From 06eccec83a88b2af00b354bedc1a44713938a385 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Tue, 3 Aug 2021 22:12:11 +0200 Subject: waybar: update --- .config/waybar/config.jsonc | 424 ++++++++++++++++++++++---------------------- 1 file changed, 210 insertions(+), 214 deletions(-) (limited to '.config/waybar/config.jsonc') diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index b117c3b..6c5b294 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -1,216 +1,212 @@ { - "layer": "top", - "position": "top", - "height": 25, - "gtk-layer-shell": true, - - // "modules-left": ["sway/mode", "sway/workspaces", "sway/window", "custom/mpris"], - "modules-left": ["sway/mode", "sway/workspaces", "custom/mpris"], - "modules-center": ["custom/weather", "clock#local", "clock#utc", "custom/toggl", "custom/todo"], - "modules-right": ["tray", "custom/covid", "cpu", "memory", "disk#root", "disk#home", "temperature", "idle_inhibitor", "backlight", "custom/gamma", "pulseaudio", "network#tailscale", "network", "battery"], - - "sway/workspaces": { - "disable-scroll": true, - "all-outputs": false, - "format": "{icon}", - "format-icons": { - "m": "󰎇", - "v": "󰿏", - "g": "󰺵", - "__vnc": "󱒃" - } - }, - "sway/window": { - "format": "{}", - "max-length": 100 - }, - "sway/mode": { - "format": "{}" - }, - "idle_inhibitor": { - "format": "{icon}", - "format-icons": { - "activated": "󰅶", - "deactivated": "󰾪" - } - }, - "tray": { - "spacing": 10 - }, - "clock#local": { - "format": "{:%a %d %b %H:%M}", - "tooltip-format": "TZ: {:%Z %z}\n\n{calendar}", - // "locale": "ja_JP.utf-8" - "locale": "en_US.utf-8" - }, - "clock#utc": { - "timezone": "UTC", - "format": "({:%Z %H:%M})", - "tooltip-format": "{:%Z %z}" - }, - "disk#root": { - "path": "/", - "format": "󰋊 / {percentage_used}%" - }, - "disk#home": { - "path": "/home", - "format": "/home {percentage_used}%" - }, - "cpu": { - "format": "󰊚 {}%", - "on-click": "$HOME/bin/swx -t -f -- htop --sort-key PERCENT_CPU" - }, - "memory": { - "format": "󰍛 {}%", - "on-click": "$HOME/bin/swx -t -f -- htop --sort-key PERCENT_MEM" - }, - "temperature": { - "critical-threshold": 100, - "format": "{icon} {temperatureC}℃", - "format-icons": ["󱃃", "󰔏", "󱃂", "󰸁"] - }, - "backlight": { - "format": "{icon} {percent}%", - "format-icons": ["󰹐", "󰌶", "󰛩"], - "on-scroll-down": "light -A 5", - "on-scroll-up": "light -U 5", - // save current level - // then set to minimum brightness - "on-click-right": "light -O; light -S $(light -P)", - // revert to previously saved brightness - "on-click-middle": "light -I" - }, - "battery": { - "states": { - // "good": 95, - "warning": 30, - "critical": 15 - }, - "format": "{icon} {capacity}%", - "format-charging": "󰗱 {capacity}%", - "format-plugged": "󰚥 {capacity}%", - "format-alt": "{icon} {time}", - "format-full": "󱊦", - "format-icons": ["󱃍", "󱊡", "󱊢", "󱊣"] - }, - "network": { - "format-wifi": "{icon} ({signalStrength}%)", - "format-icons": ["󰤫", "󰤟", "󰤢", "󰤥", "󰤨"], - "format-ethernet": "󰌗", - "format-linked": "󰈀 {ifname}", - "format-disconnected": "󰌙 ", - "tooltip-format": "{ifname}: {ipaddr}/{cidr}\nssid: {essid}\nsignal: {signaldBm} dbm\ndown: {bandwidthDownBits}\nup: {bandwidthUpBits}", - "tooltip-format-disconnected": "disconnected", - "on-click": "swx -t -f iwctl" - }, - "network#tailscale": { - "interface": "tailscale0", - "format": "󰌆", - "tooltip-format": "{ifname}: {bandwidthUpBits} {bandwidthDownBits}", - "tooltip-format-disconnected": "disconnected", - "on-click": "doas rc-service tailscale start", - "on-click-right": "doas rc-service tailscale stop" - }, - "pulseaudio": { - "format": "{icon} {volume}%", - "format-bluetooth": "{icon} {volume}%", - "format-muted": "󰝟 {volume}%", - "format-source": "󰍬 {volume}%", - "format-source-muted": " {volume}%", - "format-icons": { - "headphones": "󰋋", - "handsfree": "󰜟", - "headset": "󰋎", - "phone": "󰏲", - "portable": "󰛵", - "car": "󰄋", - "default": ["󰕿", "󰖀", "󰕾"] - }, - "on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle", - "on-click": "swx -t -F '0.4' pulsemixer" - }, - "custom/mpris": { - "format": "{}", - "exec": "waybar-mpris --position --autofocus --interpolate --play 󰏤 --pause 󰲸", - "on-click": "waybar-mpris --send toggle", - "on-click-right": "waybar-mpris --send player-next", - "escape": true, - "max-width": 90, - "return-type": "json" - }, - "custom/toggl": { - "format": "󰔟 {}", - "exec": "$HOME/.config/waybar/modules/toggl.lua 2>/dev/null", - "interval": 60 - }, - "custom/todo": { - "format": "{icon} {}", - "format-icons": { - "off": "󰒲", - "on": "󰈻" - }, - "exec": "env WAYBAR_TODO_FILE=$HOME/.zk/todo.md $HOME/.config/waybar/modules/waybar-todo", - "on-click": "pkill -x -USR1 waybar-todo", - "on-click-right": "pkill -x -USR2 waybar-todo", - "escape": true, - "return-type": "json" - }, - "custom/gamma": { - "format": "{icon}", - "format-icons": { - "day": "󰱌", - "night": "󰱊" - }, - "exec-if": "pgrep wlsunset", - "exec": "env GAMMA_COMMAND='wlsunset -l $HOME_LAT -L $HOME_LON -p' $HOME/.config/waybar/modules/waybar-gamma", - "return-type": "json", - "on-click": "pkill -x -USR1 gamma", - "on-click-right": "pkill -x -HUP waybar-gamma" - }, - "custom/weather": { - "format": "{icon} {percentage}℃", - "format-icons": { - "sunny": "󰖙", - "partlycloudy": "󰖕", - "cloudy": "󰖐", - "verycloudy": "󰼯", - "fog": "󰖑", - "lightrain": "󰖗", - "heavyrain": "󰖖", - "hail": "󰖒", - "thunder": "󰖓", - "lightsnow": "󰖘", - "heavysnow": "󰼶", - "snowrain": "󰙿" - }, - "exec": "$HOME/.config/waybar/modules/weather.sh", - "interval": 600, - "return-type": "json", - "tooltip": true, - // "signal": 4, - // "on-click-right": "pkill -SIGRTMIN+5 waybar", - "on-click": "swx -t env REPORT=1 $HOME/.config/waybar/modules/weather.sh" - }, - "custom/covid": { - "format": "{icon} {}", - "format-icons": { - "gray": "󱅼", - "green": "󱎷", - "yellow": "󱎷", - "orange": "󱎷", - "red": "󱎷", - "darkred": "󱎷", - "darkdarkred": "󰯆" - }, - "exec": "$HOME/.config/waybar/modules/covid.sh", - "interval": 86400, - "tooltip": true, - "return-type": "json" - }, - // "custom/im": { - // "format": "{}", - // "exec": "printf '󱌵󱌴'", - // "exec-if": "pgrep anthywl", - // "interval": 5 - // } + "modules-left": ["sway/mode", "sway/workspaces", "custom/mpris"], + + "sway/workspaces": { + "disable-scroll": true, + "format": "{icon}", + "format-icons": { + "m": "󰎇", + "v": "󰿏", + "g": "󰺵", + "__vnc": "󱒃" + } + }, + + "custom/mpris": { + "exec-on-event": false, + "max-width": 60, + "escape": true, + "on-click": "playerctl play-pause", + "on-click-right": "playerctl next", + // "exec": "env YAEGI_SYSCALL=1 YAEGI_UNRESTRICTED=1 ${HOME}/.config/waybar/modules/mpris.go", + "exec": "${HOME}/.config/waybar/modules/mpris.sh", + "return-type": "json" + }, + + // ------------------------------------------------------------------------ // + + "modules-center": ["custom/weather", "clock#local", "clock#utc", "custom/toggl"], + + "custom/weather": { + "format": "{icon} {percentage}℃", + "format-icons": { + "sunny": "󰖙", + "partlycloudy": "󰖕", + "cloudy": "󰖐", + "verycloudy": "󰼯", + "fog": "󰖑", + "lightrain": "󰖗", + "heavyrain": "󰖖", + "hail": "󰖒", + "thunder": "󰖓", + "lightsnow": "󰖘", + "heavysnow": "󰼶", + "snowrain": "󰙿" + }, + "exec": "$HOME/.config/waybar/modules/weather.sh", + "interval": 600, + "return-type": "json", + "tooltip": true, + "on-click": "swx -t env REPORT=1 $HOME/.config/waybar/modules/weather.sh" + }, + + "clock#local": { + "format": "{:%a %d %b %H:%M}", + "tooltip-format": "TZ: {:%Z %z}\n\n{calendar}", + // "locale": "ja_JP.utf-8" + "locale": "en_US.utf-8" + }, + + "clock#utc": { + "timezone": "UTC", + "format": "({:%Z %H:%M})", + "tooltip-format": "{:%Z %z}" + }, + + "custom/todo": { + "format": "{icon} {}", + "format-icons": { + "off": "󰒲", + "on": "󰈻" + }, + "exec": "env WAYBAR_TODO_FILE=$HOME/.zk/todo.md $HOME/.config/waybar/modules/waybar-todo", + "on-click": "pkill -x -USR1 waybar-todo", + "on-click-right": "pkill -x -USR2 waybar-todo", + "escape": true, + "return-type": "json" + }, + + // ------------------------------------------------------------------------ // + "modules-right": ["tray", "custom/covid", "cpu", "memory", "disk#root", "disk#home", "temperature", "idle_inhibitor", "backlight", "custom/gamma", "pulseaudio", "network#tailscale", "network", "battery"], + + "tray": { + "spacing": 10 + }, + + "custom/covid": { + "format": "{icon} {}", + "format-icons": { + "gray": "󱅼", + "green": "󱎷", + "yellow": "󱎷", + "orange": "󱎷", + "red": "󱎷", + "darkred": "󱎷", + "darkdarkred": "󰯆" + }, + "exec": "$HOME/.config/waybar/modules/covid.sh", + "interval": 86400, + "return-type": "json" + }, + + "disk#root": { + "path": "/", + "format": "󰋊 / {percentage_used}%" + }, + + "disk#home": { + "path": "/home", + "format": "/home {percentage_used}%" + }, + + "cpu": { + "format": "󰊚 {}%", + "on-click": "$HOME/bin/swx -t -f -- htop --sort-key PERCENT_CPU" + }, + + "memory": { + "format": "󰍛 {}%", + "on-click": "$HOME/bin/swx -t -f -- htop --sort-key PERCENT_MEM" + }, + + "temperature": { + "critical-threshold": 100, + "format": "{icon} {temperatureC}℃", + "format-icons": ["󱃃", "󰔏", "󱃂", "󰸁"] + }, + + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "󰅶", + "deactivated": "󰾪" + } + }, + + "backlight": { + "format": "{icon}", + "format-icons": ["󰹐", "󰌶", "󰛩"], + "on-scroll-down": "light -A 5", + "on-scroll-up": "light -U 5", + // save current level + // then set to minimum brightness + "on-click-right": "light -O; light -S $(light -P)", + // revert to previously saved brightness + "on-click-middle": "light -I" + }, + + "custom/gamma": { + "format": "{icon}", + "format-icons": { + "day": "󰱌", + "night": "󰱊", + "dusk": "?", + "dawn": "?" + }, + "exec": "env GAMMA_COMMAND='wlsunset -l $HOME_LAT -L $HOME_LON -p' YAEGI_SYSCALL=1 YAEGI_UNRESTRICTED=1 ${HOME}/.config/waybar/modules/gamma.go", + "return-type": "json" + }, + + "pulseaudio": { + "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}%", + "format-muted": "󰝟 {volume}%", + "format-source": "󰍬 {volume}%", + "format-source-muted": " {volume}%", + "format-icons": { + "headphones": "󰋋", + "handsfree": "󰜟", + "headset": "󰋎", + "phone": "󰏲", + "portable": "󰛵", + "car": "󰄋", + "default": ["󰕿", "󰖀", "󰕾"] + }, + "on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "on-click": "swx -t -F '0.4' pulsemixer" + }, + + "network#tailscale": { + "interface": "tailscale0", + "format": "󰌆", + "tooltip-format": "{ifname}: {bandwidthUpBits} {bandwidthDownBits}", + "tooltip-format-disconnected": "disconnected", + "on-click": "doas rc-service tailscale start", + "on-click-right": "doas rc-service tailscale stop" + }, + + "network": { + "format-wifi": "{icon} ({signalStrength}%)", + "format-icons": ["󰤫", "󰤟", "󰤢", "󰤥", "󰤨"], + "format-ethernet": "󰌗", + "format-linked": "󰈀 {ifname}", + "format-disconnected": "󰌙 ", + "tooltip-format": "{ifname}: {ipaddr}/{cidr}\nssid: {essid}\nsignal: {signaldBm} dbm\ndown: {bandwidthDownBits}\nup: {bandwidthUpBits}", + "tooltip-format-disconnected": "disconnected", + "on-click": "swx -t -f iwctl" + }, + + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{icon} {capacity}%", + "format-charging": "󰗱 {capacity}%", + "format-plugged": "󰚥 {capacity}%", + "format-alt": "{icon} {time}", + "format-full": "󱊦", + "format-icons": ["󱃍", "󱊡", "󱊢", "󱊣"] + }, } -- cgit 1.4.1