2024-04-23 06:34:22 +02:00
|
|
|
|
{
|
|
|
|
|
config,
|
|
|
|
|
lib,
|
|
|
|
|
pkgs,
|
|
|
|
|
...
|
2024-05-07 18:20:52 +02:00
|
|
|
|
}:
|
|
|
|
|
let
|
2024-04-23 06:34:22 +02:00
|
|
|
|
commonSettings = {
|
|
|
|
|
layer = "top";
|
|
|
|
|
position = "top";
|
|
|
|
|
|
|
|
|
|
height = 32;
|
|
|
|
|
spacing = 2;
|
|
|
|
|
margin = "2";
|
|
|
|
|
|
2024-05-07 18:20:52 +02:00
|
|
|
|
modules-center = [ "hyprland/window" ];
|
2024-05-03 04:56:26 +02:00
|
|
|
|
modules-right = [
|
|
|
|
|
"tray"
|
|
|
|
|
"idle_inhibitor"
|
|
|
|
|
"pulseaudio"
|
|
|
|
|
"clock"
|
|
|
|
|
];
|
2024-04-23 06:34:22 +02:00
|
|
|
|
|
|
|
|
|
idle_inhibitor = {
|
|
|
|
|
format = "{icon}";
|
|
|
|
|
format-icons = {
|
|
|
|
|
activated = "";
|
|
|
|
|
deactivated = "";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
tray.spacing = 10;
|
|
|
|
|
|
|
|
|
|
pulseaudio = {
|
|
|
|
|
format = "{icon} {volume}%";
|
2024-05-03 04:56:26 +02:00
|
|
|
|
format-icons.default = [
|
|
|
|
|
""
|
|
|
|
|
""
|
|
|
|
|
""
|
|
|
|
|
];
|
2024-04-23 06:34:22 +02:00
|
|
|
|
on-click = "pavucontrol";
|
|
|
|
|
};
|
|
|
|
|
};
|
2024-05-03 04:56:26 +02:00
|
|
|
|
|
2024-09-08 02:18:28 +02:00
|
|
|
|
darkColors = # css
|
|
|
|
|
''
|
|
|
|
|
@define-color red #f38ba8;
|
|
|
|
|
@define-color pink #f5c2e7;
|
|
|
|
|
@define-color crust #11111c;
|
|
|
|
|
@define-color base #1e1e2e;
|
|
|
|
|
@define-color text #cdd6f4;
|
|
|
|
|
@define-color surface0 #313244;
|
|
|
|
|
@define-color surface2 #585b70;
|
|
|
|
|
'';
|
|
|
|
|
lightColors = # css
|
|
|
|
|
''
|
|
|
|
|
@define-color red #d20f39;
|
|
|
|
|
@define-color pink #ea76cb;
|
|
|
|
|
@define-color crust #dce0e8;
|
|
|
|
|
@define-color base #eff1f5;
|
|
|
|
|
@define-color text #4c4f69;
|
|
|
|
|
@define-color surface0 #ccd0da;
|
|
|
|
|
@define-color surface2 #acb0be;
|
|
|
|
|
'';
|
|
|
|
|
style = # css
|
|
|
|
|
''
|
|
|
|
|
* {
|
|
|
|
|
font-family: Symbols Nerd Font, IBM Plex Sans;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: @text;
|
|
|
|
|
}
|
2024-05-03 04:56:26 +02:00
|
|
|
|
|
2024-09-08 02:18:28 +02:00
|
|
|
|
window#waybar {
|
|
|
|
|
background-color: @base;
|
|
|
|
|
border: 2px solid @crust;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
}
|
2024-05-03 04:56:26 +02:00
|
|
|
|
|
2024-09-08 02:18:28 +02:00
|
|
|
|
#workspaces button:first-child {
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
border-radius: 5px 0 0 5px;
|
|
|
|
|
border-left: 2px solid @crust;
|
|
|
|
|
}
|
|
|
|
|
#workspaces button.active:first-child {
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
box-shadow: unset;
|
|
|
|
|
border-radius: 5px 0 0 5px;
|
|
|
|
|
border-left: 2px solid @pink;
|
|
|
|
|
border-top: 2px solid @pink;
|
|
|
|
|
border-bottom: 2px solid @pink;
|
|
|
|
|
}
|
2024-05-03 04:56:26 +02:00
|
|
|
|
|
2024-09-08 02:18:28 +02:00
|
|
|
|
#workspaces button {
|
|
|
|
|
padding: 0 5px;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
border-top: 2px solid @crust;
|
|
|
|
|
border-bottom: 2px solid @crust;
|
|
|
|
|
}
|
2024-05-03 04:56:26 +02:00
|
|
|
|
|
2024-09-08 02:18:28 +02:00
|
|
|
|
#workspaces button:hover {
|
|
|
|
|
background: @surface2;
|
|
|
|
|
}
|
2024-05-03 04:56:26 +02:00
|
|
|
|
|
2024-09-08 02:18:28 +02:00
|
|
|
|
#workspaces button.active {
|
|
|
|
|
color: @pink;
|
|
|
|
|
background: @surface0;
|
|
|
|
|
border-top: 2px solid @pink;
|
|
|
|
|
border-bottom: 2px solid @pink;
|
|
|
|
|
}
|
2024-05-03 04:56:26 +02:00
|
|
|
|
|
2024-09-08 02:18:28 +02:00
|
|
|
|
#workspaces button.urgent {
|
|
|
|
|
background-color: @red;
|
|
|
|
|
}
|
2024-05-03 04:56:26 +02:00
|
|
|
|
|
2024-09-08 02:18:28 +02:00
|
|
|
|
#clock, #network, #pulseaudio, #tray, #idle_inhibitor {
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
}
|
|
|
|
|
'';
|
2024-05-07 18:20:52 +02:00
|
|
|
|
in
|
|
|
|
|
{
|
2024-04-23 06:34:22 +02:00
|
|
|
|
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) {
|
|
|
|
|
programs.waybar = {
|
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
|
|
settings = {
|
2024-05-07 18:20:52 +02:00
|
|
|
|
hyprland = commonSettings // {
|
|
|
|
|
modules-left = [ "hyprland/workspaces" ];
|
|
|
|
|
"hyprland/workspaces" = {
|
|
|
|
|
format = "{icon}";
|
|
|
|
|
on-click = "activate";
|
|
|
|
|
format-icons = {
|
|
|
|
|
"1" = "Ⅰ";
|
|
|
|
|
"2" = "Ⅱ";
|
|
|
|
|
"3" = "Ⅲ";
|
|
|
|
|
"4" = "Ⅳ";
|
|
|
|
|
"5" = "Ⅴ";
|
|
|
|
|
"6" = "Ⅵ";
|
|
|
|
|
"7" = "Ⅶ";
|
|
|
|
|
"8" = "Ⅷ";
|
|
|
|
|
"9" = "Ⅸ";
|
|
|
|
|
"10" = "Ⅹ";
|
2024-04-23 06:34:22 +02:00
|
|
|
|
};
|
2024-05-07 18:20:52 +02:00
|
|
|
|
persistent-workspaces."*" = 10;
|
2024-04-23 06:34:22 +02:00
|
|
|
|
};
|
2024-05-07 18:20:52 +02:00
|
|
|
|
};
|
2024-04-23 06:34:22 +02:00
|
|
|
|
};
|
2024-05-03 04:56:26 +02:00
|
|
|
|
};
|
|
|
|
|
xdg.configFile = {
|
|
|
|
|
"waybar/style-dark.css".text = darkColors + style;
|
|
|
|
|
"waybar/style-light.css".text = lightColors + style;
|
2024-04-23 06:34:22 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|