if can sudo loadkeys, remap caps/esc in tty

This commit is contained in:
Luke Smith 2018-08-27 12:50:31 -04:00
parent 98abc09217
commit 969070e01c
2 changed files with 7 additions and 0 deletions

View file

@ -17,3 +17,8 @@ export BIB="$HOME/Documents/LaTeX/uni.bib"
if [[ "$(tty)" = "/dev/tty1" ]]; then
pgrep -x i3 || exec startx
fi
# Switch escape and caps and use wal colors if tty:
sudo -n loadkeys ~/.scripts/ttymaps.kmap 2>/dev/null
wal -Rn

2
.scripts/ttymaps.kmap Normal file
View file

@ -0,0 +1,2 @@
keycode 1 = Caps_Lock
keycode 58 = Escape