unify config a bit
This commit is contained in:
@ -1,19 +1,82 @@
|
||||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland = let
|
||||
locker = "${pkgs.swaylock}/bin/swaylock";
|
||||
set-dpms = "${pkgs.hyprland}/bin/hyprctl dispatcher dpms";
|
||||
locked-dpms = pkgs.writeShellScript "locked-dpms.sh" ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 10 'if pgrep -x swaylock; then ${set-dpms} off; fi' \
|
||||
resume '${set-dpms} on'
|
||||
'';
|
||||
idle-script = pkgs.writeShellScript "idle-lock.sh" ''
|
||||
${pkgs.swayidle}/bin/swayidle -w \
|
||||
timeout 300 '${locker} -f' \
|
||||
timeout 330 '${set-dpms} off' \
|
||||
resume '${set-dpms} on'
|
||||
'';
|
||||
in {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 330;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = {
|
||||
monitor = "";
|
||||
path = "screenshot";
|
||||
|
||||
blur_passes = 2;
|
||||
blur_size = 7;
|
||||
noise = 1.17e-2;
|
||||
};
|
||||
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = "$TIME";
|
||||
color = "rgba(242, 243, 244, 0.75)";
|
||||
font_size = 95;
|
||||
position = "0, 300";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:1000] echo $(date +"%A, %B %d")'';
|
||||
color = "rgba(242, 243, 244, 0.75)";
|
||||
font_size = 22;
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "200,50";
|
||||
outline_thickness = 2;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.35;
|
||||
dots_center = true;
|
||||
outer_color = "rgba(0, 0, 0, 0)";
|
||||
inner_color = "rgba(0, 0, 0, 0.2)";
|
||||
font_color = "rgb(111, 45, 104)";
|
||||
fade_on_empty = false;
|
||||
rounding = -1;
|
||||
check_color = "rgb(30, 107, 204)";
|
||||
placeholder_text = ''<i><span foreground="##cdd6f4">Input Password...</span></i>'';
|
||||
hide_input = false;
|
||||
position = "0, -100";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
@ -22,16 +85,12 @@
|
||||
exec-once = [
|
||||
"${pkgs.waybar}/bin/waybar"
|
||||
"${pkgs.mako}/bin/mako"
|
||||
idle-script
|
||||
locked-dpms
|
||||
];
|
||||
|
||||
monitor = [
|
||||
"eDP-1,1920x1080,0x0,1.333333" # Laptop screen
|
||||
"desc:Dell Inc. DELL P2723DE 79RFH14,2560x1440,1440x0,1"
|
||||
"desc:Dell Inc. DELL P2723DE 39RFH14,2560x1440,4000x0,1"
|
||||
# "desc:LG Electronics LG ULTRAWIDE 0x000219F2,2560x1080,1440x0,1" # Primary @home
|
||||
# "desc:Fujitsu Siemens Computers GmbH B22W-6 LED YV3U164923,1680x1050,4000x0,1" # Secondary @home
|
||||
",preferred,auto,1" # Automatically configure everything else
|
||||
];
|
||||
|
||||
@ -97,7 +156,7 @@
|
||||
"$mod, return, exec, ${pkgs.alacritty}/bin/alacritty"
|
||||
"$mod, D, exec, ${pkgs.rofi-wayland}/bin/rofi -show drun"
|
||||
"$mod SHIFT, Q, killactive, "
|
||||
"$mod, L, exec, ${locker}"
|
||||
"$mod, L, exec, loginctl lock-session"
|
||||
"$mod, V, togglefloating, "
|
||||
"$mod, F, fullscreen, 1"
|
||||
"$mod, P, pseudo, # dwindle"
|
||||
@ -124,10 +183,6 @@
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
"$mod SHIFT, L, exec, ${locker}"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
# KeePassXC
|
||||
"float,class:(org.keepassxc.KeePassXC)"
|
||||
|
Reference in New Issue
Block a user