add systemd support

This commit is contained in:
lelgenio 2022-04-10 23:29:41 -03:00
parent 54d0b12586
commit 506dbb0f0e
15 changed files with 155 additions and 9 deletions

View File

@ -266,8 +266,9 @@ profiles:
dotfiles:
- arch-packages
- paru
- systemd
variables:
supervisor: scripts
supervisor: systemd
cursor_theme: "capitaine-cursors"
###############################################################
@ -310,7 +311,14 @@ actions:
reload_sway: swaymsg reload & disown
reload_mako: makoctl reload
reload_runit_sv: env SVDIR="{{@@ user_svdir @@}}" sv reload "{0}"
reload_runit_sv:
which sv 2> /dev/null &&
env SVDIR="{{@@ user_svdir @@}}" sv reload "{0}" ||
true
reload_systemd_sv:
systemctl --user daemon-reload
enable_systemd_sv:
systemctl --user enable --now "{0}"
groups_install: _groups_install
lesskey: lesskey
reload_fish: pkill -SIGHUP fish
@ -352,6 +360,11 @@ actions:
# bootstrap scripts
pam_gpg: _pam-gpg-strap
make_theme: _make_theme
qt6ct: |
cd "$HOME/.config"
rm -rf "qt6ct/"
cp -r "qt5ct/" "qt6ct"
mv "qt6ct/qt5ct.conf" "qt6ct/qt6ct.conf"
install_arch_meta: install_arch_meta
install_mpv: _mpv_install
filter_backgrounds: _backgrouds_filter
@ -479,6 +492,27 @@ dotfiles: # Just a bunch of paths and action mappings
src: runit_sv
dst: ~/.config/runit
systemd:
src: systemd
dst: ~/.config/systemd/user
actions:
- enable_systemd_sv caffeinated.service
- enable_systemd_sv firefox.service
- enable_systemd_sv gammastep.service
- enable_systemd_sv kanshi.service
- enable_systemd_sv mako.service
- enable_systemd_sv mpd.service
- enable_systemd_sv mpDris2.service
- enable_systemd_sv notify-mail.service
- enable_systemd_sv pipewire.service
- enable_systemd_sv pulseaudio.service
- enable_systemd_sv sway-idle.service
- enable_systemd_sv syncthing.service
- enable_systemd_sv telegram-desktop.service
- enable_systemd_sv waybar.service
- enable_systemd_sv xsettingsd.service
- enable_systemd_sv vdirsyncer.timer
libinput-gestures:
src: libinput-gestures.conf
dst: ~/.config/libinput-gestures.conf
@ -513,6 +547,7 @@ dotfiles: # Just a bunch of paths and action mappings
src: theme
dst: ~/
actions:
- qt6ct
- reload_runit_sv xsettingsd
- apply_gsetting_gnome gtk-theme '{{@@ gtk_theme @@}}'
- apply_gsetting_gnome icon-theme '{{@@ icon_theme @@}}'

View File

@ -39,10 +39,14 @@ function esway
# this should not be necessary, but whatever
if not pidof sway &> /dev/null
{%@@ if profile in ["voidlinux"] @@%}
{%@@ if supervisor == "runit" @@%}
pkill -HUP -u "$USER" runsvdir
{%@@ endif @@%}
exec dbus-launch --exit-with-session sway
{%@@ elif supervisor == "systemd" @@%}
exec systemd-cat --identifier=sway sway
{%@@ else @@%}
exec dbus-launch --exit-with-session sway
{%@@ endif @@%}
end
end

View File

@ -48,7 +48,6 @@ plug 'kak-lsp/kak-lsp' do %{
} config %{
map global normal <F2> ': lsp-rename-prompt<ret>'
set global lsp_hover_max_lines 10
lsp-inlay-diagnostics-enable global
set global lsp_auto_highlight_references true
set global lsp_inlay_diagnostic_sign "●"
set global lsp_diagnostic_line_error_sign "●"

View File

@ -2,7 +2,7 @@
gpg-connect-agent reloadagent /bye
PATH="$PATH:/usr/lib:/usr/libexec"
PATH="$PATH:/usr/lib:/usr/libexec:/usr/lib/gnupg"
keygrip=$(cat "$HOME/.pam-gnupg")
echo '{{@@ main_password @@}}' |

View File

@ -45,8 +45,8 @@ assign [class="Hollow Knight"] workspace 9
assign [class=dishonored.exe] workspace 9
# Chats
assign [app_id=telegram.?desktop] workspace 10
assign [class=TelegramDesktop] workspace 10
assign [app_id=".*[Tt]elegram.*"] workspace 10
assign [class=".*[Tt]elegram.*"] workspace 10
assign [class="Jitsi Meet"] workspace 10
assign [class=discord] workspace 10
assign [title=Discord] workspace 10

View File

@ -40,12 +40,14 @@ include modes
include assigns
{%@@ if profile in ["voidlinux"] @@%}
{%@@ if supervisor == "runit" @@%}
set $user_svd "{{@@ user_svdir @@}}"
exec_always pgrep -u "$USER" "^runsvdir$" || runsvdir $user_svd
exec_always env SVDIR=$user_svd sv hup kanshi
exec_always env SVDIR=$user_svd sv hup waybar
exec_always _gpg-unlock
{%@@ elif supervisor == "systemd" @@%}
exec "systemctl --user import-environment; systemctl --user start sway-session.target"
{%@@ else @@%}
include daemons
{%@@ endif @@%}

View File

@ -0,0 +1,11 @@
# {{ header() }}
[Unit]
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/firefox
[Install]
WantedBy=sway-session.target

View File

@ -0,0 +1,13 @@
# {{ header() }}
[Unit]
Description=Wayland equivalent of autorandr.
Documentation=https://sr.ht/~emersion/kanshi/
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/kanshi
[Install]
WantedBy=sway-session.target

View File

@ -0,0 +1,13 @@
# {{ header() }}
[Unit]
Description= Lightweight notification daemon for Wayland compositors.
Documentation=https://github.com/emersion/mako/wiki
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/mako
[Install]
WantedBy=sway-session.target

View File

@ -0,0 +1,12 @@
# {{ header() }}
[Unit]
Description= Send notification when maildir gets modified
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/bin/env _notify-mail
[Install]
WantedBy=sway-session.target

View File

@ -0,0 +1,12 @@
# {{ header() }}
[Unit]
Description= Send notification when maildir gets modified
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/bin/env _sway_idle
[Install]
WantedBy=sway-session.target

View File

@ -0,0 +1,8 @@
# {{ header() }}
[Unit]
Description=sway compositor session
Documentation=man:systemd.special(7)
BindsTo=graphical-session.target
Wants=graphical-session-pre.target
After=graphical-session-pre.target

View File

@ -0,0 +1,11 @@
# {{ header() }}
[Unit]
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/telegram-desktop
[Install]
WantedBy=sway-session.target

View File

@ -0,0 +1,13 @@
# {{ header() }}
[Unit]
Description=Highly customizable Wayland bar for Sway and Wlroots based compositors.
Documentation=https://github.com/Alexays/Waybar/wiki/
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/waybar
[Install]
WantedBy=sway-session.target

View File

@ -0,0 +1,13 @@
# {{ header() }}
[Unit]
Description= X settings daemon
Documentation=https://github.com/derat/xsettingsd
PartOf=graphical-session.target
[Service]
Type=simple
ExecStart=/usr/bin/xsettingsd
[Install]
WantedBy=sway-session.target