diff --git a/home/atuin.nix b/home/atuin.nix index 168a84d..da65610 100644 --- a/home/atuin.nix +++ b/home/atuin.nix @@ -18,7 +18,7 @@ prefers_reduced_motion = true; # History storage - store_failed = false; + store_failed = true; secrets_filter = true; enter_accept = true; diff --git a/home/gtklock.nix b/home/gtklock.nix new file mode 100644 index 0000000..2be6f3b --- /dev/null +++ b/home/gtklock.nix @@ -0,0 +1,85 @@ +{ + pkgs, + config, + lib, + ... +}: + +let + p = config.colorScheme.palette; + + # Get files from ./Wallpapers relative to this flake/module + wallpapersPath = ./Wallpapers; + + # Get all image file names + wallpaperFiles = builtins.attrNames (builtins.readDir wallpapersPath); + + # Pick a "random" file (first one deterministically) + selectedWallpaper = builtins.elemAt wallpaperFiles 0; + + # Define the path to copy the selected wallpaper to + wallpaperTargetPath = ".config/gtklock/${selectedWallpaper}"; +in +{ + # Install gtklock + home.packages = [ + pkgs.gtklock + ]; + + # Copy the selected wallpaper into the config dir + home.file.${wallpaperTargetPath}.source = "${wallpapersPath}/${selectedWallpaper}"; + + # GTKlock config + xdg.configFile."gtklock/config.ini".text = '' + [main] + # Plugins/configuration here + ''; + + # GTK CSS styling + xdg.configFile."gtklock/style.css".text = '' + window { + background-image: url("${config.xdg.configHome}/gtklock/${selectedWallpaper}"); + background-size: cover; + background-repeat: no-repeat; + background-position: center; + background-color: #${p.base00}; + } + + label { + color: #${p.base05}; + font-weight: bold; + font-size: 16px; + } + + entry { + background-color: #${p.base01}; + color: #${p.base06}; + border: none; + padding: 8px; + border-radius: 4px; + } + + button { + background-color: #${p.base02}; + color: #${p.base05}; + border-radius: 6px; + padding: 6px 12px; + font-weight: bold; + font-size: 14px; + border-width: 2px; + border-style: solid; + border-color: #${p.base0D}; + } + + button:hover { + background-color: #${p.base03}; + border-color: #${p.base0C}; + } + + button:active { + background-color: #${p.base0D}; + color: #${p.base00}; + } + ''; +} + diff --git a/home/gunalx.nix b/home/gunalx.nix index 0e75379..adc00d1 100644 --- a/home/gunalx.nix +++ b/home/gunalx.nix @@ -16,6 +16,7 @@ ./colors.nix ./fuzzel.nix ./swaylock.nix + ./gtklock.nix ./swayidle.nix ./waybar.nix ./wlogout.nix diff --git a/home/niri.nix b/home/niri.nix index 5e5b742..370f6d8 100644 --- a/home/niri.nix +++ b/home/niri.nix @@ -67,7 +67,7 @@ let //switch events for open closing lid. switch-events { - lid-close { spawn "swaylock"; } + lid-close { spawn "gtklock"; } //lid-open { spawn "notify-send" "The laptop lid is open!"; } tablet-mode-on { spawn "bash" "-c" "wvkbd-mobintl"; } tablet-mode-off { spawn "bash" "-c" "pkill wvkbd-mobintl"; } @@ -365,7 +365,7 @@ let Mod+Return { spawn "footclient"; } Mod+T { spawn "sh" "-c" "if pgrep -f '^foot -T dropdown$' >/dev/null; then pkill -f '^foot -T dropdown$'; else exec foot -T dropdown; fi"; } Mod+D { spawn "fuzzel"; } - Mod+M { spawn "swaylock" "--grace" "0"; } + Mod+M { spawn "gtklock"; } Mod+O { toggle-window-rule-opacity; } // You can also use a shell. Do this if you need pipes, multiple commands, etc. diff --git a/home/swayidle.nix b/home/swayidle.nix index 25883fb..017acec 100644 --- a/home/swayidle.nix +++ b/home/swayidle.nix @@ -12,7 +12,8 @@ timeouts = [ { timeout = 180; - command = "swaylock -f"; + #command = "swaylock"; + command = "gtklock"; resumeCommand = null; } { @@ -25,7 +26,8 @@ events = [ { event = "before-sleep"; - command = "swaylock -f"; + #command = "swaylock"; + command = "gtklock"; } ]; diff --git a/home/swaylock.nix b/home/swaylock.nix index 8b34761..e652a90 100644 --- a/home/swaylock.nix +++ b/home/swaylock.nix @@ -23,6 +23,8 @@ in # authentication grace grace = 3; # --grace submit-on-touch = false; # --submit-on-touch + ignore-empty-password = true; + show-failed-attempts = true; # clock clock = true; # --clock diff --git a/modules/desktopApplications.nix b/modules/desktopApplications.nix index 3dcbc9c..f41cc6d 100644 --- a/modules/desktopApplications.nix +++ b/modules/desktopApplications.nix @@ -23,6 +23,7 @@ sweethome3d.application audacity bitwarden + openvpn zettlr # notes logseq pandoc