toggles: fix spawn-or-move + todo toggle

This commit is contained in:
2 * r + 2 * t
2025-01-31 18:16:04 +11:00
parent e84d467d34
commit 9f29e9e676
4 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ complete -c caelestia -n $not_seen -a 'previous' -d 'Go to previous song'
complete -c caelestia -n $not_seen -a 'stop' -d 'Stop media'
# Toggles
set -l commands communication music specialws sysmon
set -l commands communication music specialws sysmon todo
complete -c caelestia -n "$seen toggle && not $seen $commands" -a "$commands"
# Workspace action
+1 -1
View File
@@ -21,7 +21,7 @@ if test "$argv[1]" = shell
end
if test "$argv[1]" = toggle
set -l valid_toggles communication music sysmon specialws
set -l valid_toggles communication music sysmon specialws todo
contains -- "$argv[2]" $valid_toggles && $src/toggles/$argv[2].fish || error "Invalid toggle: $argv[2]"
exit
end
+7
View File
@@ -0,0 +1,7 @@
#!/bin/fish
. (dirname (status filename))/util.fish
spawn-or-move '.class == "Todoist"' todo todoist
hyprctl dispatch togglespecialworkspace todo
+1 -1
View File
@@ -13,7 +13,7 @@ function spawn-client -a selector
if test $stat != 0
uwsm app -- $argv[2..] & disown
end
return $stat
test $stat != 0 # Exit 1 if already exists
end
function spawn-or-move -a selector -a workspace