From e57889aeed88841befc2dfd6a01ad1816b8d9917 Mon Sep 17 00:00:00 2001 From: Nulo Date: Sat, 15 Oct 2022 12:48:38 -0300 Subject: [PATCH] sway: Usar runsvdir para correr servicios --- .config/sv/.gitignore | 1 + .config/sv/gnome-keyring-daemon/run | 2 ++ .config/sv/goimapnotify/run | 2 ++ .config/sv/syncthing/run | 2 ++ .config/sway/config | 6 +----- .local/share/service/gnome-keyring-daemon | 1 + .local/share/service/goimapnotify | 1 + .local/share/service/syncthing | 1 + .zprofile | 3 +++ 9 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .config/sv/.gitignore create mode 100755 .config/sv/gnome-keyring-daemon/run create mode 100755 .config/sv/goimapnotify/run create mode 100755 .config/sv/syncthing/run create mode 120000 .local/share/service/gnome-keyring-daemon create mode 120000 .local/share/service/goimapnotify create mode 120000 .local/share/service/syncthing diff --git a/.config/sv/.gitignore b/.config/sv/.gitignore new file mode 100644 index 0000000..8e8a4f9 --- /dev/null +++ b/.config/sv/.gitignore @@ -0,0 +1 @@ +*/supervise diff --git a/.config/sv/gnome-keyring-daemon/run b/.config/sv/gnome-keyring-daemon/run new file mode 100755 index 0000000..5c90608 --- /dev/null +++ b/.config/sv/gnome-keyring-daemon/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec gnome-keyring-daemon --foreground --components=pkcs11,secrets,ssh diff --git a/.config/sv/goimapnotify/run b/.config/sv/goimapnotify/run new file mode 100755 index 0000000..fca9b35 --- /dev/null +++ b/.config/sv/goimapnotify/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec goimapnotify -conf ~/.config/imapnotify/config.json diff --git a/.config/sv/syncthing/run b/.config/sv/syncthing/run new file mode 100755 index 0000000..7343b85 --- /dev/null +++ b/.config/sv/syncthing/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec syncthing -no-browser diff --git a/.config/sway/config b/.config/sway/config index f7168d1..89653b7 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -252,11 +252,7 @@ exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DE exec pipewire exec "foot --server" exec "wlsunset -l -34.61315 -L -58.37723" -exec "pgrep -x syncthing >/dev/null || syncthing -no-browser" exec swaync exec kanshi -exec "mbsync -a" -exec "mpd" -exec "pgrep -x goimapnotify >/dev/null || goimapnotify -conf ~/.config/imapnotify/config.json" -exec "gnome-keyring-daemon --foreground --components=pkcs11,secrets,ssh" + diff --git a/.local/share/service/gnome-keyring-daemon b/.local/share/service/gnome-keyring-daemon new file mode 120000 index 0000000..114e614 --- /dev/null +++ b/.local/share/service/gnome-keyring-daemon @@ -0,0 +1 @@ +../../../.config/sv/gnome-keyring-daemon \ No newline at end of file diff --git a/.local/share/service/goimapnotify b/.local/share/service/goimapnotify new file mode 120000 index 0000000..ac9c197 --- /dev/null +++ b/.local/share/service/goimapnotify @@ -0,0 +1 @@ +../../../.config/sv/goimapnotify \ No newline at end of file diff --git a/.local/share/service/syncthing b/.local/share/service/syncthing new file mode 120000 index 0000000..cd021b1 --- /dev/null +++ b/.local/share/service/syncthing @@ -0,0 +1 @@ +../../../.config/sv/syncthing \ No newline at end of file diff --git a/.zprofile b/.zprofile index 751ba1f..4aa6b6d 100755 --- a/.zprofile +++ b/.zprofile @@ -7,6 +7,9 @@ if ! "$REMOTE" && test "$(tty)" = /dev/tty1; then chmod 700 "$XDG_RUNTIME_DIR" mkdir -p "$HOME/.local/share/sway" log="$HOME/.local/share/sway/$(date +%Y-%m-%d@%H:%M:%S).log" + + pgrep -U "$(id -u)" runsv >/dev/null || (nohup runsvdir ~/.local/share/service >/dev/null &; disown) + exec env \ XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" \ XDG_CURRENT_DESKTOP=sway \