summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-02-27 20:02:10 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-02-27 20:06:21 -0500
commit65cb251ba9d9203056c3c71e49576d7bd7e36069 (patch)
tree025b4015b5b8bed7906f271cc7d3b369c07535ba
parent5e5e5029e76d88b3887bb175e28709a9022323a8 (diff)
more systemd/x11 stuff
-rw-r--r--.config/X11/clientrc25
-rw-r--r--.config/cron/make-config2
l---------.config/systemd/user/X11@.target.wants/xmodmap@.service1
l---------.config/systemd/user/X11@.target.wants/xresources-dpi@.service1
l---------.config/systemd/user/X11@.target.wants/xresources@.service1
l---------.config/systemd/user/basic.target.wants/import-profile.service1
-rw-r--r--.config/systemd/user/dunst@.service2
-rw-r--r--.config/systemd/user/emacs-daemon.service4
-rw-r--r--.config/systemd/user/import-profile.service11
-rw-r--r--.config/systemd/user/lxpanel@.service2
-rw-r--r--.config/systemd/user/maildirproc@.service2
-rw-r--r--.config/systemd/user/rbar@.service2
-rw-r--r--.config/systemd/user/redshift@.service4
-rw-r--r--.config/systemd/user/synergy@.service2
-rw-r--r--.config/systemd/user/vncserver@.service2
-rw-r--r--.config/systemd/user/wmii@.service4
-rw-r--r--.config/systemd/user/x0vncserver@.service2
-rw-r--r--.config/systemd/user/xcompmgr@.service2
-rw-r--r--.config/systemd/user/xmodmap@.service14
-rw-r--r--.config/systemd/user/xresources-dpi@.service15
-rw-r--r--.config/systemd/user/xresources@.service14
-rwxr-xr-x.config/wmii-hg/quit2
-rwxr-xr-x.local/bin/systemd-import-profile9
-rwxr-xr-x.local/bin/xrdb-set-dpi4
24 files changed, 87 insertions, 41 deletions
diff --git a/.config/X11/clientrc b/.config/X11/clientrc
index e280f8d..5ffdd97 100644
--- a/.config/X11/clientrc
+++ b/.config/X11/clientrc
@@ -1,30 +1,5 @@
#!/hint/sh
-# Load system xinit modules (disabled)
-# Remove "false &&" to enable
-if false && [ -d /etc/X11/xinit/xinitrc.d ]; then
- echo ' ==> Running scripts in Entering xinitrc.d/*'
- for f in /etc/X11/xinit/xinitrc.d/*; do
- echo " -> $f"
- [ -x "$f" ] && . "$f"
- done
- unset f
- echo ' -> done'
-fi
-
-usermodmap="$XDG_CONFIG_HOME/X11/modmap"
-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
diff --git a/.config/cron/make-config b/.config/cron/make-config
index a4a3480..172233c 100644
--- a/.config/cron/make-config
+++ b/.config/cron/make-config
@@ -1,2 +1,2 @@
#m h dom mon dow command
-*/5 * * * * chronic make -C ~/.config
+*/5 * * * * systemd-run --user -- chronic make -C ~/.config
diff --git a/.config/systemd/user/X11@.target.wants/xmodmap@.service b/.config/systemd/user/X11@.target.wants/xmodmap@.service
new file mode 120000
index 0000000..3eb09e4
--- /dev/null
+++ b/.config/systemd/user/X11@.target.wants/xmodmap@.service
@@ -0,0 +1 @@
+../xmodmap@.service \ No newline at end of file
diff --git a/.config/systemd/user/X11@.target.wants/xresources-dpi@.service b/.config/systemd/user/X11@.target.wants/xresources-dpi@.service
new file mode 120000
index 0000000..f3b5a4c
--- /dev/null
+++ b/.config/systemd/user/X11@.target.wants/xresources-dpi@.service
@@ -0,0 +1 @@
+../xresources-dpi@.service \ No newline at end of file
diff --git a/.config/systemd/user/X11@.target.wants/xresources@.service b/.config/systemd/user/X11@.target.wants/xresources@.service
new file mode 120000
index 0000000..807639b
--- /dev/null
+++ b/.config/systemd/user/X11@.target.wants/xresources@.service
@@ -0,0 +1 @@
+../xresources@.service \ No newline at end of file
diff --git a/.config/systemd/user/basic.target.wants/import-profile.service b/.config/systemd/user/basic.target.wants/import-profile.service
new file mode 120000
index 0000000..04009d1
--- /dev/null
+++ b/.config/systemd/user/basic.target.wants/import-profile.service
@@ -0,0 +1 @@
+../import-profile.service \ No newline at end of file
diff --git a/.config/systemd/user/dunst@.service b/.config/systemd/user/dunst@.service
index 265845b..74d2447 100644
--- a/.config/systemd/user/dunst@.service
+++ b/.config/systemd/user/dunst@.service
@@ -8,4 +8,4 @@ Requisite=X11@%i.target
Environment=DISPLAY=%I
Type=simple
-ExecStart=/usr/bin/dunst
+ExecStart=/usr/bin/env dunst
diff --git a/.config/systemd/user/emacs-daemon.service b/.config/systemd/user/emacs-daemon.service
index eaf6729..3869d75 100644
--- a/.config/systemd/user/emacs-daemon.service
+++ b/.config/systemd/user/emacs-daemon.service
@@ -3,8 +3,8 @@ Description=Emacs deamon
[Service]
Type=forking
-ExecStart=/bin/bash -l -c 'emacs --daemon'
-ExecStop=/bin/bash -l -c 'emacsclient -a false -e "(kill-emacs)"'
+ExecStart=/usr/bin/env emacs --daemon
+ExecStop=/usr/bin/env emacsclient -a false -e '(kill-emacs)'
Restart=always
[Install]
diff --git a/.config/systemd/user/import-profile.service b/.config/systemd/user/import-profile.service
new file mode 100644
index 0000000..acde590
--- /dev/null
+++ b/.config/systemd/user/import-profile.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Load user profile into systemd
+Before=basic.target
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/env bash -l -c systemd-import-profile
+
+[Install]
+WantedBy=basic.target
diff --git a/.config/systemd/user/lxpanel@.service b/.config/systemd/user/lxpanel@.service
index 3a0dc67..76df925 100644
--- a/.config/systemd/user/lxpanel@.service
+++ b/.config/systemd/user/lxpanel@.service
@@ -11,7 +11,7 @@ Before=panel@%i.target
Environment=DISPLAY=%I
Type=simple
-ExecStart=/usr/bin/lxpanel
+ExecStart=/usr/bin/env lxpanel
[Install]
RequiredBy=panel@%i.target
diff --git a/.config/systemd/user/maildirproc@.service b/.config/systemd/user/maildirproc@.service
index 9c4181c..450157f 100644
--- a/.config/systemd/user/maildirproc@.service
+++ b/.config/systemd/user/maildirproc@.service
@@ -3,7 +3,7 @@ Description=maildirproc mail filter
[Service]
Type=simple
-ExecStart=/usr/bin/maildirproc --rcfile=${HOME}/.config/maildirproc/%I.rc --logfile=-
+ExecStart=/usr/bin/env maildirproc --rcfile=${HOME}/.config/maildirproc/%I.rc --logfile=-
Restart=on-failure
[Install]
diff --git a/.config/systemd/user/rbar@.service b/.config/systemd/user/rbar@.service
index 18d6201..55b802c 100644
--- a/.config/systemd/user/rbar@.service
+++ b/.config/systemd/user/rbar@.service
@@ -4,4 +4,4 @@ StopWhenUnneeded=true
[Service]
Type=simple
-ExecStart=/usr/bin/bash -c '%h/.wmii-hg/rbar %I'
+ExecStart=/bin/sh -c '%h/.wmii-hg/rbar %I'
diff --git a/.config/systemd/user/redshift@.service b/.config/systemd/user/redshift@.service
index dff6e7b..fda41d6 100644
--- a/.config/systemd/user/redshift@.service
+++ b/.config/systemd/user/redshift@.service
@@ -8,5 +8,5 @@ Requisite=X11@%i.target
Environment=DISPLAY=%I
Type=simple
-ExecStart=/usr/bin/redshift
-ExecStopPost=/usr/bin/redshift -x
+ExecStart=/usr/bin/env redshift
+ExecStopPost=/usr/bin/env redshift -x
diff --git a/.config/systemd/user/synergy@.service b/.config/systemd/user/synergy@.service
index dc15e58..c045749 100644
--- a/.config/systemd/user/synergy@.service
+++ b/.config/systemd/user/synergy@.service
@@ -9,4 +9,4 @@ Requires=panel@%i.target
Environment=DISPLAY=%I
Type=simple
-ExecStart=/usr/bin/synergy
+ExecStart=/usr/bin/env synergy
diff --git a/.config/systemd/user/vncserver@.service b/.config/systemd/user/vncserver@.service
index 2433977..2b5b453 100644
--- a/.config/systemd/user/vncserver@.service
+++ b/.config/systemd/user/vncserver@.service
@@ -6,7 +6,7 @@ Conflicts=x0vncserver@%i.service
Type=simple
Restart=always
-ExecStart=/bin/bash -l -c 'vncserver -fg %I'
+ExecStart=/usr/bin/env vncserver -fg %I
ExecStopPost=/bin/rm /tmp/.X%I-lock /tmp/.X11-unix/X%I
[Install]
diff --git a/.config/systemd/user/wmii@.service b/.config/systemd/user/wmii@.service
index f1e87df..c939221 100644
--- a/.config/systemd/user/wmii@.service
+++ b/.config/systemd/user/wmii@.service
@@ -12,8 +12,8 @@ Environment=DISPLAY=%I
Type=notify
NotifyAccess=all
-ExecStart=/usr/bin/bash -l -c 'exec 8>${XDG_RUNTIME_DIR}/x11-wm@%I; exec /usr/bin/wmii'
-ExecStop=/usr/bin/wmiir xwrite /ctl Quit
+ExecStart=/usr/bin/env bash -c 'exec 8>${XDG_RUNTIME_DIR}/x11-wm@%I; exec /usr/bin/wmii'
+ExecStop=/usr/bin/env wmiir xwrite /ctl Quit
[Install]
RequiredBy=X11@%i.target
diff --git a/.config/systemd/user/x0vncserver@.service b/.config/systemd/user/x0vncserver@.service
index 4a995f6..1582f42 100644
--- a/.config/systemd/user/x0vncserver@.service
+++ b/.config/systemd/user/x0vncserver@.service
@@ -7,4 +7,4 @@ Requisite=X11@%i.target
[Service]
Type=simple
-ExecStart=/usr/bin/x0vncserver display=%I PasswordFile=%h/.vnc/passwd
+ExecStart=/usr/bin/env x0vncserver display=%I PasswordFile=%h/.vnc/passwd
diff --git a/.config/systemd/user/xcompmgr@.service b/.config/systemd/user/xcompmgr@.service
index 6d80218..c3d98d4 100644
--- a/.config/systemd/user/xcompmgr@.service
+++ b/.config/systemd/user/xcompmgr@.service
@@ -9,4 +9,4 @@ Requisite=X11@%i.target
Environment=DISPLAY=%I
Type=simple
-ExecStart=/usr/bin/xcompmgr
+ExecStart=/usr/bin/env xcompmgr
diff --git a/.config/systemd/user/xmodmap@.service b/.config/systemd/user/xmodmap@.service
new file mode 100644
index 0000000..57bab8f
--- /dev/null
+++ b/.config/systemd/user/xmodmap@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Load XModMap keyboard map on X display %I
+Documentation=man:xmodmap(1)
+After=X11@%i.target
+Requisite=X11@%i.target
+
+[Service]
+Environment=DISPLAY=%I
+
+Type=oneshot
+ExecStart=-/usr/bin/env xmodmap ${XDG_CONFIG_HOME}/X11/modmap
+
+[Install]
+WantedBy=X11@%i.target
diff --git a/.config/systemd/user/xresources-dpi@.service b/.config/systemd/user/xresources-dpi@.service
new file mode 100644
index 0000000..82f2096
--- /dev/null
+++ b/.config/systemd/user/xresources-dpi@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Set the X Resources DataBase DPI to match the display DPI on X display %I
+Documentation=man:xrdb(1)
+Before=X11@%i.target
+Requisite=X11@%i.target
+Conflicts=xresources@:i.service
+
+[Service]
+Environment=DISPLAY=%I
+
+Type=oneshot
+ExecStart=/usr/bin/env xrdb-set-dpi
+
+[Install]
+WantedBy=X11@%i.target
diff --git a/.config/systemd/user/xresources@.service b/.config/systemd/user/xresources@.service
new file mode 100644
index 0000000..760fd0f
--- /dev/null
+++ b/.config/systemd/user/xresources@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Load X Resources DataBase on X display %I
+Documentation=man:xrdb(1)
+Before=X11@%i.target
+Requisite=X11@%i.target
+
+[Service]
+Environment=DISPLAY=%I
+
+Type=oneshot
+ExecStart=/usr/bin/env xrdb -merge ${XDG_CONFIG_HOME}/X11/resources
+
+[Install]
+WantedBy=X11@%i.target
diff --git a/.config/wmii-hg/quit b/.config/wmii-hg/quit
index b34a913..58d4db0 100755
--- a/.config/wmii-hg/quit
+++ b/.config/wmii-hg/quit
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
if type systemctl &>/dev/null; then
- systemctl --user stop "wmii@$DISPLAY.service"
+ systemctl --user stop "wmii@$(systemd-escape -- "$DISPLAY").service"
else
. include.sh
echo quit >> $WMII_DIR/ctl
diff --git a/.local/bin/systemd-import-profile b/.local/bin/systemd-import-profile
new file mode 100755
index 0000000..c896e31
--- /dev/null
+++ b/.local/bin/systemd-import-profile
@@ -0,0 +1,9 @@
+#!/bin/sh
+. ~/.profile
+vars=$(declare -x -p | sed -rn 's/^declare -x ([^=]+)(=.*)?$/\1/p' | grep -xFv -e PWD -e OLDPWD -e SHLVL)
+if test "$1" = '-p'; then
+ declare -p $vars
+ echo systemctl --user import-environment $vars
+else
+ systemctl --user import-environment $vars
+fi
diff --git a/.local/bin/xrdb-set-dpi b/.local/bin/xrdb-set-dpi
new file mode 100755
index 0000000..2a6b055
--- /dev/null
+++ b/.local/bin/xrdb-set-dpi
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+
+dpi=$(LC_ALL=C DISPLAY=:0 xdpyinfo|sed -rn 's/^\s*resolution:\s*(.*) dots per inch$/\1/p')
+xrdb -merge <<<"Xft.dpi: ${dpi}"