This commit is contained in:
Hadi 2024-06-14 20:58:52 +02:00
parent 089c57802e
commit fad7c6e46d
6 changed files with 119 additions and 102 deletions

View File

@ -1,23 +1,21 @@
{ config, pkgs, ... }: { { pkgs, ... }: {
home.packages = with pkgs; [ hypridle ];
xdg.configFile."hypr/hypridle.conf".text = '' services.hypridle = {
general { enable = true;
ignore_dbus_inhibit = false settings = {
} general = { ignore_dbus_inhibit = false; };
listener = [
# Screenlock {
listener { timeout = 600;
timeout = 600 on-timeout = pkgs.hyprlock + "/bin/hyprlock";
on-timeout = ${pkgs.hyprlock}/bin/hyprlock }
on-resume = ${pkgs.libnotify}/bin/notify-send "Welcome back ${config.home.username}!" {
} timeout = 660;
on-timeout = "systemctl suspend";
# Suspend (not working on my laptop) on-resume = pkgs.libnotify
#listener { + "/bin/notify-send 'Welcome back to your desktop!'";
# timeout = 660 }
# on-timeout = systemctl suspend ];
# on-resume = ${pkgs.libnotify}/bin/notify-send "Welcome back to your desktop!" };
#} };
'';
} }

View File

@ -1,75 +1,84 @@
{ pkgs, config, ... }: { { config, ... }: {
home.packages = with pkgs; [ hyprlock ]; programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = true;
grace = 5;
no_fade_in = true;
no_fade_out = true;
};
xdg.configFile."hypr/hyprlock.conf".text = '' background = {
background { monitor = "";
monitor = path = "$HOME/wallpapers/${config.var.theme.wallpaper}";
path = $HOME/wallpapers/${config.var.theme.wallpaper} color = "rgb(${config.var.theme.colors.bg})";
color = rgb(${config.var.theme.colors.bg})
blur_size = 4 blur_size = 4;
blur_passes = 3 blur_passes = 3;
noise = 0.0117 noise = 1.17e-2;
contrast = 1.3000 contrast = 1.3;
brightness = 0.8000 brightness = 0.8;
vibrancy = 0.2100 vibrancy = 0.21;
vibrancy_darkness = 0.0 vibrancy_darkness = 0.0;
} };
input-field { input-field = [{
monitor = monitor = "";
size = 250, 50 size = "250, 50";
outline_thickness = 3 outline_thickness = 3;
dots_size = 0.2 # Scale of input-field height, 0.2 - 0.8 dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.64 # Scale of dots' absolute size, 0.0 - 1.0 dots_spacing = 0.64; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true dots_center = true;
outer_color = rgb(${config.var.theme.colors.accent}) outer_color = "rgb(${config.var.theme.colors.accent})";
inner_color = rgb(${config.var.theme.colors.bg}) inner_color = "rgb(${config.var.theme.colors.bg})";
font_color = rgb(${config.var.theme.colors.fg}) font_color = "rgb(${config.var.theme.colors.fg})";
fade_on_empty = true fade_on_empty = true;
placeholder_text = <i>Password...</i> # Text rendered in the input box when it's empty. placeholder_text =
hide_input = false "Password..."; # Text rendered in the input box when it's empty.
position = 0, 80 position = "0, 80";
halign = center halign = "center";
valign = bottom valign = "bottom";
} }];
# Current time label = [
label { # Current time
monitor = {
text = cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>" monitor = "";
color = rgb(${config.var.theme.colors.fg}) text =
font_size = 64 ''cmd[update:1000] echo "<b><big> $(date +"%H:%M:%S") </big></b>"'';
font_family = ${config.var.theme.font} color = "rgb(${config.var.theme.colors.fg})";
position = 0, 16 font_size = 64;
halign = center font_family = config.var.theme.font;
valign = center position = "0, 16";
} halign = "center";
valign = "center";
# User label }
label { # User label
monitor = {
text = Hey <span text_transform="capitalize" size="larger">$USER</span> monitor = "";
color = rgb(${config.var.theme.colors.fg}) text = ''
font_size = 20 Hey <span text_transform="capitalize" size="larger">$USER</span>'';
font_family = ${config.var.theme.font} color = "rgb(${config.var.theme.colors.fg})";
position = 0, 0 font_size = 20;
halign = center font_family = config.var.theme.font;
valign = center position = "0, 0";
} halign = "center";
valign = "center";
}
# Type to unlock # Type to unlock
label { {
monitor = monitor = "";
text = Type to unlock! text = "Type to unlock!";
color = rgb(${config.var.theme.colors.fg}) color = "rgb(${config.var.theme.colors.fg})";
font_size = 16 font_size = 16;
font_family = ${config.var.theme.font} font_family = config.var.theme.font;
position = 0, 30 position = "0, 30";
halign = center halign = "center";
valign = bottom valign = "bottom";
} }
''; ];
};
};
} }

View File

@ -1,10 +1,12 @@
{ pkgs, config, ... }: { { config, ... }: {
home.packages = with pkgs; [ hyprpaper ]; services.hyprpaper = {
enable = true;
xdg.configFile."hypr/hyprpaper.conf".text = '' settings = {
preload = ~/wallpapers/${config.var.theme.wallpaper} ipc = "on";
wallpaper = ,~/wallpapers/${config.var.theme.wallpaper} splash = false;
ipc=true splash_offset = 2.0;
splash=false preload = [ "~/wallpapers/${config.var.theme.wallpaper}" ];
''; wallpaper = [ ",~/wallpapers/${config.var.theme.wallpaper}" ];
};
};
} }

View File

@ -9,10 +9,16 @@
# package = inputs.waybar.packages."${pkgs.system}".waybar; # package = inputs.waybar.packages."${pkgs.system}".waybar;
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = config.var.theme.waybar.position;
position = "top"; position = config.var.theme.waybar.position;
spacing = 0; spacing = 0;
"margin-top" = if config.var.theme.waybar.float then "margin-top" = if config.var.theme.waybar.float
&& config.var.theme.waybar.position == "top" then
config.var.theme.gaps-out
else
0;
"margin-bottom" = if config.var.theme.waybar.float
&& config.var.theme.waybar.position == "bottom" then
config.var.theme.gaps-out config.var.theme.gaps-out
else else
0; 0;

View File

@ -40,6 +40,7 @@
waybar = { waybar = {
transparent = true; transparent = true;
float = true; float = true;
position = "top";
}; };
colors = { colors = {

View File

@ -40,6 +40,7 @@
waybar = { waybar = {
transparent = true; transparent = true;
float = true; float = true;
position = "top";
}; };
colors = { colors = {