2024-05-14 20:04:27 +02:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
host,
|
2024-05-22 07:12:27 +02:00
|
|
|
config,
|
2024-05-14 20:04:27 +02:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
2024-05-22 03:39:50 +02:00
|
|
|
inherit (import ../hosts/${host}/variables.nix) clock24h;
|
2024-05-14 20:04:27 +02:00
|
|
|
in
|
|
|
|
with lib;
|
|
|
|
{
|
|
|
|
# Configure & Theme Waybar
|
|
|
|
programs.waybar = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.waybar;
|
|
|
|
settings = [
|
|
|
|
{
|
|
|
|
layer = "top";
|
|
|
|
position = "top";
|
|
|
|
modules-center = [ "hyprland/workspaces" ];
|
|
|
|
modules-left = [
|
|
|
|
"custom/startmenu"
|
|
|
|
"hyprland/window"
|
|
|
|
"pulseaudio"
|
|
|
|
"cpu"
|
|
|
|
"memory"
|
2024-05-17 09:29:31 +02:00
|
|
|
"idle_inhibitor"
|
2024-05-14 20:04:27 +02:00
|
|
|
];
|
|
|
|
modules-right = [
|
|
|
|
"custom/hyprbindings"
|
|
|
|
"custom/notification"
|
2024-05-17 09:29:31 +02:00
|
|
|
"custom/exit"
|
2024-05-14 20:04:27 +02:00
|
|
|
"battery"
|
|
|
|
"tray"
|
2024-05-17 08:53:48 +02:00
|
|
|
"clock"
|
2024-05-14 20:04:27 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
"hyprland/workspaces" = {
|
|
|
|
format = "{name}";
|
|
|
|
format-icons = {
|
|
|
|
default = " ";
|
|
|
|
active = " ";
|
|
|
|
urgent = " ";
|
|
|
|
};
|
|
|
|
on-scroll-up = "hyprctl dispatch workspace e+1";
|
|
|
|
on-scroll-down = "hyprctl dispatch workspace e-1";
|
|
|
|
};
|
|
|
|
"clock" = {
|
|
|
|
format = if clock24h == true then '' {:L%H:%M}'' else '' {:L%I:%M %p}'';
|
|
|
|
tooltip = true;
|
2024-05-17 09:29:31 +02:00
|
|
|
tooltip-format = "<big>{:%A, %d.%B %Y }</big>\n<tt><small>{calendar}</small></tt>";
|
2024-05-14 20:04:27 +02:00
|
|
|
};
|
|
|
|
"hyprland/window" = {
|
2024-05-17 09:29:31 +02:00
|
|
|
max-length = 22;
|
2024-05-14 20:04:27 +02:00
|
|
|
separate-outputs = false;
|
|
|
|
rewrite = {
|
|
|
|
"" = " 🙈 No Windows? ";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
"memory" = {
|
|
|
|
interval = 5;
|
|
|
|
format = " {}%";
|
|
|
|
tooltip = true;
|
|
|
|
};
|
|
|
|
"cpu" = {
|
|
|
|
interval = 5;
|
|
|
|
format = " {usage:2}%";
|
|
|
|
tooltip = true;
|
|
|
|
};
|
|
|
|
"disk" = {
|
|
|
|
format = " {free}";
|
|
|
|
tooltip = true;
|
|
|
|
};
|
|
|
|
"network" = {
|
|
|
|
format-icons = [
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
];
|
|
|
|
format-ethernet = " {bandwidthDownOctets}";
|
|
|
|
format-wifi = "{icon} {signalStrength}%";
|
|
|
|
format-disconnected = "";
|
|
|
|
tooltip = false;
|
|
|
|
};
|
|
|
|
"tray" = {
|
|
|
|
spacing = 12;
|
|
|
|
};
|
|
|
|
"pulseaudio" = {
|
|
|
|
format = "{icon} {volume}% {format_source}";
|
|
|
|
format-bluetooth = "{volume}% {icon} {format_source}";
|
|
|
|
format-bluetooth-muted = " {icon} {format_source}";
|
|
|
|
format-muted = " {format_source}";
|
|
|
|
format-source = " {volume}%";
|
|
|
|
format-source-muted = "";
|
|
|
|
format-icons = {
|
|
|
|
headphone = "";
|
|
|
|
hands-free = "";
|
|
|
|
headset = "";
|
|
|
|
phone = "";
|
|
|
|
portable = "";
|
|
|
|
car = "";
|
|
|
|
default = [
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
];
|
|
|
|
};
|
|
|
|
on-click = "sleep 0.1 && pavucontrol";
|
|
|
|
};
|
|
|
|
"custom/exit" = {
|
|
|
|
tooltip = false;
|
|
|
|
format = "";
|
|
|
|
on-click = "sleep 0.1 && wlogout";
|
|
|
|
};
|
|
|
|
"custom/startmenu" = {
|
|
|
|
tooltip = false;
|
2024-05-17 08:53:48 +02:00
|
|
|
format = "";
|
2024-05-14 20:04:27 +02:00
|
|
|
# exec = "rofi -show drun";
|
2024-05-23 16:14:54 +02:00
|
|
|
on-click = "sleep 0.1 && rofi-launcher";
|
2024-05-14 20:04:27 +02:00
|
|
|
};
|
|
|
|
"custom/hyprbindings" = {
|
|
|
|
tooltip = false;
|
2024-05-21 21:19:59 +02:00
|
|
|
format = "";
|
2024-05-14 20:04:27 +02:00
|
|
|
on-click = "sleep 0.1 && list-hypr-bindings";
|
|
|
|
};
|
|
|
|
"idle_inhibitor" = {
|
|
|
|
format = "{icon}";
|
|
|
|
format-icons = {
|
2024-05-21 21:19:59 +02:00
|
|
|
activated = "";
|
|
|
|
deactivated = "";
|
2024-05-14 20:04:27 +02:00
|
|
|
};
|
|
|
|
tooltip = "true";
|
|
|
|
};
|
|
|
|
"custom/notification" = {
|
|
|
|
tooltip = false;
|
|
|
|
format = "{icon} {}";
|
|
|
|
format-icons = {
|
|
|
|
notification = "<span foreground='red'><sup></sup></span>";
|
|
|
|
none = "";
|
|
|
|
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
|
|
|
dnd-none = "";
|
|
|
|
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
|
|
|
inhibited-none = "";
|
|
|
|
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
|
|
|
dnd-inhibited-none = "";
|
|
|
|
};
|
|
|
|
return-type = "json";
|
|
|
|
exec-if = "which swaync-client";
|
|
|
|
exec = "swaync-client -swb";
|
|
|
|
on-click = "sleep 0.1 && task-waybar";
|
|
|
|
escape = true;
|
|
|
|
};
|
|
|
|
"battery" = {
|
|
|
|
states = {
|
|
|
|
warning = 30;
|
|
|
|
critical = 15;
|
|
|
|
};
|
|
|
|
format = "{icon} {capacity}%";
|
|
|
|
format-charging = " {capacity}%";
|
|
|
|
format-plugged = " {capacity}%";
|
|
|
|
format-icons = [
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
];
|
|
|
|
on-click = "";
|
|
|
|
tooltip = false;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
style = concatStrings [
|
|
|
|
''
|
2024-05-17 08:57:21 +02:00
|
|
|
* {
|
2024-05-22 07:12:27 +02:00
|
|
|
font-family: JetBrainsMono Nerd Font Mono;
|
2024-05-17 08:53:48 +02:00
|
|
|
font-size: 16px;
|
|
|
|
border-radius: 0px;
|
|
|
|
border: none;
|
|
|
|
min-height: 0px;
|
|
|
|
}
|
2024-05-22 07:12:27 +02:00
|
|
|
window#waybar {
|
|
|
|
background: #${config.stylix.base16Scheme.base00};
|
2024-05-17 08:53:48 +02:00
|
|
|
}
|
|
|
|
#workspaces {
|
2024-05-22 07:12:27 +02:00
|
|
|
color: #${config.stylix.base16Scheme.base00};
|
|
|
|
background: #${config.stylix.base16Scheme.base01};
|
2024-05-17 09:29:31 +02:00
|
|
|
margin: 4px 4px;
|
2024-05-22 07:12:27 +02:00
|
|
|
padding: 5px 5px;
|
2024-05-17 08:53:48 +02:00
|
|
|
border-radius: 16px;
|
|
|
|
}
|
|
|
|
#workspaces button {
|
2024-05-17 09:29:31 +02:00
|
|
|
font-weight: bold;
|
2024-05-17 08:53:48 +02:00
|
|
|
padding: 0px 5px;
|
|
|
|
margin: 0px 3px;
|
|
|
|
border-radius: 16px;
|
2024-05-22 07:12:27 +02:00
|
|
|
color: #${config.stylix.base16Scheme.base00};
|
|
|
|
background: linear-gradient(45deg, #${config.stylix.base16Scheme.base08}, #${config.stylix.base16Scheme.base0D});
|
2024-05-17 08:53:48 +02:00
|
|
|
opacity: 0.5;
|
|
|
|
transition: ${betterTransition};
|
|
|
|
}
|
|
|
|
#workspaces button.active {
|
2024-05-17 09:29:31 +02:00
|
|
|
font-weight: bold;
|
2024-05-17 08:53:48 +02:00
|
|
|
padding: 0px 5px;
|
2024-05-17 09:29:31 +02:00
|
|
|
margin: 0px 3px;
|
2024-05-17 08:53:48 +02:00
|
|
|
border-radius: 16px;
|
2024-05-22 07:12:27 +02:00
|
|
|
color: #${config.stylix.base16Scheme.base00};
|
|
|
|
background: linear-gradient(45deg, #${config.stylix.base16Scheme.base08}, #${config.stylix.base16Scheme.base0D});
|
2024-05-17 08:53:48 +02:00
|
|
|
transition: ${betterTransition};
|
|
|
|
opacity: 1.0;
|
|
|
|
min-width: 40px;
|
|
|
|
}
|
|
|
|
#workspaces button:hover {
|
2024-05-17 09:29:31 +02:00
|
|
|
font-weight: bold;
|
2024-05-17 08:53:48 +02:00
|
|
|
border-radius: 16px;
|
2024-05-22 07:12:27 +02:00
|
|
|
color: #${config.stylix.base16Scheme.base00};
|
|
|
|
background: linear-gradient(45deg, #${config.stylix.base16Scheme.base08}, #${config.stylix.base16Scheme.base0D});
|
2024-05-17 08:53:48 +02:00
|
|
|
opacity: 0.8;
|
|
|
|
transition: ${betterTransition};
|
|
|
|
}
|
|
|
|
tooltip {
|
2024-05-22 07:12:27 +02:00
|
|
|
background: #${config.stylix.base16Scheme.base00};
|
|
|
|
border: 1px solid #${config.stylix.base16Scheme.base08};
|
|
|
|
border-radius: 12px;
|
|
|
|
}
|
|
|
|
tooltip label {
|
|
|
|
color: #${config.stylix.base16Scheme.base08};
|
2024-05-17 08:53:48 +02:00
|
|
|
}
|
2024-05-17 09:29:31 +02:00
|
|
|
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
|
2024-05-17 08:53:48 +02:00
|
|
|
font-weight: bold;
|
2024-05-17 09:29:31 +02:00
|
|
|
margin: 4px 0px;
|
2024-05-17 08:53:48 +02:00
|
|
|
margin-left: 7px;
|
2024-05-17 09:29:31 +02:00
|
|
|
padding: 0px 18px;
|
2024-05-22 07:12:27 +02:00
|
|
|
background: #${config.stylix.base16Scheme.base04};
|
|
|
|
color: #${config.stylix.base16Scheme.base00};
|
2024-05-17 08:53:48 +02:00
|
|
|
border-radius: 24px 10px 24px 10px;
|
|
|
|
}
|
|
|
|
#custom-startmenu {
|
2024-05-22 07:12:27 +02:00
|
|
|
color: #${config.stylix.base16Scheme.base0B};
|
|
|
|
background: #${config.stylix.base16Scheme.base02};
|
2024-05-17 08:53:48 +02:00
|
|
|
font-size: 28px;
|
|
|
|
margin: 0px;
|
2024-05-17 09:29:31 +02:00
|
|
|
padding: 0px 30px 0px 15px;
|
2024-05-17 08:53:48 +02:00
|
|
|
border-radius: 0px 0px 40px 0px;
|
|
|
|
}
|
2024-05-30 05:14:06 +02:00
|
|
|
#custom-hyprbindings, #network, #battery,
|
2024-05-17 09:29:31 +02:00
|
|
|
#custom-notification, #tray, #custom-exit {
|
2024-05-17 08:53:48 +02:00
|
|
|
font-weight: bold;
|
2024-05-22 07:12:27 +02:00
|
|
|
background: #${config.stylix.base16Scheme.base0F};
|
2024-05-22 08:11:37 +02:00
|
|
|
color: #${config.stylix.base16Scheme.base00};
|
2024-05-17 09:29:31 +02:00
|
|
|
margin: 4px 0px;
|
|
|
|
margin-right: 7px;
|
2024-05-17 08:53:48 +02:00
|
|
|
border-radius: 10px 24px 10px 24px;
|
2024-05-17 09:29:31 +02:00
|
|
|
padding: 0px 18px;
|
2024-05-17 08:53:48 +02:00
|
|
|
}
|
|
|
|
#clock {
|
2024-05-17 09:29:31 +02:00
|
|
|
font-weight: bold;
|
2024-05-22 07:12:27 +02:00
|
|
|
color: #0D0E15;
|
|
|
|
background: linear-gradient(90deg, #${config.stylix.base16Scheme.base0E}, #${config.stylix.base16Scheme.base0C});
|
2024-05-17 08:53:48 +02:00
|
|
|
margin: 0px;
|
2024-05-17 23:19:08 +02:00
|
|
|
padding: 0px 15px 0px 30px;
|
2024-05-17 08:53:48 +02:00
|
|
|
border-radius: 0px 0px 0px 40px;
|
|
|
|
}
|
|
|
|
''
|
2024-05-14 20:04:27 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|