feat: add hypridle and hyprlock, update nixos config
This commit is contained in:
24
home-manager/dotfiles/hypr/hypridle.conf
Normal file
24
home-manager/dotfiles/hypr/hypridle.conf
Normal file
@@ -0,0 +1,24 @@
|
||||
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.
|
||||
}
|
||||
|
||||
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
|
||||
# listener {
|
||||
# timeout = 150 # 2.5min.
|
||||
# on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
|
||||
# on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
|
||||
# }
|
||||
|
||||
listener {
|
||||
timeout = 300 # 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.
|
||||
}
|
||||
@@ -39,7 +39,7 @@ $menu = wofi --show drun
|
||||
|
||||
# exec-once = $terminal
|
||||
# exec-once = nm-applet &
|
||||
exec-once = waybar
|
||||
exec-once = waybar & swaync & hypridle
|
||||
|
||||
|
||||
#############################
|
||||
@@ -203,20 +203,23 @@ device {
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, Q, exec, $terminal
|
||||
bind = $mainMod, return, exec, $terminal
|
||||
bind = $mainMod, C, killactive,
|
||||
bind = $mainMod, M, exit,
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, R, exec, $menu
|
||||
bind = $mainMod, space, exec, $menu
|
||||
bind = $mainMod, P, pseudo, # dwindle
|
||||
bind = $mainMod, J, togglesplit, # dwindle
|
||||
bind = , PRINT, exec, hyprshot -m window
|
||||
bind = shift, PRINT, exec, hyprshot -m region
|
||||
bind = $mainMod, L, exec, hyprlock
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
bind = $mainMod, right, movefocus, r
|
||||
bind = $mainMod, up, movefocus, u
|
||||
bind = $mainMod, down, movefocus, d
|
||||
bind = $mainMod, h, movefocus, l
|
||||
bind = $mainMod, j, movefocus, u
|
||||
bind = $mainMod, k, movefocus, d
|
||||
bind = $mainMod, l, movefocus, r
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
|
||||
37
home-manager/dotfiles/hypr/hyprlock.conf
Normal file
37
home-manager/dotfiles/hypr/hyprlock.conf
Normal file
@@ -0,0 +1,37 @@
|
||||
label {
|
||||
monitor =
|
||||
text = Hi there, $USER
|
||||
color = rgba(200, 200, 200, 1.0)
|
||||
font_size = 25
|
||||
font_family = ComicCodeLigatures
|
||||
|
||||
position = 0, 80
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
|
||||
background {
|
||||
monitor =
|
||||
path = screenshot
|
||||
color = rgba(25, 20, 20, 1.0)
|
||||
blur_passes = 2
|
||||
}
|
||||
|
||||
input-field {
|
||||
monitor =
|
||||
size = 20%, 5%
|
||||
outline_thickness = 3
|
||||
inner_color = rgba(0, 0, 0, 0.0) # no fill
|
||||
|
||||
outer_color = rgba(33ccffee) rgba(00ff99ee) 45deg
|
||||
check_color=rgba(00ff99ee) rgba(ff6633ee) 120deg
|
||||
fail_color=rgba(ff6633ee) rgba(ff0066ee) 40deg
|
||||
|
||||
font_color = rgb(143, 143, 143)
|
||||
fade_on_empty = false
|
||||
rounding = 15
|
||||
|
||||
position = 0, -20
|
||||
halign = center
|
||||
valign = center
|
||||
}
|
||||
Reference in New Issue
Block a user