diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-14 15:42:20 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-14 15:42:20 +1000 |
| commit | b5a91d3ca57d1369d0b7b502112c4b4c9849d26c (patch) | |
| tree | 8ea45e54e0b0c826f65f54ebf82e41cb68163221 /toggles | |
| parent | feat: impl pip subcommand (diff) | |
| download | caelestia-cli-b5a91d3ca57d1369d0b7b502112c4b4c9849d26c.tar.gz caelestia-cli-b5a91d3ca57d1369d0b7b502112c4b4c9849d26c.tar.bz2 caelestia-cli-b5a91d3ca57d1369d0b7b502112c4b4c9849d26c.zip | |
internal: remove all legacy fish scripts
Diffstat (limited to 'toggles')
| -rwxr-xr-x | toggles/specialws.fish | 10 | ||||
| -rw-r--r-- | toggles/util.fish | 42 |
2 files changed, 0 insertions, 52 deletions
diff --git a/toggles/specialws.fish b/toggles/specialws.fish deleted file mode 100755 index 01fcfd7..0000000 --- a/toggles/specialws.fish +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env fish - -if ! hyprctl workspaces -j | jq -e 'first(.[] | select(.name == "special:special"))' - set activews (hyprctl activewindow -j | jq -r '.workspace.name') - string match -r -- '^special:' $activews && set togglews (string sub -s 9 $activews) || set togglews special -else - set togglews special -end - -hyprctl dispatch togglespecialworkspace $togglews diff --git a/toggles/util.fish b/toggles/util.fish deleted file mode 100644 index 3cffc15..0000000 --- a/toggles/util.fish +++ /dev/null @@ -1,42 +0,0 @@ -. (dirname (status filename))/../util.fish - -function move-client -a selector workspace - if hyprctl -j clients | jq -e 'first(.[] | select('$selector')).workspace.name != "special:'$workspace'"' > /dev/null - # Window not in correct workspace - set -l window_addr (hyprctl -j clients | jq -r 'first(.[] | select('$selector')).address') - hyprctl dispatch movetoworkspacesilent "special:$workspace,address:$window_addr" - end -end - -function spawn-client -a selector spawn - # Spawn if doesn't exist - hyprctl -j clients | jq -e "first(.[] | select($selector))" > /dev/null - set -l stat $status - if test $stat != 0 - eval "app2unit -- $spawn & disown" - end - test $stat != 0 # Exit 1 if already exists -end - -function jq-var -a op json - jq -rn --argjson json "$json" "\$json | $op" -end - -function toggle-workspace -a workspace - set -l apps (get-config "toggles.$workspace.apps") - - for i in (seq 0 (math (jq-var 'length' "$apps") - 1)) - set -l app (jq-var ".[$i]" "$apps") - set -l action (jq-var '.action' "$app") - set -l selector (jq-var '.selector' "$app") - set -l extra_cond (jq-var '.extraCond' "$app") - - test $extra_cond = null && set -l extra_cond true - if eval $extra_cond - string match -qe -- 'spawn' $action && spawn-client $selector (jq-var '.spawn' "$app") - string match -qe -- 'move' $action && move-client $selector $workspace - end - end - - hyprctl dispatch togglespecialworkspace $workspace -end |