aboutsummaryrefslogtreecommitdiffstats
path: root/config/ags/variables.js
diff options
context:
space:
mode:
authorJaKooLit <ejhay.games@gmail.com>2025-07-19 17:27:14 +0900
committerJaKooLit <ejhay.games@gmail.com>2025-07-19 17:27:14 +0900
commit3c1cc04020678b76a622a1a7a28a2c1e529f7665 (patch)
treec191782fc9e8c9eee61f64450726c77a3cae65ed /config/ags/variables.js
parentef1b52470a5fd2ec4b5b24ea6c1d56ca62c3c9fa (diff)
updated copy.sh and still added ags
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..645a5807
--- /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 "hyprctl monitors -j | jq '.[0].width / .[0].scale'"`));
+export const SCREEN_HEIGHT = Number(exec(`bash -c "hyprctl monitors -j | jq '.[0].height / .[0].scale'"`));
+
+// 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