From bae5466ef08e4d60750c1941541e48e69aeb0c4f Mon Sep 17 00:00:00 2001 From: Sad Beast Date: Thu, 24 Oct 2019 19:25:05 -0600 Subject: first pass at sway and waybar --- .config/waybar/config | 39 ++++++++++++++++++++++++++++ .config/waybar/style.css | 66 ++++++++++++++++++++++++++++++++++++++++++++++++ .config/waybar/waybar.sh | 10 ++++++++ 3 files changed, 115 insertions(+) create mode 100644 .config/waybar/config create mode 100644 .config/waybar/style.css create mode 100755 .config/waybar/waybar.sh (limited to '.config/waybar') diff --git a/.config/waybar/config b/.config/waybar/config new file mode 100644 index 0000000..15a4b26 --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1,39 @@ +{ + "layer": "bottom", + "position": "top", + "height": 25, + + "modules-left": ["sway/workspaces", "sway/mode"], + "modules-center": ["sway/window"], + "modules-right": ["tray", "battery", "clock"], + "sway/workspaces": { + "format": "{name}", + "disable-scroll": true + }, + "sway/mode": { + "format": " {}" + }, + "sway/window": { + "max-length": 80, + "tooltip": false + }, + "clock": { + "format": "{:%a %d %H:%M}", + "tooltip": false + }, + "battery": { + "format": "{capacity}% {icon}", + "format-alt": "{time} {icon}", + "format-icons": ["", "", "", "", ""], + "format-charging": "{capacity}% ", + "interval": 30, + "states": { + "warning": 25, + "critical": 10 + }, + "tooltip": false + }, + "tray": { + "icon-size": 18 + } +} diff --git a/.config/waybar/style.css b/.config/waybar/style.css new file mode 100644 index 0000000..c4bdcb6 --- /dev/null +++ b/.config/waybar/style.css @@ -0,0 +1,66 @@ +* { + border: none; + border-radius: 0; + font-family: Iosevka; + font-size: 13px; + min-height: 0; +} + +window#waybar { + background: rgba(43, 48, 59, 0.5); + border-bottom: 3px solid rgba(100, 114, 125, 0.5); + color: white; +} + +#workspaces button { + padding: 0 5px; + background: transparent; + color: white; + border-bottom: 3px solid transparent; +} + +#workspaces button.focused { + background: #64727D; + border-bottom: 3px solid white; +} + +#mode, #clock, #battery { + padding: 0 10px; + margin: 0 5px; +} + +#mode { + background: #64727D; + border-bottom: 3px solid white; +} + +#clock { + background-color: #64727D; +} + +#battery { + background-color: #ffffff; + color: black; +} + +#battery.charging { + color: white; + background-color: #26A65B; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: black; + } +} + +#battery.warning:not(.charging) { + background: #f53c3c; + color: white; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} diff --git a/.config/waybar/waybar.sh b/.config/waybar/waybar.sh new file mode 100755 index 0000000..720620c --- /dev/null +++ b/.config/waybar/waybar.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +# Terminate already running bar instances +killall -q waybar + +# Wait until the processes have been shut down +while pgrep -x waybar >/dev/null; do sleep 1; done + +# Launch main +waybar -- cgit v1.2.3