diff --git a/suckless/config/dwm/autostart b/suckless/config/dwm/autostart index 98b36d7..7fa2bb2 100755 --- a/suckless/config/dwm/autostart +++ b/suckless/config/dwm/autostart @@ -13,49 +13,23 @@ $HOME/.config/dwm/statusbar xset s off xset dpms 300 300 300 killall xss-lock -xss-lock (which slock) & +xss-lock $(which slock) & # start network applet pgrep -x nm-applet || nm-applet & # start bluetooth applet -if which blueman-applet - pgrep -x blueman-applet || blueman-applet & -end +which blueman-applet && ! pgrep -x blueman-applet || blueman-applet & # start screenshot tool -if which flameshot - pgrep -x flameshot || flameshot & -end +which flameshot && ! pgrep -x flameshot && flameshot & # start input method -#pgrep -x fcitx || fcitx & pgrep -x ibus-daemon || ibus-daemon -drx & # restart wallpaper nitrogen --restore -# start password manager -#pgrep -x keepassxc || keepassxc & - -# start a terminal with tmux -#if not xdotool search --onlyvisible --class term && not xdotool search --onlyvisible --class Alacritty - #if tmux has-session -t 0 - #st -c term -n autostart -e tmux a -t 0 & - ##alacritty --class autostart,term -e tmux a -t 0 & - #else - #st -c term -n autostart -e tmux new -s 0 & - ##alacritty --class autostart,term -e tmux new -s 0 & - #end -#end - # start nextcloud -#if which nextcloud - #if not pgrep -x nextcloud - #nextcloud & - #while not xdotool search --onlyvisible --name Nextcloud - #sleep 0.5 - #end - #xdotool windowclose (xdotool search --onlyvisible --name Nextcloud) - #end -#end +pgrep -x nextcloud || nextcloud & + diff --git a/suckless/config/dwm/statusbar b/suckless/config/dwm/statusbar index 53c5daa..cb18ffa 100755 --- a/suckless/config/dwm/statusbar +++ b/suckless/config/dwm/statusbar @@ -115,8 +115,9 @@ start() { } restart() { - pkill -f 'dwmbar loop' - $0 loop & + FP=$(readlink -f $0) + pkill -f "$FP loop" + $FP loop & } if [ "$1" = "loop" ]; then diff --git a/suckless/install.sh b/suckless/install.sh index ed78898..13e7788 100755 --- a/suckless/install.sh +++ b/suckless/install.sh @@ -82,5 +82,5 @@ EOT [[ -L $XDG_CONFIG_HOME/dwm/autostart ]] && rm $XDG_CONFIG_HOME/dwm/autostart mkdir -p $XDG_CONFIG_HOME/dwm cp $DIR/config/dwm/autostart $XDG_CONFIG_HOME/dwm/autostart -lnsf $DIR/config/dwm/dwmbar $XDG_CONFIG_HOME/dwm/dwmbar +lnsf $DIR/config/dwm/statusbar $XDG_CONFIG_HOME/dwm/statusbar lnsf $DIR/config/autorandr/postswitch $XDG_CONFIG_HOME/autorandr/postswitch