summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Günzler <r@gnzler.io>2021-08-31 12:32:52 +0200
committerRobert Günzler <r@gnzler.io>2021-08-31 12:41:21 +0200
commitbdebc9e86ad77316e1d2703cdc2f5d194d51742a (patch)
tree25f9bcec1924bb668e2f2077d229904fbe2a56cb
parent384babec22004b8a2cdd5cf6c6d4aafa05594813 (diff)
use s6 to manage user services
-rw-r--r--.config/sway/config17
-rw-r--r--.gitignore18
-rwxr-xr-x.local/share/s6/footserver/run2
-rwxr-xr-x.local/share/s6/kanshi/run2
-rwxr-xr-x.local/share/s6/mako/run2
-rwxr-xr-x.local/share/s6/oguri/run2
-rwxr-xr-x.local/share/s6/pipewire/run2
-rwxr-xr-x.local/share/s6/swayidle/run9
-rwxr-xr-x.local/share/s6/waybar/run2
-rwxr-xr-x.local/share/s6/wlsunset/run4
10 files changed, 45 insertions, 15 deletions
diff --git a/.config/sway/config b/.config/sway/config
index 8af69ad..affbfb6 100644
--- a/.config/sway/config
+++ b/.config/sway/config
@@ -85,23 +85,10 @@ client.unfocused $bg2 $bg $text2 $indicator_unfocused $bg
 client.urgent $urgent2 $urgent $text $indicator_focused $urgent
 # }}}
 
-exec {
-	light -S 80
-	once oguri
-	once kanshi
-	once wlsunset -l $HOME_LAT -L $HOME_LON -H ~/bin/darkmode
-	once waybar
-	once swayidle -w \
-		timeout 540 'lock' \
-		timeout 800 'swaymsg output \* dpms off' \
-				resume 'swaymsg output \* dpms on' \
-		before-sleep 'lock' \
-		lock 'lock'
-	once foot -s
-}
 
 exec {
-	dbus-update-activation-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK && once pipewire
+	light -S 80
+  once -- s6-svscan ${HOME}/.local/share/s6
 }
 
 exec_always sleep 1.4 && kanshictl reload
diff --git a/.gitignore b/.gitignore
index 31b33ce..0a0ae7f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,21 @@
 # To track a file using the dotfile repo add it using: git add -f FILE
 # or exclude below
 
+!.config
+!.config/**
+.config/mpv/scripts
+.config/sway/contrib
+
+!.vim
+!.vim/**
+
+!.local
+.local/*
+!.local/share
+.local/share/*
+!.local/share/s6
+!.local/share/s6/**
+.local/share/s6/**/supervise
+.local/share/s6/**/events
+.local/share/s6/**/lock
+.local/share/s6/**/control
diff --git a/.local/share/s6/footserver/run b/.local/share/s6/footserver/run
new file mode 100755
index 0000000..dcc018c
--- /dev/null
+++ b/.local/share/s6/footserver/run
@@ -0,0 +1,2 @@
+#!/bin/execlineb -P
+foreground { foot -s }
diff --git a/.local/share/s6/kanshi/run b/.local/share/s6/kanshi/run
new file mode 100755
index 0000000..801da1a
--- /dev/null
+++ b/.local/share/s6/kanshi/run
@@ -0,0 +1,2 @@
+#!/bin/execlineb -P
+foreground { kanshi }
diff --git a/.local/share/s6/mako/run b/.local/share/s6/mako/run
new file mode 100755
index 0000000..4964adf
--- /dev/null
+++ b/.local/share/s6/mako/run
@@ -0,0 +1,2 @@
+#!/bin/execlineb -P
+foreground { mako }
diff --git a/.local/share/s6/oguri/run b/.local/share/s6/oguri/run
new file mode 100755
index 0000000..fee19b2
--- /dev/null
+++ b/.local/share/s6/oguri/run
@@ -0,0 +1,2 @@
+#!/bin/execlineb -P
+foreground { oguri }
diff --git a/.local/share/s6/pipewire/run b/.local/share/s6/pipewire/run
new file mode 100755
index 0000000..8cd9afd
--- /dev/null
+++ b/.local/share/s6/pipewire/run
@@ -0,0 +1,2 @@
+#!/bin/execlineb -P
+foreground { pipewire }
diff --git a/.local/share/s6/swayidle/run b/.local/share/s6/swayidle/run
new file mode 100755
index 0000000..b41d059
--- /dev/null
+++ b/.local/share/s6/swayidle/run
@@ -0,0 +1,9 @@
+#!/bin/execlineb -P
+foreground {
+  swayidle -w \
+    timeout 540 'lock' \
+    timeout 800 'swaymsg output \* dpms off' \
+        resume 'swaymsg output \* dpms on' \
+    before-sleep 'lock' \
+    lock 'lock'
+}
diff --git a/.local/share/s6/waybar/run b/.local/share/s6/waybar/run
new file mode 100755
index 0000000..5de0ff6
--- /dev/null
+++ b/.local/share/s6/waybar/run
@@ -0,0 +1,2 @@
+#!/bin/execlineb -P
+foreground { waybar }
diff --git a/.local/share/s6/wlsunset/run b/.local/share/s6/wlsunset/run
new file mode 100755
index 0000000..9d325aa
--- /dev/null
+++ b/.local/share/s6/wlsunset/run
@@ -0,0 +1,4 @@
+#!/bin/execlineb -P
+foreground {
+  wlsunset -l $HOME_LAT -L $HOME_LON -H $HOME/bin/darkmode
+}