aboutsummaryrefslogtreecommitdiffstats
path: root/config/ags/variables.js
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2024-05-05 00:12:26 +0900
committerGitHub <noreply@github.com>2024-05-05 00:12:26 +0900
commit962a09dd0088cd01cbf3e678c4c500ff5087e4e4 (patch)
tree92f8977ed345ba8a39141ff7d36f423efd46f43a /config/ags/variables.js
parente27bc1e75280f02a0798e7150d7e7c775ee1aff6 (diff)
parente29068df76f763a999b9013ece32c8adb299b29f (diff)
Merge branch 'experimental-ags' into main
Diffstat (limited to 'config/ags/variables.js')
-rw-r--r--config/ags/variables.js21
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';
+ }
+}
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage