From 6d25df5263c6cf23b7b9981cab3d02e807398b2f Mon Sep 17 00:00:00 2001 From: "bozo.kopic" Date: Wed, 11 Sep 2024 23:08:39 +0200 Subject: . --- sway/init.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'sway/init.sh') diff --git a/sway/init.sh b/sway/init.sh index b478aaa..903d4ea 100755 --- a/sway/init.sh +++ b/sway/init.sh @@ -1,7 +1,7 @@ #!/bin/sh # export GDK_DPI_SCALE=0.95 -if command -v gsettings > /dev/null; then +if command -v gsettings >/dev/null; then gsettings set org.gnome.desktop.interface scaling-factor 1 gsettings set org.gnome.desktop.interface text-scaling-factor 1 gsettings set org.gnome.desktop.interface cursor-size 32 @@ -10,7 +10,9 @@ fi export QT_QPA_PLATFORM=wayland export XDG_CURRENT_DESKTOP=sway -if command -v systemctl > /dev/null; then +os_id=$(. /etc/os-release && echo $ID) + +if command -v systemctl >/dev/null; then systemctl --user import-environment \ QT_QPA_PLATFORM \ SWAYSOCK \ @@ -23,12 +25,18 @@ if command -v systemctl > /dev/null; then systemctl --user restart xdg-desktop-portal-wlr systemctl --user restart xdg-desktop-portal-gtk systemctl --user restart plasma-kactivitymanagerd + else dbus-update-activation-environment WAYLAND_DISPLAY \ XDG_CURRENT_DESKTOP - /usr/libexec/pipewire-launcher & - /usr/libexec/xdg-desktop-portal-wlr & + if [ "$os_id" = "alpine" ]; then + /usr/libexec/pipewire-launcher & + /usr/libexec/xdg-desktop-portal-wlr & + + elif [ "$os_id" = "void" ]; then + pipewire & + fi fi ~/.config/sway/swayidle.sh & -- cgit v1.2.3-70-g09d2