136 lines
4.5 KiB
Text
136 lines
4.5 KiB
Text
{
|
|
"layer": "top", // Waybar at top layer
|
|
// "position": "bottom", // Waybar position (top|bottom|left|right)
|
|
"height": 30, // Waybar height (to be removed for auto height)
|
|
// "width": 1280, // Waybar width
|
|
// "gtk-layer-shell": "false",
|
|
// Choose the order of the modules
|
|
"modules-left": ["tray", "sway/workspaces", "sway/mode", "custom/spotify"],
|
|
"modules-center": ["sway/window"],
|
|
"modules-right": ["custom/scratchpad-indicator", "network", "cpu", "memory", "temperature", "battery", "pulseaudio", "clock#date", "custom/clock"],
|
|
"sway/mode": {
|
|
"format": " {}"
|
|
},
|
|
"sway/workspaces": {
|
|
"all-outputs": false,
|
|
"disable-scroll": true,
|
|
},
|
|
"sway/window": {
|
|
"max-length": 80,
|
|
"tooltip": false
|
|
},
|
|
"custom/layout": {
|
|
"tooltip": false,
|
|
"exec": "swaymsg -mrt subscribe '[\"input\"]' | jq -r --unbuffered \"select(.change == \\\"xkb_layout\\\") | .input | select(.type == \\\"keyboard\\\") | .xkb_active_layout_name | .[0:2]\""
|
|
},
|
|
"custom/zypper": {
|
|
"format": "{} ",
|
|
"interval": 3600,
|
|
"exec": "zypper lu | grep 'v |' | wc -l; echo 'packages to update'",
|
|
"exec-if": "exit 0",
|
|
"on-click": "exec alacritty -e sudo sh -c 'zypper ref; zypper dup; pkill -SIGRTMIN+8 waybar'",
|
|
"signal": 8
|
|
},
|
|
// Modules configuration
|
|
"idle_inhibitor": {
|
|
"format": "{icon}",
|
|
"format-icons": {
|
|
"activated": "",
|
|
"deactivated": ""
|
|
}
|
|
},
|
|
"tray": {
|
|
// "icon-size": 21,
|
|
"spacing": 10
|
|
},
|
|
"clock": {
|
|
"format": "{:%H:%M}",
|
|
"tooltip": false
|
|
},
|
|
"clock#date": {
|
|
"format": "{:%a %d %b w:%V}",
|
|
"tooltip": false
|
|
},
|
|
"custom/clock": {
|
|
"format": " {} ",
|
|
"exec": "date +'%Y-%m-%d %k:%M'"
|
|
},
|
|
"cpu": {
|
|
"format": "{usage}% ",
|
|
"tooltip": false
|
|
},
|
|
"memory": {
|
|
"format": "{}% "
|
|
},
|
|
"temperature": {
|
|
// "thermal-zone": 2,
|
|
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
|
"critical-threshold": 80,
|
|
// "format-critical": "{temperatureC}°C {icon}",
|
|
"format": "{temperatureC}°C {icon}",
|
|
"format-icons": ["", "", ""]
|
|
},
|
|
"backlight": {
|
|
// "device": "acpi_video1",
|
|
"format": "{percent}% {icon}",
|
|
"format-icons": ["", ""]
|
|
},
|
|
"battery": {
|
|
"states": {
|
|
// "good": 95,
|
|
"warning": 30,
|
|
"critical": 15
|
|
},
|
|
"format": "{icon}",
|
|
"format-charging": "",
|
|
"format-plugged": "",
|
|
"format-alt": "{capacity}% {time}",
|
|
"format-icons": ["", "", "", "", ""]
|
|
},
|
|
"battery#bat2": {
|
|
"bat": "BAT2"
|
|
},
|
|
"network": {
|
|
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
|
"format-wifi": "",
|
|
"format-ethernet": "",
|
|
"format-linked": "",
|
|
"format-disconnected": "⚠",
|
|
"format-alt": "{ifname} {essid} ({signalStrength}%)"
|
|
},
|
|
"pulseaudio": {
|
|
"format": "{icon}",
|
|
"format-alt": "{volume} {icon}",
|
|
"format-alt-click": "click-right",
|
|
"format-muted": "",
|
|
"format-icons": {
|
|
"headphones": "",
|
|
"handsfree": "",
|
|
"headset": "",
|
|
"phone": "",
|
|
"portable": "",
|
|
"car": "",
|
|
"default": ["", "", ""]
|
|
},
|
|
"scroll-step": 10,
|
|
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
|
|
"on-click-right": "pavucontrol",
|
|
"tooltip": false
|
|
},
|
|
"custom/scratchpad-indicator": {
|
|
"interval": 3,
|
|
"return-type": "json",
|
|
"exec": "swaymsg -t get_tree | jq --unbuffered --compact-output '(recurse(.nodes[]) | select(.name == \"__i3_scratch\") | .focus) as $scratch_ids | [.. | (.nodes? + .floating_nodes?) // empty | .[] | select(.id |IN($scratch_ids[]))] as $scratch_nodes | if ($scratch_nodes|length) > 0 then { text: \"\\($scratch_nodes | length)\", tooltip: $scratch_nodes | map(\"\\(.app_id // .window_properties.class) (\\(.id)): \\(.name)\") | join(\"\\n\") } else empty end'",
|
|
"format": "{} 🗗",
|
|
"on-click": "exec swaymsg 'scratchpad show'",
|
|
"on-click-right": "exec swaymsg 'move scratchpad'"
|
|
},
|
|
"custom/weather": {
|
|
"exec": "curl 'https://wttr.in/?format=1'",
|
|
"interval": 3600
|
|
},
|
|
"custom/spotify": {
|
|
"exec": "$HOME/.config/waybar/spotify.sh",
|
|
"interval": 1
|
|
}
|
|
}
|