2024-02-07 13:00:22 -05:00
|
|
|
{ scripts, config, lib, pkgs, terminal, ... } :
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
|
terminalExec = "${pkgs.lib.getExe terminal} -e";
|
|
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
enable = true;
|
|
|
|
|
settings = [{
|
|
|
|
|
modules-left = [ "sway/workspaces" ];
|
2024-04-13 23:18:20 -04:00
|
|
|
modules-right = [ "pulseaudio" "bluetooth" "network" "cpu" "memory" "disk" "battery" "tray" "sway/language" "clock" ];
|
2024-02-07 13:00:22 -05:00
|
|
|
"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}";
|
|
|
|
|
format-muted = "{volume}% {format_source}";
|
|
|
|
|
format-source = "{volume}% ";
|
|
|
|
|
format-source-muted = "{volume}% ";
|
|
|
|
|
format-icons = [ "" "" ];
|
|
|
|
|
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";
|
2024-03-19 23:07:41 -04:00
|
|
|
on-scroll-up = "";
|
|
|
|
|
on-scroll-down = "";
|
2024-02-07 13:00:22 -05:00
|
|
|
};
|
|
|
|
|
network = {
|
|
|
|
|
format-wifi = "{essid} ({signalStrength}%) ";
|
|
|
|
|
format-ethernet = "{ipaddr}/{cidr} ";
|
|
|
|
|
tooltip-format = "{ifname} via {gwaddr} ";
|
|
|
|
|
format-linked = "{ifname} (No IP) ";
|
|
|
|
|
format-disconnected = "Disconnected ⚠";
|
|
|
|
|
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
|
|
|
|
on-click-right = "exec ${terminalExec} nmtui";
|
|
|
|
|
};
|
|
|
|
|
bluetooth = {
|
|
|
|
|
format = " {status}";
|
|
|
|
|
format-disabled = ""; # hide module
|
|
|
|
|
format-connected = " {num_connections}";
|
|
|
|
|
tooltip-format = "{controller_alias}\t{controller_address}";
|
|
|
|
|
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{device_enumerate}";
|
|
|
|
|
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}";
|
|
|
|
|
on-click = "exec blueman-manager";
|
|
|
|
|
on-click-right = "exec bluetoothctl disconnect";
|
|
|
|
|
};
|
|
|
|
|
cpu = {
|
|
|
|
|
format = "{usage}% ";
|
|
|
|
|
};
|
|
|
|
|
memory = {
|
|
|
|
|
format = "{used:0.1f}GB/{total:0.1f}GB ";
|
|
|
|
|
};
|
|
|
|
|
disk = {
|
|
|
|
|
format = "{used} ";
|
|
|
|
|
path = "/";
|
|
|
|
|
};
|
|
|
|
|
battery = {
|
|
|
|
|
states = {
|
|
|
|
|
good = 95;
|
|
|
|
|
warning = 20;
|
|
|
|
|
critical = 10;
|
|
|
|
|
};
|
|
|
|
|
format = "{capacity}% {icon}";
|
|
|
|
|
format-charging = "{capacity}% ";
|
|
|
|
|
format-plugged = "{capacity}% ";
|
|
|
|
|
format-alt = "{time} {icon}";
|
|
|
|
|
format-icons = [ "" "" "" "" "" ];
|
|
|
|
|
};
|
|
|
|
|
tray = {
|
|
|
|
|
icon-size = 20;
|
|
|
|
|
spacing = 5;
|
|
|
|
|
};
|
2024-04-13 23:18:20 -04:00
|
|
|
"sway/language" = {
|
|
|
|
|
format = "eriuu";
|
|
|
|
|
tooltip-format = "boofer";
|
|
|
|
|
on-click = "swaymsg input \"*\" xkb_switch_layout next";
|
|
|
|
|
};
|
2024-02-07 13:00:22 -05:00
|
|
|
clock = {
|
2024-02-21 08:42:04 -05:00
|
|
|
interval = 1;
|
2024-04-13 23:18:20 -04:00
|
|
|
format = "{:L%H:%M:%S %a %F}";
|
|
|
|
|
locale = "fr_CA.utf8"; # TODO fix this; I don't want it to be hardcoded but rather tied to i18n.defaultLocale
|
2024-02-07 13:00:22 -05:00
|
|
|
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
|
|
|
|
};
|
|
|
|
|
}];
|
|
|
|
|
style = ''
|
|
|
|
|
* {
|
|
|
|
|
font-family: FontAwesome, Red Hat Display, sans-serif;
|
|
|
|
|
font-size: 12pt;
|
2024-02-09 14:42:30 -05:00
|
|
|
min-height: 20pt;
|
2024-02-07 13:00:22 -05:00
|
|
|
}
|
|
|
|
|
'' +
|
|
|
|
|
''
|
|
|
|
|
window#waybar {
|
2024-02-09 14:42:30 -05:00
|
|
|
background: rgba(34, 34, 34, 1);
|
2024-02-07 13:00:22 -05:00
|
|
|
color: white;
|
|
|
|
|
}
|
|
|
|
|
'' +
|
|
|
|
|
''
|
2024-02-09 14:42:30 -05:00
|
|
|
#workspaces button {
|
|
|
|
|
padding: 0 3px;
|
|
|
|
|
background: rgba(34, 34, 34, 1);
|
|
|
|
|
border-style: hidden;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
color: white;
|
|
|
|
|
}
|
2024-02-07 13:00:22 -05:00
|
|
|
'' +
|
|
|
|
|
''
|
2024-02-09 14:42:30 -05:00
|
|
|
#workspaces button.focused {
|
|
|
|
|
background: rgba(40, 85, 119, 1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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
|
|
|
|
|
|
|
|
#battery.critical:not(.charging) {
|
|
|
|
|
background: #ffffff;
|
|
|
|
|
color: black;
|
|
|
|
|
}
|
2024-02-07 13:00:22 -05:00
|
|
|
'' +
|
|
|
|
|
"";
|
|
|
|
|
}
|