From 6d25df5263c6cf23b7b9981cab3d02e807398b2f Mon Sep 17 00:00:00 2001 From: "bozo.kopic" Date: Wed, 11 Sep 2024 23:08:39 +0200 Subject: . --- sway/config | 2 +- sway/init.sh | 16 ++++++++++++---- sway/run-sway.sh | 4 ++-- 3 files changed, 15 insertions(+), 7 deletions(-) (limited to 'sway') diff --git a/sway/config b/sway/config index 61ad468..a3b8270 100644 --- a/sway/config +++ b/sway/config @@ -16,7 +16,7 @@ exec ~/.config/sway/init.sh bindsym { $mod+Return exec foot - $mod+space exec ~/.dotfiles/wofi/run.sh + $mod+space exec wofi $mod+Tab layout toggle $mod+Shift+q kill 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 & diff --git a/sway/run-sway.sh b/sway/run-sway.sh index 763d83f..9141b8e 100755 --- a/sway/run-sway.sh +++ b/sway/run-sway.sh @@ -1,9 +1,9 @@ #!/bin/sh -exec > ~/.sway.log 2>&1 +exec >~/.sway.log 2>&1 if ( ( command -v systemctl && systemctl --user is-system-running ) || - pgrep -U $(id -u) dbus-daemon ) > /dev/null; then + pgrep -U $(id -u) dbus-daemon ) >/dev/null; then exec sway else exec dbus-run-session -- sway -- cgit v1.2.3-70-g09d2