tileos-settings-sway/etc/xdg/xdg-tileos/waybar/config.jsonc
Sunderland93 6b0a66e6be Swtich back from running apps with systemd
systemd integration for Sway is cool, but introduces a lot of
unexpected problems, such as race conditions. So switch back to classic
config-based systemd for autostarting services until all major problems
with systemd integration (sway-systemd) will resolved
2023-06-09 18:02:22 +04:00

219 lines
6.3 KiB
JSON
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"layer": "top",
"position": "top",
"height": 30,
"modules-left": ["custom/menu", "sway/workspaces", "sway/window"],
"modules-center": ["custom/wf-recorder", "sway/mode"],
"modules-right": [
"custom/scratchpad",
"custom/playerctl",
"custom/wlsunset",
"idle_inhibitor",
"custom/dunst",
"sway/language",
"custom/clipboard",
"cpu",
"memory",
"battery",
"network",
"bluetooth",
"pulseaudio",
"clock",
"custom/power",
"tray"
],
"custom/menu": {
"format": "",
"on-click": "exec nwg-drawer",
"tooltip": false
},
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true
},
"sway/window": {
"format": "{}",
"max-length": 50,
"tooltip": true
},
"custom/wf-recorder": {
"interval": "once",
"return-type": "json",
"format": "{}",
"tooltip-format": "{tooltip}",
"exec": "echo '{\"class\": \"recording\",\"text\":\"\",\"tooltip\":\"press $mod+Esc to stop recording\"}'",
"exec-if": "pgrep wf-recorder",
"on-click": "killall -s SIGINT wf-recorder",
"signal": 8
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>",
"tooltip": false
},
"custom/scratchpad": {
"interval": "once",
"return-type": "json",
"format": "{icon}",
"format-icons": {
"one": "",
"many": ""
},
"exec": "/bin/bash /usr/share/sway/scripts/scratchpad.sh; pkill -RTMIN+7 waybar",
"on-click": "swaymsg 'scratchpad show'",
"signal": 7
},
"custom/playerctl": {
"interval": "once",
"tooltip": true,
"return-type": "json",
"format": "{icon}",
"format-icons": {
"Playing": "",
"Paused": ""
},
"exec": "playerctl metadata --format '{\"alt\": \"{{status}}\", \"tooltip\": \"{{playerName}}: {{markup_escape(title)}} - {{markup_escape(artist)}}\" }'",
"on-click": "playerctl play-pause; pkill -RTMIN+5 waybar",
"on-click-right": "playerctl next; pkill -RTMIN+5 waybar",
"on-scroll-up": "playerctl position 10+; pkill -RTMIN+5 waybar",
"on-scroll-down": "playerctl position 10-; pkill -RTMIN+5 waybar",
"signal": 5
},
"custom/wlsunset": {
"interval": "once",
"tooltip": true,
"tooltip-format": "{tooltip}",
"return-type": "json",
"format": "{icon}",
"format-icons": {
"on": "",
"off": ""
},
"exec": "fallback_latitude=50.1 fallback_longitude=8.7 latitude= longitude= /usr/share/sway/scripts/sunset.sh",
"on-click": "/usr/share/sway/scripts/sunset.sh toggle; pkill -RTMIN+6 waybar",
"exec-if": "/usr/share/sway/scripts/sunset.sh check",
"signal": 6
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"tooltip": true,
"tooltip-format-activated": "power-saving disabled",
"tooltip-format-deactivated": "power-saving enabled"
},
"custom/dunst": {
"exec": "/usr/share/sway/scripts/dunst.sh",
"on-click": "dunstctl set-paused toggle",
"restart-interval": 1,
},
"sway/language": {
"format": " {}",
"min-length": 5,
"tooltip": false,
"on-click": "swaymsg input $(swaymsg -t get_inputs --raw | jq '[.[] | select(.type == \"keyboard\")][0] | .identifier') xkb_switch_layout next"
},
"custom/clipboard": {
"format": "",
"interval": "once",
"return-type": "json",
"on-click": "swaymsg -q exec '$clipboard'; pkill -RTMIN+9 waybar",
"on-click-right": "swaymsg -q exec '$clipboard-del'; pkill -RTMIN+9 waybar",
"on-click-middle": "rm -f ~/.cache/cliphist/db; pkill -RTMIN+9 waybar",
"exec": "printf '{\"tooltip\":\"%s\"}' $(cliphist list | wc -l)' item(s) in the clipboard\r(Mid click to clear)'",
"exec-if": "[ -x \"$(command -v cliphist)\" ] && [ $(cliphist list | wc -l) -gt 0 ]",
"signal": 9
},
"cpu": {
"interval": 5,
"format": " {usage}%",
"states": {
"warning": 70,
"critical": 90
},
"on-click": "swaymsg exec \\$term_float btop"
},
"memory": {
"interval": 30,
"format": " {}%",
"states": {
"warning": 70,
"critical": 90
},
"on-click": "swaymsg exec \\$term_float btop"
},
"battery": {
"format": "{icon} {capacity}%",
"format-icons": ["", "", "", "", ""]
},
"network": {
"format-wifi": " ({signalStrength}%)",
"format-ethernet": "",
"format-disconnected": "",
"tooltip-format": "{ifname} ({essid}): {ipaddr}",
"on-click": "swaymsg exec \\$term_float nmtui"
},
"bluetooth": {
"format": "",
"format-disabled": "",
"on-click": "swaymsg exec \\$bluetooth",
"on-click-right": "rfkill toggle bluetooth",
"tooltip-format": "{}"
},
"pulseaudio": {
"format": "{icon} {volume}% {format_source}",
"format-bluetooth": "{icon} {volume}%",
"format-muted": " {format_source}",
"format-source": "  {volume}%",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"headset": "",
"default": ["", "", ""]
},
"tooltip-format": "{icon} {volume}% {format_source}",
"on-click": "swaymsg exec \\$pulseaudio",
"on-click-middle": "swaymsg exec \\$volume_mute",
"on-click-right": "swaymsg exec pavucontrol",
"on-scroll-up": "swaymsg exec \\$volume_up",
"on-scroll-down": "swaymsg exec \\$volume_down"
},
"clock": {
"format": "{:%e %b %H:%M}",
"tooltip": true,
"tooltip-format": "{:%d.%m.%Y %H:%M}",
"interval": 5,
"on-click": "swaymsg exec \\$calendar"
},
"custom/power": {
"format": "",
"on-click": "nwg-bar -x"
},
"tray": {
"icon-size": 21,
"spacing": 10
}
}