From 93db20c4ac8077e7c374a8babe0ca1903d8e02b1 Mon Sep 17 00:00:00 2001 From: Sravan Balaji Date: Wed, 2 Oct 2024 20:49:09 -0400 Subject: [PATCH] Fix swhkd dbus issues - Remove redundant `systemctl --user import-environment` from winitrc - Add `--all` flag to `dbus-update-activation-environment` in winitrc - Stop using swhkd systemd user service which doesn't seem to work properly when running dwl in a dbus session - Add swhks and swhkd to startup script --- README.org | 9 ++++++--- dwl/.scripts/wayland-startup.sh | 4 ++++ dwl/.winitrc | 5 ++--- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.org b/README.org index 20e2c94..5ddea82 100644 --- a/README.org +++ b/README.org @@ -9042,9 +9042,8 @@ export XDG_CURRENT_DESKTOP=wlroots # Set XDG current desktop #+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle dwl/.winitrc $HOME/.scripts/wayland-startup.sh --kill-startup -systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -dbus-run-session dwl -s '$HOME/.scripts/wayland-startup.sh --startup' +dbus-update-activation-environment --systemd --all +exec dbus-run-session -- dwl -s '$HOME/.scripts/wayland-startup.sh --startup' #+END_SRC *** Wayland Startup @@ -9057,6 +9056,8 @@ declare -a startup_array=(\ "$HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon "/usr/bin/wl-paste --type text --watch cliphist store" \ # Clipboard for Text "/usr/bin/wl-paste --type image --watch cliphist store" \ # Clipboard for Images + "/usr/bin/swhks" \ # Simple Wayland HotKey Server + "sudo /usr/bin/swhkd" \ # Simple Wayland HotKey Daemon # Display / Compositor Setup "/usr/bin/shikane" \ # Display Setup "$HOME/.azotebg" \ # Wallpaper @@ -9081,6 +9082,8 @@ declare -a kill_startup_array=(\ "pkill kdeconnectd" \ "$HOME/.scripts/dunst.sh --off" \ "pkill wl-paste" \ + "pkill swhks" \ + "pkill swhkd" \ # Display / Compositor Setup "pkill shikane" \ "pkill gammastep" \ diff --git a/dwl/.scripts/wayland-startup.sh b/dwl/.scripts/wayland-startup.sh index 3fae133..a7d69f3 100755 --- a/dwl/.scripts/wayland-startup.sh +++ b/dwl/.scripts/wayland-startup.sh @@ -6,6 +6,8 @@ declare -a startup_array=(\ "$HOME/.scripts/dunst.sh --on" \ # Dunst Notification Daemon "/usr/bin/wl-paste --type text --watch cliphist store" \ # Clipboard for Text "/usr/bin/wl-paste --type image --watch cliphist store" \ # Clipboard for Images + "/usr/bin/swhks" \ # Simple Wayland HotKey Server + "sudo /usr/bin/swhkd" \ # Simple Wayland HotKey Daemon # Display / Compositor Setup "/usr/bin/shikane" \ # Display Setup "$HOME/.azotebg" \ # Wallpaper @@ -30,6 +32,8 @@ declare -a kill_startup_array=(\ "pkill kdeconnectd" \ "$HOME/.scripts/dunst.sh --off" \ "pkill wl-paste" \ + "pkill swhks" \ + "pkill swhkd" \ # Display / Compositor Setup "pkill shikane" \ "pkill gammastep" \ diff --git a/dwl/.winitrc b/dwl/.winitrc index cc43180..8dd160f 100755 --- a/dwl/.winitrc +++ b/dwl/.winitrc @@ -11,6 +11,5 @@ export XDG_CURRENT_DESKTOP=wlroots # Set XDG current desktop $HOME/.scripts/wayland-startup.sh --kill-startup -systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP -dbus-run-session dwl -s '$HOME/.scripts/wayland-startup.sh --startup' +dbus-update-activation-environment --systemd --all +exec dbus-run-session -- dwl -s '$HOME/.scripts/wayland-startup.sh --startup'