Added Android Debug Bridge Fixed seconds not showing on waybar, with the caveat that now, every second, all the other widgets shift based on the size of the glyphs
126 lines
3.4 KiB
Nix
126 lines
3.4 KiB
Nix
{ scripts, config, lib, pkgs, terminal, ... } :
|
|
|
|
let
|
|
terminalExec = "${pkgs.lib.getExe terminal} -e";
|
|
in
|
|
{
|
|
enable = true;
|
|
settings = [{
|
|
modules-left = [ "sway/workspaces" ];
|
|
modules-right = [ "pulseaudio" "bluetooth" "network" "cpu" "memory" "disk" "battery" "tray" "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}";
|
|
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";
|
|
on-scroll-up = null;
|
|
on-scroll-down = null;
|
|
};
|
|
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;
|
|
};
|
|
clock = {
|
|
interval = 1;
|
|
format = "{:%H:%M:%S %a %F}";
|
|
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
|
|
};
|
|
}];
|
|
style = ''
|
|
* {
|
|
font-family: FontAwesome, Red Hat Display, sans-serif;
|
|
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);
|
|
}
|
|
|
|
.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);
|
|
}
|
|
|
|
#battery.critical:not(.charging) {
|
|
background: #ffffff;
|
|
color: black;
|
|
}
|
|
'' +
|
|
"";
|
|
}
|