runit: add user runit config

This commit is contained in:
lelgenio 2021-06-27 18:42:54 -03:00
parent 97f10480c6
commit 89f599f5ea
30 changed files with 87 additions and 11 deletions

View File

@ -21,6 +21,7 @@ variables:
bar: waybar
bar_pos: top
tmux: false
supervisor: runit
accent_fg: '#ffffff'
@ -259,6 +260,16 @@ actions:
sudo dotdrop install -f -p main \
-c "{{@@ _dotfile_abs_dst @@}}/config.yaml" ||
rm -r "{{@@ _dotfile_abs_dst @@}}"
start_services: >
_runit_config "{{@@ _dotfile_abs_dst @@}}"
dbus-daemon gsd-xsettings
fusuma gpg-agent
geoclue redshift light mako
mpd mpDris2 telegram
pipewire pipewire-media-session xdpw
pulseaudio kdeconnectd kdeconnect-indicator
kanshi swayidle waybar
syncthing udiskie
# bootstrap scripts
pam_gpg: _pam-gpg-strap
@ -380,6 +391,12 @@ dotfiles: # Just a bunch of paths and action mappings
actions:
- make_theme
services:
src: runit_sv
dst: ~/.config/runit/sv
actions:
- start_services
deemix:
src: deemix
dst: ~/.config/deemix

View File

@ -7,7 +7,7 @@
profile sedetary {
output eDP-1 position 1920,312
output eDP-1 disable position 1920,312
output HDMI-A-1 position 0,0
exec xrdb .Xresources

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec _start_dbus-daemon

2
dotfiles/runit_sv/fusuma/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec fusuma

2
dotfiles/runit_sv/geoclue/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec /usr/lib/geoclue-2.0/demos/agent

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec gpg-agent --server

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec /usr/lib/gsd-xsettings

2
dotfiles/runit_sv/kanshi/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec kanshi

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec kdeconnect-indicator

View File

@ -0,0 +1,2 @@
#!/bin/sh
pidof kdeconnectd

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec /usr/lib/kdeconnectd

View File

2
dotfiles/runit_sv/light/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec light -N 1

2
dotfiles/runit_sv/mako/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec mako

2
dotfiles/runit_sv/mpDris2/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec mpDris2

2
dotfiles/runit_sv/mpd/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec mpd --no-daemon

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec pipewire-media-session

2
dotfiles/runit_sv/pipewire/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec pipewire

View File

@ -0,0 +1,3 @@
#!/bin/sh
pulseaudio -k
exec pulseaudio

2
dotfiles/runit_sv/redshift/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec redshift

3
dotfiles/runit_sv/swayidle/run Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec _sway_idle

View File

@ -0,0 +1,2 @@
#!/bin/sh
exec syncthing -no-browser

5
dotfiles/runit_sv/telegram/run Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
command -v telegram-desktop-bin &&
exec telegram-desktop-bin ||
exec telegram-desktop

2
dotfiles/runit_sv/udiskie/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec udiskie

2
dotfiles/runit_sv/waybar/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec waybar

2
dotfiles/runit_sv/xdpw/run Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
exec /usr/lib/xdg-desktop-portal-wlr

View File

@ -1,10 +1,8 @@
#!/bin/sh
if ! pidof gpg-agent
then
gpg-agent --daemon
while ! pidof gpg-agent; do
sleep 5s
fi
done
KEYGRIP=$(cat "$HOME/.pam-gnupg")

View File

@ -40,8 +40,18 @@ include keys-special
include modes
include assigns
include daemons
{%@@ if supervisor == "scripts" @@%}
include daemons
{%@@ elif supervisor == "runit" @@%}
set $user_svd "$HOME/.config/runit/runsvdir/default"
exec runsvdir $user_svd
exec_always env SVDIR=$user_svd sv hup kanshi
exec_always _gpg-unlock
{%@@ endif @@%}
# Prevent the screen from locking if fullscreen
for_window [title=.*] inhibit_idle fullscreen
include /etc/sway/config.d/

View File

@ -62,9 +62,6 @@ exec light -N 1
# Idle
###############################################################
# Prevent the screen from locking if fullscreen
for_window [title=.*] inhibit_idle fullscreen
# Idle daemon
exec_always _sway_idle

View File

@ -42,9 +42,10 @@ client.urgent $alert $alert $fg_color $alert $alert
# Bar configuration
###############################################################
{%@@ if bar == "waybar" @@%}
{%@@ if supervisor == "scripts" @@%}
{%@@ if bar == "waybar" @@%}
bar swaybar_command waybar
{%@@ else @@%}
{%@@ else @@%}
# I rarely use this
bar {
position {{@@ bar_pos @@}}
@ -61,8 +62,10 @@ client.urgent $alert $alert $fg_color $alert $alert
focused_workspace $accent $bg_color $fg_color
}
}
{%@@ endif @@%}
{%@@ endif @@%}
###############################################################
# Gaps
###############################################################