forked from Shinonome/caelestia-cli
shell: start shell if no args
Also pip daemon log started
This commit is contained in:
@@ -5,15 +5,17 @@ cd (dirname (realpath (status filename))) || exit
|
|||||||
. ./util.fish
|
. ./util.fish
|
||||||
|
|
||||||
if test "$argv[1]" = shell
|
if test "$argv[1]" = shell
|
||||||
if contains 'caelestia' (astal -l)
|
# Start shell if no args
|
||||||
if test -n "$argv[2..]"
|
if test -z "$argv[2..]"
|
||||||
|
set -q CAELESTIA_SHELL_DIR && set shell_dir $CAELESTIA_SHELL_DIR || set shell_dir ~/.config/caelestia/shell
|
||||||
|
$shell_dir/run.fish
|
||||||
|
else
|
||||||
|
if contains 'caelestia' (astal -l)
|
||||||
log "Sent command '$argv[2..]' to shell"
|
log "Sent command '$argv[2..]' to shell"
|
||||||
astal -i caelestia $argv[2..]
|
astal -i caelestia $argv[2..]
|
||||||
else
|
else
|
||||||
warn 'No args given, ignoring'
|
warn 'Shell unavailable'
|
||||||
end
|
end
|
||||||
else
|
|
||||||
warn 'Shell unavailable'
|
|
||||||
end
|
end
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
@@ -45,7 +47,7 @@ echo
|
|||||||
echo 'COMMAND := help | shell | workspace-action | change-wallpaper'
|
echo 'COMMAND := help | shell | workspace-action | change-wallpaper'
|
||||||
echo
|
echo
|
||||||
echo ' help: show this help message'
|
echo ' help: show this help message'
|
||||||
echo ' shell: send a message to the shell'
|
echo ' shell: start the shell or message it'
|
||||||
echo ' screenshot: take a screenshot'
|
echo ' screenshot: take a screenshot'
|
||||||
echo ' workspace-action: execute a Hyprland workspace dispatcher in the current group'
|
echo ' workspace-action: execute a Hyprland workspace dispatcher in the current group'
|
||||||
echo ' change-wallpaper: change the wallpaper'
|
echo ' change-wallpaper: change the wallpaper'
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ function handle-window -a address workspace
|
|||||||
end
|
end
|
||||||
|
|
||||||
if set -q _flag_d
|
if set -q _flag_d
|
||||||
|
log 'Daemon started'
|
||||||
socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read line
|
socat -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock | while read line
|
||||||
switch $line
|
switch $line
|
||||||
case 'openwindow*'
|
case 'openwindow*'
|
||||||
|
|||||||
Reference in New Issue
Block a user