diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-17 16:32:26 +1100 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-01-17 16:32:26 +1100 |
| commit | 2185b60b5842c5f2d87d232cc3dd4546045947a6 (patch) | |
| tree | 9d0545c57ddd88ae4fd1f8eed814ce272a549907 /main.fish | |
| parent | Initial commit (diff) | |
| download | caelestia-cli-2185b60b5842c5f2d87d232cc3dd4546045947a6.tar.gz caelestia-cli-2185b60b5842c5f2d87d232cc3dd4546045947a6.tar.bz2 caelestia-cli-2185b60b5842c5f2d87d232cc3dd4546045947a6.zip | |
main: message shell
Diffstat (limited to 'main.fish')
| -rwxr-xr-x | main.fish | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -4,15 +4,31 @@ cd (dirname (status filename)) || exit . ./util.fish +if test "$argv[1]" = shell + if contains 'caelestia' (astal -l) + if test -n "$argv[2..]" + log "Sent command '$argv[2..]' to shell" + astal -i caelestia $argv[2..] + else + warn 'No args given, ignoring' + end + else + warn 'Shell unavailable' + end + exit +end + if test "$argv[1]" = change-wallpaper ./change-wallpaper.fish $argv[2..] + exit end test "$argv[1]" != help && error "Unknown command: $argv[1]" echo 'Usage: caelestia COMMAND' echo -echo 'COMMAND := help | change-wallpaper' +echo 'COMMAND := help | shell | change-wallpaper' echo echo ' help: show this help message' +echo ' shell: send a message to the shell' echo ' change-wallpaper: change the wallpaper' |