diff --git a/.local/bin/logwrap b/.local/bin/logwrap index 964781f24..aac451ac7 100755 --- a/.local/bin/logwrap +++ b/.local/bin/logwrap @@ -1,4 +1,5 @@ #!/bin/sh +# WARN: this will clobber logfiles LOGFILE="${LOGFILE:-${HOME}/.local/log/${1}.log}" BOLD="$(tput bold)" @@ -8,13 +9,13 @@ NC="$(tput sgr0)" infolog() { while IFS= read -r line; do - echo "[$(date +%X)][${BOLD}${GREEN}INF${NC}][$1] $line" >>"${LOGFILE}" + echo "[$(date +%X)][${BOLD}${GREEN}INF${NC}][$1] $line" >"${LOGFILE}" done } errorlog() { while IFS= read -r line; do - echo "[$(date +%X)][${BOLD}${RED}ERR${NC}][$1] $line" >>"${LOGFILE}" + echo "[$(date +%X)][${BOLD}${RED}ERR${NC}][$1] $line" >"${LOGFILE}" done } diff --git a/.local/libexec/dwm/autostart.sh b/.local/libexec/dwm/autostart.sh index 9bc5a0de1..71a7b009f 100755 --- a/.local/libexec/dwm/autostart.sh +++ b/.local/libexec/dwm/autostart.sh @@ -5,16 +5,6 @@ start() { pidof -sx "$1" || "$@" & } -remaps -qd -xwallpaper --zoom "$XDG_DATA_HOME/bg" -unclutter -noevents & - -start gpgconf --launch gpg-agent -start dwmblocks -start picom -start pipewire -start dunst - # Set up xsecurelock xset s 300 env \ @@ -35,8 +25,15 @@ env \ XSECURELOCK_SHOW_HOSTNAME=1 \ xss-lock -n /usr/libexec/xsecurelock/dimmer -l -- sh -c "xsecurelock -- playerctl pause || kill -9 -1" & -# Run host autostart [ -r "$XDG_CONFIG_HOME/dwm/host.sh" ] && "$XDG_CONFIG_HOME/dwm/host.sh" & -# Check for updates -checkup & +xwallpaper --zoom "$XDG_DATA_HOME/bg" +remaps -qd + +start unclutter -noevents & +start gpgconf --launch gpg-agent +start dwmblocks +start picom +start pipewire +start dunst +start checkup