Evie Litherland-Smith
1600288da0
Split current clock waybar widget into date only and time only, use more rainbow colours across the system modules
215 lines
6.3 KiB
Nix
215 lines
6.3 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
systemd.user.targets.tray.Unit = {
|
|
Description = "Home Manager System Tray";
|
|
Requires = ["graphical-session-pre.target"];
|
|
};
|
|
programs.waybar = {
|
|
enable = true;
|
|
style = builtins.readFile (config.lib.stylix.colors {
|
|
template = ./default.mustache;
|
|
extension = ".css";
|
|
});
|
|
systemd = {
|
|
enable = true;
|
|
target = "hyprland-session.target";
|
|
};
|
|
settings.main = {
|
|
layer = "top";
|
|
position = "top";
|
|
# Layout
|
|
"modules-left" = ["hyprland/window" "mpris"];
|
|
"modules-center" = ["hyprland/workspaces"];
|
|
"modules-right" = [
|
|
"custom/notification"
|
|
"pulseaudio"
|
|
"network"
|
|
"bluetooth"
|
|
"clock#calendar"
|
|
"clock"
|
|
"custom/separator"
|
|
"backlight"
|
|
"battery"
|
|
"tray"
|
|
];
|
|
# Module config
|
|
"custom/separator" = {format = "|";};
|
|
"hyprland/window" = {
|
|
"format" = "{title}";
|
|
# TODO workspace rewrites
|
|
"rewrite" = {
|
|
"(.*) - GNU Emacs at (.*)" = " $1 [$2]";
|
|
"Alacritty" = " ";
|
|
"(.*) - Thunar" = " $1";
|
|
"Nyxt - (.*)" = " $1";
|
|
"(.*) — Mozilla Firefox" = " $1";
|
|
".*WebCord (.*)" = " $1";
|
|
"[Ss]team" = " ";
|
|
"Prism Launcher (.*)" = " Minecraft (Prism Launcher $1)";
|
|
"(.*) - mpv" = " $1";
|
|
"Microsoft Teams(?: classic)?(?: - )?(.*)(?: \| Microsoft Teams)?" = " $1";
|
|
};
|
|
"separate-outputs" = true;
|
|
};
|
|
"hyprland/workspaces" = {
|
|
format = "{icon}";
|
|
format-icons = {
|
|
default = " ";
|
|
active = " ";
|
|
urgent = " ";
|
|
};
|
|
show-special = false;
|
|
sort-by = "id";
|
|
persistent-workspaces = {
|
|
"1" = [];
|
|
"2" = [];
|
|
"3" = [];
|
|
"4" = [];
|
|
"5" = [];
|
|
"6" = [];
|
|
};
|
|
};
|
|
mpris = {
|
|
"format" = "> {player_icon} {player}";
|
|
"tooltip-format" = "{player_icon} ({player}) {dynamic}";
|
|
"interval" = 1;
|
|
"dynamic-order" = ["album" "artist" "title" "position" "length"];
|
|
"player-icons" = {
|
|
"default" = " ";
|
|
"emms" = " ";
|
|
"firefox" = " ";
|
|
"mpv" = " ";
|
|
};
|
|
"status-icons" = {
|
|
"playing" = "";
|
|
"paused" = "";
|
|
"stopped" = "";
|
|
};
|
|
"ignored-players" = [];
|
|
};
|
|
pulseaudio = {
|
|
scroll-step = 5;
|
|
format = "{format_source} {icon} {volume}%";
|
|
format-muted = "{format_source} ";
|
|
format-source = "";
|
|
format-source-muted = "";
|
|
format-icons = {
|
|
car = "";
|
|
default = ["" "" ""];
|
|
hands-free = "";
|
|
headset = "";
|
|
phone = "";
|
|
portable = "";
|
|
headphone = "";
|
|
};
|
|
on-click = "pavucontrol";
|
|
on-click-middle = "volumectl -m %";
|
|
on-click-right = "volumectl %";
|
|
on-scroll-up = "volumectl -u + 5";
|
|
on-scroll-down = "volumectl -u - 5";
|
|
};
|
|
disk = {
|
|
format = " {percentage_used}%";
|
|
path = config.home.homeDirectory;
|
|
};
|
|
cpu = {
|
|
format = " {usage}%";
|
|
tooltip = false;
|
|
};
|
|
memory = {format = " {}%";};
|
|
temperature = {
|
|
critical-threshold = 80;
|
|
format = "{icon} {temperatureC}°C";
|
|
format-icons = ["" "" ""];
|
|
};
|
|
network = {
|
|
format-icons = [" " " " " " " "];
|
|
format-wifi = "{icon}";
|
|
format-ethernet = " ";
|
|
tooltip-format = "{essid} ({signalStrength}%)";
|
|
format-linked = " ";
|
|
format-disconnected = " ";
|
|
};
|
|
bluetooth = {
|
|
format = " ";
|
|
format-disabled = " ";
|
|
format-off = " ";
|
|
format-on = " ";
|
|
format-connected = " ";
|
|
tooltip-format = "{status} | {device_alias}";
|
|
on-click = "${pkgs.blueman}/bin/blueman-manager";
|
|
};
|
|
"clock#calendar" = {
|
|
format = "{: %Y-%m-%d}";
|
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
|
calendar = {
|
|
mode = "month";
|
|
mode-mon-col = 3;
|
|
weeks-pos = "left";
|
|
on-scroll = 1;
|
|
on-click-right = "mode";
|
|
format = {
|
|
months = "<span color='#ffead3'><b>{}</b></span>";
|
|
days = "<span color='#ecc6d9'><b>{}</b></span>";
|
|
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
|
|
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
|
|
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
|
|
};
|
|
};
|
|
actions = {
|
|
on-click-right = "mode";
|
|
on-scroll-up = "shift_up";
|
|
on-scroll-down = "shift_down";
|
|
};
|
|
};
|
|
clock = {format = "{: %R}";};
|
|
backlight = {
|
|
format = "{icon} ";
|
|
tooltip-format = "{percent}%";
|
|
format-icons = ["" "" "" "" "" "" "" "" ""];
|
|
};
|
|
battery = {
|
|
states = {
|
|
warning = 30;
|
|
critical = 15;
|
|
};
|
|
format = "{icon} ";
|
|
format-charging = " ";
|
|
format-plugged = " ";
|
|
tooltip-format = "{capacity}% {time}";
|
|
format-icons = ["" "" "" "" "" "" "" "" "" "" ""];
|
|
};
|
|
"custom/notification" = let
|
|
swaync = pkgs.swaynotificationcenter;
|
|
in {
|
|
"tooltip" = false;
|
|
"format" = "{icon}{}";
|
|
"format-icons" = {
|
|
"notification" = " ";
|
|
"none" = " ";
|
|
"dnd-notification" = " ";
|
|
"dnd-none" = " ";
|
|
"inhibited-notification" = " ";
|
|
"inhibited-none" = " ";
|
|
"dnd-inhibited-notification" = " ";
|
|
"dnd-inhibited-none" = " ";
|
|
};
|
|
"return-type" = "json";
|
|
"exec-if" = "which ${swaync}/bin/swaync-client";
|
|
"exec" = "${swaync}/bin/swaync-client -swb";
|
|
"on-click" = "${swaync}/bin/swaync-client -t -sw";
|
|
"on-click-right" = "${swaync}/bin/swaync-client -d -sw";
|
|
"escape" = true;
|
|
};
|
|
tray = {
|
|
icon-size = 16;
|
|
show-passive-items = true;
|
|
spacing = 5;
|
|
};
|
|
};
|
|
};
|
|
}
|