commit 8d524f95a18bc4a4c9376b9a1682f453a66efa71 parent 84f866cc92ccc19079d08784d1b909d2fae1665e Author: Matt Fehrenbach <m.fehrenbach@pm.me> Date: Sat, 26 Dec 2020 17:16:52 +0000 Added X config files Diffstat:
| A | .config/X11/xinitrc | | | 15 | +++++++++++++++ |
| A | .config/X11/xprofile | | | 24 | ++++++++++++++++++++++++ |
2 files changed, 39 insertions(+), 0 deletions(-)
diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc @@ -0,0 +1,15 @@ +#!/bin/sh + +# xinitrc runs automatically when you run startx. + +# There are some small but important commands that need to be run when we start +# the graphical environment. There is a link to this file in ~/.xprofile +# because that file is run automatically if someone uses a display manager +# (login screen) and so they are needed there. To prevent doubling up commands, +# I source them here with the line below. + +if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" ]; then + . "${XDG_CONFIG_HOME:-$HOME/.config}/x11/xprofile" +else + . "$HOME/.xprofile" +fi diff --git a/.config/X11/xprofile b/.config/X11/xprofile @@ -0,0 +1,24 @@ +#!/bin/sh + +userresources=${XDG_CONFIG_HOME:-$HOME/.config}/X11/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