i dont like "caps lock notification"

This reverts commit 67508af47d.
This commit is contained in:
2025-09-29 15:53:04 +02:00
parent 67508af47d
commit 3e66f74531

View File

@@ -253,10 +253,7 @@ in
# Define a user account. Don't forget to set a password with passwd.
users.users.${user} = {
isNormalUser = true;
extraGroups = [
"wheel"
"input"
]; # Enable sudo for the user.
extraGroups = [ "wheel" ]; # Enable sudo for the user.
initialPassword = "password";
packages = with pkgs; [
# managed by home-manager
@@ -304,8 +301,6 @@ in
nnn
libreoffice-qt6-fresh
nix-tree
evtest
dunst
]
);
@@ -575,30 +570,4 @@ in
};
wantedBy = [ "timers.target" ];
};
systemd.user.services.caps-lock-notify = {
description = "Caps lock state notification";
script = ''
caps_state=""
prev_state=""
while true; do
caps_state=$(${pkgs.xorg.xset}/bin/xset q 2>/dev/null | ${pkgs.gnugrep}/bin/grep "Caps Lock" | ${pkgs.gawk}/bin/awk '{print $4}' || echo "")
if [ -n "$caps_state" ] && [ "$caps_state" != "$prev_state" ] && [ -n "$prev_state" ]; then
${pkgs.libnotify}/bin/notify-send "Caps Lock" "$caps_state" -t 1000
fi
prev_state="$caps_state"
sleep 0.1
done
'';
serviceConfig = {
Type = "simple";
Restart = "always";
RestartSec = 3;
};
wantedBy = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
};
}