mirror of
https://github.com/caelestia-dots/cli.git
synced 2026-06-05 14:59:29 -05:00
toggles: fix spawn-or-move + todo toggle
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/fish
|
||||
|
||||
. (dirname (status filename))/util.fish
|
||||
|
||||
spawn-or-move '.class == "Todoist"' todo todoist
|
||||
|
||||
hyprctl dispatch togglespecialworkspace todo
|
||||
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user