// {{@@ header() @@}} { "position":"{{@@ bar_pos @@}}", "layer":"top", "modules-left": [ "sway/workspaces", "sway/mode", "sway/window" ], "modules-center": [ "clock", "custom/weather" ], "modules-right": [ "custom/mpd", "custom/recording", "tray", "custom/mail", "custom/torrentD", "custom/torrentS", "custom/updates", "custom/caffeine", "pulseaudio", "network", "battery" ], "sway/workspaces": { "enable-bar-scroll":true, "format": "{icon}", "format-icons": { "1": "", "2": "", "3": "", "9": "", "10": "", "urgent": "", "focused": "", "default": "" } }, "sway/window":{ "max-length":40 }, "custom/mpd": { "tooltip":false, "exec": "mpd-status", "exec-if": "pidof mpd", "on-click": "mpc toggle", "on-scroll-up": "mpc vol +10", "on-scroll-down": "mpc vol -10", "interval": 2 }, "tray": { "spacing": 7, "icon-size":19 }, "clock": { "interval":60, "format":"{:%H:%M %a %d}", "tooltip":false }, "battery": { "tooltip":true, "states": { "full":100, "good": 95, "warning": 25 }, "format": "{icon} ", "format-charging": "", "format-plugged": "", "format-full": "", "format-warning":"{icon} {time}", "format-icons": ["", "", "", "", "", ""] }, "network": { "tooltip":false, "on-click": "terminal nmtui", "format-wifi": "{icon}", "format-icons":[ "", "", "", "", "" ], "format-ethernet": "", "format-linked": "", "format-disconnected": "" }, "pulseaudio": { "tooltip":false, "scroll-step": 10, "format": "{icon}", "format-bluetooth": "", "format-bluetooth-muted": "", "format-muted": "ﱝ", "format-icons": { "headphones": "", "handsfree": "", "headset": "", "phone": "", "portable": "", "car": "", "default": ["奄", "奔", "墳"] }, "on-click": "pavucontrol" }, "custom/weather": { "tooltip":false, "format": "{}", "exec": "jq -r '.temp +\"°C \"+ .weather' ~/.forecast.json", "interval": 30, "on-click": "terminal --class weather 'forecast interactive'", "on-click-right": "xdg-open https://openweathermap.org" }, "custom/mail": { "tooltip":false, "format":"{} ", "exec-if":"sleep 30s", "exec": "checkmail", "on-click": "terminal neomutt; pkill -SIGRTMIN+4 waybar", "signal": 4, "interval": 10 }, "custom/updates": { "tooltip":false, "format": "{} ", "interval": 60, "exec-if":"sleep 60s", "exec": "pacman -Qqu | wc -l | sed 's/^0$//'", "on-click": "terminal sh -c 'ping -qc1 archlinux.org >/dev/null && pacman -Syu || pacman -Su; pkill -SIGRTMIN+8 waybar; read'", "signal": 8 }, "custom/recording": { "tooltip":false, "exec": "pidof wf-recorder > /dev/null && echo  || echo", "interval": 5, "on-click": "pkill wf-recorder; pkill -SIGRTMIN+5 waybar", "signal": 5 }, "custom/spigot":{ "format":"{}", "exec":"pgrep -f spigot.jar>/dev/null && spigot command list | awk '/There are/ {if ($6) print $6}'", "interval":30, "on-click":"terminal spigot console" }, "custom/torrentD":{ "format":" {} ", "exec":"transmission-remote -l | tail -n+2 | grep Down | wc -l | sed 's/^0$//'", "exec-if":"pidof transmission-daemon", "interval":180 }, "custom/torrentS":{ "format":" {} ", "exec":"transmission-remote -l | grep Seeding| wc -l | sed 's/^0$//'", "exec-if":"pidof transmission-daemon", "interval":180 }, "custom/caffeine":{ "format":"{} ", "exec":"pidof caffeinated &>/dev/null &&echo  ||echo 鈴", "on-click":"pidof caffeinated &&pkill caffeinated||caffeinated -d ", "interval": 1 }, } // vim:ft=json