X11:xinit: Check for commands existence
This commit is contained in:
18
.xinitrc
18
.xinitrc
@@ -34,14 +34,16 @@ unset {sys,user}{resources,modmap,xinitrcd}
|
|||||||
# Key repeat rate
|
# Key repeat rate
|
||||||
xset r rate 400 35
|
xset r rate 400 35
|
||||||
|
|
||||||
touchpad="DLL082A:01 06CB:76AF Touchpad"
|
if command -v xinput >/dev/null 2>&1; then
|
||||||
xinput set-prop "$touchpad" "libinput Tapping Enabled" 1
|
touchpad="DLL082A:01 06CB:76AF Touchpad"
|
||||||
xinput set-prop "$touchpad" "libinput Natural Scrolling Enabled" 1
|
xinput set-prop "$touchpad" "libinput Tapping Enabled" 1
|
||||||
xinput set-prop "$touchpad" "libinput Accel Speed" 0.45
|
xinput set-prop "$touchpad" "libinput Natural Scrolling Enabled" 1
|
||||||
unset touchpad
|
xinput set-prop "$touchpad" "libinput Accel Speed" 0.45
|
||||||
|
unset touchpad
|
||||||
|
fi
|
||||||
|
|
||||||
# Muted at startup
|
# Muted at startup
|
||||||
amixer -q -D pulse sset Master mute
|
! command -v amixer >/dev/null 2>&1 || amixer -q -D pulse sset Master mute
|
||||||
|
|
||||||
# Compositor
|
# Compositor
|
||||||
compositor="${XDG_CONFIG_HOME:-$HOME/.config}"/compositor/launch.sh
|
compositor="${XDG_CONFIG_HOME:-$HOME/.config}"/compositor/launch.sh
|
||||||
@@ -50,7 +52,7 @@ unset compositor
|
|||||||
|
|
||||||
# Wallpaper
|
# Wallpaper
|
||||||
wallpaper="$HOME"/pics/wallpapers/wallpaper
|
wallpaper="$HOME"/pics/wallpapers/wallpaper
|
||||||
feh --bg-scale --no-fehbg "$wallpaper"
|
! command -v feh >/dev/null 2>&1 || feh --bg-scale --no-fehbg "$wallpaper"
|
||||||
unset wallpaper
|
unset wallpaper
|
||||||
|
|
||||||
# Locker
|
# Locker
|
||||||
@@ -58,4 +60,4 @@ locker="${XDG_CONFIG_HOME:-$HOME/.config}"/locker/launch.sh
|
|||||||
[ ! -x "$locker" ] || "$locker"
|
[ ! -x "$locker" ] || "$locker"
|
||||||
unset locker
|
unset locker
|
||||||
|
|
||||||
exec i3
|
! command -v i3 >/dev/null 2>&1 || exec i3
|
||||||
|
|||||||
Reference in New Issue
Block a user