2024-12-04 12:53:29 -05:00
|
|
|
{ pkgs, config, ... }:
|
2024-02-07 13:00:22 -05:00
|
|
|
|
2024-12-04 12:53:29 -05:00
|
|
|
let terminalExec = "${pkgs.lib.getExe config.defaultPrograms.terminal} -e";
|
|
|
|
|
in
|
2025-05-22 13:22:44 -04:00
|
|
|
{
|
2024-12-04 12:53:29 -05:00
|
|
|
programs.waybar = {
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = [{
|
|
|
|
|
modules-left = [ "sway/workspaces" ];
|
|
|
|
|
modules-right = [
|
|
|
|
|
"pulseaudio"
|
|
|
|
|
"bluetooth"
|
|
|
|
|
"network"
|
|
|
|
|
"cpu"
|
|
|
|
|
"memory"
|
|
|
|
|
"disk"
|
|
|
|
|
"battery"
|
|
|
|
|
"tray"
|
|
|
|
|
"sway/language"
|
|
|
|
|
"clock"
|
|
|
|
|
];
|
|
|
|
|
"sway/workspaces" = {
|
|
|
|
|
enable-bar-scroll = true;
|
|
|
|
|
disable-scroll-wraparound = true;
|
|
|
|
|
smooth-scrolling-threshold = 2.0;
|
|
|
|
|
};
|
|
|
|
|
pulseaudio = {
|
|
|
|
|
format = "{volume}% {icon} {format_source}";
|
|
|
|
|
format-bluetooth = "{volume}% {icon} {format_source}";
|
2024-12-17 21:56:38 -05:00
|
|
|
format-muted = "{volume}% 🔇 {format_source}";
|
2025-05-22 13:22:44 -04:00
|
|
|
format-source = "{volume}% 🎤";
|
|
|
|
|
format-source-muted = "{volume}% 🙊";
|
2025-01-31 11:10:34 -05:00
|
|
|
format-icons = [ "🔈" "🔊" ];
|
2024-12-04 12:53:29 -05:00
|
|
|
on-click = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
|
|
|
|
on-click-right = "exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
|
|
|
|
|
on-click-middle = "exec pavucontrol";
|
|
|
|
|
on-scroll-up = "";
|
|
|
|
|
on-scroll-down = "";
|
|
|
|
|
};
|
|
|
|
|
network = {
|
2024-12-17 21:56:38 -05:00
|
|
|
format-wifi = "{essid} ({signalStrength}%) ";
|
2025-05-22 13:22:44 -04:00
|
|
|
format-ethernet = "{ipaddr}/{cidr} ";
|
|
|
|
|
tooltip-format = "{ifname} via {gwaddr}";
|
|
|
|
|
format-linked = "{ifname} (No IP)";
|
2024-12-04 12:53:29 -05:00
|
|
|
format-disconnected = "Disconnected ⚠";
|
|
|
|
|
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
|
|
|
|
on-click-right = "exec ${terminalExec} nmtui";
|
|
|
|
|
};
|
|
|
|
|
bluetooth = {
|
2025-05-22 13:22:44 -04:00
|
|
|
format = "🔵🦷 {status}";
|
2024-12-04 12:53:29 -05:00
|
|
|
format-disabled = ""; # hide module
|
2025-05-22 13:22:44 -04:00
|
|
|
format-connected = "🔵🦷 {num_connections}";
|
2024-12-04 12:53:29 -05:00
|
|
|
tooltip-format = "{controller_alias} {controller_address}";
|
|
|
|
|
tooltip-format-connected = ''
|
|
|
|
|
{controller_alias} {controller_address}
|
2024-04-13 23:45:36 -04:00
|
|
|
|
2024-12-04 12:53:29 -05:00
|
|
|
{device_enumerate}'';
|
|
|
|
|
tooltip-format-enumerate-connected = "{device_alias} {device_address}";
|
|
|
|
|
on-click = "exec blueman-manager";
|
|
|
|
|
on-click-right = "exec bluetoothctl disconnect";
|
2024-02-07 13:00:22 -05:00
|
|
|
};
|
2025-05-22 13:22:44 -04:00
|
|
|
cpu = { format = "{usage}% 📈"; };
|
|
|
|
|
memory = { format = "{used:0.1f}GB/{total:0.1f}GB 💾"; };
|
2024-12-04 12:53:29 -05:00
|
|
|
disk = {
|
2025-05-22 13:22:44 -04:00
|
|
|
format = "{used} 💽";
|
2024-12-04 12:53:29 -05:00
|
|
|
path = "/";
|
|
|
|
|
};
|
|
|
|
|
battery = {
|
|
|
|
|
states = {
|
|
|
|
|
good = 95;
|
|
|
|
|
warning = 20;
|
|
|
|
|
critical = 10;
|
|
|
|
|
};
|
|
|
|
|
format = "{capacity}% {icon}";
|
2025-05-22 13:22:44 -04:00
|
|
|
format-charging = "{capacity}% ⚡";
|
|
|
|
|
format-plugged = "{capacity}% 🔌";
|
2024-12-04 12:53:29 -05:00
|
|
|
# format-alt = "{time} {icon}";
|
2025-05-22 13:22:44 -04:00
|
|
|
format-icons = [ "🪫" "🔋" ];
|
2024-12-04 12:53:29 -05:00
|
|
|
on-click = "";
|
|
|
|
|
};
|
|
|
|
|
tray = {
|
|
|
|
|
icon-size = 20;
|
|
|
|
|
spacing = 5;
|
|
|
|
|
};
|
|
|
|
|
"sway/language" = {
|
|
|
|
|
format = "{shortDescription}";
|
|
|
|
|
tooltip-format = "{long}";
|
|
|
|
|
on-click = ''swaymsg input "*" xkb_switch_layout next'';
|
|
|
|
|
};
|
|
|
|
|
clock = {
|
|
|
|
|
interval = 1;
|
|
|
|
|
format = "<span size='10pt' font='Red Hat Mono'>{:L%H:%M:%S %a %F}</span>";
|
|
|
|
|
locale =
|
|
|
|
|
"fr_CA.utf8"; # TODO fix this; I don't want it to be hardcoded but rather tied to i18n.defaultLocale
|
|
|
|
|
tooltip-format = ''
|
|
|
|
|
<big>{:L%Y %B}</big>
|
|
|
|
|
<tt><small>{calendar}</small></tt>'';
|
|
|
|
|
};
|
|
|
|
|
}];
|
|
|
|
|
style = ''
|
|
|
|
|
* {
|
2025-01-31 11:10:34 -05:00
|
|
|
font-family: Rubik, "OpenMoji Color", sans-serif;
|
2024-12-04 12:53:29 -05:00
|
|
|
font-size: 12pt;
|
|
|
|
|
min-height: 20pt;
|
|
|
|
|
}
|
|
|
|
|
'' + ''
|
|
|
|
|
window#waybar {
|
|
|
|
|
background: rgba(34, 34, 34, 1);
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
'' + ''
|
|
|
|
|
#workspaces button {
|
|
|
|
|
padding: 0 3px;
|
|
|
|
|
background: rgba(34, 34, 34, 1);
|
|
|
|
|
border-style: hidden;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
'' + ''
|
|
|
|
|
#workspaces button.focused {
|
|
|
|
|
background: rgba(40, 85, 119, 1);
|
|
|
|
|
}
|
2024-04-13 23:45:36 -04:00
|
|
|
|
2024-12-04 12:53:29 -05:00
|
|
|
.modules-right label,
|
|
|
|
|
.modules-right box {
|
|
|
|
|
border-left: 1px solid #d3d3d3;
|
|
|
|
|
padding-left: 5px;
|
|
|
|
|
padding-right: 5px;
|
|
|
|
|
}
|
|
|
|
|
'' + ''
|
|
|
|
|
#battery.warning:not(.charging) {
|
|
|
|
|
background: rgba(140, 0, 0, 1);
|
|
|
|
|
}
|
2024-02-13 09:05:12 -05:00
|
|
|
|
2024-12-04 12:53:29 -05:00
|
|
|
#battery.critical:not(.charging) {
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
color: black;
|
|
|
|
|
}
|
|
|
|
|
'' + ''
|
|
|
|
|
#language {
|
|
|
|
|
min-width: 30px;
|
|
|
|
|
}
|
|
|
|
|
'' + "";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
wayland.windowManager.sway.config.bars = [{
|
|
|
|
|
command = "${pkgs.lib.getExe config.programs.waybar.package}";
|
|
|
|
|
position = "top";
|
|
|
|
|
fonts = config.wayland.windowManager.sway.config.fonts;
|
|
|
|
|
}];
|
2024-02-07 13:00:22 -05:00
|
|
|
}
|