]> git.rmz.io Git - dotfiles.git/commitdiff
xinitrc: initial commit
authorSamir Benmendil <me@rmz.io>
Tue, 19 Jul 2016 22:38:11 +0000 (23:38 +0100)
committerSamir Benmendil <me@rmz.io>
Tue, 19 Jul 2016 22:45:46 +0000 (23:45 +0100)
xinitrc [new file with mode: 0644]

diff --git a/xinitrc b/xinitrc
new file mode 100644 (file)
index 0000000..f79ee4a
--- /dev/null
+++ b/xinitrc
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+userprofile=$HOME/.xprofile
+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
+
+if [ -f "$userprofile" ]; then
+    source "$userprofile"
+fi
+
+exec awesome