mirror of
https://github.com/caelestia-dots/cli.git
synced 2026-06-16 14:00:00 -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'
|
complete -c caelestia -n $not_seen -a 'stop' -d 'Stop media'
|
||||||
|
|
||||||
# Toggles
|
# 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"
|
complete -c caelestia -n "$seen toggle && not $seen $commands" -a "$commands"
|
||||||
|
|
||||||
# Workspace action
|
# Workspace action
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ if test "$argv[1]" = shell
|
|||||||
end
|
end
|
||||||
|
|
||||||
if test "$argv[1]" = toggle
|
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]"
|
contains -- "$argv[2]" $valid_toggles && $src/toggles/$argv[2].fish || error "Invalid toggle: $argv[2]"
|
||||||
exit
|
exit
|
||||||
end
|
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
|
if test $stat != 0
|
||||||
uwsm app -- $argv[2..] & disown
|
uwsm app -- $argv[2..] & disown
|
||||||
end
|
end
|
||||||
return $stat
|
test $stat != 0 # Exit 1 if already exists
|
||||||
end
|
end
|
||||||
|
|
||||||
function spawn-or-move -a selector -a workspace
|
function spawn-or-move -a selector -a workspace
|
||||||
|
|||||||
Reference in New Issue
Block a user