diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-18 20:01:26 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-18 20:01:26 +0100 |
commit | fd22305dac10cfe08923dbf9a3d482da23dd2845 (patch) | |
tree | f2c3e251ef660dbc9cb7dc321b5e65c0ae98d1ee | |
parent | 84fb1be64cf47f7867d1163ec396af84cf8471b8 (diff) | |
download | dotfiles-fd22305dac10cfe08923dbf9a3d482da23dd2845.tar.gz dotfiles-fd22305dac10cfe08923dbf9a3d482da23dd2845.tar.bz2 dotfiles-fd22305dac10cfe08923dbf9a3d482da23dd2845.zip |
(Scripts)~Prefix every notify-send with script creating it
-rwxr-xr-x | Scripts/.local/scripts/alarm | 2 | ||||
-rwxr-xr-x | Scripts/.local/scripts/do_backup | 2 | ||||
-rwxr-xr-x | Scripts/.local/scripts/eselect | 10 | ||||
-rwxr-xr-x | Scripts/.local/scripts/timer | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/Scripts/.local/scripts/alarm b/Scripts/.local/scripts/alarm index f880679..7dd4621 100755 --- a/Scripts/.local/scripts/alarm +++ b/Scripts/.local/scripts/alarm @@ -23,4 +23,4 @@ end = current + duration while (time() <= end): sleep(1) -run(["notify-send", f"Alarm {name} complete"]) +run(["notify-send", f"alarm: Alarm {name} complete"]) diff --git a/Scripts/.local/scripts/do_backup b/Scripts/.local/scripts/do_backup index 0d85694..66321e3 100755 --- a/Scripts/.local/scripts/do_backup +++ b/Scripts/.local/scripts/do_backup @@ -7,9 +7,11 @@ folders="$HOME/Code $HOME/Dotfiles $HOME/Downloads $HOME/Media $HOME/Pictures $H mkdir -p $dir +notify-send "do_backup: Starting backup (stored at $dir)" for name in $folders do out_name=$dir/$(basename $name).tar.xz XZ_OPT='-T0 -9' tar -Jcvf $out_name -C $name . done +notify-send "do_backup: Finished backup" diff --git a/Scripts/.local/scripts/eselect b/Scripts/.local/scripts/eselect index 8759896..0f2d682 100755 --- a/Scripts/.local/scripts/eselect +++ b/Scripts/.local/scripts/eselect @@ -3,17 +3,17 @@ case "$(printf "new\nstop\nrestart\neshell\nmail" | dmenu -p "eserver: ")" in "restart") systemctl --user restart emacs; - notify-send "Restarted Emacs server";; + notify-send "eselect: Restarted Emacs server";; "stop") systemctl --user stop emacs; - notify-send "Halted Emacs server";; + notify-send "eselect: Halted Emacs server";; "new") - notify-send "Launching Emacs"; + notify-send "eselect: Launching Emacs"; emacsclient -c;; "eshell") - notify-send "Launching Eshell"; + notify-send "eselect: Launching Eshell"; emacsclient -c --eval '(let ((b (or (get-buffer "*eshell*") (eshell)))) (switch-to-buffer b))';; "mail") - notify-send "Launching notmuch"; + notify-send "eselect: Launching notmuch"; emacsclient -c --eval '(let ((b (or (get-buffer "*notmuch-hello*") (progn (notmuch) (get-buffer "*notmuch-hello*"))))) (switch-to-buffer b))';; esac diff --git a/Scripts/.local/scripts/timer b/Scripts/.local/scripts/timer index 84ee095..2cb61c4 100755 --- a/Scripts/.local/scripts/timer +++ b/Scripts/.local/scripts/timer @@ -8,7 +8,7 @@ def speak(text: str, volume=100, word_gap=20): system(f'espeak -a {volume} -g {word_gap} -k 20 "{text}"') def alert(text:str): - run(["notify-send", text]) + run(["notify-send", "timer: " + text]) def beep(time): system(f"play -q -n synth {time} sin 880") |