diff --git a/.config/X11/xsession.d/90auto-start b/.config/X11/xsession.d/90auto-start index 23ce5313..3a1d5da2 100644 --- a/.config/X11/xsession.d/90auto-start +++ b/.config/X11/xsession.d/90auto-start @@ -4,6 +4,8 @@ start() { pidof -s $1 || $@ >/dev/null 2>&1 & } +remaps +xwallpaper --zoom "${XDG_DATA_HOME:-$HOME/.local/share/}/bg" start playerctld daemon start picom start unclutter @@ -11,5 +13,3 @@ start dunst start pipewire start dwmblocks start remapd -start setbg -start xwallpaper --zoom "${XDG_DATA_HOME:-$HOME/.local/share/}/bg" diff --git a/.local/bin/daemons/remapd b/.local/bin/daemons/remapd index e885ad1e..4acc7140 100755 --- a/.local/bin/daemons/remapd +++ b/.local/bin/daemons/remapd @@ -1,6 +1,8 @@ #!/bin/sh +trap "rm -f /tmp/udev_pipe" HUP INT QUIT ILL TRAP BUS TERM +mkfifo -m 600 /tmp/udev_pipe +udevadm monitor -u -t seat -s input -s usb >> /tmp/udev_pipe & while :; do - dmesg -W -f kern | grep "input:" -q - sleep 1 + grep -q "add" /tmp/udev_pipe && grep -q " bind" /tmp/udev_pipe remaps us:dvorak done diff --git a/.local/bin/statusbar/sb-playerctl b/.local/bin/statusbar/sb-playerctl index 0cf08529..4a76665f 100755 --- a/.local/bin/statusbar/sb-playerctl +++ b/.local/bin/statusbar/sb-playerctl @@ -2,7 +2,7 @@ pidof -x sbd-playerctl >/dev/null 2>&1 || sbd-playerctl >/dev/null 2>&1 & [ "$(playerctl status 2>&1)" = "No players found" ] && echo ""ﱙ && exit 1 # song="$(playerctl metadata xesam:artist) - $(playerctl metadata xesam:title)" -song="$(playerctl metadata xesam:title)" +song="$(playerctl metadata xesam:title) - $(playerctl metadata xesam:artist)" [ ${#song} -gt 35 ] && song="$(printf %.35s "$song")…" icon=$(playerctl status | sed "s/Playing//;s/Paused//;") echo "$icon $song"