aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-06-12 14:03:02 -0400
committerDon Williams <don.e.williams@gmail.com>2026-06-12 14:03:02 -0400
commit8011be2b2114dc9e4bbd229798c398b599179c89 (patch)
tree258e504508a5674b46540457d8aeb602ac9fee0a /config/hypr
parent378b483a139e6d57b0f76cc97d9a326dc795360e (diff)
Fixed WaybarStartup to make sure ENV set
Signed-off-by: Don Williams <don.e.williams@gmail.com> On branch main Your branch is up to date with 'origin/main'. Changes to be committed: modified: config/hypr/scripts/WaybarStartup.sh
Diffstat (limited to 'config/hypr')
-rwxr-xr-xconfig/hypr/scripts/WaybarStartup.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/config/hypr/scripts/WaybarStartup.sh b/config/hypr/scripts/WaybarStartup.sh
index ac269600..5691c86b 100755
--- a/config/hypr/scripts/WaybarStartup.sh
+++ b/config/hypr/scripts/WaybarStartup.sh
@@ -14,6 +14,30 @@ export XDG_RUNTIME_DIR="$runtime_dir"
is_waybar_running() {
pgrep -x "waybar" >/dev/null 2>&1 || pgrep -x '\.waybar-wrapped' >/dev/null 2>&1
}
+sync_portal_env() {
+ if command -v dbus-update-activation-environment >/dev/null 2>&1; then
+ dbus-update-activation-environment --systemd \
+ WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE XDG_DATA_DIRS GSETTINGS_SCHEMA_DIR >/dev/null 2>&1 || true
+ fi
+
+ if command -v systemctl >/dev/null 2>&1; then
+ systemctl --user import-environment \
+ WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE XDG_DATA_DIRS GSETTINGS_SCHEMA_DIR >/dev/null 2>&1 || true
+ fi
+}
+
+start_portal_services() {
+ command -v systemctl >/dev/null 2>&1 || return 0
+
+ systemctl --user start xdg-desktop-portal-hyprland.service >/dev/null 2>&1 || true
+ systemctl --user start xdg-desktop-portal.service >/dev/null 2>&1 || true
+
+ for _ in $(seq 1 50); do
+ systemctl --user is-active --quiet xdg-desktop-portal.service && return 0
+ sleep 0.1
+ done
+ return 1
+}
wait_for_wayland() {
# If WAYLAND_DISPLAY is already valid, use it.
@@ -71,6 +95,8 @@ main() {
# Allow key startup services to settle before launching Waybar.
sleep 1
wait_for_wayland || true
+ sync_portal_env
+ start_portal_services || true
is_waybar_running && exit 0
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage