about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2023-08-30 21:57:49 +0200
committerBaitinq <manuelpalenzuelamerino@gmail.com>2023-08-30 22:50:46 +0200
commit4107a926667bc7c99bfde6bf6c6d5f7db3eded57 (patch)
tree15d4ae0c32400a4b49aa5c3d2269ead13771a167
parentHosts: Prepare for eventual transition from sxhkd to swhkd (diff)
downloadnixos-config-4107a926667bc7c99bfde6bf6c6d5f7db3eded57.tar.gz
nixos-config-4107a926667bc7c99bfde6bf6c6d5f7db3eded57.tar.bz2
nixos-config-4107a926667bc7c99bfde6bf6c6d5f7db3eded57.zip
Waybar: Style occupied workspaces differently
-rw-r--r--dotfiles/waybar/style.css39
1 files changed, 24 insertions, 15 deletions
diff --git a/dotfiles/waybar/style.css b/dotfiles/waybar/style.css
index 01fded6..2e78598 100644
--- a/dotfiles/waybar/style.css
+++ b/dotfiles/waybar/style.css
@@ -5,7 +5,8 @@
 	border-radius: 0;
 }
 
-window#waybar {
+#window,
+#waybar {
 	background: #222222;
 	color: #bbbbbb;
 }
@@ -24,35 +25,43 @@ window#waybar {
 	margin: 0 0;
 }
 
+/* This is for occupied (but not focused) workspaces */
 #workspaces button {
+	border: none;
+	border-radius: 0;
 	padding: 0 7px;
 	margin: 0;
 	color: #bbbbbb;
+	/* 4px is the white line height */
+	background: linear-gradient(transparent 0%, transparent calc(100% - 4px), white calc(100% - 4px), white 100%);
+	/* 57% is the white line width */
+	background-size: 57% 100%, 100% 100%;
+	background-repeat: no-repeat;
+	background-position: center bottom;
 }
 
-#workspaces button.occupied {
-	border-top: 4px solid #bbbbbb;
-	margin: 0;
-	padding: 0 7px;
-}
-
-#workspaces button.focused, #workspaces button.focused:hover {
-	border-top: 0;
+#workspaces button.focused {
+	border: none;
+	border-radius: 0;
 	margin: 0;
 	padding: 0 7px;
 	color: #222222;
 	background: #bbbbbb;
+	border-bottom: 0px;
 }
 
-#workspaces button:hover {
-	background: inherit;
-	color: inherit;
+button:hover {
 	box-shadow: inherit;
 	text-shadow: inherit;
+	background: inherit;
 }
 
-#battery.critical:not(.charging) {
-    background-color: darkred;
-    color: #ffffff;
+#workspaces button.persistent {
+	border: 0;
+	background: #222222;
 }
 
+#battery.critical:not(.charging) {
+	background-color: darkred;
+	color: #ffffff;
+}