Fix waybar icons

This commit is contained in:
Jakob Lechner 2023-05-25 12:09:56 +00:00
parent 7dee81a691
commit 8232ceae2e
No known key found for this signature in database
GPG key ID: 996082EFB5906C10

View file

@ -14,10 +14,6 @@ let
fi
'';
# nerd fonts are abusing arabic which breaks latin text
# context: https://github.com/Alexays/Waybar/issues/628
lrm = "‎";
# for fine-grained control over spacing
thinsp = " ";
@ -70,14 +66,14 @@ in
{ class = "inactive"; };
on-click = toggleUserUnitState "gammastep";
return-type = "json";
format = "";
format = "󰌵";
tooltip = false;
};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = " ";
deactivated = " ";
activated = "󰈈 ";
deactivated = "󰈉 ";
};
};
"custom/screencast" = {
@ -103,7 +99,7 @@ in
print(f"Invalid action {action} (in line {line})", file=sys.stderr)
if active_outputs > 0:
print("${lrm} ")
print("󱒃")
else:
print()
@ -114,15 +110,15 @@ in
};
backlight = {
format = "{percent}% {icon}";
format-icons = [ " " " " " " " " " " " " " " ];
format-icons = [ "󰛩" "󱩎" "󱩏" "󱩐" "󱩑" "󱩒" "󱩓" "󱩔" "󱩕" "󱩖" "󰛨" ];
on-scroll-up = "${pkgs.brightnessctl}/bin/brightnessctl -q set +5%";
on-scroll-down = "${pkgs.brightnessctl}/bin/brightnessctl -q set 5%-";
};
mpd = {
server = config.services.mpd.network.listenAddress;
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ";
format-disconnected = "Disconnected ";
format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ";
format = "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) 󰎈";
format-disconnected = "Disconnected 󰎈";
format-stopped = "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped 󰎈";
unknown-tag = "N/A";
interval = 2;
tooltip-format = "MPD (connected)";
@ -132,45 +128,45 @@ in
title-len = 48;
artist-len = 24;
consume-icons = {
on = " ";
on = "󰩫 ";
};
random-icons = {
off = " ";
on = " ";
off = "󰒞 ";
on = "󰒝 ";
};
repeat-icons = {
on = " ";
on = "󰑖 ";
};
single-icons = {
on = " ";
on = "󰑘 ";
};
state-icons = {
paused = "";
playing = "";
paused = "󰏤 ";
playing = "󰐊 ";
};
};
pulseaudio = {
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = "${lrm}${lrm} {icon} {format_source}";
format-muted = "${lrm}${lrm} {format_source}";
format-source = "{volume}% ${thinsp}";
format-source-muted = "${thinsp}";
format-bluetooth = "{volume}% {icon}󰗾{format_source}";
format-bluetooth-muted = "{icon}󰗿{format_source}";
format-muted = "󰝟 {format_source}";
format-source = "{volume}% ${thinsp}";
format-source-muted = "${thinsp}";
format-icons = {
car = " ";
default = [ "" "奔" "" ];
hands-free = " ";
headphone = " ";
headset = " ";
phone = " ";
portable = " ";
car = "󰄋 ";
default = [ "󰕿" "󰖀" "󰕾" ];
hands-free = "󰋎";
headphone = "󰋋";
headset = "󰋎";
phone = "󰏲";
portable = "󰏲";
};
on-click-right = "${pkgs.pavucontrol}/bin/pavucontrol";
};
network = {
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} ";
format-linked = "{ifname} (No IP) ";
format-wifi = "{essid} ({signalStrength}%) 󰖩 ";
format-ethernet = "{ipaddr}/{cidr} 󰈀 ";
format-linked = "{ifname} (No IP) 󰈀 ";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
tooltip = false;
@ -181,7 +177,7 @@ in
exec = pkgs.writeShellScript "vpn-state" ''
${pkgs.iproute}/bin/ip -j link \
| ${pkgs.jq}/bin/jq --unbuffered --compact-output '
[[.[].ifname | select(. | startswith("mullvad"))][] | split("-")[1] + " ${thinsp}"] as $conns
[[.[].ifname | select(. | startswith("mullvad"))][] | split("-")[1] + " 󰌾${thinsp}"] as $conns
| { text: ($conns[0] // ""), class: (if $conns | length > 0 then "connected" else "disconnected" end) }'
'';
return-type = "json";
@ -190,11 +186,11 @@ in
};
memory = {
interval = 2;
format = "{:2}% ";
format = "{:2}% 󰍛 ";
};
cpu = {
interval = 2;
format = "{usage:2}% ";
format = "{usage:2}% ";
tooltip = false;
};
temperature = {
@ -208,9 +204,9 @@ in
interval = 5;
format = "{capacity}% {icon}";
format-charging = "{capacity}% ";
format-plugged = "{capacity}% ${lrm}";
format-plugged = "{capacity}% x";
format-alt = "{time} {icon}";
format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ];
format-icons = [ "󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
states = {
critical = 15;
good = 95;
@ -243,9 +239,9 @@ in
events_today = []
if len(events_today) == 0:
text = " "
text = "󰃮 "
else:
text = f"{len(events_today)} "
text = f"{len(events_today)} 󰃶 "
print(
json.dumps(