Improved scaling

Размеры теперь в относительные единицах. Высота бара зависит от размера шрифта.
This commit is contained in:
DIvan2000 2024-12-05 15:48:16 +04:00
parent ecbd9a1a50
commit 6bcc57999b
2 changed files with 40 additions and 39 deletions

35
config
View File

@ -2,7 +2,7 @@
"reload_style_on_change": true,
"layer": "top", // Waybar at top layer
"position": "top", // Waybar at the bottom of your screen
"height": 20, // Waybar height
// Bar height is based on the css font size. Don't forget to change the tray icon size!
// "width": 1366, // Waybar width
// Choose the order of the modules
"modules-left": ["hyprland/workspaces", "tray", "hyprland/language"],
@ -18,10 +18,11 @@
"disable-scroll": true,
"all-outputs": false,
"active-only": false,
"show-special": true,
"format": "{name}"
},
"tray": {
// "icon-size": 21,
"icon-size": 17,
"spacing": 10
},
"clock": {
@ -43,10 +44,10 @@
}
},
"cpu": {
"format": "{usage}% "
"format": "{usage}%  "
},
"memory": {
"format": "{}% "
"format": "{}%  "
},
"battery": {
"interval": 5,
@ -58,27 +59,27 @@
"format": "{capacity}% {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
"format-icons": [" ", " ", " ", " ", " "]
},
"network": {
// "interface": "wlp2s0", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-disconnected": "Disconnected ⚠"
"format-wifi": "{essid} ({signalStrength}%)  ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr}  ",
"format-disconnected": "Disconnected ⚠ "
},
"pulseaudio": {
"scroll-step": 1,
"format": "{volume}% {icon}",
"format-bluetooth": "{volume}% {icon}",
"format-muted": "",
"format-bluetooth": "{volume}% {icon} ",
"format-muted": " ",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", ""]
"headphones": " ",
"handsfree": " ",
"headset": " ",
"phone": " ",
"portable": " ",
"car": " ",
"default": [" ", " "]
},
"on-click": "pavucontrol"
},

View File

@ -13,8 +13,8 @@
border: none;
border-radius: 0;
font-family: "Noto Nerd Font";
font-size: 13px;
min-height: 0;
font-size: 17px;
min-height: 1em;
}
window#waybar {
@ -29,32 +29,32 @@ window#waybar {
.modules-left {
background: @base;
border-radius: 10px;
margin-left: -10px;
padding: 0 10px;
border-radius: 0.5em;
margin-left: -0.5em;
padding: 0 0.5em;
}
.modules-right {
background: @base;
border-radius: 10px;
margin-right: -10px;
padding: 0 10px;
border-radius: 0.5em;
margin-right: -0.5em;
padding: 0 0.5em;
}
.modules-center {
background: @base;
border-radius: 10px;
margin-right: 5px;
margin-left: 5px;
padding: 0 10px;
border-radius: 0.5em;
margin-right: 0.25em;
margin-left: 0.25em;
padding: 0 0.5em;
}
#power {
background: @surface0;
border-radius: 10px;
margin-left: 2px;
padding-right: 10px;
margin-right: -10px;
border-radius: 0.5em;
margin-left: 0.15em;
padding-right: 0.5em;
margin-right: -0.5em;
color: @red;
}
@ -72,7 +72,7 @@ window#waybar {
}
#workspaces button {
padding: 0 5px;
padding: 0 0.25em;
background: transparent;
color: @text_color;
border-top: 2px solid @surface0;
@ -95,16 +95,16 @@ window#waybar {
}
#clock {
padding: 0 10px;
margin: 0 1px;
padding: 0 0.5em;
margin: 0 0.15em;
background: @surface0;
border-radius: 5px;
border-radius: 0.5em;
font-weight: bold;
}
#language, #battery, #cpu, #memory, #network, #pulseaudio, #custom-spotify, #tray, #mode {
padding: 0 10px;
margin: 0 1px;
padding: 0 0.15em;
margin: 0 0.15em;
}
#battery {