Check command exists before runnning in .xprofile

This commit is contained in:
Eric Teunis de Boone 2022-03-21 21:59:47 +01:00
parent 76f4f04f2e
commit 89463a215a
1 changed files with 6 additions and 2 deletions

View File

@ -8,10 +8,14 @@
[ -f ~/.Xresources ] && xrdb -merge $HOME/.Xresources
# Turn on numlock
numlockx on
if [[ $(command -v numlockx) ]]; then
numlockx on
fi
# Caps Lock works as escape key: whoever uses CapsLock?
setxkbmap -option caps:escape
if [[ $(command -v setxkbmap) ]]; then
setxkbmap -option caps:escape
fi
# Start redshift if it exists
if [[ $(command -v redshift) ]]; then