Add waybar

Note that I also added support for pywal color schemes.
This commit is contained in:
Donovan Glover 2021-06-21 18:10:23 -04:00
parent f4627139a6
commit e1487a5c9c
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
3 changed files with 110 additions and 0 deletions

View File

@ -0,0 +1,46 @@
{
"height": 30,
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["sway/window"],
"modules-right": ["pulseaudio", "network", "backlight", "battery", "clock", "tray"],
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"tray": {
"spacing": 10
},
"clock": {
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format-alt": "{:%Y-%m-%d}"
},
"backlight": {
"format": "{icon} {percent}%",
"format-icons": ["", ""]
},
"battery": {
"states": {
"warning": 20,
"critical": 10
},
"format": "{icon} {capacity}%",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""]
},
"network": {
"format-wifi": " {essid} ({signalStrength}%)",
"format-ethernet": " {ifname}: {ipaddr}/{cidr}",
"format-linked": " {ifname} (No IP)",
"format-disconnected": "⚠ Disconnected",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
"format": "{icon} {volume}%",
"format-icons": {
"default": ["", "", ""]
},
"on-click": "pavucontrol"
}
}
// vim:syn=json

View File

@ -0,0 +1,48 @@
@import url("../../.cache/wal/colors-waybar.css");
* {
font-family: "Noto Sans CJK JP";
}
window#waybar {
background: rgba(43, 48, 59, 0.9);
background: @background;
border-bottom: 1px solid rgba(100, 114, 125, 0.3);
color: @foreground;
}
#workspaces button {
padding: 0 5px;
background: transparent;
color: white;
}
#workspaces button.focused {
background: #64727D;
background: @color8;
}
#mode, #pulseaudio, #network, #backlight, #clock, #battery {
padding: 0 5px;
margin: 0 5px;
}
#mode {
background: #64727D;
border-bottom: 3px solid white;
}
#battery.charging {
color: #26A65B;
color: @color2;
}
#battery.warning:not(.charging) {
background: #f53c3c;
background: @color8;
}
#battery.critical:not(.charging) {
background: #f53c3c;
color: white;
}

16
waybar/README.md Normal file
View File

@ -0,0 +1,16 @@
# waybar
[waybar][waybar] is a Wayland bar for [sway][sway].
## Use Cases
waybar can be used to:
- Have a nicer looking bar than the default
You should not use waybar if:
- You aren't using Wayland
[waybar]: https://github.com/Alexays/Waybar
[sway]: https://github.com/swaywm/sway