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
|
|
@ -11,6 +11,7 @@ in {
|
|||
imports = [
|
||||
./options.nix
|
||||
./keybindings.nix
|
||||
./animations.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
|
|
@ -45,194 +46,6 @@ in {
|
|||
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 = {
|
||||
execOnce = [
|
||||
"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 = {
|
||||
pseudotile = 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 = ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue