From 720780d50429df86ccec4802bb80edcec8bd6d19 Mon Sep 17 00:00:00 2001 From: q3aql Date: Mon, 12 May 2025 14:24:58 +0200 Subject: [PATCH] Sway X11 config --- .config/sway/config | 4 ++-- .config/sway/xhost-x11-root.sh | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 .config/sway/xhost-x11-root.sh diff --git a/.config/sway/config b/.config/sway/config index fcb9198..108cb42 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -38,10 +38,10 @@ exec --no-startup-id ~/.config/sway/startwlrrandr.sh & # If you have problems, rename this files: # mv -v ~/.config/systemd/user/xdg-desktop-portal.service.disabled ~/.config/systemd/user/xdg-desktop-portal.service # mv -v ~/.config/systemd/user/xdg-desktop-portal-wlr.service.disabled ~/.config/systemd/user/xdg-desktop-portal-wlr.service -exec --no-startup-id systemctl --user start xdg-desktop-portal-wlr.service & +exec --no-startup-id systemctl --user start xdg-desktop-portal-wlr.service # Run apps with sudo -exec --no-startup-id xhost +SI:localuser:root +exec --no-startup-id ~/.config/sway/xhost-x11-root.sh & # Configure wallpaper exec --no-startup-id "swaybg -i ~/wallpapers/gruvbox-arch.png -m fill" diff --git a/.config/sway/xhost-x11-root.sh b/.config/sway/xhost-x11-root.sh new file mode 100755 index 0000000..ca69ecf --- /dev/null +++ b/.config/sway/xhost-x11-root.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +repeat="30m" +xhost_while=0 + +while [ ${xhost_while} -eq 0 ] ; do + xhost +SI:localuser:root + sleep ${repeat} +done