Skip to content

Commit

Permalink
sway{idle,lock} -> hypr{idle,lock}
Browse files Browse the repository at this point in the history
  • Loading branch information
fufexan committed Feb 22, 2024
1 parent d8d83f6 commit e85f77b
Show file tree
Hide file tree
Showing 11 changed files with 186 additions and 73 deletions.
110 changes: 98 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};

hypridle = {
url = "github:hyprwm/hypridle";
inputs.nixpkgs.follows = "nixpkgs";
};

hyprland.url = "github:hyprwm/Hyprland";

hyprland-contrib = {
Expand All @@ -88,6 +93,11 @@
inputs.hyprland.follows = "hyprland";
};

hyprlock = {
url = "github:hyprwm/hyprlock";
inputs.nixpkgs.follows = "nixpkgs";
};

hyprpaper.url = "github:hyprwm/hyprpaper";

kmonad = {
Expand Down
2 changes: 2 additions & 0 deletions home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
./terminal
inputs.matugen.nixosModules.default
inputs.nix-index-db.hmModules.nix-index
inputs.hyprlock.homeManagerModules.default
inputs.hypridle.homeManagerModules.default
self.nixosModules.theme
];

Expand Down
2 changes: 1 addition & 1 deletion home/profiles/io/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

# wayland-specific
../../services/wayland/hyprpaper.nix
../../services/wayland/swayidle.nix
../../services/wayland/hypridle.nix

# terminal emulators
../../terminal/emulators/foot.nix
Expand Down
2 changes: 1 addition & 1 deletion home/programs/wayland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
{
imports = [
./hyprland
./swaylock.nix
./hyprlock.nix
./wlogout.nix
];

Expand Down
4 changes: 0 additions & 4 deletions home/programs/wayland/hyprland/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
inputs,
lib,
pkgs,
...
}: {
Expand All @@ -15,9 +14,6 @@
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
];

# start swayidle as part of hyprland, not sway
systemd.user.services.swayidle.Install.WantedBy = lib.mkForce ["hyprland-session.target"];

# enable hyprland
wayland.windowManager.hyprland = {
enable = true;
Expand Down
2 changes: 1 addition & 1 deletion home/programs/wayland/hyprland/settings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ in {
# set cursor for HL itself
"hyprctl setcursor ${pointer.name} ${toString pointer.size}"
"systemctl --user start clight"
"swaylock"
"hyprlock"
];

general = {
Expand Down
60 changes: 60 additions & 0 deletions home/programs/wayland/hyprlock.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{config, ...}: let
variant = config.theme.name;
c = config.programs.matugen.theme.colors.colors.${variant};

font_family = "Inter";
in {
programs.hyprlock = {
enable = true;

general.hide_cursor = false;

backgrounds = [
{
monitor = "";
path = "${config.home.homeDirectory}/wall.png";
}
];

input-fields = [
{
monitor = "eDP-1";

size = {
width = 300;
height = 50;
};

outline_thickness = 2;

outer_color = "rgb(${c.primary})";
inner_color = "rgb(${c.on_primary_container})";
font_color = "rgb(${c.primary_container})";

fade_on_empty = false;
placeholder_text = ''<span font_family="${font_family}" foreground="##${c.primary_container}">Password...</span>'';

dots_spacing = 0.3;
dots_center = true;
}
];

labels = [
{
monitor = "";
text = "$TIME";
inherit font_family;
font_size = 50;
color = "rgb(${c.primary})";

position = {
x = 0;
y = 80;
};

valign = "center";
halign = "center";
}
];
};
}
39 changes: 0 additions & 39 deletions home/programs/wayland/swaylock.nix

This file was deleted.

Loading

0 comments on commit e85f77b

Please sign in to comment.