From a153022b7d457466db9140c62dc5564f9de7a3af Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Sun, 5 Nov 2023 14:02:06 +0900 Subject: changes for new Hyprland-Dots --- config/hypr/scripts/Polkit-NixOS.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 config/hypr/scripts/Polkit-NixOS.sh (limited to 'config/hypr/scripts/Polkit-NixOS.sh') diff --git a/config/hypr/scripts/Polkit-NixOS.sh b/config/hypr/scripts/Polkit-NixOS.sh new file mode 100755 index 00000000..ef5e74fd --- /dev/null +++ b/config/hypr/scripts/Polkit-NixOS.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Find all polkit-gnome executables in the Nix store +polkit_gnome_paths=$(find /nix/store -name 'polkit-gnome-authentication-agent-1' -type f 2>/dev/null) + +for polkit_gnome_path in $polkit_gnome_paths; do + # Extract the directory containing the executable + polkit_gnome_dir=$(dirname "$polkit_gnome_path") + + # Check if the executable is valid and exists + if [ -x "$polkit_gnome_dir/polkit-gnome-authentication-agent-1" ]; then + # Start the Polkit-GNOME Authentication Agent + "$polkit_gnome_dir/polkit-gnome-authentication-agent-1" & + exit 0 + fi +done + +# If no valid executable is found, report an error +echo "No valid Polkit-GNOME Authentication Agent executable found." \ No newline at end of file -- cgit v1.2.3