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 = $terminal
|
||||||
# exec-once = nm-applet &
|
# 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
|
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||||
|
|
||||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
# 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, C, killactive,
|
||||||
bind = $mainMod, M, exit,
|
bind = $mainMod, M, exit,
|
||||||
bind = $mainMod, E, exec, $fileManager
|
bind = $mainMod, E, exec, $fileManager
|
||||||
bind = $mainMod, V, togglefloating,
|
bind = $mainMod, V, togglefloating,
|
||||||
bind = $mainMod, R, exec, $menu
|
bind = $mainMod, space, exec, $menu
|
||||||
bind = $mainMod, P, pseudo, # dwindle
|
bind = $mainMod, P, pseudo, # dwindle
|
||||||
bind = $mainMod, J, togglesplit, # 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
|
# Move focus with mainMod + arrow keys
|
||||||
bind = $mainMod, left, movefocus, l
|
bind = $mainMod, h, movefocus, l
|
||||||
bind = $mainMod, right, movefocus, r
|
bind = $mainMod, j, movefocus, u
|
||||||
bind = $mainMod, up, movefocus, u
|
bind = $mainMod, k, movefocus, d
|
||||||
bind = $mainMod, down, movefocus, d
|
bind = $mainMod, l, movefocus, r
|
||||||
|
|
||||||
# Switch workspaces with mainMod + [0-9]
|
# Switch workspaces with mainMod + [0-9]
|
||||||
bind = $mainMod, 1, workspace, 1
|
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
|
||||||
|
}
|
||||||
@@ -23,9 +23,7 @@
|
|||||||
"temperature",
|
"temperature",
|
||||||
"backlight",
|
"backlight",
|
||||||
"keyboard-state",
|
"keyboard-state",
|
||||||
"sway/language",
|
|
||||||
"battery",
|
"battery",
|
||||||
"battery#bat2",
|
|
||||||
"clock",
|
"clock",
|
||||||
"tray",
|
"tray",
|
||||||
"custom/power"
|
"custom/power"
|
||||||
@@ -37,7 +35,7 @@
|
|||||||
"warp-on-scroll": false,
|
"warp-on-scroll": false,
|
||||||
"format": "{name}: {icon}",
|
"format": "{name}: {icon}",
|
||||||
"format-icons": {
|
"format-icons": {
|
||||||
// "1": "",
|
"1": "",
|
||||||
// "2": "",
|
// "2": "",
|
||||||
// "3": "",
|
// "3": "",
|
||||||
// "4": "",
|
// "4": "",
|
||||||
@@ -104,7 +102,7 @@
|
|||||||
"spacing": 10
|
"spacing": 10
|
||||||
},
|
},
|
||||||
"clock": {
|
"clock": {
|
||||||
// "timezone": "America/New_York",
|
"timezone": "Asia/Karachi",
|
||||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||||
"format-alt": "{:%Y-%m-%d}"
|
"format-alt": "{:%Y-%m-%d}"
|
||||||
},
|
},
|
||||||
@@ -130,7 +128,7 @@
|
|||||||
},
|
},
|
||||||
"battery": {
|
"battery": {
|
||||||
"states": {
|
"states": {
|
||||||
// "good": 95,
|
"good": 95,
|
||||||
"warning": 30,
|
"warning": 30,
|
||||||
"critical": 15
|
"critical": 15
|
||||||
},
|
},
|
||||||
@@ -143,9 +141,6 @@
|
|||||||
// "format-full": "",
|
// "format-full": "",
|
||||||
"format-icons": ["", "", "", "", ""]
|
"format-icons": ["", "", "", "", ""]
|
||||||
},
|
},
|
||||||
"battery#bat2": {
|
|
||||||
"bat": "BAT2"
|
|
||||||
},
|
|
||||||
"power-profiles-daemon": {
|
"power-profiles-daemon": {
|
||||||
"format": "{icon}",
|
"format": "{icon}",
|
||||||
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
|
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
|
||||||
@@ -158,7 +153,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"network": {
|
"network": {
|
||||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
|
||||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||||
"format-ethernet": "{ipaddr}/{cidr} ",
|
"format-ethernet": "{ipaddr}/{cidr} ",
|
||||||
"tooltip-format": "{ifname} via {gwaddr} ",
|
"tooltip-format": "{ifname} via {gwaddr} ",
|
||||||
|
|||||||
@@ -98,6 +98,10 @@ in
|
|||||||
dolphin
|
dolphin
|
||||||
waybar
|
waybar
|
||||||
font-awesome
|
font-awesome
|
||||||
|
swaynotificationcenter
|
||||||
|
hyprshot
|
||||||
|
hyprlock
|
||||||
|
hypridle
|
||||||
|
|
||||||
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -104,7 +104,7 @@
|
|||||||
|
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Shahab Dogar";
|
description = "Shahab Dogar";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = [ "networkmanager" "wheel" "input" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
|
|||||||
Reference in New Issue
Block a user