dotfiles/x11/.xsession
Tom Willemse 5bb0014265 Reorganize xsession and Xresources
- Add xsession. Instead of requiring each of my machines to setup their own
‘.xsession’ add one that should work for all of them.

- Use M4 for the Xresources database. I didn’t want the X11 project to be aware
of all the configuration files that could be added in there and I was able to
figure out how to have it load all of the configuration files in the
‘Xresources.d’ directory. Now each configuration can inject properties into the
X resources database.

- Have ‘.xsession’ load all of the scripts in ‘.config/X11/Xsession.d’. Each
configuration can now inject some script to run when X starts.

- Have ‘.xsession’ load a machine-specific script so that each machine can
override what it does when X starts.
2020-04-26 21:34:57 -07:00

20 lines
546 B
Bash
Executable file

#!/usr/bin/env sh
# shellcheck source=../lib/usr/lib/sh/loading.sh
. ~/usr/lib/sh/loading.sh
xrdb -cpp m4 -merge "${HOME}/.config/X11/Xresources" \
-I"${HOME}/.config/X11/Xresources.d"
load_machine_config ".config/X11/machines"
load_config_directory ".config/X11/Xsession.d"
command -v kdeconnect-indicator \
&& (pgrep kdeconnect-indicator \
|| { kdeconnect-indicator & })
command -v syncthing-gtk \
&& (pgrep syncthing-gtk \
|| { syncthing-gtk & })
command -v unclutter && (pgrep unclutter || unclutter --fork)