This commit is contained in:
2025-09-09 19:44:03 +02:00
parent 3a2df7bb96
commit ef574c90da
7 changed files with 96 additions and 5 deletions

View File

@@ -18,7 +18,7 @@
prefers_reduced_motion = true;
# History storage
store_failed = false;
store_failed = true;
secrets_filter = true;
enter_accept = true;

85
home/gtklock.nix Normal file
View File

@@ -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};
}
'';
}

View File

@@ -16,6 +16,7 @@
./colors.nix
./fuzzel.nix
./swaylock.nix
./gtklock.nix
./swayidle.nix
./waybar.nix
./wlogout.nix

View File

@@ -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.

View File

@@ -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";
}
];

View File

@@ -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

View File

@@ -23,6 +23,7 @@
sweethome3d.application
audacity
bitwarden
openvpn
zettlr # notes
logseq
pandoc