Switch from swayidle to hypridle

This commit is contained in:
Kiana Sheibani 2024-05-14 01:39:50 -04:00
parent e304f05642
commit 7d446d026a
4 changed files with 47 additions and 35 deletions

View file

@ -25,6 +25,7 @@
]; ];
programs.hyprland.enable = true; programs.hyprland.enable = true;
security.pam.services.hyprlock = {};
programs.fish.enable = true; programs.fish.enable = true;
programs.sway.enable = true; programs.sway.enable = true;

View file

@ -36,9 +36,7 @@ in {
resize_on_border = true; resize_on_border = true;
"col.inactive_border" = "rgb(474f6f)"; "col.inactive_border" = "rgb(474f6f)";
"col.active_border" = "rgb(7bc5e4)"; "col.active_border" = "rgb(b4f9f8)";
"col.nogroup_border" = "rgb(d5556f)";
"col.nogroup_border_active" = "rgb(d5556f)";
}; };
plugin.hy3 = { plugin.hy3 = {
@ -47,6 +45,10 @@ in {
tabs = { tabs = {
height = 6; height = 6;
render_text = false; render_text = false;
"col.active" = "rgb(b4f9f8)";
"col.inactive" = "rgb(474f6f)";
"col.urgent" = "rgb(f7768e)";
}; };
}; };
@ -61,9 +63,6 @@ in {
font_size = 14; font_size = 14;
}; };
windowrulev2 = [
"bordercolor rgb(e0af68), fullscreen:1"
];
layerrule = [ layerrule = [
"noanim, ^(notifications)$" "noanim, ^(notifications)$"
]; ];
@ -87,7 +86,7 @@ in {
"$mod, Return, exec, $terminal" "$mod, Return, exec, $terminal"
"$mod, D, exec, $menu" "$mod, D, exec, $menu"
"$mod Shift, E, exec, ${scripts}/exit" "$mod Shift, E, exec, ${scripts}/exit"
"$mod, M, exec, swaylock" "$mod, M, exec, hyprlock --immediate"
# Emacs Everywhere # Emacs Everywhere
# "$mod, Q, exec, $HOME/.config/emacs/bin/doom +everywhere" # "$mod, Q, exec, $HOME/.config/emacs/bin/doom +everywhere"

View file

@ -21,13 +21,13 @@ in {
services.hypridle.enable = true; services.hypridle.enable = true;
services.hypridle.settings = { services.hypridle.settings = {
general = { general = {
before_sleep_cmd = "swaylock -f"; before_sleep_cmd = "hyprlock --immediate";
}; };
listener = [ listener = [
{ {
timeout = 120; timeout = 120;
on-timeout = "swaylock -f --grace=180"; on-timeout = "hyprlock";
} }
{ {
timeout = 600; timeout = 600;

View file

@ -1,7 +1,6 @@
{ pkgs, config, ... }: { pkgs, config, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
swaylock-effects
wl-clipboard wl-clipboard
wtype wtype
wlroots wlroots
@ -11,31 +10,6 @@
]; ];
xdg.configFile = { xdg.configFile = {
"swaylock/config".text = ''
ignore-empty-password
fade-in=0.3
indicator
screenshots
font=JetBrainsMono
text-color=ffffff
color=00000000
ring-color=7da6ff
key-hl-color=7bc5e4
line-uses-inside
indicator-radius=120
indicator-thickness=7
clock
datestr=%a, %Y-%m-%d
effect-scale=0.4
effect-vignette=0.3:0.7
effect-blur=2x2
'';
"swaynag/config".text = '' "swaynag/config".text = ''
font=JetBrainsMono 10 font=JetBrainsMono 10
layer=top layer=top
@ -50,6 +24,44 @@
''; '';
}; };
# Hyprlock
programs.hyprlock.enable = true;
programs.hyprlock.settings = {
general = {
hide_cursor = true;
disable_loading_bar = true;
grace = 180;
};
background = [
{
monitor = "";
path = "screenshot";
blur_passes = 2;
blur_size = 6;
}
];
input-field = [
{
monitor = "";
size = "500, 50";
position = "0, -80";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(a9b1d6)";
inner_color = "rgb(1a1b26)";
outer_color = "rgb(b4f9f8)";
outline_thickness = 3;
placeholder_text = ''<span foreground="##565f89">Password</span>'';
shadow_passes = 2;
}
];
};
# Rofi # Rofi
programs.rofi.enable = true; programs.rofi.enable = true;