This repository has been archived on 2021-04-06. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/home/.config/waybar/config
Simon Bruder 867e3a4771
waybar: Make size less dynamic
This also removes the album display from the mpd widget as the fmt
library used by waybar does not support specifying a maximum width in
unicode characters, only in bytes (which breaks when the
title/album/artist contains unicode).
2020-08-24 14:14:23 +02:00

163 lines
4.7 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// vim: set ft=json:
// not actually json, but better than nothing
{
"layer": "top",
"position": "top",
"height": 24, // Waybar height (to be removed for auto height)
// Position/Order of modules
"modules-left": [
"sway/workspaces",
"sway/mode"
],
"modules-center": [],
"modules-right": [
"tray",
"custom/redshift",
"idle_inhibitor",
"backlight",
"mpd",
"pulseaudio",
"network",
"custom/vpn",
"network#speed",
"memory",
"cpu",
"temperature",
"battery",
"clock"
],
// Modules configuration
"sway/workspaces": {
"disable-scroll": true
},
"sway/mode": {
"format": "{}"
},
"mpd": {
"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,
"consume-icons": {
"on": " "
},
"random-icons": {
"off": "劣 ",
"on": "列 "
},
"repeat-icons": {
"on": "凌 "
},
"single-icons": {
"on": "綾 "
},
"state-icons": {
"paused": "",
"playing": "契"
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": " ",
"deactivated": " "
}
},
"tray": {
// "icon-size": 21,
"spacing": 5
},
"clock": {
"format": "{:%H:%M %Z}",
"format-alt": "{:%Y-%m-%d (%a)}",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
},
"cpu": {
"interval": 2,
"format": "{usage:2}% ﬙ ",
"tooltip": false
},
"memory": {
"interval": 2,
"format": "{:2}%  "
},
"temperature": {
"critical-threshold": 80,
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", "", "", ""]
},
"backlight": {
"format": "{percent}% {icon}",
"format-icons": [" ", " ", " ", " ", " ", " ", " "],
"on-scroll-up": "brightnessctl set +5%",
"on-scroll-down": "brightnessctl set 5%-"
},
"battery": {
"interval": 5,
"states": {
"good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ﮣ",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", "", "", "", "", "", "", ""]
},
"network": {
"format-wifi": "{essid} ({signalStrength}%) 直 ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr}  ",
"format-linked": "{ifname} (No IP)  ",
"format-disconnected": "Disconnected ⚠ ",
"format-alt": "{ifname}: {ipaddr}/{cidr}",
"tooltip": false
},
"network#speed": {
"interval": 2,
"format": "{bandwidthDownBits:>8}  {bandwidthUpBits:>8} 祝",
"format-alt": "{bandwidthDownOctets:>8}  {bandwidthUpOctets:>8} 祝",
"format-disconnected": " 0b/s 祝 0b/s",
"tooltip": false
},
"pulseaudio": {
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": "遼 {icon} {format_source}", // FIXME: see below
"format-muted": "遼 {format_source}", // FIXME: use normal mute icon (ﱝ ), which for some reason is displayed right of the source?
"format-source": "{volume}% \u2009",
"format-source-muted": "\u2009",
"format-icons": {
"headphone": " ",
"hands-free": " ",
"headset": " ",
"phone": " ",
"portable": " ",
"car": " ",
"default": ["奄", "奔", "墳"]
},
"on-click": "pavucontrol"
},
"custom/vpn": {
"interval": 10,
"exec": "ip -j link | jq --unbuffered --compact-output '[[.[].ifname | select(. | startswith(\"mullvad\"))][] | split(\"-\")[1] + \" \u2009\"] as $conns | { text: ($conns[0] // \"\"), class: (if $conns | length > 0 then \"connected\" else \"disconnected\" end) }'",
"return-type": "json",
"format": "{}",
"tooltip": false
},
"custom/redshift": {
"interval": 10,
"exec": "systemctl --user show redshift | grep -q ActiveState=active && echo '{\"tooltip\": \"Redshift active\", \"class\": \"active\"}' || echo '{\"tooltip\": \"Redshift inactive\", \"class\": \"inactive\"}'",
"on-click": "systemctl --user show redshift | grep -q ActiveState=active && systemctl --user stop redshift || systemctl --user start redshift",
"return-type": "json",
"format": "",
"tooltip": false
}
}