Compare commits

...

2 Commits

Author SHA1 Message Date
1c9dded45c
🔒 Replaced swaylock with Hyprlock
- Removed Swaylock
- Added Hyprlock with Catppuccin theme.
- Replaced commands to swaylock with hyprlock.
- Added JetBrains Mono Nerd Font
2024-12-31 00:39:22 +01:00
793b3a16d0
💤 Hypridle
- Added hypridle with a simple config
2024-12-30 23:19:40 +01:00
11 changed files with 146 additions and 14 deletions

View File

@ -44,6 +44,13 @@
NIXOS_CONFIG_PATH = "/etc/nixos";
};
fonts = {
fontconfig.enable = true;
packages = with pkgs; [
nerd-fonts.jetbrains-mono
];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [

View File

@ -42,9 +42,6 @@ in
enable = true;
settings = (with builtins; fromTOML (readFile ./starship.toml)) // { };
};
# Lock desktop
swaylock.enable = true;
};
services = {

View File

@ -5,6 +5,8 @@
imports = [
./hyprcursor
./waybar
./hypridle
./hyprlock
];
home.file.".config/hypr/hyprland.conf".source = ./hyprland.conf;

View File

@ -0,0 +1,26 @@
{ ... }:
{
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 900; # Seconds
on-timeout = "hyprlock";
}
{
timeout = 5;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
}

View File

@ -301,7 +301,7 @@ bind = $mainMod, R, exec, $menu
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, B, exec, $browser
bind = $mainMod, L, exec, swaylock & disown
bind = $mainMod, L, exec, hyprlock
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l

View File

@ -0,0 +1,95 @@
{ lib, ... }:
{
home.file.".face.png".source = ./face.png;
# TODO style face and wallpaper
programs.hyprlock = {
enable = true;
settings = {
"$base" = "rgb(1e1e2e)";
"$text" = "rgb(cdd6f4)";
"$textAlpha" = "cdd6f4";
"$mauve" = "rgb(cba6f7)";
"$mauveAlpha" = "cba6f7";
"$red" = "rgb(f38ba8)";
"$yellow" = "rgb(f9e2af)";
"$accent" = "$mauve";
"$accentAlpha" = "$mauveAlpha";
"$surface0" = "rgb(313244)";
"$font" = "JetBrainsMono Nerd Font";
# GENERAL
general = {
disable_loading_bar = true;
hide_cursor = true;
};
# LAYOUT
label = [
{
text = "$LAYOUT";
color = "$text";
font_size = 25;
font_family = "$font";
position = "30, -30";
halign = "left";
valign = "top";
}
# TIME
{
text = "$TIME";
color = "$text";
font_size = 90;
font_family = "$font";
position = "-30, 0";
halign = "right";
valign = "top";
}
# DATE
{
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
color = "$text";
font_size = 25;
font_family = "$font";
position = "-30, -150";
halign = "right";
valign = "top";
}
];
# USER AVATAR
image = {
path = "~/.face.png";
size = 100;
border_color = "$accent";
position = "0, 75";
halign = "center";
valign = "center";
};
# INPUT FIELD
input-field = {
size = "300, 60";
outline_thickness = 4;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = lib.mkDefault "$accent";
inner_color = lib.mkDefault "$surface0";
font_color = lib.mkDefault "$text";
fade_on_empty = false;
placeholder_text = "<span foreground=\"##$textAlpha\"><i>󰌾 Logged in as </i><span foreground=\"##$accentAlpha\">$USER</span></span>";
hide_input = false;
check_color = lib.mkDefault "$accent";
fail_color = lib.mkDefault "$red";
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
capslock_color = lib.mkDefault "$yellow";
position = "0, -47";
halign = "center";
valign = "center";
};
};
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

View File

@ -96,7 +96,7 @@
},
"custom/lock": {
"tooltip": false,
"on-click": "sh -c '(sleep 0.5s; swaylock)' & disown",
"on-click": "sh -c '(sleep 0.5s; hyprlock)'",
"format": ""
},
"custom/power": {

View File

@ -1,8 +1,8 @@
{...}:
{ ... }:
{
home.file.".config/waybar" = {
source = ./config;
recursive = true;
};
home.file.".config/waybar" = {
source = ./config;
recursive = true;
};
}

View File

@ -16,7 +16,7 @@
layout = [
{
label = "lock";
action = "sh -c '(sleep 0.5s; swaylock)' & disown";
action = "sh -c '(sleep 0.5s; hyprlock)'";
text = "Lock";
keybind = "l";
}

View File

@ -13,8 +13,13 @@
hyprpolkitagent # Auth deamon providing modals for password auth
];
programs.hyprland = {
enable = true;
xwayland.enable = true;
programs = {
hyprland = {
enable = true;
xwayland.enable = true;
};
hyprlock.enable = true; # Lock screen
};
services.hypridle.enable = true; # Lock when unused
}