Skip to content

Instantly share code, notes, and snippets.

@savolla
Created October 8, 2018 11:41
Show Gist options
  • Save savolla/fd7cf02e0fb89e20aa172a67e20f5e16 to your computer and use it in GitHub Desktop.
Save savolla/fd7cf02e0fb89e20aa172a67e20f5e16 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
DEFAULT_SESSION='i3 --shmlog-size 0'
# 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
exec i3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment