Update .config/waybar/config

Update .config/waybar/scripts/keyhint.sh
Update .config/waybar/style.css
This commit is contained in:
2024-12-18 22:31:39 +01:00
parent 27e934e4c5
commit 93a9e246ff
3 changed files with 305 additions and 251 deletions

View File

@@ -1,219 +1,186 @@
// Global
{
"layer": "top",
"position": "top",
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
// "height": 30, // Auto-height is used when commented
// "width": 1280, // Full screen width when commented
"spacing": 16, // Gaps between modules (in px)
// See `man waybar` for more configuration options
// If height property would be not present, it'd be calculated dynamically
"height": 30,
// Configuration - modules-left
"modules-left": [
"custom/launcher",
"sway/workspaces",
"sway/mode",
],
"modules-center": [
"sway/window"
],
"modules-right": [
"network",
"idle_inhibitor",
"memory",
"cpu",
"pulseaudio",
"custom/keyboard-layout",
"battery",
//"custom/PBPbattery",
"backlight#icon",
"backlight#value",
"clock",
"tray",
//"custom/weather",
"custom/power",
],
"custom/launcher": {
"format":"<span size='x-large'></span>",
"on-click": "exec nwg-drawer",
"tooltip": false
},
// Modules
"idle_inhibitor": {
"format": "{icon} ",
"format-icons":{
"activated": "",
"deactivated": ""
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": "{icon}",
"format-icons": {
"3": "3",
"4": "4",
"5": "5",
"6": "6",
"7": "7",
"8": "8",
"9": "9",
"10": "10"
}
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
"sway/mode": {
"format": "<span style=\"italic\">{}</span>",
"tooltip": false
},
"custom/PBPbattery": {
"exec": "~/.config/waybar/scripts/PBPbattery.sh",
"sway/window": {
"format": "{}",
//"all-outputs": true, // Active window shows only on active display when commented
"max-length": 120
},
"clock": {
"interval": 10,
"format-alt": " {:%e %b %Y}", // Icon: calendar-alt
"format": "{:%H:%M}",
"tooltip-format": "{:%e %B %Y}"
// Configuration - modules-center
"modules-center": [
"network"
],
"network": {
"format-disabled": " Disabled",
"format-wifi": " {bandwidthDownBits:>} 󰶡 {bandwidthUpBits:>} 󰶣",
"tooltip-format-wifi": "{essid}",
"format-ethernet": "󰈀 {bandwidthDownBits:>} 󰶡 {bandwidthUpBits:>} 󰶣",
"tooltip-format-ethernet": "{ifname}: {ipaddr}/{cidr}",
"format-disconnected": " Disconnected",
"on-click": "footclient -T waybar_nmtui -e nmtui",
"interval": 2
},
// Configuration - modules-right
"modules-right": [
"custom/keyboard-layout",
"idle_inhibitor",
"cpu",
"memory",
"backlight",
"pulseaudio",
"battery",
"clock",
"tray",
"custom/power"
],
"custom/keyboard-layout": {
"exec": "i=$(swaymsg -t get_inputs); echo \"\"; echo \"$i\" | grep -m1 'xkb_active_layout_name' | cut -d '\"' -f4",
"format": "",
// Interval set only as a fallback; use signal to update the module more immediately
"interval": 30,
// See example config for sending signal to Waybar in ~/.config/sway/config.d/input
"signal": 1,
"on-click": "~/.config/waybar/scripts/keyhint.sh"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
},
"tooltip-format-activated": "Idle Inhibitor Activated",
"tooltip-format-deactivated": "Idle Inhibitor Deactivated"
},
"cpu": {
"interval": 5,
"format": "{usage}% ({load})", // Icon: microchip
"format": "{usage:>3}%",
"states": {
"warning": 70,
"critical": 90,
},
"on-click": "xfce4-terminal -e 'htop'",
"on-click": "footclient -T waybar_htop -e htop"
},
"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,
"on-click": "~/.config/waybar/scripts/keyhint.sh",
},
"memory": {
"interval": 5,
"format": " {}%", // Icon: memory
"on-click": "xfce4-terminal -e 'htop'",
"format": "{:>3}%",
"on-click": "footclient -T waybar_htop -e htop",
"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}",
"on-click": "xfce4-terminal -e 'nmtui'",
},
"network#vpn": {
"interface": "tun0",
"format": " {essid} ({signalStrength}%)",
"format-disconnected": "⚠ Disconnected",
"tooltip-format": "{ifname}: {ipaddr}/{cidr}",
},
"sway/mode": {
"format": "{}",
"tooltip": false
},
"sway/window": {
"format": "{}",
"max-length": 120
},
"sway/workspaces": {
"disable-scroll": true,
"disable-markup" : false,
"all-outputs": true,
"format": " {icon} ",
//"format":"{icon}",
"format-icons": {
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
}
"backlight": {
"format": "{icon} {percent}%",
"format-icons": ["󰄰", "󰪞", "󰪟", "󰪠", "󰪡", "󰪢", "󰪣", "󰪤", "󰪥"],
"tooltip-format": "Backlight (Scroll): {percent:}%",
"on-scroll-down": "brightnessctl -c backlight set 5%-",
"on-scroll-up": "brightnessctl -c backlight set +5%"
},
"pulseaudio": {
"scroll-step": 1, // %, can be a float
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon}  {format_source}",
"format-bluetooth-muted": " {icon}  {format_source}",
"format-muted": "婢 {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"scroll-step": 2,
"format": "{icon} {volume}%",
"format-muted":"󰝟 muted",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": [""]
"default": ["󰕿", "󰖀", "󰕾"]
},
"on-click": "pavucontrol",
"on-scroll-up": "pactl set-sink-volume @DEFAULT_SINK@ +2%",
"on-scroll-down": "pactl set-sink-volume @DEFAULT_SINK@ -2%",
"on-click": "pavucontrol"
},
// to use the weather module replace <your_location> with your city or town
// note: do not use spaces: new york would be newyork
"custom/weather": {
"exec": "~/.config/waybar/scripts/weather.sh <your_location>",
"return-type": "json",
"interval": 600,
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-icons": ["", "", "", "", ""]
},
"clock": {
"format": "󰅐 {:%H:%M}",
"format-alt": "󰅐 {:%OI:%M %p}",
"tooltip-format": " {:%A %m/%d}\n\n<tt><small>{calendar}</small></tt>",
"calendar": {
"on-scroll": 1,
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
},
},
"actions": {
"on-scroll-up": "shift_up",
"on-scroll-down": "shift_down"
},
},
"tray": {
"icon-size": 18,
"spacing":10,
"icon-size": 16,
"spacing":10
},
"backlight#icon": {
"format": "{icon}",
"format-icons": [""],
"on-scroll-down": "brightnessctl -c backlight set 1%-",
"on-scroll-up": "brightnessctl -c backlight set +1%"
},
"backlight#value" :{
"format": "{percent}%",
"on-scroll-down": "brightnessctl -c backlight set 1%-",
"on-scroll-up": "brightnessctl -c backlight set +1%"
},
"custom/firefox": {
"format": " ",
"on-click": "exec firefox",
"tooltip": false
},
"custom/terminal": {
"format": " ",
"on-click": "exec xfce4-terminal",
"tooltip": false
},
"custom/files": {
"format": " ",
"on-click": "exec thunar",
"tooltip": false
},
"custom/launcher": {
"format":" ",
"on-click": "exec wofi -c ~/.config/wofi/config -I",
"tooltip": false,
},
"custom/power": {
"format":"⏻",
"on-click": "exec ~/.config/waybar/scripts/power-menu.sh",
"tooltip": false,
"on-click": "exec ~/.config/sway/scripts/power_menu.sh",
"tooltip": false
},
}