aboutsummaryrefslogtreecommitdiffstats
path: root/config/hypr/scripts/Polkit-NixOS.sh
diff options
context:
space:
mode:
authorJa.KooLit <jimmielovejay@gmail.com>2023-11-07 13:49:12 +0900
committerGitHub <noreply@github.com>2023-11-07 13:49:12 +0900
commitfd4c2c3f7566b46eb22c693ea97f25baadf292e2 (patch)
tree13f6698c9430bf4ea3ad9ba8d33e09f7f9c7512c /config/hypr/scripts/Polkit-NixOS.sh
parent3fa5c6a5973d0cec5801f5b46da87e8ff2b7ee90 (diff)
parent56f61f9d90095eb5464bd6f38f606e03f8fd9c33 (diff)
Merge pull request #10 from JaKooLit/Beta-v0.4
Hyprland-Dots V2
Diffstat (limited to 'config/hypr/scripts/Polkit-NixOS.sh')
-rwxr-xr-xconfig/hypr/scripts/Polkit-NixOS.sh19
1 files changed, 19 insertions, 0 deletions
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
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage