FEAT: Updated waybar to look better and more custom

This commit is contained in:
_N0x 2024-11-30 12:46:14 +01:00
parent 6d1617b41d
commit 72799bf294
2 changed files with 69 additions and 125 deletions

View File

@ -1,31 +1,29 @@
{ {
"layer": "top", // Waybar at top layer "layer": "top",
"position": "top", // Waybar position (top|bottom|left|right) "position": "top",
"height": 34, // Waybar height (to be removed for auto height) "height": 35,
// "width": 1280, // Waybar width "spacing": 4,
"spacing": 4, // Gaps between modules (4px) "margin-left": 10,
"margin-right": 10,
"margin-top": 10,
// Choose the order of the modules // Choose the order of the modules
"modules-left": ["hyprland/workspaces"], "modules-left": ["hyprland/workspaces","hyprland/window"],
"modules-center": ["hyprland/window"], "modules-center": ["clock"],
"modules-right": ["idle_inhibitor", "pulseaudio", "backlight", "network", "custom/updates", "hyprland/submap", "hyprland/language", "cpu", "memory", "temperature", "battery", "tray", "clock"], "modules-right": ["pulseaudio", "backlight", "network", "cpu", "memory", "tray"],
// Modules configuration // Modules configuration
"hyprland/workspaces": { "hyprland/workspaces": {
"disable-scroll": true, "disable-scroll": true,
//"all-outputs": true,
"on-click": "activate", "on-click": "activate",
// "all-outputs": false, "format": "{icon}",
// "format": "{name}: {icon}",
"format": "{name}",
"on-scroll-up": "hyprctl dispatch workspace m-1 > /dev/null",
"on-scroll-down": "hyprctl dispatch workspace m+1 > /dev/null",
"format-icons": { "format-icons": {
"1": "", "empty": "",
"2": "", //"default": "",
"3": "", "default": "",
"4": "", "active": "",
"5": "",
"urgent": "",
"focused": "",
"default": ""
} }
}, },
"keyboard-state": { "keyboard-state": {
@ -38,56 +36,10 @@
} }
}, },
"hyprland/window": { "hyprland/window": {
"max-length": 50, "max-length": 64,
"separate-outputs": true "separate-outputs": true
}, },
"hyprland/language": {
"format": "{}",
"max-length": 18
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"sway/scratchpad": {
"format": "{icon} {count}",
"show-empty": false,
"format-icons": ["", ""],
"tooltip": true,
"tooltip-format": "{app}: {title}"
},
"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": " "
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ",
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": { "tray": {
// "icon-size": 21, // "icon-size": 21,
"spacing": 0 "spacing": 0
@ -104,14 +56,6 @@
"memory": { "memory": {
"format": "{}% " "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": { "backlight": {
// "device": "acpi_video1", // "device": "acpi_video1",
"format": "{percent}% {icon}", "format": "{percent}% {icon}",
@ -144,21 +88,21 @@
"format-alt": "{ifname}: {ipaddr}/{cidr}" "format-alt": "{ifname}: {ipaddr}/{cidr}"
}, },
"pulseaudio": { "pulseaudio": {
// "scroll-step": 10, // %, can be a float // "scroll-step": 1, // %, can be a float
"format": "{volume}%{icon} {format_source}", "format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon} {format_source}", "format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}", "format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}", "format-muted": " {format_source}",
"format-source": "{volume}% ", "format-source": "{volume}% ",
"format-source-muted": "", "format-source-muted": "",
"format-icons": { "format-icons": {
"headphone": "", "headphone": "",
"hands-free": "", "hands-free": "",
"headset": "", "headset": "",
"phone": "", "phone": "",
"portable": "", "portable": "",
"car": "", "car": "",
"default": ["", "", ""] "default": ["", "", ""]
}, },
"on-click": "pavucontrol" "on-click": "pavucontrol"
}, },
@ -189,8 +133,8 @@
"has-updates": "󱍷", "has-updates": "󱍷",
"updated": "󰂪" "updated": "󰂪"
}, },
"exec-if": "which waybar-module-pacman-updates", "exec-if": "which waybar-updates",
"exec": "waybar-module-pacman-updates --interval-seconds 5 --network-interval-seconds 300" "exec": "waybar-updates --interval-seconds 5 --network-interval-seconds 300"
} }
} }

View File

@ -21,10 +21,11 @@
} }
#waybar { #waybar {
font-family: 'Source Code Pro', sans-serif; font-family: 'Hack JBM Ligatured', "Font Awesome 6 Free";
font-size: 1.2em; font-size: 1.2em;
font-weight: 400; font-weight: 400;
color: @base04; color: @base04;
border-radius: 10px;
background: @base01; background: @base01;
} }
@ -42,8 +43,8 @@
} }
#workspaces button.active { #workspaces button.active {
border-radius: 4px; border-radius: 10px;
background-color: @base02; background-color: @base03;
} }
#workspaces button.urgent { #workspaces button.urgent {
@ -92,9 +93,8 @@
} }
#window { #window {
font-size: 0.9em;
font-weight: 400; font-weight: 400;
font-family: sans-serif; margin-left:20px;
} }
#language { #language {