122 lines
4.3 KiB
JSON
122 lines
4.3 KiB
JSON
{
|
||
// Basic config
|
||
"layer": "bottom",
|
||
"position": "bottom",
|
||
"margin-top": 0,
|
||
"margin-bottom": 0,
|
||
"margin-right": 100,
|
||
"margin-left": 100,
|
||
|
||
"modules-center": ["sway/mode", "sway/workspaces"],
|
||
"sway/workspaces": {
|
||
"disable-scroll": true,
|
||
"all-outputs": false,
|
||
"format": "{icon}",
|
||
},
|
||
"sway/mode": {
|
||
"format": "<span style=\"italic\">{}</span>",
|
||
"tooltip": false
|
||
},
|
||
|
||
"modules-left": ["systemd-failed-units", "memory", "load", "custom/cputemp", "custom/nvidia", "disk#disk1", "disk#disk2", "network"],
|
||
"custom/cputemp": {
|
||
"exec": "sensors | grep 'CPU:' | awk '{print substr($2,2); }'",
|
||
"format": " {}",
|
||
"on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 80x45 watch sensors'",
|
||
"interval": 1
|
||
},
|
||
"custom/nvidia": {
|
||
"exec": "nvidia-smi --query-gpu=utilization.gpu,memory.used,temperature.gpu --format=csv,nounits,noheader | sed 's/\\([0-9]\\+\\), \\([0-9]\\+\\), \\([0-9]\\+\\)/\\1% \\2MB \\3°C/g'",
|
||
"format": " {}",
|
||
"on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 nvtop'",
|
||
"interval": 1
|
||
},
|
||
"load": {
|
||
"interval": 1,
|
||
"format": " {load1}%",
|
||
"states": {
|
||
"warning": 70,
|
||
"critical": 90
|
||
},
|
||
"tooltip": true,
|
||
"on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 btop'"
|
||
},
|
||
"memory": {
|
||
"interval": 1,
|
||
"format": " {used:0.1f}G",
|
||
"states": {
|
||
"warning": 70,
|
||
"critical": 90
|
||
},
|
||
"tooltip": true,
|
||
"on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 btop'"
|
||
},
|
||
"systemd-failed-units": {
|
||
"hide-on-ok": false, // Do not hide if there is zero failed units.
|
||
"format": "Systemd ✗ {nr_failed}",
|
||
"format-ok": "Systemd ✓",
|
||
"system": true, // Monitor failed systemwide units.
|
||
"user": true, // Ignore failed user units.
|
||
"on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 isd'"
|
||
},
|
||
"include": "~/.config/waybar/local_config.jsonc",
|
||
|
||
"modules-right": ["tray", "pulseaudio", "custom/scratchpad", "custom/theme", "clock"],
|
||
"pulseaudio": {
|
||
"scroll-step": 5,
|
||
"format": "{icon} {volume}%{format_source}",
|
||
"format-muted": " {format_source}",
|
||
"format-source": " ",
|
||
"format-source-muted": " ",
|
||
"format-icons": {
|
||
"headphone": "",
|
||
"headset": "",
|
||
"default": [ "", "", "" ]
|
||
},
|
||
"tooltip-format": "{icon} {volume}% {format_source}",
|
||
"on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x12 pulsemixer'",
|
||
"on-click-middle": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
|
||
"on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +5%",
|
||
"on-scroll-down": "pactl set-sink-volume @DEFAULT_SINK@ -5%"
|
||
},
|
||
"custom/scratchpad": {
|
||
"interval": 5,
|
||
"return-type": "json",
|
||
"format": "{icon}",
|
||
"format-icons": {
|
||
"one": "",
|
||
"many": ""
|
||
},
|
||
"exec": "/bin/sh /usr/share/sway/scripts/scratchpad.sh",
|
||
"on-click": "swaymsg 'scratchpad show'",
|
||
"signal": 7
|
||
},
|
||
"custom/theme": {
|
||
"format": "{icon}",
|
||
"interval": 300,
|
||
"tooltip": true,
|
||
"format-icons": {
|
||
"light": "",
|
||
"dark": "",
|
||
"auto_light": "",
|
||
"auto_dark": ""
|
||
},
|
||
"return-type": "json",
|
||
"exec-if": "/usr/share/sway/scripts/theme-toggle.sh check",
|
||
"exec": "/usr/share/sway/scripts/theme-toggle.sh status",
|
||
"on-click": "/usr/share/sway/scripts/theme-toggle.sh toggle",
|
||
"on-click-right": "/usr/share/sway/scripts/theme-toggle.sh auto-toggle",
|
||
"signal": 17
|
||
},
|
||
"tray": {
|
||
"icon-size": 21,
|
||
"spacing": 10
|
||
},
|
||
"clock": {
|
||
"interval": 1,
|
||
"tooltip-format": "<tt>{calendar}</tt>",
|
||
"format": " {:%Y-%m-%d %H:%M:%S}",
|
||
"on-click": "swaymsg exec 'footclient --app-id floating_shell --window-size-chars 120x45 calcurse'"
|
||
}
|
||
}
|