diff options
| author | Akshay Nair <phenax5@gmail.com> | 2023-10-15 00:51:15 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2023-10-15 00:51:15 +0530 |
| commit | 32d0bd79637cdc6400798bc033c8e2149ec4c5a6 (patch) | |
| tree | df6f25cb31bb2b93a1af5104b613c96013b823b9 /packages/dwm/autostart.sh | |
| parent | 4eb5f01f1f7a11527be56bd8a8afecd31d640b15 (diff) | |
| download | nixos-config-32d0bd79637cdc6400798bc033c8e2149ec4c5a6.tar.gz nixos-config-32d0bd79637cdc6400798bc033c8e2149ec4c5a6.zip | |
config sync
Diffstat (limited to 'packages/dwm/autostart.sh')
| -rwxr-xr-x | packages/dwm/autostart.sh | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/packages/dwm/autostart.sh b/packages/dwm/autostart.sh index 5421000..65a02ee 100755 --- a/packages/dwm/autostart.sh +++ b/packages/dwm/autostart.sh @@ -26,9 +26,15 @@ once() { # Kill previous instance and run again run() { local name=$1; shift; - [[ ! -z "$name" ]] && pkill "$name" && sleep 0.05; + [[ ! -z "$name" ]] && pkill "$name" && sleep 0.1; is_kill || $@ & } + +spew() { + local name=$1; shift; + [[ ! -z "$name" ]] && pkill "$name" && sleep 0.1; + is_kill || setsid -f "$@" & +} # }}} @@ -36,29 +42,29 @@ run() { echo "[Autostart]: Running daemons"; # Key daemon - run "shotkey" shotkey; + spew "shotkey" shotkey; # Wallpaper run "" ~/.fehbg; - # Dwm blocks status text - # run "dwmblocks" dwmblocks; - # Notification daemon - run "dunst" dunst -config ~/.config/dunst/dunstrc; + spew "dunst" dunst -config ~/.config/dunst/dunstrc; # Compositor - run "picom" picom --experimental-backends --config ~/.config/picom.conf; - - # Cron jobs - #run "crond" crond -n -f ~/.config/crontab/crontab; + spew "picom" picom --config ~/.config/picom.conf; # Scheduler - run "remind" remind -k"notify-send -a reminder %s" -z10 $REMINDER_FILE; + spew "remind" remind -k='notify-send -a reminder %s' -z10 "$REMINDER_FILE"; # Battery watcher run "" ~/scripts/battery-watch.sh start; + # Dwm blocks status text + # run "dwmblocks" dwmblocks; + + # Cron jobs + #run "crond" crond -n -f ~/.config/crontab/crontab; + # Disk automount #once "udiskie" ~/.bin/with_zsh udiskie; @@ -88,7 +94,9 @@ echo "[Autostart]: Checking applications"; #on_startup sensible-browser; applications() { - #sleep 0.5; + sleep 0.5; + + run "dwmblocks" dwmblocks; #focus_tag 9; #on_startup :today; |
