add swaylock.nix

This commit is contained in:
crurak 2023-08-07 21:22:56 +02:00
parent 718220bc41
commit 8e34b7d8f3
3 changed files with 30 additions and 8 deletions

View File

@ -9,6 +9,7 @@
./kitty.nix
./librewolf.nix
./neovim.nix
./swaylock.nix
./waybar.nix
./xcursor.nix
./xresources.nix

View File

@ -58,12 +58,12 @@ in {
dwindle {
preserve_split = yes
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
# pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
}
master {
new_is_master = true
new_on_top = no
}
misc {
@ -91,12 +91,12 @@ in {
bindm = $SUPER, mouse:272, movewindow
bindm = $SUPER, mouse:273, resizewindow
# # Change volume with keys
# bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -t 2000 "Muted" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
# bindl=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -t 2000 "Raised volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
# bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -t 2000 "Lowered volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
# bindl=, XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -t 2000 "Decreased brightness to" "$(brightnessctl get)"
# bindl=, XF86MonBrightnessUp, exec, brightnessctl set +5% && notify-send -t 2000 "Increased brightness to" "$(brightnessctl get)"
# Change volume with keys
bindl=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && notify-send -t 2000 "Muted" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
bindl=, XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && notify-send -t 2000 "Raised volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
bindl=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && notify-send -t 2000 "Lowered volume to" "$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | tail -c 3)%"
bindl=, XF86MonBrightnessDown, exec, brightnessctl set 5%- && notify-send -t 2000 "Decreased brightness to" "$(brightnessctl get)"
bindl=, XF86MonBrightnessUp, exec, brightnessctl set +5% && notify-send -t 2000 "Increased brightness to" "$(brightnessctl get)"
'';
}

21
home/swaylock.nix Normal file
View File

@ -0,0 +1,21 @@
{ pkgs, ... }:
{
programs.swaylock = {
package = pkgs."swaylock-effects";
settings = {
show-keyboard-layout = true;
daemonize = true;
effect-blur = "20x2";
clock = true;
indicator = true;
font-size = 25;
indicator-radius = 85;
indicator-thickness = 16;
screenshots = true;
fade-in = 1;
};
};
}