summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x.config/X11/clientrc10
-rw-r--r--.config/redshift.conf2
-rw-r--r--.config/systemd/user/dunst@.service2
-rw-r--r--.config/systemd/user/lxpanel@.service3
-rw-r--r--.config/systemd/user/redshift@.service2
-rw-r--r--.config/systemd/user/vncserver@.service5
-rw-r--r--.config/systemd/user/wm@.target3
-rw-r--r--.config/systemd/user/wmii@.service9
-rw-r--r--.config/systemd/user/x0vncserver@.service3
-rw-r--r--.config/systemd/user/xcompmgr@.service2
-rw-r--r--.config/wmii-hg/config.sh8
-rwxr-xr-x.config/wmii-hg/quit8
-rwxr-xr-x.config/wmii-hg/wmiirc4
13 files changed, 40 insertions, 21 deletions
diff --git a/.config/X11/clientrc b/.config/X11/clientrc
index 9488ec8..4773ea4 100755
--- a/.config/X11/clientrc
+++ b/.config/X11/clientrc
@@ -17,9 +17,9 @@ if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
-#exec wmii
-wm=wmii
+trap "rm -f $(printf '%q' "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}")" EXIT
mkfifo "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}"
-trap "rm $(printf %q "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}")" EXIT
-systemctl --user start "${wm}@${DISPLAY}.service"
-cat "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" >/dev/null
+
+cat "${XDG_RUNTIME_DIR}/x11-wm@${DISPLAY}" &
+systemctl --user start "wm@${DISPLAY}.target" &
+wait
diff --git a/.config/redshift.conf b/.config/redshift.conf
index 7f19a99..ef83f3f 100644
--- a/.config/redshift.conf
+++ b/.config/redshift.conf
@@ -3,7 +3,7 @@
temp-day=6500K
temp-night=6500K
brightness-day=1.0
-brightness-night=0.5
+brightness-night=0.65
location-provider=manual
transition=0
diff --git a/.config/systemd/user/dunst@.service b/.config/systemd/user/dunst@.service
index 2aff6be..568af3f 100644
--- a/.config/systemd/user/dunst@.service
+++ b/.config/systemd/user/dunst@.service
@@ -1,5 +1,5 @@
[Unit]
-Description=Dunst notification-daemon
+Description=Dunst notification-daemon on X display %I
Documentation=man:dunst(1)
StopWhenUnneeded=true
diff --git a/.config/systemd/user/lxpanel@.service b/.config/systemd/user/lxpanel@.service
index 3327ab4..71e2114 100644
--- a/.config/systemd/user/lxpanel@.service
+++ b/.config/systemd/user/lxpanel@.service
@@ -1,7 +1,8 @@
[Unit]
-Description=LXDE Desktop Panel
+Description=LXDE Desktop Panel on X display %I
Documentation=man:lxpanel(1)
StopWhenUnneeded=true
+After=wm@%i.target
[Service]
Type=simple
diff --git a/.config/systemd/user/redshift@.service b/.config/systemd/user/redshift@.service
index 149bb74..b4ef3bb 100644
--- a/.config/systemd/user/redshift@.service
+++ b/.config/systemd/user/redshift@.service
@@ -1,5 +1,5 @@
[Unit]
-Description=Redshift display colour temperature adjustment
+Description=Redshift display colour temperature adjustment on X display %I
Documentation=http://jonls.dk/redshift/
StopWhenUnneeded=true
diff --git a/.config/systemd/user/vncserver@.service b/.config/systemd/user/vncserver@.service
index 8c1d818..2433977 100644
--- a/.config/systemd/user/vncserver@.service
+++ b/.config/systemd/user/vncserver@.service
@@ -1,11 +1,12 @@
[Unit]
-Description=VNC desktop
+Description=VNC virtual desktop %I
Conflicts=x0vncserver@%i.service
[Service]
Type=simple
-ExecStart=/bin/bash -l -c 'vncserver -fg %I'
Restart=always
+
+ExecStart=/bin/bash -l -c 'vncserver -fg %I'
ExecStopPost=/bin/rm /tmp/.X%I-lock /tmp/.X11-unix/X%I
[Install]
diff --git a/.config/systemd/user/wm@.target b/.config/systemd/user/wm@.target
new file mode 100644
index 0000000..ac91fa1
--- /dev/null
+++ b/.config/systemd/user/wm@.target
@@ -0,0 +1,3 @@
+[Unit]
+Description=Window Manager on display %I
+Requires=wmii@%i.service
diff --git a/.config/systemd/user/wmii@.service b/.config/systemd/user/wmii@.service
index 3902627..0442fca 100644
--- a/.config/systemd/user/wmii@.service
+++ b/.config/systemd/user/wmii@.service
@@ -1,10 +1,13 @@
[Unit]
-Description=Window Manager Improved Improved
+Description=Window Manager Improved Improved on X display %I
Documentation=file:/usr/share/doc/wmii/wmii.pdf
+Before=wm@%i.target
+StopWhenUnneeded=true
[Service]
-Type=simple
-Restart=no
+# This assumes that you write READY=1 to $NOTIFY_SOCKET in wmiirc
+Type=notify
+NotifyAccess=all
Environment=DISPLAY=%I
ExecStart=/usr/bin/bash -l -c 'exec 8>${XDG_RUNTIME_DIR}/x11-wm@%I; exec /usr/bin/wmii'
diff --git a/.config/systemd/user/x0vncserver@.service b/.config/systemd/user/x0vncserver@.service
index 02165a7..3ee349f 100644
--- a/.config/systemd/user/x0vncserver@.service
+++ b/.config/systemd/user/x0vncserver@.service
@@ -1,6 +1,7 @@
[Unit]
-Description=VNC server for X displays
+Description=VNC server for real X display %I
Conflicts=vncserver@%i.service
+StopWhenUnneeded=true
[Service]
Type=simple
diff --git a/.config/systemd/user/xcompmgr@.service b/.config/systemd/user/xcompmgr@.service
index c7844d2..85decd2 100644
--- a/.config/systemd/user/xcompmgr@.service
+++ b/.config/systemd/user/xcompmgr@.service
@@ -1,5 +1,5 @@
[Unit]
-Description=Composite Window-Effects Manger
+Description=Composite Window-Effects Manger on X display %I
Documentation=man:xcompmgr(1)
StopWhenUnneeded=true
diff --git a/.config/wmii-hg/config.sh b/.config/wmii-hg/config.sh
index ad4d2fe..64596a8 100644
--- a/.config/wmii-hg/config.sh
+++ b/.config/wmii-hg/config.sh
@@ -66,8 +66,10 @@ Event() {
rmdir -p "$WMII_DIR" 2>/dev/null;;
## WMII-meta events
Quit) ## No args
- echo ' ==> wmii quit: unmounting'
trap - EXIT
+ if [ -S "$NOTIFY_SOCKET" ]; then
+ echo STOPPING=1 | socat STDIO UNIX-SENDTO:"$NOTIFY_SOCKET"
+ fi
Event WmiircUnmount
Event WmiircQuit;;
Warning) ## $@=string
@@ -228,9 +230,9 @@ Key() {
$MODKEY-x) ## Open program menu
local command
command="$(path_ls "$_PATH" | wimenu -h "${HIST}.progs" -n 5000)" || return
- ( PATH=$_PATH; unset _PATH; exec $command ) & ;;
+ ( PATH=$_PATH; unset _PATH NOTIFY_SOCKET; exec $command ) & ;;
$MODKEY-Return) ## Launch a terminal
- ( PATH=$_PATH; unset _PATH; exec x-terminal-emulator ) & ;;
+ ( PATH=$_PATH; unset _PATH NOTIFY_SOCKET; exec x-terminal-emulator ) & ;;
## Tag actions
$MODKEY-t) ## Change to another tag
diff --git a/.config/wmii-hg/quit b/.config/wmii-hg/quit
index 27d9052..341468e 100755
--- a/.config/wmii-hg/quit
+++ b/.config/wmii-hg/quit
@@ -1,3 +1,7 @@
#!/bin/bash
-. include.sh
-echo quit >> $WMII_DIR/ctl
+if type systemctl &>/dev/null; then
+ systemctl --user stop "wmii@$DISPLAY.service"
+else
+ . include.sh
+ echo quit >> $WMII_DIR/ctl
+fi
diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc
index 396bed2..6fd348f 100755
--- a/.config/wmii-hg/wmiirc
+++ b/.config/wmii-hg/wmiirc
@@ -12,6 +12,10 @@ fi
wmiir xwrite /event WmiircQuit # close any existing wmiirc's
Event WmiircStart
+# Notify systemd that we're ready
+if [ -S "$NOTIFY_SOCKET" ]; then
+ echo READY=1 | socat STDIO UNIX-SENDTO:"$NOTIFY_SOCKET"
+fi
trap "Event Quit" EXIT