refactor(waybar): initial style updates and refactoring

This commit is contained in:
Price Hiller 2023-05-28 09:48:17 -05:00
parent 155f3eb72a
commit ca22b8d52a
No known key found for this signature in database
2 changed files with 293 additions and 346 deletions

View File

@ -1,188 +1,179 @@
[ [
{ {
"layer": "top", "layer": "top",
"position": "top", "position": "top",
"modules-left": [ "modules-left": [
"cpu", "custom/launcher",
"temperature", "wlr/workspaces",
"custom/asusmode", "cpu",
"memory", "memory",
"battery", "temperature",
"disk", "disk",
"custom/audio-device", "battery",
"custom/pipewire" "custom/audio-device",
], "custom/pipewire"
"modules-center": [ ],
"custom/media" "modules-center": [
], "custom/media"
"modules-right": [ ],
"custom/weather", "modules-right": [
"network", "custom/asusmode",
"clock", "network",
"custom/lock" "clock",
], "custom/lock"
"custom/weather": { ],
"tooltip": false, "custom/launcher": {
"min-length": 5, "format": "{}",
"exec": "curl 'https://wttr.in/?format='%t''", "tooltip": false,
"interval": 3600 "min-length": 5,
}, "interval": 1,
"battery": { "on-click": "wofi",
"min-length": 5, "exec": "printf '󰫢'"
"design-capacity": true, },
"states": { "battery": {
"full": 90, "min-length": 5,
"warning": 20, "design-capacity": true,
"critical": 10 "states": {
}, "full": 90,
"tooltip": false, "warning": 20,
"full-at": 95, "critical": 10
"format-plugged": "{icon} {capacity}%", },
"format-charging": "{icon} {capacity}%", "tooltip": false,
"format": "{icon} {capacity}%", "full-at": 95,
"format-icons": [ "format-plugged": "{icon} {capacity}%",
"", "format-charging": "{icon} {capacity}%",
"", "format": "{icon} {capacity}%",
"", "format-icons": [
"", "",
"", "",
"", "",
"", "",
"", "",
"", "",
"" "",
] "",
}, "",
"clock": { ""
"format": " {:%a %b %d %I:%M %p}", ]
"tooltip": true, },
"tooltip-format": "<big>{:%Y %B \t week: %V }</big>\n<tt>{calendar}</tt>", "wlr/workspaces": {
"min-length": 18 "format": "{icon}",
}, "format-icons": {
"custom/lock": { "active": "",
"tooltip": false, "default": ""
"format": "", },
"interval": "once", "on-scroll-up": "hyprctl dispatch workspace e-1",
"on-click": "swaylock" "on-scroll-down": "hyprctl dispatch workspace e+1",
}, "on-click": "activate"
"network": { },
"interval": 10, "clock": {
"format-wifi": " {essid}", "format": " {:%a %b %d %I:%M %p}",
"format-ethernet": " {ipaddr}", "tooltip": true,
"format-linked": " {ifname}", "tooltip-format": "<big>{:%Y %B \t week: %V }</big>\n<tt>{calendar}</tt>",
"format-disconnected": " Disconnected", "min-length": 18
"tooltip": true, },
"tooltip-format": "IP: {ipaddr}/{cidr}\nGW: {gwaddr}/{cidr}\nNM: {netmask}", "custom/lock": {
"max-length": 20, "tooltip": false,
"min-length": 14 "format": "",
}, "interval": "once",
"custom/audio-device": { "on-click": "swaylock"
"tooltip": false, },
"min-length": 20, "network": {
"interval": 1, "interval": 10,
"format": " {}", "format-wifi": " {essid}",
"exec": "wpctl status | grep -m 1 '*' | cut -d '.' -f2 | cut -d '[' -f1 | xargs" "format-ethernet": " {ipaddr}",
}, "format-linked": " {ifname}",
"custom/pipewire": { "format-disconnected": " Disconnected",
"format": "{icon} {percentage}%", "tooltip": true,
"return-type": "json", "tooltip-format": "IP: {ipaddr}/{cidr}\nGW: {gwaddr}/{cidr}\nNM: {netmask}",
"signal": 8, "max-length": 20,
"interval": "once", "min-length": 14
"format-icons": { },
"mute": "婢", "custom/audio-device": {
"default": [ "tooltip": false,
"奄", "min-length": 20,
"奔", "interval": 1,
"墳" "format": " {}",
] "exec": "wpctl status | grep -m 1 '*' | cut -d '.' -f2 | cut -d '[' -f1 | xargs"
}, },
"on-click": "pw-volume mute toggle; pkill -RTMIN+8 waybar", "custom/pipewire": {
"exec": "pw-volume status" "format": "{icon} {percentage}%",
}, "return-type": "json",
"idle_inhibitor": { "signal": 8,
"tooltip": false, "interval": "once",
"format": "{icon}", "format-icons": {
"format-icons": { "mute": "婢",
"activated": "", "default": [
"deactivated": "" "奄",
} "奔",
}, "墳"
"cpu": { ]
"interval": 4, },
"min-length": 6, "on-click": "pw-volume mute toggle; pkill -RTMIN+8 waybar",
"format": " {usage}%", "exec": "pw-volume status"
"tooltip": false, },
"states": { "idle_inhibitor": {
"critical": 90 "tooltip": false,
} "format": "{icon}",
}, "format-icons": {
"temperature": { "activated": "",
"tooltip": false, "deactivated": ""
"min-length": 6, }
"thermal-zone": 0, },
"critical-threshold": 90, "cpu": {
"format": "{icon} {temperatureC}°C", "interval": 4,
"format-critical": "{icon} {temperatureC}°C", "min-length": 6,
"format-icons": { "format": " {usage}%",
"default": [ "tooltip": false,
"", "states": {
"", "critical": 90
"", }
"", },
"" "temperature": {
] "tooltip": false,
} "min-length": 6,
}, "thermal-zone": 0,
"custom/asusmode": { "critical-threshold": 90,
"interval": 1, "format": "{icon} {temperatureC}°C",
"format": " {}", "format-critical": "{icon} {temperatureC}°C",
"exec": "asusctl profile -p | awk '{print $NF}'" "format-icons": {
}, "default": [
"memory": { "",
"format": " {percentage}%", "",
"tooltip-format": "{used:0.1f}GB/{total:0.1f}GB ", "",
"states": { "",
"critical": 90 ""
}, ]
"min-length": 5 }
}, },
"disk": { "custom/asusmode": {
"path": "/home", "interval": 1,
"interval": 60, "format": " {}",
"tooltip-format": "{used} used out of {total} ({percentage_used}%)", "exec": "asusctl profile -p | awk '{print $NF}'"
"min-length": 5, },
"format": " {percentage_used}%", "memory": {
"states": { "format": " {percentage}%",
"critical": 90 "tooltip-format": "{used:0.1f}GB/{total:0.1f}GB ",
} "states": {
}, "critical": 90
"custom/media": { },
"interval": 1, "min-length": 5
"return-type": "json", },
"exec": "~/.config/waybar/scripts/get-media.bash", "disk": {
"escape": true "path": "/home",
}, "interval": 60,
"wlr/workspaces": { "tooltip-format": "{used} used out of {total} ({percentage_used}%)",
"on-click": "activate" "min-length": 5,
"format": "🖴 {percentage_used}%",
"states": {
"critical": 90
}
},
"custom/media": {
"interval": 1,
"return-type": "json",
"exec": "~/.config/waybar/scripts/get-media.bash",
"escape": true
}
} }
},
{
"layer": "bottom",
"position": "bottom",
"modules-center": [
"wlr/workspaces"
],
"wlr/workspaces": {
"format": "{name}",
"on-click": "activate"
},
"custom/sway-mode": {
"exec": "swaymsg -t get_binding_state | jq '.name' -r",
"format": " {}",
"interval": 1
},
"sway/language": {
"format": " {long}"
}
}
] ]

