105 lines
2.5 KiB
Nix
105 lines
2.5 KiB
Nix
{ pkgs, ... }:
|
|
let
|
|
commands = import ../../../lib/commands.nix { inherit pkgs; };
|
|
inherit (commands) uwsm term;
|
|
height = 20;
|
|
in
|
|
{
|
|
programs.waybar = {
|
|
enable = true;
|
|
systemd = {
|
|
enable = true;
|
|
target = "graphical-session.target";
|
|
};
|
|
settings.mainBar = {
|
|
layer = "bottom";
|
|
position = "top";
|
|
height = height;
|
|
spacing = 0;
|
|
modules-left = [ "sway/workspaces" ];
|
|
modules-center = [ "sway/window" ];
|
|
modules-right = [
|
|
"tray"
|
|
"battery"
|
|
"group/system"
|
|
];
|
|
"group/system" = {
|
|
"orientation" = "inherit";
|
|
"drawer"= {
|
|
"transition-duration" = 100;
|
|
"transition-left-to-right" = false;
|
|
};
|
|
"modules" = [
|
|
"clock"
|
|
"sway/language"
|
|
"network"
|
|
"bluetooth"
|
|
"pulseaudio"
|
|
"idle_inhibitor"
|
|
];
|
|
};
|
|
"sway/workspaces" = {
|
|
on-click = "activate";
|
|
sort-by-number = true;
|
|
format = "{value}";
|
|
};
|
|
"sway/window".max-length = 64;
|
|
tray = {
|
|
icon-size = height;
|
|
spacing = 8;
|
|
};
|
|
idle_inhibitor = {
|
|
format = "| {icon}";
|
|
start-activated = true;
|
|
format-icons = {
|
|
activated = "🫨";
|
|
deactivated = "😴";
|
|
};
|
|
};
|
|
"sway/language" = {
|
|
format = "| {short}";
|
|
tooltip-format = "{long}";
|
|
};
|
|
clock = {
|
|
interval = 60;
|
|
tooltip = true;
|
|
format = "| {:%H:%M} ";
|
|
tooltip-format = "{:%Y-%m-%d}";
|
|
};
|
|
battery = {
|
|
interval = 60;
|
|
format = "| {capacity}%";
|
|
format-charging = "| ch:{capacity}%";
|
|
};
|
|
network = {
|
|
tooltip-format = "{ifname} = {ipaddr}/{cidr}";
|
|
format-wifi = "| w:{ipaddr}";
|
|
format-ethernet = "| e:{ipaddr}";
|
|
format-linked = "| l:{ipaddr}";
|
|
format-disconnected = "| d";
|
|
interval = 15;
|
|
on-click = "${uwsm} ${term} -e nmtui";
|
|
};
|
|
bluetooth = {
|
|
format = "| bt:{num_connections}";
|
|
format-disabled = "";
|
|
format-no-controller = "";
|
|
interval = 15;
|
|
on-click = "${uwsm} ${term} -e bluetui";
|
|
};
|
|
pulseaudio = {
|
|
format = "| snd{volume}%";
|
|
format-muted = "| snd:-";
|
|
format-bluetooth = "| snd(bt):{volume}%";
|
|
on-click = "${uwsm} pavucontrol";
|
|
};
|
|
};
|
|
style = ''
|
|
button {
|
|
box-shadow: inset 0 -8px transparent;
|
|
border: none;
|
|
border-radius: 0;
|
|
}
|
|
'';
|
|
};
|
|
}
|