From 99fab93c754172d8f443eadfe4c23b6e121576db Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Mon, 21 Sep 2020 11:38:47 +0800 Subject: [PATCH] [bugfix] dwm autostart script should be copied instead symlinked --- dunst/config/launch.sh | 0 suckless/config/dwm/autostart | 41 ++++++++++++++++------------------- suckless/install.sh | 4 +++- 3 files changed, 22 insertions(+), 23 deletions(-) mode change 100644 => 100755 dunst/config/launch.sh diff --git a/dunst/config/launch.sh b/dunst/config/launch.sh old mode 100644 new mode 100755 diff --git a/suckless/config/dwm/autostart b/suckless/config/dwm/autostart index eafaf67..a8c0b27 100755 --- a/suckless/config/dwm/autostart +++ b/suckless/config/dwm/autostart @@ -34,29 +34,26 @@ pgrep -x ibus-daemon || ibus-daemon -drx & nitrogen --restore # start password manager -pgrep -x keepassxc || keepassxc & +#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 browser -pgrep -x chromium || chromium & +#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 +#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 diff --git a/suckless/install.sh b/suckless/install.sh index 3536976..c90cba9 100755 --- a/suckless/install.sh +++ b/suckless/install.sh @@ -87,6 +87,8 @@ EOT # config dwm -lnsf $DIR/config/dwm/autostart $XDG_CONFIG_HOME/dwm/autostart +[[ -L $XDG_CONFIG_HOME/dwm/autostart ]] && rm $XDG_CONFIG_HOME/dwm/autostart +mkdir -p $DIR/config/dwm +cp $DIR/config/dwm/autostart $XDG_CONFIG_HOME/dwm/autostart lnsf $DIR/config/dwm/dwmbar $XDG_CONFIG_HOME/dwm/dwmbar lnsf $DIR/config/autorandr/postswitch $XDG_CONFIG_HOME/autorandr/postswitch