2024-07-07 08:47:50 +01:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
fonts,
|
|
|
|
accentColourName,
|
|
|
|
...
|
2024-07-30 15:06:34 +01:00
|
|
|
}:
|
|
|
|
{
|
2024-07-07 08:47:50 +01:00
|
|
|
systemd.user.targets.tray.Unit = {
|
|
|
|
Description = "Home Manager System Tray";
|
2024-07-30 15:06:34 +01:00
|
|
|
Requires = [ "graphical-session.target" ];
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
|
|
|
programs.waybar = {
|
|
|
|
enable = true;
|
|
|
|
systemd.enable = true;
|
|
|
|
settings.main = {
|
|
|
|
name = "main";
|
|
|
|
layer = "top";
|
2024-07-08 08:58:32 +01:00
|
|
|
position = "top";
|
2024-07-07 08:47:50 +01:00
|
|
|
# Layout
|
|
|
|
"modules-left" = [
|
|
|
|
"sway/workspaces"
|
|
|
|
"sway/window"
|
|
|
|
];
|
2024-07-30 15:06:34 +01:00
|
|
|
"modules-center" = [ ];
|
2024-07-07 08:47:50 +01:00
|
|
|
"modules-right" = [
|
|
|
|
"mpris"
|
|
|
|
"custom/notification"
|
|
|
|
"pulseaudio"
|
|
|
|
"network"
|
|
|
|
"bluetooth"
|
|
|
|
"clock#calendar"
|
|
|
|
"clock"
|
|
|
|
"backlight"
|
|
|
|
"battery"
|
|
|
|
"custom/weather"
|
|
|
|
"tray"
|
|
|
|
];
|
|
|
|
# Module config
|
|
|
|
"sway/workspaces" = {
|
|
|
|
format = "{icon}";
|
|
|
|
format-icons = {
|
|
|
|
"1" = " ";
|
|
|
|
"2" = " ";
|
|
|
|
"3" = " ";
|
|
|
|
"4" = " ";
|
|
|
|
"5" = " ";
|
|
|
|
"6" = " ";
|
|
|
|
default = " ";
|
|
|
|
urgent = " ";
|
|
|
|
};
|
|
|
|
all-outputs = false;
|
|
|
|
persistent-workspaces = {
|
2024-07-30 15:06:34 +01:00
|
|
|
"1" = [ ];
|
|
|
|
"2" = [ ];
|
|
|
|
"3" = [ ];
|
|
|
|
"4" = [ ];
|
|
|
|
"5" = [ ];
|
|
|
|
"6" = [ ];
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
"sway/window" = {
|
|
|
|
"format" = "{title}";
|
|
|
|
"max-length" = 50;
|
|
|
|
"rewrite" = {
|
|
|
|
"(.*) - GNU Emacs at (.*)" = " $1 [$2]";
|
2024-07-09 11:59:23 +01:00
|
|
|
"(alacritty.*)" = " $1";
|
2024-07-07 08:47:50 +01:00
|
|
|
"(.*) - mpv" = " $1";
|
|
|
|
"swayimg: (.*)" = " $1";
|
|
|
|
"(btm)" = " Resource Usage [$1]";
|
|
|
|
"(cava)" = " Music Visualiser [$1]";
|
|
|
|
"(.*) - Thunar" = " $1";
|
|
|
|
"Mozilla Firefox" = " $1";
|
|
|
|
"(.*) — Mozilla Firefox" = " $1";
|
|
|
|
"Nyxt - (.*)" = " $1";
|
|
|
|
"(.*) - Chromium" = " $1";
|
|
|
|
"(Signal.*)" = " $1";
|
|
|
|
"((?:.*)WebCord.*)" = " $1";
|
|
|
|
"(Cartridges.*)" = " $1";
|
|
|
|
"([Ss]team.*)" = " $1";
|
|
|
|
"(Prism Launcher.*)" = " Minecraft ($1)";
|
|
|
|
"(X2Go Client)" = " $1";
|
|
|
|
"(NoMachine|Nxplayer.bin) (.*)" = " $1 $2";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
mpris = {
|
2024-07-08 09:58:57 +01:00
|
|
|
"format" = "{player_icon} {artist} - {title} {status_icon}";
|
2024-07-07 08:47:50 +01:00
|
|
|
"tooltip-format" = "{player_icon} ({player}) {dynamic}";
|
|
|
|
"title-len" = 64;
|
|
|
|
"interval" = 1;
|
|
|
|
"dynamic-order" = [
|
|
|
|
"album"
|
|
|
|
"artist"
|
|
|
|
"title"
|
|
|
|
"position"
|
|
|
|
"length"
|
|
|
|
];
|
|
|
|
"player-icons" = {
|
|
|
|
"default" = " ";
|
|
|
|
"emms" = " ";
|
|
|
|
"firefox" = " ";
|
|
|
|
"mpv" = " ";
|
|
|
|
};
|
|
|
|
"status-icons" = {
|
|
|
|
"playing" = "";
|
|
|
|
"paused" = "";
|
|
|
|
"stopped" = "";
|
|
|
|
};
|
2024-07-30 15:06:34 +01:00
|
|
|
"ignored-players" = [ ];
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
|
|
|
pulseaudio = {
|
|
|
|
scroll-step = 5;
|
|
|
|
format = "{format_source}{icon}{volume}%";
|
|
|
|
format-muted = "{format_source} ";
|
|
|
|
format-source = " ";
|
|
|
|
format-source-muted = " ";
|
|
|
|
format-icons = {
|
|
|
|
car = " ";
|
2024-07-30 15:06:34 +01:00
|
|
|
default = [
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
];
|
2024-07-07 08:47:50 +01:00
|
|
|
hands-free = " ";
|
|
|
|
headset = " ";
|
|
|
|
phone = " ";
|
|
|
|
portable = " ";
|
|
|
|
headphone = " ";
|
|
|
|
};
|
|
|
|
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;
|
|
|
|
};
|
2024-07-30 15:06:34 +01:00
|
|
|
memory = {
|
|
|
|
format = " {}%";
|
|
|
|
};
|
2024-07-07 08:47:50 +01:00
|
|
|
temperature = {
|
|
|
|
critical-threshold = 80;
|
|
|
|
format = "{icon} {temperatureC}°C";
|
2024-07-30 15:06:34 +01:00
|
|
|
format-icons = [
|
|
|
|
""
|
|
|
|
""
|
|
|
|
""
|
|
|
|
];
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
|
|
|
network = {
|
2024-07-30 15:06:34 +01:00
|
|
|
format-icons = [
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
];
|
2024-07-07 08:47:50 +01:00
|
|
|
format-wifi = "{icon}";
|
|
|
|
format-ethernet = " ";
|
|
|
|
format-linked = " ";
|
|
|
|
format-disconnected = " ";
|
2024-07-09 07:18:52 +01:00
|
|
|
tooltip-format = "{essid} ({signalStrength}%)";
|
|
|
|
on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
|
|
|
bluetooth = {
|
|
|
|
format = "";
|
|
|
|
format-disabled = "";
|
|
|
|
format-off = "";
|
|
|
|
format-on = "";
|
|
|
|
format-connected = "";
|
|
|
|
tooltip-format = "{status} | {device_alias}";
|
2024-07-09 07:18:52 +01:00
|
|
|
on-click = "${pkgs.blueman}/bin/blueman-manager";
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
|
|
|
"clock#calendar" = {
|
2024-07-08 12:12:31 +01:00
|
|
|
format = " {:%Y-%m-%d}";
|
2024-07-08 12:10:46 +01:00
|
|
|
tooltip-format = "<tt>{calendar}</tt>";
|
2024-07-07 08:47:50 +01:00
|
|
|
calendar = {
|
|
|
|
mode = "month";
|
|
|
|
mode-mon-col = 3;
|
|
|
|
weeks-pos = "left";
|
|
|
|
on-scroll = 1;
|
2024-07-30 15:06:34 +01:00
|
|
|
format =
|
|
|
|
let
|
|
|
|
sc = config.scheme.withHashtag;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
months = "<span color='${sc.red}'><b>{}</b></span>";
|
|
|
|
weeks = "<span color='${sc.cyan}'><b>W{}</b></span>";
|
|
|
|
weekdays = "<span color='${sc.orange}'><b>{}</b></span>";
|
|
|
|
days = "<span color='${sc.base05}'><b>{}</b></span>";
|
|
|
|
today = "<span color='${sc.${accentColourName}}'><b><i>{}</i></b></span>";
|
|
|
|
};
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
|
|
|
actions = {
|
|
|
|
on-scroll-up = "shift_up";
|
|
|
|
on-scroll-down = "shift_down";
|
|
|
|
};
|
|
|
|
};
|
2024-07-08 12:12:31 +01:00
|
|
|
clock.format = " {:%R}";
|
2024-07-07 08:47:50 +01:00
|
|
|
backlight = {
|
|
|
|
format = "{icon}";
|
|
|
|
tooltip-format = "{percent}%";
|
2024-07-30 15:06:34 +01:00
|
|
|
format-icons = [
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
];
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
|
|
|
battery = {
|
|
|
|
states = {
|
|
|
|
warning = 30;
|
|
|
|
critical = 20;
|
|
|
|
};
|
|
|
|
format = "{icon}";
|
|
|
|
format-charging = " ";
|
|
|
|
format-plugged = " ";
|
|
|
|
tooltip-format = "{capacity}% {time}";
|
2024-07-30 15:06:34 +01:00
|
|
|
format-icons = [
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
" "
|
|
|
|
];
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
2024-07-30 15:06:34 +01:00
|
|
|
"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;
|
|
|
|
};
|
|
|
|
"custom/weather" =
|
|
|
|
let
|
|
|
|
date-format = "%Y-%m-%d";
|
|
|
|
custom-indicator = "{ICON}{temp_C}({FeelsLikeC})";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
format = "{}°";
|
|
|
|
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";
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
|
|
|
tray = {
|
|
|
|
icon-size = builtins.floor fonts.sizes.popups;
|
|
|
|
show-passive-items = true;
|
|
|
|
spacing = 5;
|
|
|
|
};
|
|
|
|
};
|
2024-07-30 15:06:34 +01:00
|
|
|
style =
|
|
|
|
let
|
|
|
|
sc = config.scheme.withHashtag;
|
|
|
|
alpha = "0.85";
|
|
|
|
in
|
|
|
|
''
|
|
|
|
* {
|
|
|
|
all: unset;
|
|
|
|
font-size: ${toString fonts.sizes.popups}px;
|
|
|
|
font-family: ${fonts.monospace.name};
|
|
|
|
}
|
2024-07-07 08:47:50 +01:00
|
|
|
|
2024-07-30 15:06:34 +01:00
|
|
|
window {
|
|
|
|
background: transparent;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
2024-07-07 08:47:50 +01:00
|
|
|
|
2024-07-30 15:06:34 +01:00
|
|
|
window > box {
|
|
|
|
color: ${sc.base05};
|
|
|
|
background: alpha(${sc.base00}, ${alpha});
|
|
|
|
margin: 5px 5px 0px;
|
|
|
|
padding: 0px;
|
|
|
|
border-top: 1px solid ${sc.base04};
|
|
|
|
border-radius: 5px;
|
|
|
|
}
|
2024-07-07 08:47:50 +01:00
|
|
|
|
2024-07-30 15:06:34 +01:00
|
|
|
tooltip {
|
|
|
|
background: ${sc.base00};
|
|
|
|
border: 1px solid ${sc.${accentColourName}};
|
|
|
|
border-radius: 5px;
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
2024-07-07 08:47:50 +01:00
|
|
|
|
2024-07-30 15:06:34 +01:00
|
|
|
tooltip label {
|
|
|
|
color: ${sc.base05};
|
|
|
|
border: none;
|
|
|
|
padding: 5px;
|
|
|
|
margin: 0px;
|
|
|
|
}
|
2024-07-07 08:47:50 +01:00
|
|
|
|
2024-07-30 15:06:34 +01:00
|
|
|
#workspaces,
|
|
|
|
#window,
|
|
|
|
#mpris,
|
|
|
|
#pulseaudio,
|
|
|
|
#network,
|
|
|
|
#bluetooth,
|
|
|
|
#backlight,
|
|
|
|
#battery,
|
|
|
|
#clock,
|
|
|
|
#custom-notification,
|
|
|
|
#custom-weather,
|
|
|
|
#tray {
|
|
|
|
margin: 0px;
|
|
|
|
padding: 1px 5px;
|
|
|
|
}
|
2024-07-07 08:47:50 +01:00
|
|
|
|
2024-07-30 15:06:34 +01:00
|
|
|
#workspaces,
|
|
|
|
#window,
|
|
|
|
#mpris,
|
|
|
|
#tray,
|
|
|
|
#backlight,
|
|
|
|
#battery,
|
|
|
|
#custom-weather {
|
|
|
|
color: ${sc.base05};
|
|
|
|
}
|
2024-07-07 08:47:50 +01:00
|
|
|
|
2024-07-30 15:06:34 +01:00
|
|
|
#workspaces button {
|
|
|
|
background: transparent;
|
|
|
|
color: ${sc.base05};
|
|
|
|
margin: 0px;
|
|
|
|
padding: 0px 5px;
|
|
|
|
}
|
|
|
|
#workspaces button.persistent {
|
|
|
|
color: ${sc.base03};
|
|
|
|
}
|
|
|
|
#workspaces button.focused {
|
|
|
|
color: ${sc.${accentColourName}};
|
|
|
|
}
|
|
|
|
#workspaces button.urgent {
|
|
|
|
color: ${sc.base09};
|
|
|
|
}
|
2024-07-07 08:47:50 +01:00
|
|
|
|
2024-07-30 15:06:34 +01:00
|
|
|
#custom-notification {
|
|
|
|
color: ${sc.base08};
|
|
|
|
}
|
|
|
|
#pulseaudio {
|
|
|
|
color: ${sc.base09};
|
|
|
|
}
|
|
|
|
#network {
|
|
|
|
color: ${sc.base0A};
|
|
|
|
}
|
|
|
|
#bluetooth {
|
|
|
|
color: ${sc.base0B};
|
|
|
|
}
|
|
|
|
#clock.calendar {
|
|
|
|
color: ${sc.base0C};
|
|
|
|
}
|
|
|
|
#clock {
|
|
|
|
color: ${sc.base0D};
|
|
|
|
}
|
|
|
|
'';
|
2024-07-07 08:47:50 +01:00
|
|
|
};
|
|
|
|
}
|