chore(waybar): update waybar config

This commit is contained in:
Andrea 2024-06-01 15:14:57 +02:00
parent 2a200c6105
commit 6d95da6e68
No known key found for this signature in database
GPG Key ID: 4594610B9C8F91C5

View File

@ -1,10 +1,16 @@
{ {
"layer": "bottom", "layer": "bottom", // Waybar at top layer
"position": "bottom", "position": "bottom", // Waybar position (top|bottom|left|right)
// "height": 30, // Waybar height (to be removed for auto height)
"margin": "5 5 5 5", "margin": "5 5 5 5",
"modules-left": ["sway/workspaces", "sway/mode", "custom/pacman"], // "width": 1280, // Waybar width
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["clock", "idle_inhibitor"], "modules-center": ["clock", "idle_inhibitor"],
"modules-right": [ "modules-right": [
"custom/pacman",
"custom/recorder",
"privacy",
"pulseaudio", "pulseaudio",
"backlight", "backlight",
"battery", "battery",
@ -12,20 +18,56 @@
"network" "network"
], ],
//***************************
//* Modules configuration *
//***************************
"sway/workspaces": { "sway/workspaces": {
"disable-scroll": true, "disable-scroll": true,
"format": "{name}" "format": "{name}"
}, },
"custom/recorder": {
"format": "",
"return-type": "json",
"interval": 1,
"exec": "echo '{\"class\": \"recording\"}'",
"exec-if": "pgrep wf-recorder"
},
"custom/pacman": { "custom/pacman": {
"format": "{} ", "format": "{} ",
"interval": 3600, "interval": 3600, // every hour
"exec": "checkupdates | wc -l", "exec": "checkupdates | wc -l", // # of updates
"exec-if": "[[ $(checkupdates | wc -l) != 0 ]]", "exec-if": "[[ $(checkupdates | wc -l) != 0 ]]", // always run; consider advanced run conditions
"on-click": "alacritty -e 'yay; echo Done - Press enter to exit; read'; pkill -SIGRTMIN+8 waybar", // update system
"signal": 8, "signal": 8,
"tooltip": false "tooltip": false
}, },
"privacy": {
"icon-spacing": 4,
"icon-size": 18,
"transition-duration": 250,
"modules": [
{
"type": "screenshare",
"tooltip": true,
"tooltip-icon-size": 24
},
{
"type": "audio-out",
"tooltip": true,
"tooltip-icon-size": 24
},
{
"type": "audio-in",
"tooltip": true,
"tooltip-icon-size": 24
}
]
},
"sway/mode": { "sway/mode": {
"format": "<span style=\"italic\">{}</span>" "format": "<span style=\"italic\">{}</span>"
}, },
@ -67,6 +109,7 @@
}, },
"pulseaudio": { "pulseaudio": {
// "scroll-step": 1, // %, can be a float
"reverse-scrolling": 1, "reverse-scrolling": 1,
"format": "{volume}% {icon} {format_source}", "format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{icon} {volume}% {format_source}", "format-bluetooth": "{icon} {volume}% {format_source}",
@ -111,6 +154,7 @@
"format": " {status}", "format": " {status}",
"format-connected": " {device_alias}", "format-connected": " {device_alias}",
"format-connected-battery": " {device_alias} {device_battery_percentage}%", "format-connected-battery": " {device_alias} {device_battery_percentage}%",
// "format-device-preference": [ "device1", "device2" ], // preference list deciding the displayed device
"tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected", "tooltip-format": "{controller_alias}\t{controller_address}\n\n{num_connections} connected",
"tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}", "tooltip-format-connected": "{controller_alias}\t{controller_address}\n\n{num_connections} connected\n\n{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}\t{device_address}", "tooltip-format-enumerate-connected": "{device_alias}\t{device_address}",
@ -122,6 +166,7 @@
"format": "{ifname}", "format": "{ifname}",
"format-wifi": "{essid} ", "format-wifi": "{essid} ",
"format-ethernet": "{ipaddr}/{cidr} 󰊗", "format-ethernet": "{ipaddr}/{cidr} 󰊗",
// "format-disconnected": "", //An empty format will hide the module.
"tooltip-format": "{ifname} via {gwaddr} 󰊗", "tooltip-format": "{ifname} via {gwaddr} 󰊗",
"tooltip-format-wifi": "{essid} ", "tooltip-format-wifi": "{essid} ",
"tooltip-format-ethernet": "{ifname} ", "tooltip-format-ethernet": "{ifname} ",