wayland: modify service setup

- sway config launches runsvdir:
 - has a mechanism for verifying if it's already running
 - doesn't have a mechanism for killing the runsvdir only when adequate
This commit is contained in:
Érico Rolim 2020-06-09 18:48:21 -03:00
parent 7d4d0e1ae7
commit 4c5fa61376
8 changed files with 17 additions and 14 deletions

View File

@ -286,6 +286,9 @@ bar {
swaybar_command waybar
}
## Services directory
exec runsvdir-sway
## Application specific settings
# PDF
assign [app_id="okular"] $wsp

View File

@ -1,3 +1,6 @@
#!/bin/sh
# TODO: some way of checking if this is the right runsvdir instance to kill
pkill -HUP -f "^runsvdir /home/ericonr/.local/share/wayland-services"
echo "Quitting sway"
pkill -HUP -f "^runsvdir $HOME/.local/share/wayland-services"
swaymsg exit

View File

@ -0,0 +1,7 @@
#!/bin/sh
pgrep -f "^runsvdir $HOME/.local/share/wayland-services" &&
exec echo "runsvdir has already been launched"
exec runsvdir "$HOME/.local/share/wayland-services" \
'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'

View File

@ -9,6 +9,7 @@ if test -z "${XDG_RUNTIME_DIR}"; then
fi
fi
export XDG_SESSION_TYPE=wayland
# start the compositor itself
exec dbus-run-session runsvdir "$HOME/.local/share/wayland-services" \
'log: ...........................................................................................................................................................................................................................................................................................................................................................................................................'
WLR_DRM_DEVICES=/dev/dri/card0 exec dbus-run-session sway --my-next-gpu-wont-be-nvidia

View File

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

View File

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

View File

@ -1,4 +0,0 @@
#!/bin/sh
SWAYSOCK=$(find $XDG_RUNTIME_DIR -type s -name "sway-ipc*") \
exec swaymsg -t send_tick

View File

@ -1,5 +0,0 @@
#!/bin/sh
export XDG_SESSION_TYPE=wayland
cd $HOME
WLR_DRM_DEVICES=/dev/dri/card0 exec sway --my-next-gpu-wont-be-nvidia