Waybar finalized
This commit is contained in:
parent
5e920cd892
commit
737c3b1de3
4 changed files with 257 additions and 220 deletions
|
|
@ -3,7 +3,7 @@
|
|||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption types mkIf trivial strings lists;
|
||||
inherit (lib) mkOption types mkIf recursiveUpdate trivial strings lists;
|
||||
inherit (builtins) concatStringsSep elem genList elemAt;
|
||||
inherit (trivial) boolToString;
|
||||
inherit (strings) floatToString;
|
||||
|
|
@ -58,10 +58,22 @@
|
|||
fontWeight = types.enum ["thin" "ultralight" "light" "semilight" "book" "normal" "medium" "semibold" "bold" "ultrabold" "heavy" "ultraheavy"];
|
||||
in {
|
||||
options.horseman.wm.hyprland.config = {
|
||||
execOnce = mkOption {type = types.listOf types.str;};
|
||||
env = mkOption {type = types.listOf types.str;};
|
||||
windowrules = mkOption {type = types.listOf types.str;};
|
||||
workspaces = mkOption {type = types.listOf types.str;};
|
||||
execOnce = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
env = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
windowrules = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
workspaces = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [];
|
||||
};
|
||||
general = {
|
||||
borderSize = mkOption {
|
||||
type = types.int;
|
||||
|
|
@ -1222,6 +1234,18 @@ in {
|
|||
};
|
||||
|
||||
waybar = {
|
||||
layout = {
|
||||
horizontal = {
|
||||
left = mkOption {type = types.listOf types.str;};
|
||||
center = mkOption {type = types.listOf types.str;};
|
||||
right = mkOption {type = types.listOf types.str;};
|
||||
};
|
||||
vertical = {
|
||||
left = mkOption {type = types.listOf types.str;};
|
||||
center = mkOption {type = types.listOf types.str;};
|
||||
right = mkOption {type = types.listOf types.str;};
|
||||
};
|
||||
};
|
||||
formats = {
|
||||
horizontal = mkOption {
|
||||
type = types.attrs;
|
||||
|
|
@ -1711,52 +1735,52 @@ in {
|
|||
);
|
||||
in {
|
||||
topBar =
|
||||
recursiveUpdate
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
output = outputMap "top";
|
||||
|
||||
modules-left = ["group/power"];
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-right = ["network" "pulseaudio" "memory" "cpu" "clock"];
|
||||
}
|
||||
// cfg.config.waybar.modules // cfg.config.waybar.formats.horizontal;
|
||||
modules-left = cfg.config.waybar.layout.horizontal.left;
|
||||
modules-center = cfg.config.waybar.layout.horizontal.center;
|
||||
modules-right = cfg.config.waybar.layout.horizontal.right;
|
||||
} (recursiveUpdate cfg.config.waybar.modules cfg.config.waybar.formats.horizontal);
|
||||
|
||||
bottomBar =
|
||||
recursiveUpdate
|
||||
{
|
||||
layer = "top";
|
||||
position = "bottom";
|
||||
output = outputMap "bottom";
|
||||
|
||||
modules-left = ["group/power"];
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-right = ["network" "pulseaudio" "memory" "cpu" "clock"];
|
||||
}
|
||||
// cfg.config.waybar.modules // cfg.config.waybar.formats.horizontal;
|
||||
modules-left = cfg.config.waybar.layout.horizontal.left;
|
||||
modules-center = cfg.config.waybar.layout.horizontal.center;
|
||||
modules-right = cfg.config.waybar.layout.horizontal.right;
|
||||
} (recursiveUpdate cfg.config.waybar.modules cfg.config.waybar.formats.horizontal);
|
||||
|
||||
rightBar =
|
||||
recursiveUpdate
|
||||
{
|
||||
layer = "top";
|
||||
position = "right";
|
||||
output = outputMap "right";
|
||||
|
||||
modules-left = ["group/power"];
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-right = ["battery" "clock"];
|
||||
}
|
||||
// cfg.config.waybar.modules // cfg.config.waybar.formats.vertical;
|
||||
modules-left = cfg.config.waybar.layout.vertical.left;
|
||||
modules-center = cfg.config.waybar.layout.vertical.center;
|
||||
modules-right = cfg.config.waybar.layout.vertical.right;
|
||||
} (recursiveUpdate cfg.config.waybar.modules cfg.config.waybar.formats.vertical);
|
||||
|
||||
leftBar =
|
||||
recursiveUpdate
|
||||
{
|
||||
layer = "top";
|
||||
position = "left";
|
||||
output = outputMap "left";
|
||||
|
||||
modules-left = ["group/power"];
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-right = ["battery" "clock"];
|
||||
}
|
||||
// cfg.config.waybar.modules // cfg.config.waybar.formats.vertical;
|
||||
modules-left = cfg.config.waybar.layout.vertical.left;
|
||||
modules-center = cfg.config.waybar.layout.vertical.center;
|
||||
modules-right = cfg.config.waybar.layout.vertical.right;
|
||||
} (recursiveUpdate cfg.config.waybar.modules cfg.config.waybar.formats.vertical);
|
||||
};
|
||||
};
|
||||
xdg.configFile."waybar/style.css".source = ./config/waybar/style.css;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue