dotfiles/x/xinitrc

78 lines
1.2 KiB
Text
Raw Normal View History

2022-05-03 21:26:33 +01:00
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
#### Custom ########
# Set external monitor config
2022-05-15 13:28:44 +01:00
if [[ "$(xrandr | awk '/^VGA/ { print $2 }')" == "connected" ]]; then
xrandr --output VGA1 --primary --above LVDS1
elif [[ "$(xrandr | awk '/^DP1/ { print $2 }')" == "connected" ]];then
xrandr --output DP1 --primary --above LVDS1
else :
fi
# xrandr --output VGA1 --primary --above LVDS1
# xrandr --output DP1 --primary --above LVDS1
#source "{$HOME}/bash_scripts/connect_monitors.sh"
2022-05-03 21:26:33 +01:00
# Set UK keyboard
setxkbmap gb
# Set custom keybindings
xmodmap ~/.Xmodmap
2022-05-09 09:59:10 +01:00
# Set background
2022-05-14 13:36:12 +01:00
feh --bg-fill /home/thomas/wallpapers/alien-blank.png
2022-05-09 09:59:10 +01:00
2022-05-03 21:26:33 +01:00
# Start i3 window manager
exec i3