wayland: move to runit service start-up

This commit is contained in:
Érico Rolim 2020-05-11 02:07:03 -03:00
parent a16b9f52de
commit e771fa5e40
13 changed files with 55 additions and 15 deletions

View File

@ -0,0 +1,7 @@
#!/bin/sh
[ -r "$1" ] && exec "$@" 2>&1
# if EXISTFAIL is set, exit, otherwise sleep
[ -z "$EXISTFAIL" ] && exit 1
exec sleep 999

View File

@ -105,17 +105,6 @@ bindsym $mod+d exec $menu
# Resize windows with right mouse button + $mod.
floating_modifier $mod normal
## Enable further services for complete session
# Polkit authenticator
exec /usr/lib/polkit-kde-authentication-agent-1
for_window [app_id="polkit"] focus, floating enable, border pixel 4
# Notifications daemon
exec mako
# KDE Connect
exec /usr/lib/kdeconnectd
# Redshift
exec redshift
## Appearance
# Default wallpaper
output * bg ~/Pictures/wallpaper.png fill
@ -311,7 +300,7 @@ for_window [app_id="mpv"] floating enable
for_window [app_id="krunner"] floating enable
for_window [app_id="konsole"] floating enable
for_window [app_id=".* KDE Connect Daemon"] floating enable
for_window [app_id="polkit"] focus, floating enable, border pixel 4
# Firefox
for_window [title="Firefox - Sharing Indicator"] floating enable
for_window [app_id="org.mozilla.plasma-browser-integration-host"] floating enable

3
wayland/.local/bin/kill-sway Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
pkill -HUP -f "^runsvdir /home/ericonr/.local/share/wayland-services"

View File

@ -1,5 +1,6 @@
#!/usr/bin/env bash
# created by elogind, usually
if test -z "${XDG_RUNTIME_DIR}"; then
export XDG_RUNTIME_DIR=/tmp/${UID}-runtime-dir
if ! test -d "${XDG_RUNTIME_DIR}"; then
@ -8,6 +9,8 @@ if test -z "${XDG_RUNTIME_DIR}"; then
fi
fi
export XDG_SESSION_TYPE=wayland
# activate PulseAudio, guarantee volume widget in Waybar works
pactl stat
exec sway
# start the compositor itself
exec dbus-run-session runsvdir $HOME/.local/share/wayland-services

View File

@ -3,7 +3,7 @@
exec swaynag \
-t warning \
-m 'Logout' \
-b 'Exit session' 'swaymsg exit' \
-b 'Exit session' 'kill-sway' \
-b 'Suspend' 'erctl suspend' \
-b 'Hibernate' 'erctl hibernate' \
-b 'Hybrid sleep' 'erctl hybrid-sleep' \

4
wayland/.local/bin/swaysv Executable file
View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
export SVDIR=$HOME/.local/share/wayland-services
exec sv "$@"

4
wayland/.local/bin/swayvsv Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
export SVDIR=$HOME/.local/share/wayland-services
exec vsv "$@"

View File

@ -0,0 +1 @@
supervise/

View File

@ -0,0 +1,9 @@
#!/bin/sh
# void location
export EXISTFAIL=1
exec exec-if-exists /usr/lib/libexec/kdeconnectd
# arch/manjaro location
unset EXISTFAIL
exec exec-if-exists /usr/lib/kdeconnectd

View File

@ -0,0 +1,3 @@
#!/bin/sh
swaysv check sway >/dev/null || exit 1
exec mako 2>&1

View File

@ -0,0 +1,9 @@
#!/bin/sh
# arch/manjaro
export EXISTFAIL=1
exec exec-if-exists /usr/lib/polkit-kde-authentication-agent-1
# void
unset EXISTFAIL
exec exec-if-exists /usr/lib/libexec/polkit-kde-authentication-agent-1

View File

@ -0,0 +1,3 @@
#!/bin/sh
swaysv check sway || exit 1
exec redshift 2>&1

View File

@ -0,0 +1,5 @@
#!/bin/sh
export XDG_SESSION_TYPE=wayland
cd $HOME
exec sway