adding hyprlock and hypridle

This commit is contained in:
Chris Cochrun 2024-04-24 08:23:36 -05:00
parent 089332d1e3
commit 9cf4756ab0
3 changed files with 80 additions and 4 deletions

View file

@ -4,6 +4,82 @@ let
laptop = builtins.readFile "/etc/hostname" == "syl\n";
in
{
home.file.".config/hypr/hyprlock.conf" = {
text = ''
background {
monitor =
path = /home/chris/pics/wallpapers/nixorange.png # only png supported for now
blur_passes = 3 # 0 disables blurring
blur_size = 7
noise = 0.0117
contrast = 0.8916
brightness = 0.8172
vibrancy = 0.1696
vibrancy_darkness = 0.0
}
input-field {
monitor =
size = 200, 50
outline_thickness = 3
dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0
dots_center = false
dots_rounding = -1 # -1 default circle, -2 follow input-field rounding
outer_color = rgb(151515)
inner_color = rgb(200, 200, 200)
font_color = rgb(10, 10, 10)
fade_on_empty = true
fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered.
placeholder_text = <i>Input Password...</i> # Text rendered in the input box when it's empty.
hide_input = false
rounding = -1 # -1 means complete rounding (circle/oval)
check_color = rgb(204, 136, 34)
fail_color = rgb(204, 34, 34) # if authentication failed, changes outer_color and fail message color
fail_text = <i>$FAIL <b>($ATTEMPTS)</b></i> # can be set to empty
fail_transition = 300 # transition time in ms between normal outer_color and fail_color
capslock_color = -1
numlock_color = -1
bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above)
invert_numlock = false # change color if numlock is off
swap_font_color = false # see below
position = 0, -20
halign = center
valign = center
}
'';
};
home.file.".config/hypr/hypridle.conf" = {
text = ''
general {
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
before_sleep_cmd = loginctl lock-session # lock before suspend.
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
}
listener {
timeout = 150 # 2.5min.
on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
on-resume = brightnessctl -r # monitor backlight restore.
}
listener {
timeout = 300 # 5min
on-timeout = loginctl lock-session # lock screen when timeout has passed
}
listener {
timeout = 330 # 5.5min
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
}
listener {
timeout = 1800 # 30min
on-timeout = systemctl suspend # suspend pc
}
'';
};
home.file.".config/hypr/hyprpaper.conf" = {
source = if laptop then /home/chris/.dotfiles/.config/hypr/hyprpaper.conf else /home/chris/.dotfiles/.config/hypr/hyprpaper.conf;
};
@ -269,7 +345,7 @@ in
"kdeconnect-indicator"
"wl-paste --watch cliphist store"
"hyprctl setcursor phinger-cursors-light 24"
"swayidle -w timeout 300 'swaylock -S --effect-blur 20x3 --fade-in 1 --effect-vignette 0.5:1 --grace 60' timeout 600 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' before-sleep 'swaylock -S --effect-blur 20x3 --effect-vignette 0.5:1'"
"hypridle"
"sleep 3 && swww img /home/chris/pics/wallpapers/nixorange.jpeg -t grow --transition-bezier .14,0,.14,.99"
];
};

View file

@ -71,8 +71,8 @@ with lib;
wlrctl
wl-clipboard
hyprpaper
swaylock-effects
swayidle
hyprlock
hypridle
aha
glxinfo
vulkan-tools

@ -1 +1 @@
Subproject commit 593b51a34630e67a833382a1a1a6aa6bde3c4102
Subproject commit e783225536394759ec7e877400008ee1da7a978e