From 5e5e5029e76d88b3887bb175e28709a9022323a8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 27 Feb 2016 18:31:31 -0500 Subject: X11 systemd stuff --- .config/X11/clientrc | 14 ++++++++++++-- .config/X11/defaults | 25 ------------------------- .config/X11/resources | 25 +++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 27 deletions(-) delete mode 100644 .config/X11/defaults create mode 100644 .config/X11/resources (limited to '.config/X11') 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/defaults deleted file mode 100644 index fca1914..0000000 --- a/.config/X11/defaults +++ /dev/null @@ -1,25 +0,0 @@ -! -*- Mode: Conf-xdefaults -*- - -! "native" colors -!URxvt.background: #000000 -!URxvt.foreground: #CCCCCC -! Tango-dark -URxvt.background: #2E3436 -URxvt.foreground: #EEEEEC -URxvt.color4: #729FCF -URxvt.color12: #729FCF - -URxvt.scrollstyle: plain -URxvt.scrollBar_floating: true - -URxvt.font: xft:Monospace-8 -URxvt.cursorBlink: true -URxvt.pastableTabs: true - -URxvt.scrollTtyOutput: false -URxvt.scrollTtyKeypress: false -URxvt.scrollWithBuffer: true - -URxvt.perl-ext-common: default,matcher -URxvt.url-launcher: v-www-browser -URxvt.matcher.button: 1 diff --git a/.config/X11/resources b/.config/X11/resources new file mode 100644 index 0000000..fca1914 --- /dev/null +++ b/.config/X11/resources @@ -0,0 +1,25 @@ +! -*- Mode: Conf-xdefaults -*- + +! "native" colors +!URxvt.background: #000000 +!URxvt.foreground: #CCCCCC +! Tango-dark +URxvt.background: #2E3436 +URxvt.foreground: #EEEEEC +URxvt.color4: #729FCF +URxvt.color12: #729FCF + +URxvt.scrollstyle: plain +URxvt.scrollBar_floating: true + +URxvt.font: xft:Monospace-8 +URxvt.cursorBlink: true +URxvt.pastableTabs: true + +URxvt.scrollTtyOutput: false +URxvt.scrollTtyKeypress: false +URxvt.scrollWithBuffer: true + +URxvt.perl-ext-common: default,matcher +URxvt.url-launcher: v-www-browser +URxvt.matcher.button: 1 -- cgit v1.2.3-2-g168b