integrated waybar configuration cleanly into existing hyprland config
This commit is contained in:
parent
90966f1b3e
commit
5e920cd892
8 changed files with 356 additions and 343 deletions
|
|
@ -7,6 +7,6 @@ confirm_os_window_close 0
|
||||||
|
|
||||||
background_opacity 0.7
|
background_opacity 0.7
|
||||||
|
|
||||||
font_family DejaVuSansM Nerd Font Mono
|
font_family Hasklug Nerd Font
|
||||||
bold_font DejaVuSansM Nerd Font Mono Bold
|
bold_font auto
|
||||||
bold_italic_font DejaVuSansM Nerd Font Mono Bold Oblique
|
bold_italic_font auto
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@
|
||||||
x = 0;
|
x = 0;
|
||||||
y = 0;
|
y = 0;
|
||||||
wallpaper = ../../misc/landscape.png;
|
wallpaper = ../../misc/landscape.png;
|
||||||
|
bar = "right";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
output = "DP-3";
|
output = "DP-3";
|
||||||
|
|
@ -35,6 +36,7 @@
|
||||||
y = 0;
|
y = 0;
|
||||||
transform = 1;
|
transform = 1;
|
||||||
wallpaper = ../../misc/portrait.png;
|
wallpaper = ../../misc/portrait.png;
|
||||||
|
bar = "top";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
bindWorkspaces = "interlaced";
|
bindWorkspaces = "interlaced";
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
nerd-fonts.dejavu-sans-mono
|
nerd-fonts.hasklug
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,14 +35,13 @@ in {
|
||||||
l = "ls -lAh --group-directories-first";
|
l = "ls -lAh --group-directories-first";
|
||||||
zip = "zip -r";
|
zip = "zip -r";
|
||||||
cat = "bat";
|
cat = "bat";
|
||||||
|
py = "python3";
|
||||||
};
|
};
|
||||||
|
|
||||||
ohMyZsh = {
|
ohMyZsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
plugins = [
|
||||||
"git"
|
|
||||||
"zsh-interactive-cd"
|
"zsh-interactive-cd"
|
||||||
"python"
|
|
||||||
"git-auto-fetch"
|
"git-auto-fetch"
|
||||||
"wd"
|
"wd"
|
||||||
];
|
];
|
||||||
|
|
|
||||||
159
modules/wm/hyprland/animations.nix
Normal file
159
modules/wm/hyprland/animations.nix
Normal file
|
|
@ -0,0 +1,159 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
cfg = config.horseman.wm.hyprland;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
horseman.wm.hyprland.config = {
|
||||||
|
animations = {
|
||||||
|
enabled = true;
|
||||||
|
beziers = [
|
||||||
|
{
|
||||||
|
name = "easeOutQuint";
|
||||||
|
startX = 0.23;
|
||||||
|
startY = 1.0;
|
||||||
|
endX = 0.32;
|
||||||
|
endY = 1.0;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "easeInOutCubic";
|
||||||
|
startX = 0.65;
|
||||||
|
startY = 0.05;
|
||||||
|
endX = 0.36;
|
||||||
|
endY = 1.0;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "linear";
|
||||||
|
startX = 0.0;
|
||||||
|
startY = 0.0;
|
||||||
|
endX = 1.0;
|
||||||
|
endY = 1.0;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "almostLinear";
|
||||||
|
startX = 0.5;
|
||||||
|
startY = 0.5;
|
||||||
|
endX = 0.75;
|
||||||
|
endY = 1.0;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "quick";
|
||||||
|
startX = 0.15;
|
||||||
|
startY = 0.0;
|
||||||
|
endX = 0.1;
|
||||||
|
endY = 1.0;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
animations = [
|
||||||
|
{
|
||||||
|
name = "global";
|
||||||
|
on = true;
|
||||||
|
speed = 10.0;
|
||||||
|
curve = "default";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "border";
|
||||||
|
on = true;
|
||||||
|
speed = 5.39;
|
||||||
|
curve = "easeOutQuint";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "windows";
|
||||||
|
on = true;
|
||||||
|
speed = 4.79;
|
||||||
|
curve = "easeOutQuint";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "windowsIn";
|
||||||
|
on = true;
|
||||||
|
speed = 4.1;
|
||||||
|
curve = "easeOutQuint";
|
||||||
|
style = "popin 87%";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "windowsOut";
|
||||||
|
on = true;
|
||||||
|
speed = 1.49;
|
||||||
|
curve = "linear";
|
||||||
|
style = "popin 87%";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "fadeIn";
|
||||||
|
on = true;
|
||||||
|
speed = 1.73;
|
||||||
|
curve = "almostLinear";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "fadeOut";
|
||||||
|
on = true;
|
||||||
|
speed = 1.46;
|
||||||
|
curve = "almostLinear";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "fade";
|
||||||
|
on = true;
|
||||||
|
speed = 3.03;
|
||||||
|
curve = "quick";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "layers";
|
||||||
|
on = true;
|
||||||
|
speed = 3.81;
|
||||||
|
curve = "easeOutQuint";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "layersIn";
|
||||||
|
on = true;
|
||||||
|
speed = 4.0;
|
||||||
|
curve = "easeOutQuint";
|
||||||
|
style = "fade";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "layersOut";
|
||||||
|
on = true;
|
||||||
|
speed = 1.5;
|
||||||
|
curve = "linear";
|
||||||
|
style = "fade";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "fadeLayersIn";
|
||||||
|
on = true;
|
||||||
|
speed = 1.79;
|
||||||
|
curve = "almostLinear";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "fadeLayersOut";
|
||||||
|
on = true;
|
||||||
|
speed = 1.39;
|
||||||
|
curve = "almostLinear";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "workspaces";
|
||||||
|
on = true;
|
||||||
|
speed = 1.94;
|
||||||
|
curve = "almostLinear";
|
||||||
|
style = "fade";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "workspacesIn";
|
||||||
|
on = true;
|
||||||
|
speed = 1.21;
|
||||||
|
curve = "almostLinear";
|
||||||
|
style = "fade";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "workspacesOut";
|
||||||
|
on = true;
|
||||||
|
speed = 1.94;
|
||||||
|
curve = "almostLinear";
|
||||||
|
style = "fade";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
* {
|
* {
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
font-family: "Zed Mono Nerd Font";
|
font-family: "Hasklug Nerd Font";
|
||||||
}
|
}
|
||||||
|
|
||||||
window#waybar{
|
window#waybar{
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ in {
|
||||||
imports = [
|
imports = [
|
||||||
./options.nix
|
./options.nix
|
||||||
./keybindings.nix
|
./keybindings.nix
|
||||||
|
./animations.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
@ -45,194 +46,6 @@ in {
|
||||||
xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.${homeCfg.username} = {
|
|
||||||
programs.waybar = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
horizontalBar = {
|
|
||||||
layer = "top";
|
|
||||||
position = "top";
|
|
||||||
output = [
|
|
||||||
"DP-3"
|
|
||||||
];
|
|
||||||
modules-left = ["group/power"];
|
|
||||||
modules-center = ["hyprland/workspaces"];
|
|
||||||
modules-right = ["network" "pulseaudio" "memory" "cpu" "clock"];
|
|
||||||
|
|
||||||
"clock" = {
|
|
||||||
interval = 1;
|
|
||||||
format = "{:%H:%M:%S}";
|
|
||||||
tooltip-format = "{:%a %d %b %Y}";
|
|
||||||
};
|
|
||||||
|
|
||||||
"cpu" = {
|
|
||||||
interval = 3;
|
|
||||||
format = " {usage}%";
|
|
||||||
on-click = "kitty btop &";
|
|
||||||
};
|
|
||||||
|
|
||||||
"memory" = {
|
|
||||||
interval = 3;
|
|
||||||
format = " {percentage}%";
|
|
||||||
on-click = "kitty btop &";
|
|
||||||
};
|
|
||||||
|
|
||||||
"pulseaudio" = {
|
|
||||||
format = " {volume}";
|
|
||||||
on-click = "kitty pulsemixer &";
|
|
||||||
};
|
|
||||||
|
|
||||||
"network" = {
|
|
||||||
interval = 3;
|
|
||||||
format = "{ipaddr}";
|
|
||||||
format-ethernet = " {ipaddr}";
|
|
||||||
format-disconnected = " Disconnected";
|
|
||||||
format-wifi = " {essid}";
|
|
||||||
|
|
||||||
tooltip = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
"battery" = {
|
|
||||||
interval = 3;
|
|
||||||
# TODO This needs to be fixed
|
|
||||||
};
|
|
||||||
|
|
||||||
"hyprland/workspaces" = {
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
"active" = "";
|
|
||||||
"default" = "";
|
|
||||||
"empty" = "";
|
|
||||||
};
|
|
||||||
persistent-workspaces = {
|
|
||||||
"*" = [1 2 3 4 5 6 7 8 9 10];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
"group/power" = {
|
|
||||||
orientation = "horizontal";
|
|
||||||
drawer = {
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
"custom/power"
|
|
||||||
"custom/reboot"
|
|
||||||
"custom/lock"
|
|
||||||
"idle_inhibitor"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"custom/lock" = {
|
|
||||||
format = " ";
|
|
||||||
tooltip = false;
|
|
||||||
on-click = "hyprlock";
|
|
||||||
};
|
|
||||||
"custom/reboot" = {
|
|
||||||
format = " ";
|
|
||||||
tooltip = false;
|
|
||||||
on-click = "reboot";
|
|
||||||
};
|
|
||||||
"custom/power" = {
|
|
||||||
format = " ";
|
|
||||||
tooltip = false;
|
|
||||||
on-click = "shutdown now";
|
|
||||||
};
|
|
||||||
"idle_inhibitor" = {
|
|
||||||
tooltip = false;
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
deactivated = " ";
|
|
||||||
activated = " ";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
verticalBar = {
|
|
||||||
layer = "top";
|
|
||||||
position = "right";
|
|
||||||
output = [
|
|
||||||
"eDP-1"
|
|
||||||
];
|
|
||||||
modules-left = ["group/power"];
|
|
||||||
modules-center = ["hyprland/workspaces"];
|
|
||||||
modules-right = ["battery" "clock"];
|
|
||||||
|
|
||||||
"clock" = {
|
|
||||||
interval = 1;
|
|
||||||
format = "{:%H\n%M\n%S}";
|
|
||||||
tooltip-format = "{:%a %d %b %Y}";
|
|
||||||
};
|
|
||||||
|
|
||||||
"cpu" = {
|
|
||||||
interval = 3;
|
|
||||||
format = "\n{usage}%";
|
|
||||||
on-click = "kitty btop &";
|
|
||||||
};
|
|
||||||
|
|
||||||
"memory" = {
|
|
||||||
interval = 3;
|
|
||||||
format = "\n{percentage}%";
|
|
||||||
on-click = "kitty btop &";
|
|
||||||
};
|
|
||||||
|
|
||||||
"battery" = {
|
|
||||||
interval = 3;
|
|
||||||
# TODO This needs to be fixed
|
|
||||||
};
|
|
||||||
|
|
||||||
"hyprland/workspaces" = {
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
"active" = "";
|
|
||||||
"default" = "";
|
|
||||||
"empty" = "";
|
|
||||||
};
|
|
||||||
persistent-workspaces = {
|
|
||||||
"*" = [1 2 3 4 5 6 7 8 9 10];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
"group/power" = {
|
|
||||||
orientation = "vertical";
|
|
||||||
drawer = {
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
"custom/power"
|
|
||||||
"custom/reboot"
|
|
||||||
"custom/lock"
|
|
||||||
"idle_inhibitor"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
"custom/lock" = {
|
|
||||||
format = " ";
|
|
||||||
tooltip = false;
|
|
||||||
on-click = "hyprlock";
|
|
||||||
};
|
|
||||||
"custom/reboot" = {
|
|
||||||
format = " ";
|
|
||||||
tooltip = false;
|
|
||||||
on-click = "reboot";
|
|
||||||
};
|
|
||||||
"custom/power" = {
|
|
||||||
format = " ";
|
|
||||||
tooltip = false;
|
|
||||||
on-click = "shutdown now";
|
|
||||||
};
|
|
||||||
"idle_inhibitor" = {
|
|
||||||
tooltip = false;
|
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
deactivated = " ";
|
|
||||||
activated = " ";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xdg.configFile."waybar/style.css".source = ./config/waybar/style.css;
|
|
||||||
};
|
|
||||||
|
|
||||||
horseman.wm.hyprland.config = {
|
horseman.wm.hyprland.config = {
|
||||||
execOnce = [
|
execOnce = [
|
||||||
"hyprpaper"
|
"hyprpaper"
|
||||||
|
|
@ -302,153 +115,6 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
animations = {
|
|
||||||
enabled = true;
|
|
||||||
beziers = [
|
|
||||||
{
|
|
||||||
name = "easeOutQuint";
|
|
||||||
startX = 0.23;
|
|
||||||
startY = 1.0;
|
|
||||||
endX = 0.32;
|
|
||||||
endY = 1.0;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "easeInOutCubic";
|
|
||||||
startX = 0.65;
|
|
||||||
startY = 0.05;
|
|
||||||
endX = 0.36;
|
|
||||||
endY = 1.0;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "linear";
|
|
||||||
startX = 0.0;
|
|
||||||
startY = 0.0;
|
|
||||||
endX = 1.0;
|
|
||||||
endY = 1.0;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "almostLinear";
|
|
||||||
startX = 0.5;
|
|
||||||
startY = 0.5;
|
|
||||||
endX = 0.75;
|
|
||||||
endY = 1.0;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "quick";
|
|
||||||
startX = 0.15;
|
|
||||||
startY = 0.0;
|
|
||||||
endX = 0.1;
|
|
||||||
endY = 1.0;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
animations = [
|
|
||||||
{
|
|
||||||
name = "global";
|
|
||||||
on = true;
|
|
||||||
speed = 10.0;
|
|
||||||
curve = "default";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "border";
|
|
||||||
on = true;
|
|
||||||
speed = 5.39;
|
|
||||||
curve = "easeOutQuint";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "windows";
|
|
||||||
on = true;
|
|
||||||
speed = 4.79;
|
|
||||||
curve = "easeOutQuint";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "windowsIn";
|
|
||||||
on = true;
|
|
||||||
speed = 4.1;
|
|
||||||
curve = "easeOutQuint";
|
|
||||||
style = "popin 87%";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "windowsOut";
|
|
||||||
on = true;
|
|
||||||
speed = 1.49;
|
|
||||||
curve = "linear";
|
|
||||||
style = "popin 87%";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "fadeIn";
|
|
||||||
on = true;
|
|
||||||
speed = 1.73;
|
|
||||||
curve = "almostLinear";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "fadeOut";
|
|
||||||
on = true;
|
|
||||||
speed = 1.46;
|
|
||||||
curve = "almostLinear";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "fade";
|
|
||||||
on = true;
|
|
||||||
speed = 3.03;
|
|
||||||
curve = "quick";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "layers";
|
|
||||||
on = true;
|
|
||||||
speed = 3.81;
|
|
||||||
curve = "easeOutQuint";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "layersIn";
|
|
||||||
on = true;
|
|
||||||
speed = 4.0;
|
|
||||||
curve = "easeOutQuint";
|
|
||||||
style = "fade";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "layersOut";
|
|
||||||
on = true;
|
|
||||||
speed = 1.5;
|
|
||||||
curve = "linear";
|
|
||||||
style = "fade";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "fadeLayersIn";
|
|
||||||
on = true;
|
|
||||||
speed = 1.79;
|
|
||||||
curve = "almostLinear";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "fadeLayersOut";
|
|
||||||
on = true;
|
|
||||||
speed = 1.39;
|
|
||||||
curve = "almostLinear";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "workspaces";
|
|
||||||
on = true;
|
|
||||||
speed = 1.94;
|
|
||||||
curve = "almostLinear";
|
|
||||||
style = "fade";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "workspacesIn";
|
|
||||||
on = true;
|
|
||||||
speed = 1.21;
|
|
||||||
curve = "almostLinear";
|
|
||||||
style = "fade";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "workspacesOut";
|
|
||||||
on = true;
|
|
||||||
speed = 1.94;
|
|
||||||
curve = "almostLinear";
|
|
||||||
style = "fade";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
dwindle = {
|
dwindle = {
|
||||||
pseudotile = true;
|
pseudotile = true;
|
||||||
preserveSplit = true;
|
preserveSplit = true;
|
||||||
|
|
@ -529,6 +195,109 @@ in {
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
waybar = {
|
||||||
|
formats = {
|
||||||
|
horizontal = {
|
||||||
|
"clock" = {
|
||||||
|
format = " {:%H:%M:%S}";
|
||||||
|
format-alt = "{:%a %d %b %Y}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
vertical = {
|
||||||
|
"clock" = {
|
||||||
|
format = "{:%H\n%M\n%S}";
|
||||||
|
format-alt = "{:%d\n%m\n%y}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
modules = {
|
||||||
|
"clock" = {
|
||||||
|
interval = 1;
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
"cpu" = {
|
||||||
|
interval = 3;
|
||||||
|
format = " {usage}%";
|
||||||
|
on-click = "kitty btop &";
|
||||||
|
};
|
||||||
|
|
||||||
|
"memory" = {
|
||||||
|
interval = 3;
|
||||||
|
format = " {percentage}%";
|
||||||
|
on-click = "kitty btop &";
|
||||||
|
};
|
||||||
|
|
||||||
|
"pulseaudio" = {
|
||||||
|
format = " {volume}";
|
||||||
|
on-click = "kitty pulsemixer &";
|
||||||
|
};
|
||||||
|
|
||||||
|
"network" = {
|
||||||
|
interval = 3;
|
||||||
|
format = "{ipaddr}";
|
||||||
|
format-ethernet = " {ipaddr}";
|
||||||
|
format-disconnected = " Disconnected";
|
||||||
|
format-wifi = " {essid}";
|
||||||
|
|
||||||
|
tooltip = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
"battery" = {
|
||||||
|
interval = 3;
|
||||||
|
# TODO This needs to be fixed
|
||||||
|
};
|
||||||
|
|
||||||
|
"hyprland/workspaces" = {
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
"active" = "";
|
||||||
|
"default" = "";
|
||||||
|
"empty" = "";
|
||||||
|
};
|
||||||
|
persistent-workspaces = {
|
||||||
|
"*" = [1 2 3 4 5 6 7 8 9 10];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"group/power" = {
|
||||||
|
orientation = "horizontal";
|
||||||
|
drawer = {
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
"custom/power"
|
||||||
|
"custom/reboot"
|
||||||
|
"custom/lock"
|
||||||
|
"idle_inhibitor"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
"custom/lock" = {
|
||||||
|
format = " ";
|
||||||
|
tooltip = false;
|
||||||
|
on-click = "hyprlock";
|
||||||
|
};
|
||||||
|
"custom/reboot" = {
|
||||||
|
format = " ";
|
||||||
|
tooltip = false;
|
||||||
|
on-click = "reboot";
|
||||||
|
};
|
||||||
|
"custom/power" = {
|
||||||
|
format = " ";
|
||||||
|
tooltip = false;
|
||||||
|
on-click = "shutdown now";
|
||||||
|
};
|
||||||
|
"idle_inhibitor" = {
|
||||||
|
tooltip = false;
|
||||||
|
format = "{icon}";
|
||||||
|
format-icons = {
|
||||||
|
deactivated = " ";
|
||||||
|
activated = " ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.logind.extraConfig = ''
|
services.logind.extraConfig = ''
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,11 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) mkOption types mkIf trivial strings;
|
inherit (lib) mkOption types mkIf trivial strings lists;
|
||||||
inherit (builtins) concatStringsSep elem genList elemAt;
|
inherit (builtins) concatStringsSep elem genList elemAt;
|
||||||
inherit (trivial) boolToString;
|
inherit (trivial) boolToString;
|
||||||
inherit (strings) floatToString;
|
inherit (strings) floatToString;
|
||||||
|
inherit (lists) remove;
|
||||||
cfg = config.horseman.wm.hyprland;
|
cfg = config.horseman.wm.hyprland;
|
||||||
homeCfg = config.horseman;
|
homeCfg = config.horseman;
|
||||||
|
|
||||||
|
|
@ -1175,6 +1176,10 @@ in {
|
||||||
type = types.nullOr types.path;
|
type = types.nullOr types.path;
|
||||||
default = null;
|
default = null;
|
||||||
};
|
};
|
||||||
|
bar = mkOption {
|
||||||
|
type = types.enum ["" "left" "right" "top" "bottom"];
|
||||||
|
default = "";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -1215,6 +1220,20 @@ in {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
waybar = {
|
||||||
|
formats = {
|
||||||
|
horizontal = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
};
|
||||||
|
vertical = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
modules = mkOption {
|
||||||
|
type = types.attrs;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
@ -1676,6 +1695,71 @@ in {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = let
|
||||||
|
outputMap = location: (
|
||||||
|
remove null (
|
||||||
|
map (disp:
|
||||||
|
if (disp.bar == location)
|
||||||
|
then disp.output
|
||||||
|
else null)
|
||||||
|
cfg.config.monitors.displays
|
||||||
|
)
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
topBar =
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
bottomBar =
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
rightBar =
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
|
||||||
|
leftBar =
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xdg.configFile."waybar/style.css".source = ./config/waybar/style.css;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue