diff options
| author | Ja.KooLit <jimmielovejay@gmail.com> | 2024-05-09 00:35:23 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-09 00:35:23 +0900 |
| commit | 472661662b29ec932f017e44a36a63b0dc61ac38 (patch) | |
| tree | 2217d9d7a5168d2eb367f0b486c6a3238b769b24 /config/ags/variables.js | |
| parent | 8e9b6f015038ae76ce68035d6aee7ff88a5be06c (diff) | |
| parent | 25cbdc6a01177a5da063458438cc9ea10271ec9f (diff) | |
Merge pull request #247 from JaKooLit/development
Development to Main
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'; + } +} |
