summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-05-20 01:04:08 +0100
committerSam James <sam@gentoo.org>2022-05-20 01:05:19 +0100
commitecff68f05e82355c7c82b448bf1b17fce957ed6b (patch)
treeb5423256f1e915826cf58a243f67f0f6e01b9aee /x11-wm/qtile
parentapp-emacs/package-build: bump to 3.1 (diff)
downloadgentoo-ecff68f05e82355c7c82b448bf1b17fce957ed6b.tar.gz
gentoo-ecff68f05e82355c7c82b448bf1b17fce957ed6b.tar.bz2
gentoo-ecff68f05e82355c7c82b448bf1b17fce957ed6b.zip
x11-wm/qtile: fix X session args
Closes: https://bugs.gentoo.org/846509 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'x11-wm/qtile')
-rw-r--r--x11-wm/qtile/files/qtile-session-r189
-rw-r--r--x11-wm/qtile/qtile-0.21.0-r1.ebuild (renamed from x11-wm/qtile/qtile-0.21.0.ebuild)2
2 files changed, 90 insertions, 1 deletions
diff --git a/x11-wm/qtile/files/qtile-session-r1 b/x11-wm/qtile/files/qtile-session-r1
new file mode 100644
index 000000000000..f16591c87044
--- /dev/null
+++ b/x11-wm/qtile/files/qtile-session-r1
@@ -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 start
diff --git a/x11-wm/qtile/qtile-0.21.0.ebuild b/x11-wm/qtile/qtile-0.21.0-r1.ebuild
index d219eaf9e16c..9e07d2b6ddc8 100644
--- a/x11-wm/qtile/qtile-0.21.0.ebuild
+++ b/x11-wm/qtile/qtile-0.21.0-r1.ebuild
@@ -65,5 +65,5 @@ python_install_all() {
doins "${FILESDIR}"/qtile.desktop
exeinto /etc/X11/Sessions
- newexe "${FILESDIR}"/${PN}-session ${PN}
+ newexe "${FILESDIR}"/${PN}-session-r1 ${PN}
}