This repository has been archived on 2024-04-07. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles-old/sway/.config/waybar/config

158 lines
4.2 KiB
JSON

{
"layer":"top",
"modules-left": [
"sway/workspaces",
"sway/window"
],
"modules-center": [
"clock",
"custom/weather"
],
"modules-right": [
"mpd",
"custom/recording",
"custom/spigot",
"tray",
"custom/mail",
"custom/torrentD",
"custom/torrentS",
"custom/updates",
"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
},
"mpd": {
"tooltip":false,
"format": " {stateIcon} {title} - {artist}",
"format-disconnected": " Disconnected",
"format-stopped": "",
"timeout":60,
"unknown-tag": " N/A ",
"interval": 2,
"max-length":40,
"state-icons": {
"paused": "",
"playing": ""
}
},
"tray": {
"spacing": 7,
"icon-size":19
},
"clock": {
"interval":60,
"format":"<b>{:%H:%M %a %d}</b>",
"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": "<b>{}</b>",
"exec": "jq -r '.temp +\"°C \"+ .weather' .forecast.json",
"interval": 30,
"on-click": "terminal --class weather sh -c 'forecast full;read -n1 -p\"Press Any key to quit \"'",
"on-click-right": "xdg-open https://openweathermap.org"
},
"custom/mail": {
"tooltip":false,
"format":"{} <b></b>",
"exec-if":"sleep 30s",
"exec": "checkmail",
"on-click": "terminal neomutt; pkill -SIGRTMIN+4 waybar",
"signal": 4,
"interval": 30
},
"custom/updates": {
"tooltip":false,
"format": "{} ",
"interval": 60,
"exec-if":"sleep 60s",
"exec": "yay -Qqu | wc -l | sed 's/^0$//'",
"on-click": "terminal sh -c 'ping -qc1 archlinux.org >/dev/null && yay -Syu || yay -Su; pkill -SIGRTMIN+8 waybar; read'",
"signal": 8
},
"custom/recording": {
"tooltip":false,
"exec": "pgrep 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$//'",
"interval":180
},
"custom/torrentS":{
"format":" {} ",
"exec":"transmission-remote -l | grep Seeding| wc -l | sed 's/^0$//'",
"interval":180
}
}
# vim:ft=json