summaryrefslogtreecommitdiff
path: root/dotfiles/hyprland/.local
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-29 10:23:52 -0600
committerCraig Jennings <c@cjennings.net>2026-01-29 10:23:52 -0600
commit82e2fcfd0915047033599290109b4fb055fa3cf6 (patch)
tree265b7d96c84c1db0d8192e52870048219e6b6ea1 /dotfiles/hyprland/.local
parenteb120910415d40dd76bff7efe59927248d9125d1 (diff)
fix(hyprland): resolve autologin startup issues
- Use start-hyprland wrapper instead of Hyprland directly (fixes "started without start-hyprland" warning) - Add init-keyring script to create empty-password keyring (fixes keyring password prompt with autologin) - Add easyeffects config with noWindowAfterStarting=true (starts minimized instead of fullscreen) - Install python-secretstorage for init-keyring script Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'dotfiles/hyprland/.local')
-rwxr-xr-xdotfiles/hyprland/.local/bin/init-keyring46
1 files changed, 46 insertions, 0 deletions
diff --git a/dotfiles/hyprland/.local/bin/init-keyring b/dotfiles/hyprland/.local/bin/init-keyring
new file mode 100755
index 0000000..c8bb733
--- /dev/null
+++ b/dotfiles/hyprland/.local/bin/init-keyring
@@ -0,0 +1,46 @@
+#!/usr/bin/env python3
+"""Initialize gnome-keyring with empty password for autologin systems.
+
+This script creates the 'login' keyring collection with an empty password,
+allowing gnome-keyring to auto-unlock without PAM password entry.
+
+Only runs once - exits immediately if login keyring already exists.
+"""
+
+import os
+import sys
+
+# Check if login keyring already exists
+keyring_dir = os.path.expanduser("~/.local/share/keyrings")
+login_keyring = os.path.join(keyring_dir, "login.keyring")
+
+if os.path.exists(login_keyring):
+ sys.exit(0)
+
+try:
+ import secretstorage
+except ImportError:
+ print("python-secretstorage not installed", file=sys.stderr)
+ sys.exit(1)
+
+try:
+ connection = secretstorage.dbus_init()
+
+ # Check if login collection exists via D-Bus
+ collections = list(secretstorage.get_all_collections(connection))
+ for collection in collections:
+ if collection.get_label() == "login" or collection.get_label() == "Login":
+ # Already exists
+ sys.exit(0)
+
+ # Create login collection with empty password
+ secretstorage.create_collection(connection, "Login", password=b"")
+
+ # Set as default
+ os.makedirs(keyring_dir, exist_ok=True)
+ with open(os.path.join(keyring_dir, "default"), "w") as f:
+ f.write("login")
+
+except Exception as e:
+ print(f"Failed to initialize keyring: {e}", file=sys.stderr)
+ sys.exit(1)