2024-01-30 14:21:50 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
2024-03-31 12:59:24 +01:00
|
|
|
fonts,
|
|
|
|
scheme,
|
2024-02-29 16:28:49 +00:00
|
|
|
accentColour ? "base07",
|
2024-01-30 14:21:50 +00:00
|
|
|
...
|
|
|
|
}: {
|
2023-11-09 11:42:12 +00:00
|
|
|
systemd.user.targets.tray.Unit = {
|
|
|
|
Description = "Home Manager System Tray";
|
2024-01-30 14:21:50 +00:00
|
|
|
Requires = ["graphical-session-pre.target"];
|
2023-11-09 11:42:12 +00:00
|
|
|
};
|
2023-07-10 11:24:42 +01:00
|
|
|
programs.waybar = {
|
|
|
|
enable = true;
|
2024-04-14 21:43:37 +01:00
|
|
|
systemd = {
|
|
|
|
enable = true;
|
|
|
|
target = "sway-session.target";
|
|
|
|
};
|
2023-07-13 12:41:00 +01:00
|
|
|
settings.main = {
|
|
|
|
layer = "top";
|
2024-04-15 17:26:31 +01:00
|
|
|
position = "top";
|
2023-11-04 12:00:40 +00:00
|
|
|
# Layout
|
2024-04-19 11:50:26 +01:00
|
|
|
"modules-left" = ["mpris"];
|
|
|
|
"modules-center" = ["sway/workspaces"];
|
2023-12-18 09:57:27 +00:00
|
|
|
"modules-right" = [
|
2024-01-03 19:18:40 +00:00
|
|
|
"custom/notification"
|
2024-01-23 19:49:29 +00:00
|
|
|
"pulseaudio"
|
2024-02-13 08:20:02 +00:00
|
|
|
"network"
|
|
|
|
"bluetooth"
|
|
|
|
"clock#calendar"
|
2024-01-22 11:59:49 +00:00
|
|
|
"clock"
|
2024-01-22 14:34:40 +00:00
|
|
|
"backlight"
|
2024-01-22 07:56:40 +00:00
|
|
|
"battery"
|
2024-02-21 10:00:18 +00:00
|
|
|
"custom/weather"
|
2023-12-18 09:57:27 +00:00
|
|
|
"tray"
|
|
|
|
];
|
2023-11-04 12:00:40 +00:00
|
|
|
# Module config
|
2024-04-12 17:56:13 +01:00
|
|
|
"sway/workspaces" = {
|
2023-11-04 12:00:40 +00:00
|
|
|
format = "{icon}";
|
|
|
|
format-icons = {
|
2024-04-19 10:53:27 +01:00
|
|
|
"1" = " ";
|
|
|
|
"2" = " ";
|
|
|
|
"3" = " ";
|
|
|
|
"4" = " ";
|
|
|
|
"5" = " ";
|
|
|
|
"6" = " ";
|
|
|
|
default = " ";
|
2024-03-02 15:32:31 +00:00
|
|
|
urgent = " ";
|
2023-12-20 10:06:32 +00:00
|
|
|
};
|
2024-04-12 17:56:13 +01:00
|
|
|
# show-special = false;
|
|
|
|
# sort-by-number = true;
|
2024-03-29 07:52:27 +00:00
|
|
|
all-outputs = false;
|
2024-01-23 11:54:06 +00:00
|
|
|
persistent-workspaces = {
|
2024-01-30 14:21:50 +00:00
|
|
|
"1" = [];
|
|
|
|
"2" = [];
|
|
|
|
"3" = [];
|
|
|
|
"4" = [];
|
2024-03-25 13:43:16 +00:00
|
|
|
"5" = [];
|
2024-04-19 10:53:27 +01:00
|
|
|
"6" = [];
|
2024-01-23 11:54:06 +00:00
|
|
|
};
|
2023-11-12 13:24:09 +00:00
|
|
|
};
|
2024-04-12 17:56:13 +01:00
|
|
|
"sway/window" = {
|
|
|
|
"format" = "{title}";
|
|
|
|
"max-length" = 50;
|
|
|
|
"rewrite" = {
|
|
|
|
"(.*) - GNU Emacs at (.*)" = " $1 [$2]";
|
|
|
|
"(Alacritty.*)" = " $1";
|
|
|
|
"(.*) - mpv" = " $1";
|
|
|
|
"swayimg: (.*)" = " $1";
|
|
|
|
"(btm)" = " Resource Usage [$1]";
|
|
|
|
"(cava)" = " Music Visualiser [$1]";
|
|
|
|
"(.*) - Thunar" = " $1";
|
|
|
|
"Mozilla Firefox" = " $1";
|
|
|
|
"(.*) — Mozilla Firefox" = " $1";
|
|
|
|
"Nyxt - (.*)" = " $1";
|
|
|
|
"(.*) - Chromium" = " $1";
|
|
|
|
"((?:.*)WebCord.*)" = " $1";
|
|
|
|
"(Signal.*)" = " $1";
|
|
|
|
"([Ss]team)" = " $1";
|
|
|
|
"(Prism Launcher.*)" = " Minecraft ($1)";
|
|
|
|
"(X2Go Client)" = " $1";
|
|
|
|
"(NoMachine|Nxplayer.bin) (.*)" = " $1 $2";
|
|
|
|
};
|
|
|
|
};
|
2023-11-04 12:00:40 +00:00
|
|
|
mpris = {
|
2024-04-02 16:08:31 +01:00
|
|
|
"format" = "{status_icon} {player_icon} {artist} - {title}";
|
2024-01-17 06:18:29 +00:00
|
|
|
"tooltip-format" = "{player_icon} ({player}) {dynamic}";
|
2024-04-17 10:14:31 +01:00
|
|
|
"title-len" = 64;
|
2023-11-04 12:00:40 +00:00
|
|
|
"interval" = 1;
|
2024-03-29 07:49:16 +00:00
|
|
|
"dynamic-order" = [
|
|
|
|
"album"
|
|
|
|
"artist"
|
|
|
|
"title"
|
|
|
|
"position"
|
|
|
|
"length"
|
|
|
|
];
|
2024-03-02 15:32:31 +00:00
|
|
|
"player-icons" = {
|
|
|
|
"default" = " ";
|
|
|
|
"emms" = " ";
|
|
|
|
"firefox" = " ";
|
|
|
|
"mpv" = " ";
|
|
|
|
};
|
2023-11-04 12:00:40 +00:00
|
|
|
"status-icons" = {
|
2024-03-02 15:32:31 +00:00
|
|
|
"playing" = "";
|
|
|
|
"paused" = "";
|
|
|
|
"stopped" = "";
|
2023-11-04 12:00:40 +00:00
|
|
|
};
|
2024-01-30 14:21:50 +00:00
|
|
|
"ignored-players" = [];
|
2023-11-04 12:00:40 +00:00
|
|
|
};
|
|
|
|
pulseaudio = {
|
|
|
|
scroll-step = 5;
|
2024-03-02 15:35:36 +00:00
|
|
|
format = "{format_source}{icon}{volume}%";
|
2024-03-02 15:32:31 +00:00
|
|
|
format-muted = "{format_source} ";
|
2024-03-02 15:35:36 +00:00
|
|
|
format-source = " ";
|
|
|
|
format-source-muted = " ";
|
2023-11-04 12:00:40 +00:00
|
|
|
format-icons = {
|
2024-03-02 15:35:36 +00:00
|
|
|
car = " ";
|
|
|
|
default = [" " " " " "];
|
|
|
|
hands-free = " ";
|
|
|
|
headset = " ";
|
|
|
|
phone = " ";
|
|
|
|
portable = " ";
|
|
|
|
headphone = " ";
|
2023-11-04 12:00:40 +00:00
|
|
|
};
|
2024-02-13 13:30:00 +00: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";
|
2023-11-04 12:00:40 +00:00
|
|
|
};
|
2024-03-02 15:32:31 +00:00
|
|
|
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 = ["" "" ""];
|
|
|
|
};
|
2024-02-13 08:20:02 +00:00
|
|
|
network = {
|
2024-03-02 15:32:31 +00:00
|
|
|
format-icons = [" " " " " " " "];
|
|
|
|
format-wifi = "{icon}";
|
|
|
|
format-ethernet = " ";
|
2024-02-13 08:20:02 +00:00
|
|
|
tooltip-format = "{essid} ({signalStrength}%)";
|
2024-03-02 15:32:31 +00:00
|
|
|
format-linked = " ";
|
|
|
|
format-disconnected = " ";
|
2024-02-13 08:20:02 +00:00
|
|
|
};
|
|
|
|
bluetooth = {
|
2024-03-02 15:35:36 +00:00
|
|
|
format = "";
|
|
|
|
format-disabled = "";
|
|
|
|
format-off = "";
|
|
|
|
format-on = "";
|
|
|
|
format-connected = "";
|
2024-02-13 08:20:02 +00:00
|
|
|
tooltip-format = "{status} | {device_alias}";
|
2024-02-17 09:52:29 +00:00
|
|
|
on-click = "${pkgs.bluez}/bin/bluetoothctl power on";
|
|
|
|
on-click-right = "${pkgs.bluez}/bin/bluetoothctl power off";
|
2024-02-13 08:20:02 +00:00
|
|
|
};
|
|
|
|
"clock#calendar" = {
|
2024-03-18 09:11:42 +00:00
|
|
|
# format = "{: %Y-%m-%d}";
|
|
|
|
format = "{:%Y-%m-%d}"; # TEMP, see https://github.com/Alexays/Waybar/issues/3021
|
2023-11-04 12:00:40 +00:00
|
|
|
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";
|
|
|
|
};
|
|
|
|
};
|
2024-03-18 09:11:42 +00:00
|
|
|
clock = {
|
|
|
|
# format = "{: %R}";
|
|
|
|
format = "{:%R}"; # TEMP, see https://github.com/Alexays/Waybar/issues/3021
|
|
|
|
};
|
2023-11-13 11:15:54 +00:00
|
|
|
backlight = {
|
2024-02-17 15:43:39 +00:00
|
|
|
format = "{icon}";
|
2023-11-13 11:15:54 +00:00
|
|
|
tooltip-format = "{percent}%";
|
2024-02-17 09:52:29 +00:00
|
|
|
format-icons = [" " " " " " " " " " " " " " " " " "];
|
2023-11-13 11:15:54 +00:00
|
|
|
};
|
|
|
|
battery = {
|
|
|
|
states = {
|
|
|
|
warning = 30;
|
2024-02-17 09:52:29 +00:00
|
|
|
critical = 20;
|
2023-11-13 11:15:54 +00:00
|
|
|
};
|
2024-02-17 09:52:29 +00:00
|
|
|
format = "{icon}";
|
2024-03-02 15:32:31 +00:00
|
|
|
format-charging = " ";
|
|
|
|
format-plugged = " ";
|
2024-01-22 14:34:40 +00:00
|
|
|
tooltip-format = "{capacity}% {time}";
|
2024-03-02 15:32:31 +00:00
|
|
|
format-icons = [" " " " " " " " " " " " " " " " " " " " " "];
|
2023-11-13 11:15:54 +00:00
|
|
|
};
|
2024-01-30 14:21:50 +00:00
|
|
|
"custom/notification" = let
|
|
|
|
swaync = pkgs.swaynotificationcenter;
|
2024-01-29 14:14:48 +00:00
|
|
|
in {
|
2024-01-03 19:18:40 +00:00
|
|
|
"tooltip" = false;
|
2024-03-02 15:32:31 +00:00
|
|
|
"format" = "{icon}{}";
|
2024-01-03 19:18:40 +00:00
|
|
|
"format-icons" = {
|
2024-03-02 15:32:31 +00:00
|
|
|
"notification" = " ";
|
|
|
|
"none" = " ";
|
|
|
|
"dnd-notification" = " ";
|
|
|
|
"dnd-none" = " ";
|
|
|
|
"inhibited-notification" = " ";
|
|
|
|
"inhibited-none" = " ";
|
|
|
|
"dnd-inhibited-notification" = " ";
|
|
|
|
"dnd-inhibited-none" = " ";
|
2024-01-03 19:18:40 +00:00
|
|
|
};
|
|
|
|
"return-type" = "json";
|
2024-01-29 14:14:48 +00:00
|
|
|
"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";
|
2024-01-03 19:18:40 +00:00
|
|
|
"escape" = true;
|
|
|
|
};
|
2024-03-09 12:18:03 +00:00
|
|
|
"custom/weather" = let
|
|
|
|
date-format = "%Y-%m-%d";
|
|
|
|
custom-indicator = "{ICON}{temp_C}({FeelsLikeC})";
|
|
|
|
in {
|
2024-02-21 10:00:18 +00:00
|
|
|
"format" = "{}°";
|
2024-03-11 11:16:35 +00:00
|
|
|
"tooltip" = true;
|
2024-03-02 11:45:36 +00:00
|
|
|
"interval" = 900; # Every 15 minutes
|
2024-03-09 12:18:03 +00:00
|
|
|
"exec" = ''${pkgs.wttrbar}/bin/wttrbar --location Didcot --date-format "${date-format}" --custom-indicator "${custom-indicator}"'';
|
2024-02-21 10:00:18 +00:00
|
|
|
"return-type" = "json";
|
|
|
|
};
|
2023-11-04 12:00:40 +00:00
|
|
|
tray = {
|
2024-04-17 13:39:18 +01:00
|
|
|
icon-size = builtins.floor (builtins.mul fonts.sizes.desktop 1.5);
|
2023-11-04 12:00:40 +00:00
|
|
|
show-passive-items = true;
|
|
|
|
spacing = 5;
|
|
|
|
};
|
2023-07-13 12:41:00 +01:00
|
|
|
};
|
2024-03-31 12:59:24 +01:00
|
|
|
style = with scheme.withHashtag; let
|
|
|
|
accent = scheme.withHashtag.${accentColour};
|
2024-02-29 16:28:49 +00:00
|
|
|
in ''
|
|
|
|
* {
|
|
|
|
all: unset;
|
2024-04-17 13:39:18 +01:00
|
|
|
font-size: ${toString (builtins.floor (builtins.mul fonts.sizes.desktop 1.5))};
|
2024-04-15 07:58:33 +01:00
|
|
|
font-family: ${fonts.monospace.name};
|
2024-02-29 16:28:49 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
window {
|
|
|
|
background: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
window > box {
|
|
|
|
color: ${base05};
|
2024-03-31 12:59:24 +01:00
|
|
|
background: alpha(${base00}, 0.8);
|
2024-04-15 17:26:31 +01:00
|
|
|
margin: 10px 10px 0px;
|
2024-02-29 16:28:49 +00:00
|
|
|
padding: 0px;
|
|
|
|
border: 1px solid ${accent};
|
|
|
|
border-radius: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
tooltip {
|
2024-04-15 11:18:19 +01:00
|
|
|
background: alpha(${base00}, 0.8);
|
2024-02-29 16:28:49 +00:00
|
|
|
border: 1px solid ${accent};
|
|
|
|
border-radius: 10px;
|
2024-03-09 12:18:03 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
tooltip label {
|
|
|
|
color: ${base05};
|
|
|
|
border: none;
|
2024-02-29 16:28:49 +00:00
|
|
|
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,
|
|
|
|
#mpris,
|
|
|
|
#tray,
|
|
|
|
#backlight,
|
|
|
|
#battery,
|
|
|
|
#custom-weather {
|
|
|
|
color: ${base05};
|
|
|
|
}
|
|
|
|
|
|
|
|
#workspaces button {
|
|
|
|
background: transparent;
|
|
|
|
color: ${base05};
|
|
|
|
margin: 0px;
|
|
|
|
padding: 0px 5px;
|
|
|
|
}
|
2024-04-12 21:17:54 +01:00
|
|
|
#workspaces button.persistent {
|
2024-02-29 16:28:49 +00:00
|
|
|
color: ${base03};
|
|
|
|
}
|
2024-04-12 21:17:54 +01:00
|
|
|
#workspaces button.focused {
|
2024-02-29 16:28:49 +00:00
|
|
|
color: ${accent};
|
|
|
|
}
|
|
|
|
#workspaces button.urgent {
|
|
|
|
color: ${base09};
|
|
|
|
}
|
|
|
|
|
|
|
|
#custom-notification {
|
|
|
|
color: ${base08};
|
|
|
|
}
|
|
|
|
#pulseaudio {
|
|
|
|
color: ${base09};
|
|
|
|
}
|
|
|
|
#network {
|
|
|
|
color: ${base0A};
|
|
|
|
}
|
|
|
|
#bluetooth {
|
|
|
|
color: ${base0B};
|
|
|
|
}
|
|
|
|
#clock.calendar {
|
|
|
|
color: ${base0C};
|
|
|
|
}
|
|
|
|
#clock {
|
|
|
|
color: ${base0D};
|
|
|
|
}
|
|
|
|
'';
|
2023-07-10 11:24:42 +01:00
|
|
|
};
|
|
|
|
}
|