.dotfiles/waybar/config.template

217 lines
7.5 KiB
Plaintext
Raw Normal View History

2022-05-27 21:13:37 +00:00
// 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": "window",
"output": __OUTPUT__,
"ipc": true,
"id": "bar-1",
"width": 1000,
"mode": "hide",
"hidden_state": "hide",
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
"margin-left": 75,
"margin-right": 75,
"margin-top": 68,
"modules-left": [],
"modules-center": ["sway/mode", "sway/window"],
"modules-right": [],
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
},
{
2022-08-23 20:20:08 +00:00
"name": "bar",
2022-05-27 21:13:37 +00:00
"output": __OUTPUT__,
"ipc": true,
"id": "bar-1",
"mode": "hide",
"hidden_state": "hide",
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
"margin-left": 20,
"margin-right": 20,
"margin-top": 20,
// Choose the order of the modules
"modules-left": ["sway/workspaces"],
"modules-center": [],
2022-09-23 21:40:56 +00:00
"modules-right": ["custom/weather", "network", "network#wireguard", "cpu", "memory", "custom/disk", "temperature", "backlight", "custom/battery", "pulseaudio","tray", "custom/wallpaper", "custom/todo", "custom/osk", "custom/pkg", "custom/bar", "custom/gammastep", "idle_inhibitor", "custom/clock", "custom/power"],
2022-05-27 21:13:37 +00:00
// Modules configuration
"sway/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
"format": "{icon}",
"numeric-first": true,
"format-icons": {
"0": "0 \uf073",
"1": "1 \uf27a",
"2": "2 \uf0e0",
"3": "3 \uf268",
"4": "4 \uf144",
"5": "5 \uf095",
"6": "6 \uf120",
"7": "7 \uf269",
"8": "8 \uf121",
"9": "9 \uf126",
"C0": "C0",
"C1": "C1",
"C2": "C2",
"C3": "C3",
"C4": "C4",
"C5": "C5",
"C6": "C6",
"C7": "C7",
"C8": "C8",
"C9": "C9",
"grave": "",
"urgent": "!",
"focused": "",
"default": ""
}
},
//"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/weather": {
"interval": 600,
"tooltip-format": "<span font='Anonymous Pro 12'><big>{:%d %B}</big>\n<tt><small>{calendar}</small></tt></span>",
"on-click": "${HOME}/scripts/waybar/waybar-weather.pl notify",
2022-06-07 12:06:58 +00:00
"exec": "${HOME}/scripts/waybar/waybar-weather.pl bar"
2022-05-27 21:13:37 +00:00
},
"network": {
// "interface": "wlp58s0", // (Optional) To force the use of this interface
"interval": 10,
2022-09-12 15:42:45 +00:00
"tooltip-format": "{essid} {ipaddr}",
2022-05-27 21:13:37 +00:00
"format-ethernet": "",
"format-wifi": "",
"format-disconnected": "⛖",
"on-click": "${HOME}/scripts/waybar/waybar-nm.sh"
//"on-click": "if [ $(sudo pgrep -c nmtui) -gt 0 ]; then sudo pkill nmtui; else /usr/bin/xterm -e 'sudo /usr/bin/nmtui'; fi"
},
"network#wireguard": {
"interval": 10,
"interface": "wg0", // (Optional) To force the use of this interface
2022-09-12 15:42:45 +00:00
"tooltip-format": "{ifname} {ipaddr}",
2022-05-27 21:13:37 +00:00
"tooltip": "{ipaddr}",
"format": "⚿",
"format-disconnected": "⚿",
2022-05-27 21:13:37 +00:00
"on-click": "if [ $(sudo pgrep -xc rofi) -gt 0 ]; then pkill rofi; else ${HOME}/scripts/rofi/rofi-openvpn.sh; fi"
},
"cpu": {
2022-08-23 19:58:01 +00:00
"format": "\u200a{usage}%",
2022-05-27 21:13:37 +00:00
"tooltip": true,
"on-click": "${HOME}/scripts/waybar/waybar-cpu.sh"
},
"memory": {
2022-08-23 19:58:01 +00:00
"format": "\u200a{}%",
2022-05-27 21:13:37 +00:00
"on-click": "${HOME}/scripts/waybar/waybar-mem.sh"
},
"custom/disk": {
2022-08-23 19:58:01 +00:00
"format": "\uf0a0\u200a{}",
2022-05-27 21:13:37 +00:00
"exec": "df / | tail -n 1 | awk {'print $5'}",
"on-click": "${HOME}/scripts/waybar/waybar-disk.sh"
},
"temperature": {
"critical-threshold": 80,
2022-08-23 19:58:01 +00:00
"format": "\u200a{temperatureC}°C"
2022-05-27 21:13:37 +00:00
},
"backlight": {
// "device": "acpi_video1",
2022-08-23 19:58:01 +00:00
"format": "{icon}\u200a{percent}%",
2022-05-27 21:13:37 +00:00
"format-icons": [ "•", "☼", "o", "", ""],
"on-click": "${HOME}/scripts/thinkpad/blc.pl --notify %",
"on-scroll-up": "${HOME}/scripts/thinkpad/blc.pl --notify ++",
"on-scroll-down": "${HOME}/scripts/thinkpad/blc.pl --notify --"
},
"custom/battery": {
"format": "{}",
"return-type": "json",
2022-08-23 19:58:01 +00:00
"exec": "${HOME}/scripts/thinkpad/pow.pl --bar",
2022-05-27 21:13:37 +00:00
"interval": 5,
"on-click": "notify-send Power \"`${HOME}/scripts/thinkpad/pow.pl -p`\""
},
"pulseaudio": {
//"scroll-step": 1,
2022-08-23 19:58:01 +00:00
"format": "{icon}\u200a{volume}%",
2022-05-27 21:13:37 +00:00
"format-bluetooth": "{icon}{volume}%",
"format-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
},
"on-click": "${HOME}/scripts/waybar/waybar-audio.sh"
},
2022-08-23 20:20:08 +00:00
"tray": {
2022-09-12 15:42:45 +00:00
"icon-size": 24,
"spacing": 0
2022-08-23 20:20:08 +00:00
},
2022-09-23 21:40:56 +00:00
"custom/wallpaper": {
"interval": 86400,
"exec": "echo '🌌\nRotate wallpaper\nactive'",
"on-click": "${HOME}/scripts/sway/rotate-wallpaper.sh"
},
2022-08-23 20:20:08 +00:00
"custom/todo": {
"interval": 86400,
"exec": "echo '\u200a🗈\nTo-do list\n'",
2022-08-23 20:20:08 +00:00
"on-click": "${HOME}/scripts/waybar/waybar-todo.sh",
},
"custom/osk": {
2022-09-23 21:39:30 +00:00
"interval": 1,
2022-08-23 20:20:08 +00:00
"on-click": "${HOME}/scripts/waybar/waybar-keyboard.sh",
2022-09-23 21:39:30 +00:00
"exec": "if [ -e $HOME/.spool/onscreen-keyboard ]; then CLASS='activated'; else CLASS=''; fi; echo '⌨\nToggle onscreen keyboard\n'$CLASS",
2022-08-23 20:20:08 +00:00
},
"custom/pkg": {
"interval": 60,
"tooltip-format": "<span font='Anonymous Pro 12'><big>{:%d %B}</big>\n<tt><small>{calendar}</small></tt></span>",
"on-click": "${HOME}/scripts/waybar/waybar-pkg.sh upgrade",
"return-type": "json",
"exec": "${HOME}/scripts/waybar/waybar-pkg.sh bar"
},
"custom/bar": {
2022-09-23 21:42:01 +00:00
"interval": 86400,
"exec": "echo '\u200a\nLock bar\n'",
2022-08-23 20:20:08 +00:00
"on-click": "${HOME}/scripts/waybar/toggle.sh"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"on-click": "echo {status} > .config/idle_inhibitor"
},
2022-08-26 05:06:16 +00:00
"custom/gammastep": {
"interval": 1,
"return-type": "json",
"exec": "${HOME}/scripts/waybar/waybar-gammastep.sh",
"on-click": "${HOME}/scripts/waybar/waybar-gammastep.sh toggle"
},
2022-08-23 20:20:08 +00:00
"custom/clock": {
"interval": 60,
"on-click": "${HOME}/.local/bin/firefox/firefox-bin 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/power": {
"format": "\u23FB",
2022-09-23 22:12:18 +00:00
"on-click": "if [ $(sudo pgrep -xc wofi) -gt 0 ]; then pkill wofi; else ${HOME}/scripts/sway/power-menu.sh; fi"
2022-08-23 20:20:08 +00:00
},
2022-05-27 21:13:37 +00:00
}]