.dotfiles/waybar/config.template

184 lines
6.7 KiB
Plaintext

// This is not a valid Waybar config file. It is a template designed to work with:
// https://git.john.me.tz/jpm/scripts/src/branch/master/sway/displays.pl
// You can make changes to the bar, but leave the '__' variables intact.
// The script will build a config with these settings for each enabled display.
// The '__' variables are defined in the hash in that script file.
[{
"name": "bar",
"output": __OUTPUT__,
"ipc": true,
"id": "bar-1",
"mode": "hide",
"hidden_state": "hide",
"layer": "overlay", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
"reload_style_on_change": true,
//"margin-left": 20,
//"margin-right": 20,
//"margin-top": 20,
// Choose the order of the modules
"modules-left": ["sway/mode", "sway/workspaces", "sway/window"],
"modules-center": [],
"modules-right": ["custom/keyboard", "custom/weather", "backlight", "cpu", "memory", "custom/disk", "temperature", "pulseaudio", "custom/battery", "tray", "custom/wallpaper", "custom/pkg", "custom/idle_mode", "custom/clock", "custom/nc"],
// Modules configuration
"sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
"format": "{icon}",
"numeric-first": true,
"format-icons": {
"0": "0 \uf073", // HUD
"1": "1 \uf27a", // Chat
"2": "2 \uf0e0", // Mail
"3": "3 \uf268", // Secondary Browser
"4": "4 \uf126", // Git
"5": "5 \uf095", // TBD
"6": "6 \uf120", // Terminals
"7": "7 \uf269", // Browser
"8": "8 \uf121", // IDE
"9": "9 \uf144", // Music
"C0": "C0",
"C1": "C1",
"C2": "C2",
"C3": "C3",
"C4": "C4",
"C5": "C5",
"C6": "C6",
"C7": "C7",
"C8": "C8",
"C9": "C9",
//"default": "",
//"urgent": "!",
//"focused": "",
"grave": ""
}
},
//"mpd": {
//"server": "10.10.0.66",
//"port": 6600,
//"interval": 10,
//"timeout": 30,
//"unknown-tag": "⚠",
//"format": "▶️ {title}",
//"format-paused": "⏸️ {title}",
//"format-stopped": "⏹️ mpd",
//"format-disconnected": "⚠ mpd",
//"on-click": "${HOME}/scripts/waybar/waybar-mpd.sh"
//},
"custom/keyboard": {
"on-click": "${HOME}/scripts/waybar/waybar-keyboard.sh layout",
"on-click-right": "${HOME}/scripts/waybar/waybar-keyboard.sh osk",
"exec": "${HOME}/scripts/waybar/waybar-keyboard.sh bar",
"exec-on-event": true,
"return-type": "json",
},
"custom/weather": {
"interval": 600,
"return-type": "json",
"on-click": "xdg-open https://john.me.tz/weather/forecast",
"exec": "${HOME}/scripts/waybar/waybar-weather.sh"
},
"cpu": {
"format": " {usage}%",
"tooltip": true,
"on-click": "${HOME}/scripts/waybar/waybar-cpu.sh"
},
"memory": {
"format": " {}%",
"on-click": "${HOME}/scripts/waybar/waybar-mem.sh"
},
"custom/disk": {
"format": "\uf0a0 {}",
"exec": "df / | tail -n 1 | awk {'print $5'}",
"on-click": "${HOME}/scripts/waybar/waybar-disk.sh"
},
"temperature": {
"critical-threshold": 80,
"format": " {temperatureC}°C"
},
"backlight": {
"device": "acpi_video1",
"format": "{icon} {percent}%",
"format-icons": [ "\uf185" ],
"on-click": "notify-send $(brightnessctl info)",
"on-scroll-up": "${HOME}/scripts/waybar/waybar-backlight.sh up",
"on-scroll-down": "${HOME}/scripts/waybar/waybar-backlight.sh down"
},
"custom/battery": {
"format": "{}",
"return-type": "json",
"exec": "${HOME}/scripts/waybar/waybar-battery.sh bar",
"interval": 10,
"on-click": "${HOME}/scripts/waybar/waybar-battery.sh notify"
},
"pulseaudio": {
"scroll-step": 1,
"format": "{icon} {volume}%",
"format-bluetooth": "{icon}{volume}%",
"format-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"on-scroll-up": "${HOME}/scripts/waybar/waybar-volume.sh up",
"on-scroll-down": "${HOME}/scripts/waybar/waybar-volume.sh down",
"on-click": "pavucontrol",
"on-click-right": "${HOME}/scripts/waybar/waybar-volume.sh"
},
"custom/pkg": {
"interval": 360,
"tooltip-format": "<span font='Anonymous Pro 12'><big>{:%d %B}</big>\n<tt><small>{calendar}</small></tt></span>",
"on-click": "alacritty --config-file ~/.dotfiles/alacritty/host.toml --class Alacritty-grave -e ${HOME}/scripts/waybar/waybar-pkg.sh upgrade",
"return-type": "json",
"exec": "${HOME}/scripts/waybar/waybar-pkg.sh bar"
},
"tray": {
"icon-size": 24,
"spacing": 0
},
"custom/wallpaper": {
"interval": 86400,
"exec": "echo '✶\nRotate wallpaper\nactive'",
"on-click": "${HOME}/scripts/sway/rotate-wallpaper.sh"
},
"custom/idle_mode": {
"interval": 1,
"return-type": "json",
"exec": "${HOME}/scripts/waybar/waybar-idle.sh",
"on-click": "${HOME}/scripts/sway/idle.sh mode",
"on-click-right": "${HOME}/scripts/sway/idle.sh toggle"
},
"custom/clock": {
"interval": 60,
"on-click": "flatpak run org.mozilla.Firefox https://papillon.john.me.tz/calendar.php",
"return-type": "json",
"exec": "echo '{\"class\": \"clock\", \"text\": \"'$(date '+%H:%M')'\", \"tooltip\": \"'$(date '+%A, %B %d, %Y | %Y-%m-%d')'\"}'"
},
"custom/nc": {
"tooltip": true,
"format": "{icon}",
"format-icons": {
"none": "",
"notification": "<span foreground=\"red\"><sup></sup></span>",
"dnd-none": "",
"dnd-notification": "<span foreground=\"red\"><sup></sup></span>",
"inhibited-notification": "<span foreground=\"red\"><sup></sup></span>",
"inhibited-none": " ",
"dnd-inhibited-notification": "<span foreground=\"red\"><sup></sup></span>",
"dnd-inhibited-none": " "
},
"return-type": "json",
"exec": "swaync-client -swb",
"exec-if": "which swaync-client",
"on-click": "swaync-client --toggle-panel",
"on-click-right": "swaync-client --toggle-dnd",
"escape": true
}
}]