2024-10-25 11:25:34 +01:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
stylix.targets.waybar.enable = false;
|
|
|
|
systemd.user.targets.tray.Unit = {
|
|
|
|
Description = "Home Manager System Tray";
|
|
|
|
Requires = [ "graphical-session.target" ];
|
|
|
|
};
|
2024-10-25 15:20:10 +01:00
|
|
|
home.packages = [ pkgs.playerctl ]; # For MPRIS to work
|
2024-10-25 11:25:34 +01:00
|
|
|
programs.waybar = {
|
|
|
|
enable = true;
|
|
|
|
systemd.enable = true;
|
|
|
|
settings.main = {
|
|
|
|
name = "main";
|
|
|
|
layer = "top";
|
|
|
|
position = "top";
|
|
|
|
# Layout
|
|
|
|
"modules-left" = [
|
2024-10-25 15:20:10 +01:00
|
|
|
"hyprland/workspaces"
|
2024-10-25 11:25:34 +01:00
|
|
|
"hyprland/window"
|
|
|
|
];
|
2024-10-25 15:20:10 +01:00
|
|
|
"modules-center" = [ "mpris" ];
|
2024-10-25 11:25:34 +01:00
|
|
|
"modules-right" = [
|
|
|
|
"custom/notification"
|
|
|
|
"pulseaudio"
|
|
|
|
"network"
|
|
|
|
"bluetooth"
|
|
|
|
"clock#calendar"
|
|
|
|
"clock"
|
|
|
|
"backlight"
|
|
|
|
"battery"
|
|
|
|
"custom/weather"
|
|
|
|
"systemd-failed-units"
|
|
|
|
"tray"
|
|
|
|
];
|
|
|
|
# Module config
|
|
|
|
"hyprland/workspaces" = {
|
|
|
|
format = "{icon}";
|
|
|
|
format-icons = {
|
2024-10-30 09:50:39 +00:00
|
|
|
"1" = " ";
|
|
|
|
"2" = " ";
|
|
|
|
"3" = " ";
|
|
|
|
"4" = " ";
|
|
|
|
"5" = " ";
|
|
|
|
"6" = " ";
|
|
|
|
default = " ";
|
|
|
|
urgent = " ";
|
2024-10-25 11:25:34 +01:00
|
|
|
};
|
|
|
|
all-outputs = false;
|
|
|
|
persistent-workspaces = {
|
|
|
|
"1" = [ ];
|
|
|
|
"2" = [ ];
|
|
|
|
"3" = [ ];
|
|
|
|
"4" = [ ];
|
|
|
|
"5" = [ ];
|
|
|
|
"6" = [ ];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
"hyprland/window" = {
|
|
|
|
"format" = "{title}";
|
|
|
|
"max-length" = 50;
|
|
|
|
"rewrite" = {
|
2024-10-30 09:50:39 +00:00
|
|
|
"(.*) - GNU Emacs at (.*)" = " $1 [$2]";
|
|
|
|
"(alacritty.*)" = " $1";
|
|
|
|
"(.*) - mpv" = " $1";
|
|
|
|
"swayimg: (.*)" = " $1";
|
|
|
|
"swappy" = " swappy";
|
|
|
|
"(?:/nix/.*)(btm)" = " Resource Usage [$1]";
|
|
|
|
"(?:/nix/.*)(cava)" = " Music Visualiser [$1]";
|
|
|
|
"Mozilla Firefox" = " $1";
|
|
|
|
"(.*) — Mozilla Firefox" = " $1";
|
|
|
|
"Nyxt - (.*)" = " $1";
|
|
|
|
"(.*) - Chromium" = " $1";
|
|
|
|
"(Signal.*)" = " $1";
|
|
|
|
"(WhatsApp for Linux.*)" = " $1";
|
|
|
|
"((?:.*)WebCord.*)" = " $1";
|
|
|
|
"(Cartridges.*)" = " $1";
|
|
|
|
"([Ss]team.*)" = " $1";
|
|
|
|
"(Prism Launcher.*)" = " Minecraft ($1)";
|
|
|
|
"(.*)(?: *)PrusaSlicer-(.*)" = " $1 PrusaSlicer ($2)";
|
|
|
|
"(.*)(?: *)PrusaSlicer G-code Viewer-(.*)" = " $1 G-code Viewer ($2)";
|
|
|
|
"FreeCAD (.*)" = " FreeCAD $1";
|
|
|
|
"(.*) - Blender.* " = " $1";
|
|
|
|
"(Remmina Remote Desktop Client)" = " $1";
|
|
|
|
"(NoMachine|Nxplayer.bin)(?: *)(.*)" = " $1 $2";
|
2024-10-25 11:25:34 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
mpris = {
|
2024-10-25 15:20:10 +01:00
|
|
|
"format" = "{player_icon} {status_icon} | {album} - {artist} - {title}";
|
|
|
|
"tooltip-format" = "{player_icon} ({player}) {status_icon} {dynamic}";
|
2024-10-25 11:25:34 +01:00
|
|
|
"title-len" = 64;
|
|
|
|
"interval" = 1;
|
|
|
|
"dynamic-order" = [
|
|
|
|
"album"
|
|
|
|
"artist"
|
|
|
|
"title"
|
|
|
|
"position"
|
|
|
|
"length"
|
|
|
|
];
|
|
|
|
"player-icons" = {
|
2024-10-30 09:50:39 +00:00
|
|
|
"default" = " ";
|
|
|
|
"firefox" = " ";
|
2024-10-25 11:25:34 +01:00
|
|
|
};
|
|
|
|
"status-icons" = {
|
|
|
|
"playing" = "";
|
|
|
|
"paused" = "";
|
|
|
|
"stopped" = "";
|
|
|
|
};
|
|
|
|
"ignored-players" = [ ];
|
|
|
|
};
|
|
|
|
pulseaudio = {
|
|
|
|
scroll-step = 5;
|
2024-10-30 09:50:39 +00:00
|
|
|
format = "{format_source}{icon}{volume}%";
|
|
|
|
format-muted = "{format_source} ";
|
|
|
|
format-source = " ";
|
|
|
|
format-source-muted = " ";
|
2024-10-25 11:25:34 +01:00
|
|
|
format-icons = {
|
2024-10-30 09:50:39 +00:00
|
|
|
car = " ";
|
2024-10-25 11:25:34 +01:00
|
|
|
default = [
|
2024-10-30 09:50:39 +00:00
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
2024-10-25 11:25:34 +01:00
|
|
|
];
|
2024-10-30 09:50:39 +00:00
|
|
|
hands-free = " ";
|
|
|
|
headset = " ";
|
|
|
|
phone = " ";
|
|
|
|
portable = " ";
|
|
|
|
headphone = " ";
|
2024-10-25 11:25:34 +01:00
|
|
|
};
|
|
|
|
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
|
|
|
|
on-click-right = "${pkgs.pamixer}/bin/pamixer -t";
|
|
|
|
on-scroll-up = "${pkgs.pamixer}/bin/pamixer -i 5";
|
|
|
|
on-scroll-down = "${pkgs.pamixer}/bin/pamixer -d 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 = [
|
2024-10-30 09:50:39 +00:00
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
2024-10-25 11:25:34 +01:00
|
|
|
];
|
|
|
|
format-wifi = "{icon}";
|
2024-10-30 07:46:58 +00:00
|
|
|
format-ethernet = "";
|
2024-10-30 09:50:39 +00:00
|
|
|
format-linked = " ";
|
|
|
|
format-disconnected = " ";
|
2024-10-25 11:25:34 +01:00
|
|
|
tooltip-format = "{essid} ({signalStrength}%)";
|
|
|
|
on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
|
|
|
};
|
|
|
|
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}";
|
2024-10-29 14:42:45 +00:00
|
|
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
2024-10-25 11:25:34 +01:00
|
|
|
calendar = {
|
2024-10-29 14:42:45 +00:00
|
|
|
mode = "year";
|
2024-10-25 11:25:34 +01:00
|
|
|
mode-mon-col = 3;
|
|
|
|
weeks-pos = "left";
|
|
|
|
on-scroll = 1;
|
|
|
|
format =
|
|
|
|
let
|
|
|
|
scheme = config.lib.stylix.scheme.withHashtag;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
months = "<span color='${scheme.red}'><b>{}</b></span>";
|
|
|
|
weeks = "<span color='${scheme.cyan}'><b>W{}</b></span>";
|
|
|
|
weekdays = "<span color='${scheme.orange}'><b>{}</b></span>";
|
|
|
|
days = "<span color='${scheme.base05}'><b>{}</b></span>";
|
2024-10-29 14:42:45 +00:00
|
|
|
today = "<span color='${scheme.magenta}'><b><i>{}</i></b></span>";
|
2024-10-25 11:25:34 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
actions = {
|
2024-10-29 14:42:45 +00:00
|
|
|
on-click-right = "mode";
|
2024-10-25 11:25:34 +01:00
|
|
|
on-scroll-up = "shift_up";
|
|
|
|
on-scroll-down = "shift_down";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
clock.format = " {:%R}";
|
|
|
|
backlight = {
|
|
|
|
format = "{icon}";
|
|
|
|
tooltip-format = "{percent}%";
|
|
|
|
format-icons = [
|
2024-10-30 09:50:39 +00:00
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
2024-10-25 11:25:34 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
battery = {
|
|
|
|
states = {
|
|
|
|
warning = 20;
|
|
|
|
critical = 10;
|
|
|
|
};
|
|
|
|
format = "{icon}";
|
|
|
|
format-time = "{H}:{m}";
|
|
|
|
format-charging = " ({time})";
|
2024-10-30 09:50:39 +00:00
|
|
|
format-plugged = " ";
|
2024-10-25 11:25:34 +01:00
|
|
|
format-warning = "{icon}{capacity}%";
|
|
|
|
format-critical = "{icon}{capacity}% ({time})";
|
|
|
|
tooltip-format = "{capacity}% | {power}W | {time}";
|
|
|
|
format-icons = [
|
2024-10-30 09:50:39 +00:00
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
2024-10-25 11:25:34 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
"systemd-failed-units" = {
|
|
|
|
hide-on-ok = false;
|
2024-10-30 09:50:39 +00:00
|
|
|
format = " S:{nr_failed_system} U:{nr_failed_user}";
|
|
|
|
format-ok = " ";
|
2024-10-25 11:25:34 +01:00
|
|
|
system = true;
|
|
|
|
user = true;
|
|
|
|
};
|
|
|
|
"custom/notification" =
|
|
|
|
let
|
|
|
|
makoctl = "${config.services.mako.package}/bin/makoctl";
|
|
|
|
jq = "${pkgs.jq}/bin/jq";
|
|
|
|
in
|
|
|
|
{
|
2024-10-30 09:50:39 +00:00
|
|
|
exec = "( ${makoctl} list | ${jq} -e '.data[] | length > 0' >/dev/null && echo ' ' ) || echo ' ' ";
|
2024-10-25 11:25:34 +01:00
|
|
|
format = "{}";
|
|
|
|
on-click = "${makoctl} dismiss -a";
|
|
|
|
interval = 3;
|
|
|
|
};
|
|
|
|
"custom/weather" =
|
|
|
|
let
|
|
|
|
date-format = "%Y-%m-%d";
|
2024-10-29 09:15:07 +00:00
|
|
|
custom-indicator = "{ICON}{temp_C}°C({FeelsLikeC}°C)";
|
2024-10-25 11:25:34 +01:00
|
|
|
in
|
|
|
|
{
|
2024-10-29 09:15:07 +00:00
|
|
|
format = "{}";
|
2024-10-25 11:25:34 +01:00
|
|
|
tooltip = true;
|
|
|
|
interval = 900; # Every 15 minutes
|
|
|
|
exec = ''${pkgs.wttrbar}/bin/wttrbar --location Didcot --date-format "${date-format}" --custom-indicator "${custom-indicator}"'';
|
|
|
|
return-type = "json";
|
|
|
|
};
|
|
|
|
tray = {
|
|
|
|
icon-size = 20;
|
|
|
|
show-passive-items = true;
|
|
|
|
spacing = 5;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
style =
|
|
|
|
let
|
|
|
|
scheme = config.lib.stylix.scheme.withHashtag;
|
|
|
|
in
|
|
|
|
''
|
|
|
|
* {
|
|
|
|
all: unset;
|
|
|
|
font-family: ${config.stylix.fonts.monospace.name};
|
|
|
|
font-size: ${toString config.stylix.fonts.sizes.popups}px;
|
|
|
|
}
|
|
|
|
|
|
|
|
window {
|
|
|
|
background: transparent;
|
|
|
|
box-shadow: none;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
window > box {
|
|
|
|
color: ${scheme.base05};
|
|
|
|
background: ${scheme.base00};
|
|
|
|
margin: 5px 5px 0px;
|
|
|
|
padding: 0px;
|
|
|
|
border-top: 1px solid ${scheme.base04};
|
|
|
|
border-radius: 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
tooltip {
|
2024-10-29 09:15:07 +00:00
|
|
|
background: ${scheme.base00};
|
2024-10-25 12:19:00 +01:00
|
|
|
border: 1px solid ${scheme.base0E};
|
2024-10-25 11:25:34 +01:00
|
|
|
border-radius: 5px;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
tooltip label {
|
|
|
|
color: ${scheme.base05};
|
|
|
|
border: none;
|
|
|
|
padding: 5px;
|
|
|
|
margin: 0px;
|
|
|
|
}
|
|
|
|
|
|
|
|
#workspaces,
|
|
|
|
#window,
|
|
|
|
#mpris,
|
|
|
|
#pulseaudio,
|
|
|
|
#network,
|
|
|
|
#bluetooth,
|
|
|
|
#backlight,
|
|
|
|
#battery,
|
|
|
|
#clock,
|
|
|
|
#custom-notification,
|
|
|
|
#custom-weather,
|
|
|
|
#tray {
|
|
|
|
margin: 0px;
|
|
|
|
padding: 1px 5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
#workspaces,
|
|
|
|
#window,
|
|
|
|
#tray,
|
|
|
|
#backlight,
|
|
|
|
#battery,
|
|
|
|
#custom-weather {
|
|
|
|
color: ${scheme.base05};
|
|
|
|
}
|
|
|
|
|
|
|
|
#workspaces button {
|
|
|
|
background: transparent;
|
|
|
|
color: ${scheme.base05};
|
|
|
|
margin: 0px;
|
|
|
|
padding: 0px 5px;
|
|
|
|
}
|
|
|
|
#workspaces button.empty {
|
|
|
|
color: ${scheme.base03};
|
|
|
|
}
|
|
|
|
#workspaces button.active {
|
|
|
|
color: ${scheme.base0E};
|
|
|
|
}
|
|
|
|
#workspaces button.urgent {
|
|
|
|
color: ${scheme.base09};
|
|
|
|
}
|
|
|
|
|
2024-10-25 15:20:10 +01:00
|
|
|
#mpris.paused {
|
|
|
|
color: ${scheme.base03};
|
2024-10-25 11:25:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#custom-notification {
|
|
|
|
color: ${scheme.base08};
|
|
|
|
}
|
|
|
|
#pulseaudio {
|
|
|
|
color: ${scheme.base09};
|
|
|
|
}
|
|
|
|
#network {
|
|
|
|
color: ${scheme.base0A};
|
|
|
|
}
|
|
|
|
#bluetooth {
|
|
|
|
color: ${scheme.base0B};
|
|
|
|
}
|
|
|
|
#clock.calendar {
|
|
|
|
color: ${scheme.base0C};
|
|
|
|
}
|
|
|
|
#clock {
|
|
|
|
color: ${scheme.base0D};
|
|
|
|
}
|
|
|
|
|
|
|
|
#battery.warning {
|
|
|
|
color: ${scheme.base09};
|
|
|
|
}
|
|
|
|
#battery.critical {
|
|
|
|
color: ${scheme.base08};
|
|
|
|
}
|
|
|
|
#battery.charging,
|
|
|
|
#battery.plugged {
|
|
|
|
color: ${scheme.base0B};
|
|
|
|
}
|
|
|
|
|
|
|
|
#systemd-failed-units.ok {
|
|
|
|
color: ${scheme.base0B}
|
|
|
|
}
|
|
|
|
#systemd-failed-units.degraded {
|
|
|
|
color: ${scheme.base08}
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|