feat: add hyprpanel configuration

This commit is contained in:
Michael Thomas 2025-05-17 15:52:48 -04:00
parent 5fbbfd7dc6
commit 03ba8a4861
5 changed files with 83 additions and 55 deletions

View File

@ -32,7 +32,11 @@
}; };
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
ags.url = "github:Aylur/ags"; hyprpanel = {
url = "github:jas-singhfsu/hyprpanel";
inputs.nixpkgs.follows = "unstable";
};
agenix = { agenix = {
url = "github:ryantm/agenix"; url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View File

@ -1,43 +0,0 @@
{
inputs,
pkgs,
lib,
config,
...
}: let
inherit (lib) mkEnableOption mkIf;
cfg = config.my.ags;
in {
imports = [inputs.ags.homeManagerModules.default];
options.my.ags = {
enable = mkEnableOption "ags";
};
config = mkIf cfg.enable {
programs.ags = {
enable = true;
extraPackages =
(with pkgs; [
fzf
])
++ (with inputs.ags.packages.${pkgs.system}; [
battery
hyprland
mpris
network
tray
wireplumber
]);
};
home.packages = with pkgs; [
brightnessctl
fd
dart-sass
hyprpicker
swww
];
};
}

View File

@ -44,6 +44,7 @@ in {
gnome-font-viewer gnome-font-viewer
gnome-system-monitor gnome-system-monitor
monophony # music player monophony # music player
zen-browser
# Nvim clipboard # Nvim clipboard
wl-clipboard wl-clipboard

View File

@ -1,4 +1,5 @@
{ {
inputs,
pkgs, pkgs,
lib, lib,
config, config,
@ -7,13 +8,13 @@
inherit (lib) mkEnableOption mkIf; inherit (lib) mkEnableOption mkIf;
cfg = config.my.hyprland; cfg = config.my.hyprland;
in { in {
imports = [inputs.hyprpanel.homeManagerModules.hyprpanel];
options.my.hyprland = { options.my.hyprland = {
enable = mkEnableOption "hyprland"; enable = mkEnableOption "hyprland";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
my.ags.enable = true;
programs.fuzzel.enable = true; programs.fuzzel.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -23,16 +24,25 @@ in {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
plugins = with pkgs.hyprlandPlugins; [
hy3
];
settings = { settings = {
# debug.disable_logs = false;
"$mod" = "SUPER"; "$mod" = "SUPER";
general = { general = {
gaps_in = 5; gaps_in = 5;
gaps_out = 10; # No top gap since the bar is there
gaps_out = "0,10,10,10";
layout = "hy3";
}; };
input = { input = {
follow_mouse = 2; follow_mouse = 2;
sensitivity = -0.2; sensitivity = -0.2;
}; };
plugin.hy3 = {
autotile.enable = true;
};
exec-once = [ exec-once = [
"hyprctl setcursor Adwaita 24" "hyprctl setcursor Adwaita 24"
"ags" "ags"
@ -49,15 +59,19 @@ in {
"$mod, T, exec, foot" "$mod, T, exec, foot"
", Print, exec, grimblast copy area" ", Print, exec, grimblast copy area"
# Windows # Windows
"$mod, H, movefocus, l" "$mod, H, hy3:movefocus, l"
"$mod, J, movefocus, d" "$mod, J, hy3:movefocus, d"
"$mod, K, movefocus, u" "$mod, K, hy3:movefocus, u"
"$mod, L, movefocus, r" "$mod, L, hy3:movefocus, r"
# Moving windows # Moving windows
"$mod SHIFT, H, movewindow, l" "$mod SHIFT, H, hy3:movewindow, l"
"$mod SHIFT, J, movewindow, d" "$mod SHIFT, J, hy3:movewindow, d"
"$mod SHIFT, K, movewindow, u" "$mod SHIFT, K, hy3:movewindow, u"
"$mod SHIFT, L, movewindow, r" "$mod SHIFT, L, hy3:movewindow, r"
# Groups
"$mod, E, hy3:makegroup, opposite"
"$mod SHIFT, E, hy3:changegroup, opposite"
"$mod, W, hy3:changegroup, toggletab"
] ]
++ ( ++ (
# workspaces # workspaces
@ -103,6 +117,8 @@ in {
# mouse bindings # mouse bindings
bindm=ALT,mouse:272,movewindow bindm=ALT,mouse:272,movewindow
bindm=ALT,mouse:273,resizewindow bindm=ALT,mouse:273,resizewindow
bindn = , mouse_down, hy3:focustab, l, require_hovered
bindn = , mouse_up, hy3:focustab, r, require_hovered
# no gaps when only window # no gaps when only window
workspace = w[t1], gapsout:0, gapsin:0 workspace = w[t1], gapsout:0, gapsin:0
@ -234,5 +250,54 @@ in {
]; ];
}; };
}; };
# https://hyprpanel.com/configuration/settings.html#home-manager-module
programs.hyprpanel = {
enable = true;
systemd.enable = true;
hyprland.enable = true;
settings = {
layout."bar.layouts"."0" = {
left = ["dashboard" "workspaces"];
middle = ["clock" "notifications"];
right = ["media" "hypridle" "volume" "network" "bluetooth" "systray"];
};
theme = {
name = "gruvbox";
font = {
name = "Inter";
size = "1rem";
weight = 600;
};
bar = {
transparent = true;
outer_spacing = "0.5em";
margin_top = "0.5em";
margin_bottom = "0.5em";
buttons.clock.spacing = "0";
};
};
bar = {
launcher.icon = "";
clock = {
format = "%b %d %l:%M %p";
showIcon = false;
};
systray.ignore = ["spotify-client"];
customModules.hypridle = {
label = false;
offIcon = "󰛊";
onIcon = "󰅶";
};
};
};
override = {
"theme.bar.buttons.workspaces.active" = "#ebdbb2";
"theme.bar.buttons.workspaces.occupied" = "#665c54";
};
};
}; };
} }

View File

@ -33,6 +33,7 @@
# External overlays # External overlays
# Included after the above to ensure modifications are applied # Included after the above to ensure modifications are applied
hyprpanel = inputs.hyprpanel.overlay;
rust-overlay = inputs.rust-overlay.overlays.default; rust-overlay = inputs.rust-overlay.overlays.default;
vscode-extensions = inputs.nix-vscode-extensions.overlays.default; vscode-extensions = inputs.nix-vscode-extensions.overlays.default;