config(hyprland): fix invalid geoclue agent path

This commit is contained in:
Hasan A. Tekeoğlu
2025-06-28 16:58:54 +03:00
parent bb456687a6
commit 9404b21f82
2 changed files with 28 additions and 1 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
# Bar, wallpaper
exec-once = swww-daemon --format xrgb --no-cache
exec-once = sleep 0.5; swww img "$(cat ~/.local/state/quickshell/user/generated/wallpaper/path.txt)" --transition-step 100 --transition-fps 120 --transition-type grow --transition-angle 30 --transition-duration 1
exec-once = /usr/lib/geoclue-2.0/demos/agent & gammastep
exec-once = ~/.config/hypr/hyprland/scripts/start_geoclue_agent.sh & gammastep
exec-once = qs &
# Input method
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/env bash
# Check if GeoClue agent is already running
if pgrep -f 'geoclue-2.0/demos/agent' > /dev/null; then
echo "GeoClue agent is already running."
exit 0
fi
# List of known possible GeoClue agent paths
AGENT_PATHS="
/usr/libexec/geoclue-2.0/demos/agent
/usr/lib/geoclue-2.0/demos/agent
"
# Find the first valid agent path
for path in $AGENT_PATHS; do
if [ -x "$path" ]; then
echo "Starting GeoClue agent from: $path"
"$path" & # starts in the background
exit 0
fi
done
# If we got here, none of the paths worked
echo "GeoClue agent not found in known paths."
echo "Please install GeoClue or update the script with the correct path."
exit 1