#!/bin/bash
setxkbmap -option ctrl:swapcaps -option tilde:swapescape
source ~/.profile
picom -b
~/.fehbg
xbindkeys -f $HOME/backups/configs/xbindkeysrc
protonmail-bridge --no-window --noninteractive &
( mru update; mru updatedirs ) &

# relaunch DWM if the binary changes, otherwise bail
csum=$(sha1sum $(which dwm))
new_csum=""
while true
do
	if [ "$csum" != "$new_csum"  ]
	then
		csum=$new_csum
		dwm-statusbar &
		dwm
	else
		exit 0
	fi
	new_csum=$(sha1sum $(which dwm))
	sleep 0.5
done