about summary refs log tree commit diff
path: root/home/modules
diff options
context:
space:
mode:
authorsefidel <contact@sefidel.net>2022-01-10 00:10:38 +0900
committersefidel <contact@sefidel.net>2022-01-10 00:29:59 +0900
commit6bb2a7673480b17638a69e5c99f7fd21c7767c7d (patch)
tree6b57e5eb6f2781653dec61031197702fcd2db680 /home/modules
parent55ade20fc966a4774762dbf9f6a0fdfb58d2155d (diff)
downloadnixrc-6bb2a7673480b17638a69e5c99f7fd21c7767c7d.tar.gz
nixrc-6bb2a7673480b17638a69e5c99f7fd21c7767c7d.zip
home/base: better bar design
Diffstat (limited to 'home/modules')
-rw-r--r--home/modules/profiles/base/config/waybar-settings.nix20
-rw-r--r--home/modules/profiles/base/config/waybar-style.nix38
-rw-r--r--home/modules/profiles/base/default.nix2
3 files changed, 42 insertions, 18 deletions
diff --git a/home/modules/profiles/base/config/waybar-settings.nix b/home/modules/profiles/base/config/waybar-settings.nix
index 2917e00..12fe8c8 100644
--- a/home/modules/profiles/base/config/waybar-settings.nix
+++ b/home/modules/profiles/base/config/waybar-settings.nix
@@ -1,15 +1,17 @@
+{ neotheme }:
+
+with neotheme.colors;
 {
   layer = "bottom";
   position = "top";
   height = 21;
-  modules-left = [ "pulseaudio" "cpu" "memory" ];
+  modules-left = [ "pulseaudio" "custom/seperator" "cpu" "custom/seperator" "memory" ];
   modules-center = [ "sway/workspaces" ];
   modules-right = [ "clock" ];
 
   modules = {
     "sway/workspaces" = {
       all-outputs = true;
-
       persistent_workspaces = {
         "α" = [ ];
         "β" = [ ];
@@ -26,23 +28,29 @@
 
     "clock" = {
       interval = 10;
-      format = "{:  %a %d %H:%M}";
+      format = "<span foreground='#${color5}'></span> {:%A, %b %d %H:%M}";
     };
 
     "cpu" = {
       interval = 5;
-      format = " {usage:3}%";
+      format = "<span foreground='#${color2}'></span> {usage:3}%";
     };
 
     "pulseaudio" = {
-      format = "{icon} {volume}%";
+      format = "<span foreground='#${color4}'>{icon}</span> {volume}%";
       format-muted = "ﱝ  Muted";
       format-icons.default = [ " " " " " " ];
     };
 
     "memory" = {
       interval = 5;
-      format = " {used:0.2f}GiB";
+      format = "<span foreground='#${color3}'>﬙</span> {used:0.2f}GiB";
+    };
+
+    "custom/seperator" = {
+      format = "|";
+      interval =  "once";
+      tooltip = false;
     };
   };
 }
diff --git a/home/modules/profiles/base/config/waybar-style.nix b/home/modules/profiles/base/config/waybar-style.nix
index 11c0d7d..e3f30f6 100644
--- a/home/modules/profiles/base/config/waybar-style.nix
+++ b/home/modules/profiles/base/config/waybar-style.nix
@@ -14,22 +14,32 @@ with neotheme.colors;
   window#waybar {
     background: #${background};
     color: #${foreground};
-    padding: 10px;
+    border-bottom: 1px solid #${bright0};
   }
 
   #workspaces button {
     padding: 0 8px;
-    background: #${color4};
-    color: #${background};
-    border-bottom: 3px solid rgba (255, 255, 255, .2);
+    background: #${background};
+    color: #${foreground};
+    border-bottom: 1px solid #${bright0};
   }
 
   #workspaces button.focused {
-    background-color: #${color4};
-    border-bottom: 3px solid #${background};
+    color: #${foreground};
+    background-color: #${bright0};
+  }
+
+  #workspaces button.urgent {
+    color: #${color1};
+  }
+
+  #workspaces button.persistent {
+    color: #${alt1};
   }
 
   #workspaces button:hover {
+    color: #${foreground};
+    background: #${alt1};
     box-shadow: inherit;
     text-shadow: inherit;
   }
@@ -45,11 +55,11 @@ with neotheme.colors;
   #tray,
   #mode,
   #mpd {
-    padding: 0 10px;
-    margin: 0 4px;
-    color: #${background};
-    background-color: #${color4};
-    border-bottom: 3px solid rgba (255, 255, 255, .2);
+    padding: 0.2rem 0.6rem;
+    margin: 0 2px;
+    color: #${foreground};
+    background-color: #${background};
+    border-bottom: 1px solid #${bright0};
   }
 
   @keyframes blink {
@@ -58,4 +68,10 @@ with neotheme.colors;
       color: #${background};
     }
   }
+
+  #custom-seperator {
+    color: #${bright0};
+    background-color: #${background};
+    border-bottom: 1px solid #${bright0};
+  }
 ''
diff --git a/home/modules/profiles/base/default.nix b/home/modules/profiles/base/default.nix
index cab1481..3d75618 100644
--- a/home/modules/profiles/base/default.nix
+++ b/home/modules/profiles/base/default.nix
@@ -106,7 +106,7 @@ in
       waybar = {
         enable = config.wayland.windowManager.sway.enable;
 
-        settings = [ (import ./config/waybar-settings.nix) ];
+        settings = [ (import ./config/waybar-settings.nix { inherit neotheme; }) ];
 
         style = import ./config/waybar-style.nix { inherit neotheme; };
       };