Files
dots/files/waybar/.config/waybar/config

226 lines
6.0 KiB
Plaintext
Executable File

// =============================================================================
//
// Waybar configuration
//
// Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
//
// =============================================================================
{
// -------------------------------------------------------------------------
// Global configuration
// -------------------------------------------------------------------------
"layer": "top",
"position": "top",
// If height property would be not present, it'd be calculated dynamically
"height": 25,
"margin-left": 6,
"margin-right": 6,
"margin-top": 6,
"margin-bottom": 0,
"modules-left": [
"sway/workspaces",
// "sway/mode",
"sway/window"
],
"modules-center": [
],
"modules-right": [
// "network",
// "pulseaudio",
// "memory",
// "cpu",
// "temperature",
"backlight",
// "custom/keyboard-layout",
"battery",
// "custom/conservation",
// "custom/power",
"clock#date",
"clock#time",
"custom/sep",
"tray"
],
// -------------------------------------------------------------------------
// Modules
// -------------------------------------------------------------------------
"battery": {
"interval": 1,
"states": {
"warning": 30,
"critical": 15
},
// Connected to AC
"format": "{capacity}% 󰂄", // Icon: bolt
// "format": "⚡ {capacity}%", // Icon: bolt
// "format": "C {capacity}%", // Icon: bolt
// Not connected to AC
"format-discharging": "{capacity}% {icon}",
// "format-discharging": "🔋 {capacity}%",
// "format-discharging": "{capacity}%",
"format-icons": [
"󰁺", // Icon: battery-empty
"󰁼", // Icon: battery-quarter
"󰁾", // Icon: battery-half
"󰂁", // Icon: battery-three-quarters
"󰁹" // Icon: battery-full
],
"tooltip": true,
"on-click": "~/.config/waybar/conservation-toggle.sh"
},
"backlight": {
"device": "intel_backligt",
"format": "{percent} {icon}",
// "format": "{percent}%",
// "format-icons": ["🔅", "🔆"]
"format-icons": ["󰃚", "󰃝", "󰃞", "󰃟", "󰃠"]
},
"clock#time": {
"interval": 1,
// "format": "🕒 {:%H:%M}",
"format": "{:%H:%M}",
"tooltip": false,
"on-click": "gnome-clocks"
},
"clock#date": {
"interval": 10,
// "format": " {:%e %b %Y}", // Icon: calendar-alt
// "format": "🗓️ {:%e. %b %Y (%a)}", // Icon: calendar-alt
"format": "{:%a, %e.%b}", // Icon: calendar-alt
"tooltip-format": "{:%e %B %Y}",
"on-click": "gnome-calendar"
},
"cpu": {
"interval": 30,
"format": "🧮 {usage}% ({load})", // Icon: microcip
"states": {
"warning": 70,
"critical": 90
}
},
"custom/keyboard-layout": {
"exec": "swaymsg -t get_inputs | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4",
// Interval set only as a fallback, as the value is updated by signal
"interval": 30,
"format": " {}", // Icon: keyboard
// Signal sent by Sway key binding (~/.config/sway/key-bindings)
"signal": 1, // SIGHUP
"tooltip": false
},
"memory": {
"interval": 30,
"format": "💾 {used} GiB", // Icon: memory
"states": {
"warning": 70,
"critical": 90
}
},
"network": {
"interval": 5,
"format-wifi": " {essid} ({signalStrength}%)", // Icon: wifi
"format-ethernet": " {ifname}: {ipaddr}/{cidr}", // Icon: ethernet
"format-disconnected": "⚠ Disconnected",
"tooltip-format": "{ifname}: {ipaddr}"
},
"sway/mode": {
"format": "<span style=\"italic\"> {}</span>", // Icon: expand-arrows-alt
"tooltip": false
},
"sway/window": {
"format": "{}",
"max-length": 100,
"icon": true,
"icon-size": 18
},
"sway/workspaces": {
"all-outputs": false,
"disable-scroll": false,
"format": "{name}",
"format-icons": {
"1": "一",
"2": "二",
"3": "三",
"4": "四",
"5": "五",
"6": "六",
"7": "七",
"8": "八",
"9": "九",
"10": "十",
// "urgent": "",
// "focused": "",
"default": ""
}
},
"pulseaudio": {
//"scroll-step": 1,
"format": "{volume}%",
"format-bluetooth": "{volume}%",
"format-muted": "Mute",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"on-click": "pavucontrol"
},
"temperature": {
"critical-threshold": 80,
"interval": 5,
"format": "{icon} {temperatureC}°C",
"format-icons": [
"", // Icon: temperature-empty
"", // Icon: temperature-quarter
"", // Icon: temperature-half
"", // Icon: temperature-three-quarters
"" // Icon: temperature-full
],
"tooltip": true
},
"tray": {
"icon-size": 13,
"spacing": 15
},
"custom/conservation": {
"exec": "~/.config/waybar/conservation.sh",
"interval": 10,
"on-click": "~/.config/waybar/conservation-toggle.sh"
},
"custom/power": {
"exec": "echo 💻 $(cat /sys/firmware/acpi/platform_profile)",
"interval": 10,
"on-click": "kitty -e 'htop'"
},
"custom/sep": {
"format": "|",
},
}