View File

@ -35,201 +35,157 @@
/* peachRed #FF5D62; */ /* peachRed #FF5D62; */
/* surimiOrange #FFA066; */ /* surimiOrange #FFA066; */
/* Global Styling */
* { * {
min-height: 0; border: none;
padding: 3px; font-family: "Fira Code", monospace;
border-radius: 20px; font-size: 13px;
margin-left: 5px; border-radius: 0px;
margin-right: 5px; margin-top: 0.1rem;
padding-right: 4px; margin-left: 0.25rem;
padding-left: 4px; margin-right: 0.25rem;
padding-top: 1px;
padding-bottom: 1px;
} }
/* Bar Styling */
#waybar { #waybar {
background: transparent; background: transparent;
font-family: JetBrainsMono;
font-size: medium;
color: #dcd7ba;
} }
#custom-media { #cpu,
background: #16161d; #temperature,
border-top: 2px solid #957fb8; #custom-asusmode,
border-left: 2px solid #957fb8; #memory,
border-right: 2px solid #957fb8; #battery,
#disk,
#custom-audio-device,
#custom-pipewire,
#workspaces,
#custom-media,
#custom-weather,
#custom-launcher,
#network,
#clock,
#custom-lock {
background-color: #16161d;
color: #dcd7ba; color: #dcd7ba;
padding: 0.4rem 0.8rem;
border-radius: 20px;
} }
#custom-asusmode { /* Launcher */
background: #16161d; #custom-launcher {
border-top: 2px solid #957fb8; padding-right: 0.3rem;
border-left: 2px solid #957fb8; padding-left: 0.1rem;
color: #dcd7ba; color: #957fb8;
margin-right: 0.25rem;
} }
#custom-audio-device { /* System Status */
background: #16161d; #cpu,
border-top: 2px solid #957fb8; #temperature,
border-left: 2px solid #957fb8; #memory,
color: #dcd7ba; #disk {
color: #7e9cd8;
} }
#custom-sway-mode { #cpu {
background: #16161d; border-top-right-radius: 0;
border-bottom: 2px solid #957fb8; border-bottom-right-radius: 0;
border-left: 2px solid #957fb8; padding-left: 1rem;
color: #dcd7ba; padding-right: 0.2rem;
margin-right: 0rem;
} }
#memory {
border-radius: 0px;
padding-left: 0.1rem;
padding-right: 0.35rem;
margin-left: 0rem;
margin-right: 0rem;
}
#temperature {
border-radius: 0px;
padding-left: 0.35rem;
padding-right: 0.35rem;
margin-left: 0rem;
margin-right: 0rem;
}
#disk {
color: #ff5d62;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
padding-left: 0.35rem;
padding-right: 1rem;
margin-left: 0rem;
}
/* Worksapces */
#workspaces { #workspaces {
background: #16161d; border-radius: 14px;
transition: none; margin-left: 0.25rem;
border-top: 2px solid #957fb8; margin-right: 0.25rem;
border-left: 2px solid #957fb8; }
border-right: 2px solid #957fb8;
padding-right: 20px; #workspaces * {
padding-left: 20px; font-size: 0px;
} }
#workspaces button { #workspaces button {
transition: none; padding: 0px;
margin: 0px; margin: 5px 5px;
color: #957fb8; min-height: 0.75rem;
background: transparent; min-width: 0.75rem;
border-bottom: 2px solid #957fb8; border-radius: 100%;
border-radius: 0px; background-color: #54546d;
padding-right: 25px;
padding-left: 25px;
padding-top: 5px;
padding-bottom: 5px;
} }
#workspaces button.active { #workspaces button.active {
color: #98bb6c; background: radial-gradient(
border-bottom: 2px solid #98bb6c; circle,
border-radius: 0px; #d27e99 0%,
#e46876 10%,
#7fb4ca 20%,
#a3d4d5 30%,
#ff9e3b 40%,
#e6c384 50%,
#98bb6c 60%,
#938aa9 70%,
#9cabca 80%,
#ffa066 90%,
#957fb8 100%
);
background-size: 400% 400%;
animation: gradient_roll 30s ease-in-out infinite;
} }
#workspaces button:hover { #workspaces button:hover {
transition: none; transition: none;
box-shadow: inherit; box-shadow: inherit;
text-shadow: inherit; text-shadow: inherit;
border-top: 0px; background-color: #ff5d62;
border-bottom: 2px solid #a3d4d5;
color: #a3d4d5;
border-right: 0px;
border-left: 0px;
border-radius: 0px;
} }
#idle_inhibitor { /* Asus Fan Mode */
margin-left: 0px; #custom-asusmode {
background: #16161d; margin-right: 0.25rem;
border-top: 2px solid #957fb8; margin-left: 0.25rem;
border-left: 2px solid #957fb8;
color: #dcd7ba;
} }
#network, /*=============*/
#custom-weather, /* Animations */
#clock, /*===========*/
#custom-lock { @keyframes gradient_roll {
background: #16161d; 0% {
border-top: 2px solid #957fb8; background-position: 0% 200%;
border-right: 2px solid #957fb8; }
color: #dcd7ba;
}
#cpu, 50% {
#memory, background-position: 200% 0%;
#custom-pipewire, }
#disk,
#temperature,
#battery {
background: #16161d;
border-top: 2px solid #957fb8;
border-left: 2px solid #957fb8;
color: #dcd7ba;
}
#disk.critical { 100% {
color: #e82424; background-position: 400% 200%;
}
#temperature.critical {
color: #e82424;
}
#cpu.critical {
color: #e82424;
}
#memory.critical {
color: #e82424;
}
@keyframes blink1 {
to {
color: #98bb6c;
} }
} }
#battery.plugged {
background-color: #16161d;
animation-name: blink1;
animation-duration: 2s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes blink2 {
to {
background-color: #e6c384;
}
}
#battery.charging {
animation-name: blink2;
animation-duration: 8s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes blink3 {
to {
background-color: #ff9e3b;
}
}
#battery.warning:not(.charging) {
animation-name: blink3;
animation-duration: 4s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes blink4 {
to {
background-color: #e82424;
}
}
#battery.critical:not(.charging) {
animation-name: blink4;
animation-duration: 4s;
animation-timing-function: ease-in-out;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#language {
border-bottom: 2px solid #957fb8;
border-right: 2px solid #957fb8;
background: #16161d;
color: #dcd7ba;
}