summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-03 21:41:26 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-04-03 21:41:26 +1100
commitf8a6e84aa9b9229a1b527dcd1c662c1068759dd8 (patch)
tree0893be4c5101a49dfbea6af52ad865d5e3f91481 /data
parentcompletions: add for shell toggle cmd (diff)
downloadcaelestia-cli-f8a6e84aa9b9229a1b527dcd1c662c1068759dd8.tar.gz
caelestia-cli-f8a6e84aa9b9229a1b527dcd1c662c1068759dd8.tar.bz2
caelestia-cli-f8a6e84aa9b9229a1b527dcd1c662c1068759dd8.zip
toggles: refactor to have config
Config is in $XDG_CONFIG_HOME/caelestia/scripts.json Selector is a jq selector using hyprland client data Spawn is a command passed to uwsm app Action is either spawn, move, or both Extra cond is an extra shell command to check whether to do action (for easy disabling just put false or empty action)
Diffstat (limited to 'data')
-rw-r--r--data/config.json51
1 files changed, 51 insertions, 0 deletions
diff --git a/data/config.json b/data/config.json
new file mode 100644
index 0000000..1efe9e4
--- /dev/null
+++ b/data/config.json
@@ -0,0 +1,51 @@
+{
+ "toggles": {
+ "communication": {
+ "apps": [
+ {
+ "selector": ".class == \"equibop\"",
+ "spawn": "equibop",
+ "action": "spawn move"
+ },
+ {
+ "selector": ".class == \"whatsapp\"",
+ "spawn": "firefox --name whatsapp -P whatsapp 'https://web.whatsapp.com'",
+ "action": "move",
+ "extraCond": "grep -q 'Name=whatsapp' ~/.mozilla/firefox/profiles.ini"
+ }
+ ]
+ },
+ "music": {
+ "apps": [
+ {
+ "selector": ".class == \"Spotify\" or .initialTitle == \"Spotify\" or .initialTitle == \"Spotify Free\"",
+ "spawn": "spotify-adblock.desktop",
+ "action": "spawn move"
+ },
+ {
+ "selector": ".class == \"feishin\"",
+ "spawn": "feishin",
+ "action": "move"
+ }
+ ]
+ },
+ "sysmon": {
+ "apps": [
+ {
+ "selector": ".class == \"btop\" and .title == \"btop\" and .workspace.name == \"special:sysmon\"",
+ "spawn": "foot -a 'btop' -T 'btop' -- btop",
+ "action": "spawn"
+ }
+ ]
+ },
+ "todo": {
+ "apps": [
+ {
+ "selector": ".class == \"Todoist\"",
+ "spawn": "todoist",
+ "action": "spawn move"
+ }
+ ]
+ }
+ }
+}