changed waybar style and config

This commit is contained in:
Niklas Kapelle 2023-10-26 20:57:09 +02:00
parent b33675b792
commit ac09714cc6
Signed by: niklas
GPG Key ID: 4EB651B36D841D16
2 changed files with 79 additions and 31 deletions

View File

@ -4,7 +4,7 @@
"layer":"top", "layer":"top",
"modules-left": ["hyprland/workspaces"], "modules-left": ["hyprland/workspaces"],
"modules-center": [], "modules-center": [],
"modules-right": ["custom/playerctl", "idle_inhibitor", "pulseaudio", "clock", "tray","custom/swaync"], "modules-right": ["group/audio", "idle_inhibitor", "group/system"],
"idle_inhibitor": { "idle_inhibitor": {
"format": "{icon}", "format": "{icon}",
"format-icons": { "format-icons": {
@ -12,6 +12,22 @@
"deactivated": "" "deactivated": ""
} }
}, },
"group/audio":{
"orientation": "horizontal",
"modules":[
"custom/playerctl",
"pulseaudio"
]
},
"group/system":{
"orientation": "horizontal",
"modules":[
"clock",
"tray",
"custom/swaync"
]
},
"tray": { "tray": {
// "icon-size": 21, // "icon-size": 21,
"spacing": 10 "spacing": 10
@ -41,7 +57,7 @@
"on-click-right":"playerctl --player=spotify,%any next", "on-click-right":"playerctl --player=spotify,%any next",
"on-scroll-up":"playerctl --player=spotify,%any volume 0.05+", "on-scroll-up":"playerctl --player=spotify,%any volume 0.05+",
"on-scroll-down":"playerctl --player=spotify,%any volume 0.05-", "on-scroll-down":"playerctl --player=spotify,%any volume 0.05-",
"exec": "playerctl --player=spotify,%any -f '{{title}} - {{artist}}' metadata -F 2>/dev/null", "exec": "playerctl --player=spotify,%any -f '{{title}} - {{artist}}' metadata -F | sed -u 's/&/\\&/g' 2>/dev/null",
"max-length":50, "max-length":50,
"tooltip":false "tooltip":false
}, },

View File

@ -1,18 +1,20 @@
@define-color color0 #2e3440; @define-color color0 #2e3440;
@define-color color1 #3b4252; @define-color bg #2e3440;
@define-color color2 #434c5e; @define-color fg #323f2d;
@define-color color3 #4c566a; @define-color focus #3b5631;
@define-color text #ffffff;
@define-color border #f4d9e1;
* { * {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif; font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px; font-size: 13px;
border-radius: 24px;
min-height: 0;
} }
window#waybar { window#waybar {
background-color: @color0; background-color: @bg;
color: #ffffff; color: @text;
margin-top: 0.6em;
} }
window#waybar.hidden { window#waybar.hidden {
@ -20,20 +22,26 @@ window#waybar.hidden {
} }
/*--- Workspaces ---*/ /*--- Workspaces ---*/
#workspaces button { #workspaces{
/* Use box-shadow instead of border so the text isn't offset */ border: solid 1px @border;
box-shadow: inset 0 -3px transparent;
margin-top: 2px;
margin-bottom: 2px;
}
#workspaces button {
border: none; border: none;
border-radius: 4px; border-radius: 24px;
padding: 0 5px; padding: 0 5px;
background-color: transparent; background-color: transparent;
color: #ffffff; color: @text;
transition: all 0.3s ease-in-out;
} }
#workspaces button:hover { #workspaces button:hover {
background: @color2; background: @fg;
/* Disble clicking effect */ /* Disble clicking effect */
box-shadow: inherit; box-shadow: inherit;
@ -41,7 +49,7 @@ window#waybar.hidden {
} }
#workspaces button.focused { #workspaces button.focused {
background-color: @color3; background-color: @focus;
} }
#workspaces button.urgent { #workspaces button.urgent {
@ -49,7 +57,17 @@ window#waybar.hidden {
} }
#workspaces button.active{ #workspaces button.active{
background-color: @color3; background-color: @focus;
transition: all 0.3s ease-in-out;
}
/*--- Groups ---*/
#audio, #system, #idle_inhibitor {
border: solid 1px @border;
border-radius: 24px;
margin-top: 2px;
margin-bottom: 2px;
} }
/*--- Each module ---*/ /*--- Each module ---*/
@ -62,31 +80,44 @@ window#waybar.hidden {
#tray, #tray,
#mode, #mode,
#idle_inhibitor{ #idle_inhibitor{
border: none; color: @text;
border-radius: 4px;
color: #ffffff;
padding-left: 0.6em; padding-left: 6px;
padding-right: 0.6em; padding-right: 6px;
}
.modules-left{
padding-left: 3px;
}
.modules-right{
padding-right: 3px;
} }
/* If workspaces is the leftmost module, omit left margin */ /* If workspaces is the leftmost module, omit left margin */
/*
.modules-left > widget:first-child > #workspaces { .modules-left > widget:first-child > #workspaces {
margin-left: 0; margin-left: 0;
} }
*/
/* If workspaces is the rightmost module, omit right margin */ /* If workspaces is the rightmost module, omit right margin */
/*
.modules-right > widget:last-child > #workspaces { .modules-right > widget:last-child > #workspaces {
margin-right: 0; margin-right: 0;
} }
*/
/*
#window, #window,
#workspaces { #workspaces {
margin: 0 4px; margin: 0 4px;
} }
*/
/* Module style */ /* Module style */
/*
#clock { #clock {
background-color: #64727D; background-color: #64727D;
} }
@ -129,10 +160,6 @@ label:focus {
background-color: #2980b9; background-color: #2980b9;
} }
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention { #tray > .needs-attention {
-gtk-icon-effect: highlight; -gtk-icon-effect: highlight;
background-color: #eb4d4b; background-color: #eb4d4b;
@ -149,13 +176,18 @@ label:focus {
#custom-playerctl { #custom-playerctl {
padding: 0 10px; padding: 0 10px;
background-color: #1DB954; /*Spotify green*/ background-color: #1DB954;
} }
*/
#tray > .passive {
-gtk-icon-effect: dim;
}
#custom-swaync { #custom-swaync {
font-family: "NotoSansMono Nerd Font"; font-family: "NotoSansMono Nerd Font";
padding: 0 10px; padding: 0 10px;
color: #ffffff; color: @text;
font-size: 17px; font-size: 17px;
} }