diff options
| author | Kiran George <kirangeorge1995@gmail.com> | 2024-04-24 22:19:05 +0530 |
|---|---|---|
| committer | Kiran George <kirangeorge1995@gmail.com> | 2024-05-04 11:00:00 +0530 |
| commit | dc9f0cd58454b4cb33a704b11e4cc8a7c6594e67 (patch) | |
| tree | 02aff524a96c620f2f603dbb45f7017256981148 /config/ags/variables.js | |
| parent | 425df5f3a17a72ba41973dedf0673bd8dd607385 (diff) | |
Added ags overview widget
Updated search iscon for overview search result suggested action
Removed excluded site from overview web search
Updated calculator icon for overview
Updated overview search action icon spacing
Added initial pywal integration to overview search and updated seach icon
Diffstat (limited to 'config/ags/variables.js')
| -rw-r--r-- | config/ags/variables.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/config/ags/variables.js b/config/ags/variables.js new file mode 100644 index 00000000..ec4aedec --- /dev/null +++ b/config/ags/variables.js @@ -0,0 +1,21 @@ +const { Gtk } = imports.gi; +import Variable from 'resource:///com/github/Aylur/ags/variable.js'; +import * as Utils from 'resource:///com/github/Aylur/ags/utils.js'; +const { exec, execAsync } = Utils; + +Gtk.IconTheme.get_default().append_search_path(`${App.configDir}/assets/icons`); + +// Screen size +export const SCREEN_WIDTH = Number(exec(`bash -c "xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1 | head -1" | awk '{print $1}'`)); +export const SCREEN_HEIGHT = Number(exec(`bash -c "xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2 | head -1" | awk '{print $1}'`)); + +// Mode switching +export const currentShellMode = Variable('normal', {}) // normal, focus +globalThis['currentMode'] = currentShellMode; +globalThis['cycleMode'] = () => { + if (currentShellMode.value === 'normal') { + currentShellMode.value = 'focus'; + } else { + currentShellMode.value = 'normal'; + } +} |
