diff --git a/autostart/20_dunst.sh b/autostart/20_dunst.sh new file mode 100755 index 0000000..4a0ed7b --- /dev/null +++ b/autostart/20_dunst.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +dunst & diff --git a/autostart/20_screen.sh b/autostart/20_screen.sh index a0c865f..f0d935e 100755 --- a/autostart/20_screen.sh +++ b/autostart/20_screen.sh @@ -1,12 +1,11 @@ #!/usr/bin/env bash -printf '%s\n' "execute xautorandr" >>"$LOGFILE" +printf '%s\n' "start compton" +compton --backend xrender --vsync opengl & -xautorandr & +printf '%s\n' "disable screen blanking" +xset -dpms & +xset s off & -printf '%s\n' "start compton" >>"$LOGFILE" -compton --backend glx --vsync opengl & - -printf '%s\n' "disable screen blanking" >>"$LOGFILE" -xset -dpms & &>> $LOGFILE -xset s off & &>> $LOGFILE +printf '%s\n' "disable wakeup when lid switched" +grep "^${ACPI_LID_NAME}.*enabled" /proc/acpi/wakeup && echo " ${ACPI_LID_NAME}" | sudo tee /proc/acpi/wakeup diff --git a/autostart/20_xresources.sh b/autostart/20_xresources.sh index 9e586f7..f55a194 100755 --- a/autostart/20_xresources.sh +++ b/autostart/20_xresources.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -printf '%s' "parsing .Xresources" >>"$LOGFILE" -xrdb -merge -I${HOME} ~/.Xresources &>> $LOGFILE +printf '%s' "parsing .Xresources" +xrdb -merge -I${HOME} ~/.Xresources diff --git a/autostart/30_audio.sh b/autostart/30_audio.sh index dfa8d91..73d307c 100755 --- a/autostart/30_audio.sh +++ b/autostart/30_audio.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -printf '%s' "starting pulseaudio" >>"$LOGFILE" +printf '%s' "starting pulseaudio" pulseaudio --start diff --git a/autostart/30_keyboard.sh b/autostart/30_keyboard.sh index a984270..a763bbd 100755 --- a/autostart/30_keyboard.sh +++ b/autostart/30_keyboard.sh @@ -6,7 +6,7 @@ keyboard_repeat_delay=150 keyboard_repeat_speed=50 printf '%s' "setting keyboard layout" >>"$LOGFILE" -setxkbmap -layout "$keyboard_layout" -variant "$keyboard_variant" & &>> $LOGFILE +setxkbmap -layout "$keyboard_layout" -variant "$keyboard_variant" & printf '%s' "setting key repeat delay" >>"$LOGFILE" -xset r rate "$keyboard_repeat_delay" "$keyboard_repeat_speed" & &>> $LOGFILE +xset r rate "$keyboard_repeat_delay" "$keyboard_repeat_speed" & diff --git a/autostart/30_touchpad.sh b/autostart/30_touchpad.sh index c6860a3..771fcf5 100755 --- a/autostart/30_touchpad.sh +++ b/autostart/30_touchpad.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -printf '%s' "configuring synclient" >>"$LOGFILE" +printf '%s' "configuring synclient" synclient VertEdgeScroll=0 synclient VertTwoFingerScroll=1 synclient MaxSpeed=2.2 diff --git a/autostart/40_wallpaper.sh b/autostart/40_wallpaper.sh index b1ebd94..7627f84 100755 --- a/autostart/40_wallpaper.sh +++ b/autostart/40_wallpaper.sh @@ -2,9 +2,7 @@ wallpaper="$LIBDIR/wallpaper/current" -printf '%s' "setting wallpaper" >>"$LOGFILE" -{ - feh --bg-scale "${wallpaper}" - sleep 10 - feh --bg-scale "${wallpaper}" -} & &>> $LOGFILE +printf '%s' "setting wallpaper" +feh --bg-scale "${wallpaper}" +sleep 10 +feh --bg-scale "${wallpaper}" diff --git a/autostart/50_network.sh b/autostart/50_network.sh index 78ec1b6..f4c8873 100755 --- a/autostart/50_network.sh +++ b/autostart/50_network.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -printf '%s' "starting network tray application" >>"$LOGFILE" -nm-applet & &>> $LOGFILE +printf '%s' "starting network tray application" +nm-applet & diff --git a/autostart/50_pasystray.sh b/autostart/50_pasystray.sh index 8487958..0a641c3 100755 --- a/autostart/50_pasystray.sh +++ b/autostart/50_pasystray.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -printf '%s' "starting pasystray" >>"$LOGFILE" -pasystray & &>> $LOGFILE +printf '%s' "starting pasystray" +pasystray & diff --git a/autostart/50_redshift.sh b/autostart/50_redshift.sh index fd5cc43..9b79650 100755 --- a/autostart/50_redshift.sh +++ b/autostart/50_redshift.sh @@ -4,6 +4,6 @@ redshift_lat_long="49.5:11" redshift_colortemp="6000:3300" -printf '%s' "starting redshift-gtk" >>"$LOGFILE" -redshift-gtk -b 1 -l "$redshift_lat_long" -t "$redshift_colortemp" & &>> "$LOGFILE" +printf '%s' "starting redshift-gtk" +redshift-gtk -b 1 -l "$redshift_lat_long" -t "$redshift_colortemp" & printf '%s' $! > "$RUNDIR"/redshift.${XDG_SESSION_ID}.pid diff --git a/x/xinitrc b/x/xinitrc index 95347e8..5bdbcc9 100644 --- a/x/xinitrc +++ b/x/xinitrc @@ -22,16 +22,20 @@ start_wm() { } autostart() { - if [[ -d "$HOME/.autostart" ]] ; then + if [ -d "$HOME/.autostart" ] ; then log "Looking for autostart files." for f in "$HOME/.autostart/"*.sh ; do - if [[ -x "$f" ]] ; then + if [ -x "$f" ] ; then log "Executing autostart file \"$f\"" - . "$f" + "$f" >>"${LOGFILE}" 2>&1 fi done fi } +exec >> "$LOGFILE" 2>&1 +set -x +log "the" autostart +log "fuck" start_wm diff --git a/zsh/zprofile b/zsh/zprofile index fac6bbc..d7f3ed8 100644 --- a/zsh/zprofile +++ b/zsh/zprofile @@ -41,6 +41,8 @@ export GOPATH=~/dev/go export PATH=$PATH:$(go env GOPATH)/bin +export ACPI_LID_NAME=LID + # Start the gpg-agent if not already running if ! pgrep -x --uid "${USER}" gpg-agent >/dev/null 2>&1; then eval $(gpg-agent --daemon --sh)