Rework Waybar configuration

This commit is contained in:
Yorick Barbanneau 2023-04-08 20:28:39 +02:00
parent 8fcd60dc0c
commit 560aee3218
2 changed files with 79 additions and 48 deletions

View file

@ -1,13 +1,29 @@
{ {
"layer": "top", "layer": "top",
"height":"22", "spacing":6,
"disable-toolptips": true, "disable-toolptips": true,
"modules-left": ["sway/workspaces", "sway/mode"], "modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": [], "modules-center": [],
"modules-right": ["network", "temperature", "memory", "cpu", "backlight", "battery", "pulseaudio", "clock", "tray"], "modules-right": [
"sway/mode": { "network",
"custom/sep",
"temperature", "memory", "cpu",
"custom/sep",
"backlight", "battery",
"custom/sep",
"pulseaudio",
"custom/sep",
"clock",
"custom/sep",
"tray"
],
"sway/mode": {
"format": "<span style=\"italic\">{}</span>" "format": "<span style=\"italic\">{}</span>"
}, },
"custom/sep": {
"format": "|",
"tooltip": false
},
"sway/workspace": { "sway/workspace": {
"disable-scroll": true "disable-scroll": true
}, },
@ -20,22 +36,22 @@
}, },
"clock": { "clock": {
"tooltip": false, "tooltip": false,
"tooltip-format": "{:%Y-%m-%d | %H:%M}", "timezone": "Europe/Paris",
"format-alt": "{:%Y-%m-%d}" "format-alt": "{:%Y-%m-%d}"
}, },
"temperature": { "temperature": {
"thermal-zone": 0, "thermal-zone": 0,
"critical-threshold": 80, "critical-threshold": 80,
"format": "{temperatureC}°C  |" "format": "{temperatureC}°C  "
}, },
"cpu": { "cpu": {
"format": "{usage}%  |", "format": "{usage}% {icon}",
"tooltip": false "tooltip": false,
"format-icons": [""]
}, },
"backlight": { "backlight": {
//"device": "intel_backlight", "format": "{percent}% {icon}",
"format": "{percent}% {icon} |", "format-icons": ["󰌶", "󱩏", "󱩐", "󱩐", "󱩑", "󱩒", "󱩓", "󱩔", "󱩕", "󱩖", "󰛨"],
"format-icons": ["", ""],
"tooltip": false "tooltip": false
}, },
"battery": { "battery": {
@ -44,37 +60,36 @@
"full": 100, "full": 100,
"warning": 30, "warning": 30,
"critical": 15 "critical": 15
}, },
"format": "{capacity}% {icon} |", "format": "{capacity}% {icon}",
"format-charging": "{capacity}%  |", "format-charging": "{capacity}% ",
"format-plugged": "{capacity}%  |", "format-plugged": "{capacity}% ",
"format-alt": "{time} {icon} |", "format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""] "format-icons": [" ", " ", " ", " ", " "]
}, },
"network": { "network": {
"tooltip": false, "tooltip": false,
"format-wifi": "{essid} ({signalStrength}%)  |", "format-wifi": "{essid} ({signalStrength}%)  ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr}  |", "format-ethernet": "{ifname}: {ipaddr}/{cidr}  ",
"format-linked": "{ifname} (No IP)  |", "format-linked": "{ifname} (No IP)  ",
"format-disconnected": "Disconnected ⚠ |", "format-disconnected": "Disconnected ⚠ ",
"format-alt": "{ifname}: {ipaddr}/{cidr} |" "format-alt": "{ifname}: {ipaddr}/{cidr}"
}, },
"pulseaudio": { "pulseaudio": {
"tooltip": false, "tooltip": false,
"format": "{volume}% {icon} |", "format": "{format_source} {volume}% {icon}",
"format-bluetooth": "{volume}% {icon} |", "format-bluetooth": "{volume}% {icon}",
"format-muted": "婢|", "format-muted": "{format_source} 婢 ",
"format-source": "{volume}%  ", "format-source": "{volume}%  ",
"format-source-muted": "", "format-source-muted": " ",
"format-icons": { "format-icons": {
"headphones": "", "headphones": " ",
"handsfree": "", "handsfree": " ",
"headset": "", "headset": " ",
"phone": "", "phone": " ",
"portable": "", "portable": " ",
"car": "", "car": " ",
"default": "墳" "default": "墳 "
} }
}, },
"memory": { "memory": {

View file

@ -1,14 +1,21 @@
@define-color color-base-bg #323232;
@define-color color-base-fg #ddd;
@define-color electric-magenta #f268b3;
@define-color electric-green #1cd180;
* { * {
border: none; border: none;
border-radius: 0; border-radius: 0;
font-family: "Fira Code Nerd Font";
font-size: 14px;
min-height:0; min-height:0;
} }
window#waybar { window#waybar {
background:#323232 ; background: @color-base-bg ;
color:#ddd; color: @color-base-fg;
font-family: "Fira Code Nerd Font";
font-size: 12px;
} }
button, button,
@ -26,12 +33,10 @@ button:hover{
} }
#workspaces { #workspaces {
color:#fff; color:#fff;
} }
#workspaces button { #workspaces button {
margin:0 3px; margin:0 3px;
padding:4px 4px; padding:4px 4px;
background:#323232 ;
color:#9c9c9c; color:#9c9c9c;
border-bottom: 1px solid transparent; border-bottom: 1px solid transparent;
} }
@ -39,14 +44,18 @@ button:hover{
#workspaces button:hover { #workspaces button:hover {
box-shadow:inherit; box-shadow:inherit;
text-shadow:inherit; text-shadow:inherit;
color:#f268b3; color: @electric-magenta;
border-bottom: 1px solid #f268b3; border-bottom: 1px solid @electric-magenta;
} }
#workspaces button.focused { #workspaces button.focused {
background:#1cd180 ; background:#1cd180 ;
color:#000; color:#000;
} }
#workspaces button.visible:not(.focused) {
color: @electric-green;
border-color: @electric-green;
}
#clock, #clock,
#cpu, #cpu,
@ -66,20 +75,27 @@ button:hover{
background:red; background:red;
font-weight:bold; font-weight:bold;
} }
#pulseaudio {} #pulseaudio {}
#pulseaudio.muted {} #pulseaudio.muted {
color:#f268b3;
}
#battery { #battery.discharging {
border-bottom:1px solid transparent; color: @color-base-fg;
border-bottom: none;
} }
#battery.charging, #battery.plugged { #battery.charging, #battery.plugged {
border-color:#1cd180; border-bottom: 1px solid @electric-green;
color:#1cd180; color: @electric-green;
} }
#battery.critical:not(.charging) { #battery.critical:not(.charging) {
border-color:#f268b3; border-color: @electric-magenta;
color:#f268b3; color: @electric-magenta;
}
#tray {
font-family: "DejaVu Sans";
font-size: 12px;
} }