From 1321288028c39d3afe7f5d3c18c9dd9e6ee4b4a9 Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Fri, 2 Dec 2022 16:29:44 +0100 Subject: [PATCH] [qtile] install xinitrc --- wayland/qtile/SlackBuild | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/wayland/qtile/SlackBuild b/wayland/qtile/SlackBuild index 97a298f0..f0498505 100755 --- a/wayland/qtile/SlackBuild +++ b/wayland/qtile/SlackBuild @@ -81,6 +81,39 @@ cp resources/qtile-wayland.desktop $PKG$PREFIX/share/wayland-sessions/ mkdir -p $PKG$PREFIX/share/xsessions/ cp resources/qtile.desktop $PKG$PREFIX/share/xsessions/ +mkdir -p $PKG/etc/X11/xinit/ +cat < $PKG/etc/X11/xinit/xinitrc.$PRGNAM +#!/bin/sh + +userresources=\$HOME/.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 + +# Start qtile +if [ -z "\$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then + exec ck-launch-session dbus-launch --exit-with-session qtile start +else + exec dbus-launch --exit-with-session qtile start +fi +EOF sed -i 's|Exec=qtile start -b wayland|Exec=/usr/bin/start_qtile.sh|' $PKG$PREFIX/share/wayland-sessions/qtile-wayland.desktop