summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2012-11-13 05:03:09 +0000
committerTim Harder <radhermit@gentoo.org>2012-11-13 05:03:09 +0000
commit9456c809ab8d216b6704cb8ab2aad0cfadbd5bb0 (patch)
treece67db23718f7e861d1fe172e8f157d42f6a6874 /x11-wm/qtile/files
parentDev channel bump. (diff)
downloadgentoo-2-9456c809ab8d216b6704cb8ab2aad0cfadbd5bb0.tar.gz
gentoo-2-9456c809ab8d216b6704cb8ab2aad0cfadbd5bb0.tar.bz2
gentoo-2-9456c809ab8d216b6704cb8ab2aad0cfadbd5bb0.zip
Initial import, ebuild by me (bug #442820).
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
Diffstat (limited to 'x11-wm/qtile/files')
-rw-r--r--x11-wm/qtile/files/qtile-session89
1 files changed, 89 insertions, 0 deletions
diff --git a/x11-wm/qtile/files/qtile-session b/x11-wm/qtile/files/qtile-session
new file mode 100644
index 000000000000..56a96ddd79ea
--- /dev/null
+++ b/x11-wm/qtile/files/qtile-session
@@ -0,0 +1,89 @@
+#!/bin/sh
+# qtile Xsession starter, based on Xsession from x11-apps/xinit
+
+# redirect errors to a file in user's home directory if we can
+for errfile in "$HOME/.qtile-errors" "${TMPDIR-/tmp}/qtile-$USER" "/tmp/qtile-$USER"
+do
+ if ( cp /dev/null "$errfile" 2> /dev/null )
+ then
+ chmod 600 "$errfile"
+ exec > "$errfile" 2>&1
+ break
+ fi
+done
+
+userresources=$HOME/.Xresources
+usermodmap=$HOME/.Xmodmap
+userxkbmap=$HOME/.Xkbmap
+
+sysresources=/etc/X11/Xresources
+sysmodmap=/etc/X11/Xmodmap
+sysxkbmap=/etc/X11/Xkbmap
+
+rh6sysresources=/etc/X11/xinit/Xresources
+rh6sysmodmap=/etc/X11/xinit/Xmodmap
+
+# merge in defaults
+if [ -f "$rh6sysresources" ]; then
+ xrdb -merge "$rh6sysresources"
+fi
+
+if [ -f "$sysresources" ]; then
+ xrdb -merge "$sysresources"
+fi
+
+if [ -f "$userresources" ]; then
+ xrdb -merge "$userresources"
+fi
+
+# merge in keymaps
+if [ -f "$sysxkbmap" ]; then
+ setxkbmap `cat "$sysxkbmap"`
+ XKB_IN_USE=yes
+fi
+
+if [ -f "$userxkbmap" ]; then
+ setxkbmap `cat "$userxkbmap"`
+ XKB_IN_USE=yes
+fi
+
+#
+# Eeek, this seems like too much magic here
+#
+if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
+ if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f /etc/X11/XF86Config ]; then
+ xkbsymbols=`sed -n -e 's/^[ ]*XkbSymbols[ ]*"\(.*\)".*$/\1/p' /etc/X11/XF86Config /etc/X11/xorg.conf`
+ if [ -n "$xkbsymbols" ]; then
+ setxkbmap -symbols "$xkbsymbols"
+ XKB_IN_USE=yes
+ fi
+ fi
+fi
+
+# xkb and xmodmap don't play nice together
+if [ -z "$XKB_IN_USE" ]; then
+ if [ -f "$rh6sysmodmap" ]; then
+ xmodmap "$rh6sysmodmap"
+ fi
+
+ if [ -f "$sysmodmap" ]; then
+ xmodmap "$sysmodmap"
+ fi
+
+ if [ -f "$usermodmap" ]; then
+ xmodmap "$usermodmap"
+ fi
+fi
+
+unset XKB_IN_USE
+
+# run all system xinitrc shell scripts.
+if [ -d /etc/X11/xinit/xinitrc.d ]; then
+ for i in /etc/X11/xinit/xinitrc.d/* ; do
+ if [ -x "$i" ]; then
+ . "$i"
+ fi
+ done
+fi
+
+exec /usr/bin/qtile