about summary refs log tree commit diff
path: root/users/fcuny
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-02-18 09:27:30 -0800
committerFranck Cuny <franck@fcuny.net>2022-02-18 09:27:30 -0800
commit80aea4f709e2030a79ee2b1b7ea3e63b43ec78b3 (patch)
treecc13f3f951e526f875fe1219604d3bfeea0b1284 /users/fcuny
parentsway: add default font (diff)
downloadworld-80aea4f709e2030a79ee2b1b7ea3e63b43ec78b3.tar.gz
waybar: first round of customizations
Diffstat (limited to '')
-rw-r--r--users/fcuny/desktop/sway/waybar.nix116
1 files changed, 94 insertions, 22 deletions
diff --git a/users/fcuny/desktop/sway/waybar.nix b/users/fcuny/desktop/sway/waybar.nix
index 13ee9eb..1e3035f 100644
--- a/users/fcuny/desktop/sway/waybar.nix
+++ b/users/fcuny/desktop/sway/waybar.nix
@@ -4,26 +4,98 @@
   programs.waybar = {
     enable = true;
     systemd.enable = true;
-       settings = [{
-          layer = "top";
-          position = "top";
-          height = 24;
-          modules-left = ["sway/workspaces" "sway/mode"];
-          modules-center = ["sway/window"];
-          modules-right = [ "network" "pulseaudio" "clock" ];
-          modules = {
-            "network" = {
-              format-wifi = "{essid} ({signalStrength}%)";
-              format-ethernet = "{ifname}: {ipaddr}/{cidr}";
-              format-disconnected = "Disconnected";
-            };
-            "pulseaudio" = {
-              format = "{icon} {volume}%";
-            };
-            "clock" = {
-              format = "{:%a %d %b %H:%M}";
-            };
-          };
-        }];
-};
+    settings = [{
+      layer = "top";
+      position = "top";
+      height = 20;
+      modules-left = ["sway/workspaces" "sway/mode"];
+      modules-center = ["sway/window"];
+      modules-right = [ "network" "pulseaudio" "clock" ];
+      modules = {
+        "network" = {
+          format-wifi = "{essid} ({signalStrength}%)";
+          format-ethernet = "{ifname}: {ipaddr}";
+          format-disconnected = "Disconnected";
+        };
+        "pulseaudio" = {
+          format = "{volume}%";
+        };
+        "clock" = {
+          format = "{:%a %d %b %H:%M}";
+        };
+      };
+    }];
+
+    style = ''
+    * {
+      border: none;
+      border-radius: 0;
+      min-height: 0;
+      margin: 0;
+      padding: 0;
+    }
+
+    #waybar {
+      background: #000000;
+      color: white;
+      font-family: Source Code Pro;
+      font-size: 12px;
+    }
+
+    #clock,
+    #mode,
+    #network,
+    #pulseaudio {
+      padding-left: 10px;
+      padding-right: 10px;
+    }
+
+    #clock {
+      font-weight: bold;
+    }
+
+    #mode {
+      background: #64727D;
+      border-top: 2px solid white;
+      padding-bottom: 2px;
+    }
+
+    #network {
+    }
+
+    #network.disconnected {
+      color: orange;
+    }
+
+    #pulseaudio {
+    }
+
+    #pulseaudio.muted {
+    }
+
+    #window {
+      font-weight: bold;
+    }
+
+    #workspaces button {
+      border-top: 2px solid transparent;
+      /* To compensate for the top border and still have vertical centering */
+      padding-bottom: 2px;
+      padding-left: 10px;
+      padding-right: 10px;
+      color: #888888;
+    }
+
+    #workspaces button.focused {
+      border-color: #4c7899;
+      color: white;
+      background-color: #285577;
+    }
+
+    #workspaces button.urgent {
+      border-color: #c9545d;
+      color: #c9545d;
+    }
+    '';
+  };
 }