start i3 only once after the computer is started

if the user exited i3 and logged out then logged in, it's up to the user
to start i3 again
This commit is contained in:
Mohammad Rasim 2019-07-29 22:41:03 +03:00
parent dcd68dac0d
commit eb956674c4
No known key found for this signature in database
GPG Key ID: 4AFC78A385397206

View File

@ -31,7 +31,7 @@ mpd >/dev/null 2>&1 &
echo "$0" | grep "bash$" >/dev/null && [ -f ~/.bashrc ] && source "$HOME/.bashrc"
# Start graphical server if i3 not already running.
[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x i3 >/dev/null && exec startx
[ "$(tty)" = "/dev/tty1" ] && ! pgrep -x i3 >/dev/null && [ ! -e /tmp/i3startedonce ] && touch /tmp/i3startedonce && exec startx
# Switch escape and caps if tty:
sudo -n loadkeys ~/.local/bin/ttymaps.kmap 2>/dev/null