feat(quickshell): support x11 bar sessions

This commit is contained in:
2026-09-27 09:33:47 -04:00
parent 3f6473ce17
commit 5c13c8c3e7
10 changed files with 133 additions and 24 deletions
@@ -1,5 +1,23 @@
#!/bin/bash
# Start the systemd-managed Quickshell bar on the current Wayland session.
# Start the systemd-managed Quickshell bar in the current graphical session.
systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE
if ! command -v qs &> /dev/null; then
if [ "${XDG_SESSION_TYPE}" = "x11" ]; then
~/bin/desktop/polybar-start.sh
fi
exit 0
fi
if [ "${XDG_SESSION_TYPE}" = "x11" ]; then
systemctl --user unset-environment WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE
systemctl --user set-environment QT_QPA_PLATFORM=xcb
else
systemctl --user set-environment QT_QPA_PLATFORM=wayland
fi
systemctl --user import-environment DISPLAY XAUTHORITY WAYLAND_DISPLAY XDG_SESSION_TYPE XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE I3SOCK
if [ "$(hostname)" = "desktop" ]; then
systemctl --user set-environment QUICKSHELL_BAR_SCREEN=DP-2
else
systemctl --user unset-environment QUICKSHELL_BAR_SCREEN
fi
systemctl --user restart quickshell-bar.service
+1 -5
View File
@@ -5,11 +5,7 @@ pass git pull
# Desktop
~/bin/connect-nas.sh
if [ "${XDG_SESSION_TYPE}" = "wayland" ]; then
~/bin/desktop/quickshell-start.sh
else
systemctl --user start polybar
fi
~/bin/desktop/quickshell-start.sh
systemctl --user restart streamdeck
/usr/libexec/polkit-gnome-authentication-agent-1 &