diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-02-27 18:31:31 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-02-27 18:31:31 -0500 |
commit | 10de71240a14b1fd5e7c9f788fbddb0ca6da664b (patch) | |
tree | fabef4e9d99683cab2da66c3a5d032352d2aff9e /.config/X11 | |
parent | 1dcd53b0d46b46eb9f252b5dfbb2300ba5bf4641 (diff) |
X11 systemd stuff
Diffstat (limited to '.config/X11')
-rw-r--r-- | .config/X11/clientrc | 14 | ||||
-rw-r--r-- | .config/X11/resources (renamed from .config/X11/defaults) | 0 |
2 files changed, 12 insertions, 2 deletions
diff --git a/.config/X11/clientrc b/.config/X11/clientrc index bc68ed6..e280f8d 100644 --- a/.config/X11/clientrc +++ b/.config/X11/clientrc @@ -17,14 +17,24 @@ if [ -f "$usermodmap" ]; then xmodmap "$usermodmap" fi +dpi=$(LC_ALL=C DISPLAY=:0 xdpyinfo|sed -rn 's/^\s*resolution:\s*(.*) dots per inch$/\1/p') +xrdb -merge <<<"Xft.dpi: ${dpi}" + +userresources="$XDG_CONFIG_HOME/X11/resources" +if [ -f "$userresources" ]; then + xrdb -merge "$userresources" +fi + if [ -z "$XDG_RUNTIME_DIR" ]; then printf "XDG_RUNTIME_DIR isn't set\n" >&2 exit 6 fi + _DISPLAY="$(systemd-escape -- "$DISPLAY")" trap "rm -f $(printf '%q' "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}")" EXIT mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}" -cat "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}" & -systemctl --user start "wm@${_DISPLAY}.target" & +cat < "${XDG_RUNTIME_DIR}/x11-wm@${_DISPLAY}" & +systemctl --user start "X11@${_DISPLAY}.target" & wait +systemctl --user stop "X11@${_DISPLAY}.target" diff --git a/.config/X11/defaults b/.config/X11/resources index fca1914..fca1914 100644 --- a/.config/X11/defaults +++ b/.config/X11/resources |