diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc index cd4b9ade4..1a069d93b 100755 --- a/.config/X11/xinitrc +++ b/.config/X11/xinitrc @@ -3,16 +3,6 @@ exec dbus-run-session -- sh -c ' X11_CONFIG="$XDG_CONFIG_HOME/X11" -SESSIONFILES=$(run-parts --list "$X11_CONFIG/xsession.d") - -if [ -n "$SESSIONFILES" ]; then - set +e - for SESSIONFILE in $SESSIONFILES; do - echo "Executing $SESSIONFILE" - $SESSIONFILE - done - set -e -fi echo "Sourcing $X11_CONFIG/xprofile" @@ -20,9 +10,10 @@ echo "Sourcing $X11_CONFIG/xprofile" echo $DBUS_SESSION_BUS_ADDRESS > $XDG_STATE_HOME/dbus_session_bus_address -echo "Starting DWM with PATH='$PATH:$HOME'" +echo "Starting DWM" dwm +# /home/luca/Documents/code/desktop/dwm-custom/pkg/usr/bin/dwm echo "Exited DWM, Killing $(jobs -p | awk "{print \$3}")" diff --git a/.config/X11/xsession.d/70xsecurelock b/.config/X11/xsession.d/70xsecurelock deleted file mode 100755 index fefbaa717..000000000 --- a/.config/X11/xsession.d/70xsecurelock +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -xset s 300 - -env \ - XSECURELOCK_AUTH_BACKGROUND_COLOR="#24283b" \ - XSECURELOCK_AUTH_FOREGROUND_COLOR="#c0caf5" \ - XSECURELOCK_AUTH_WARNING_COLOR="#f7768e" \ - XSECURELOCK_BACKGROUND_COLOR="#15161E" \ - XSECURELOCK_DATETIME_FORMAT="%d.%m.%Y %H:%M" \ - XSECURELOCK_PASSWORD_PROMPT="time_hex" \ - XSECURELOCK_AUTH_TIMEOUT=5 \ - XSECURELOCK_BLANK_TIMEOUT=30 \ - XSECURELOCK_BLANK_DPMS_STATE="off" \ - XSECURELOCK_BURNIN_MITIGATION=0 \ - XSECURELOCK_DIM_FPS=60 \ - XSECURELOCK_SHOW_DATETIME=1 \ - XSECURELOCK_SAVER="/usr/libexec/xscreensaver/cubicgrid" \ - XSECURELOCK_SHOW_USERNAME=1 \ - XSECURELOCK_SHOW_HOSTNAME=1 \ - xss-lock -n /usr/libexec/xsecurelock/dimmer -l -- \ - sh -c "xsecurelock -- sh -c 'playerctl pause; gpg-connect-agent --noautostart reloadagent /bye' || kill -9 -1" & diff --git a/.config/X11/xsession.d/80autostart b/.config/X11/xsession.d/80autostart deleted file mode 100755 index 63f14316f..000000000 --- a/.config/X11/xsession.d/80autostart +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -start() { - pidof -sx "$1" || "$@" >"${HOME}/.local/log/${1}.log" 2>&1 & -} - -start xwallpaper --zoom "${XDG_DATA_HOME}/bg" -start pipewire -start remaps -qd -start checkup -start playerctld daemon -start picom -start unclutter -noevents -start dunst -start syncthingtray -start system-config-printer-applet - -start "$HOME/.local/libexec/daemons/remapd" -start env PATH="$HOME/.local/libexec/statusbar:$PATH" dwmblocks diff --git a/.local/bin/logwrap b/.local/bin/logwrap new file mode 100755 index 000000000..964781f24 --- /dev/null +++ b/.local/bin/logwrap @@ -0,0 +1,31 @@ +#!/bin/sh + +LOGFILE="${LOGFILE:-${HOME}/.local/log/${1}.log}" +BOLD="$(tput bold)" +RED="$(tput setaf 1)" +GREEN="$(tput setaf 2)" +NC="$(tput sgr0)" + +infolog() { + while IFS= read -r line; do + 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}" + done +} + +start() { + stdout="$XDG_RUNTIME_DIR/dwm-stdout" + stderr="$XDG_RUNTIME_DIR/dwm-stderr" + [ -p "$stdout" ] || mkfifo "$stdout" + [ -p "$stderr" ] || mkfifo "$stderr" + cat <"$stdout" | infolog "$1" & + cat <"$stderr" | errorlog "$1" & + pidof -sx "$1" || "$@" >"$stdout" 2>"$stderr" +} + +start "$@" diff --git a/.local/libexec/dwm/autostart.sh b/.local/libexec/dwm/autostart.sh index a6b79daa2..dff6eea71 100755 --- a/.local/libexec/dwm/autostart.sh +++ b/.local/libexec/dwm/autostart.sh @@ -1,32 +1,8 @@ #!/bin/sh # This script is executed by DWM on start. -LOGFILE="${LOGFILE:-${HOME}/.local/log/${1}.log}" -BOLD="$(tput bold)" -RED="$(tput setaf 1)" -GREEN="$(tput setaf 2)" -NC="$(tput sgr0)" - -infolog() { - while IFS= read -r line; do - 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}" - done -} - start() { - stdout="$XDG_RUNTIME_DIR/dwm-stdout" - stderr="$XDG_RUNTIME_DIR/dwm-stderr" - [ -p "$stdout" ] || mkfifo "$stdout" - [ -p "$stderr" ] || mkfifo "$stderr" - cat <"$stdout" | infolog "$1" & - cat <"$stderr" | errorlog "$1" & - pidof -sx "$1" || "$@" >"$stdout" 2>"$stderr" + pidof -sx "$1" || "$@" & } remaps -qd