Waybar theme

This commit is contained in:
Rodolphe Bréard 2024-10-12 13:24:57 +02:00
parent 5e53ad2190
commit d2e73e4115
3 changed files with 220 additions and 341 deletions

View file

@ -1,157 +1,133 @@
{
"layer": "top", // Waybar at top layer
"position": "top", // Waybar position (top|bottom|left|right)
"height": 30, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
"spacing": 4, // Gaps between modules (4px)
// Choose the order of the modules
"modules-left": ["hyprland/workspaces"],
"modules-center": ["hyprland/window"],
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "clock", "tray"],
// Modules configuration
// "hyprland/workspaces": {
// "disable-scroll": true,
// "all-outputs": true,
// "warp-on-scroll": false,
// "format": "{name}: {icon}",
// "format-icons": {
// "1": "",
// "2": "",
// "3": "",
// "4": "",
// "5": "",
// "urgent": "",
// "focused": "",
// "default": ""
// }
// },
"keyboard-state": {
"numlock": true,
"capslock": true,
"format": "{name} {icon}",
"format-icons": {
"locked": "",
"unlocked": ""
}
},
"mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"unknown-tag": "N/A",
"interval": 2,
"consume-icons": {
"on": " "
"margin-top" : 0,
"margin-left": 0,
"margin-right": 0,
"height" : 35,
"modules-left": [
"custom/launcher",
"hyprland/workspaces"
],
"modules-center": [
"hyprland/window"
],
"modules-right": [
"pulseaudio",
"network",
"temperature",
"battery",
"clock",
"custom/updates",
"custom/notification",
"tray",
"custom/power"
],
"hyprland/window": {
"format": "{title}",
"icon": false,
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ",
"on": " "
"hyprland/workspaces": {
"format": "{icon}",
"on-click": "activate",
"sort-by-number": true
},
"repeat-icons": {
"on": " "
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:L%A %e %b}",
"locale": "fr_FR.utf8",
"calendar": {
"weeks-pos": "left",
"format": {
"weeks": "<span color='#99ffdd'><b>{:%U}</b></span>",
"today": "<span color='#ff6699'><b>{}</b></span>"
}
}
},
"single-icons": {
"on": "1 "
"cpu": {
"format": " {usage}%",
"tooltip": false
},
"state-icons": {
"paused": "",
"playing": ""
"memory": {
"format": "{}%  "
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
// "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"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
"temperature": {
"critical-threshold": 80,
"format": "{icon} {temperatureC}°C",
"format-icons": ["", "", ""]
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ipaddr}/{cidr} ",
"tooltip-format": "{ifname} via {gwaddr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
"battery": {
"states": {
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-full": "{icon} {capacity}%",
"format-charging": "⚡ {capacity}%",
"format-plugged": " {capacity}%",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""]
},
"on-click": "pavucontrol"
},
"custom/media": {
"format": "{icon} {}",
"return-type": "json",
"max-length": 40,
"format-icons": {
"spotify": "",
"default": "🎜"
"network": {
"format-wifi": " {signalStrength}%",
"format-ethernet": "🖧",
"tooltip-format": "{ipaddr}/{cidr} {ifname} via {gwaddr} {essid}",
"format-linked": "{ifname} (No IP) ⚠",
"format-disconnected": " ⚠ ",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": "🔇 {format_source}",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"custom/launcher": {
"format": " ",
"on-click": "wofi --show drun",
},
"custom/power": {
"format": "⏻",
"tooltip": false,
"on-click": "poweroff"
},
"custom/updates": {
"format": "{} {icon}",
"return-type": "json",
"format-icons": {
"has-updates": "󱍷",
"updated": "󰂪"
},
"exec-if": "which waybar-module-pacman-updates",
"exec": "waybar-module-pacman-updates --interval-seconds 5 --network-interval-seconds 300"
},
"custom/notification": {
"tooltip": false,
"format": "{icon}",
"format-icons": {
"notification": "<span foreground='red'><sup></sup></span>",
"none": "",
"dnd-notification": "<span foreground='red'><sup></sup></span>",
"dnd-none": "",
"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-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
},
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
}
}