summary refs log tree commit diff stats
path: root/hm/waybar
diff options
context:
space:
mode:
authorSilas Schöffel <sils@sils.li>2024-04-04 17:06:23 +0200
committerSilas Schöffel <sils@sils.li>2024-04-04 17:06:23 +0200
commit924ec30e7075ea7a9dbac569a537d876f9146850 (patch)
tree11ff56048f05536a1905490137333b3596d0ee18 /hm/waybar
parentusers/default.nix: delete (diff)
downloadnix-config-924ec30e7075ea7a9dbac569a537d876f9146850.tar.gz
nix-config-924ec30e7075ea7a9dbac569a537d876f9146850.zip
refactor: move users/sils dir to hm
Diffstat (limited to 'hm/waybar')
-rw-r--r--hm/waybar/default.nix93
-rw-r--r--hm/waybar/style.css139
2 files changed, 232 insertions, 0 deletions
diff --git a/hm/waybar/default.nix b/hm/waybar/default.nix
new file mode 100644
index 0000000..18b659c
--- /dev/null
+++ b/hm/waybar/default.nix
@@ -0,0 +1,93 @@
+{pkgs, ...}: {
+  programs.waybar = {
+    enable = true;
+    settings = {
+      mainBar = {
+        layer = "top";
+        position = "top";
+        modules-left = ["hyprland/workspaces" "clock"];
+        modules-center = ["hyprland/window"];
+        modules-right = ["pulseaudio" "network" "backlight" "battery" "tray"];
+
+        "hyprland/workspaces" = {
+          disable-scroll = false;
+          sort-by-name = true;
+          format = "{name}";
+          #format-icons = {default = "";};
+          on-sroll-up = "hyprctl dispatch workspace e+1";
+          on-scroll-down = "hyprctl dispatch workspace e-1";
+          on-click = "activate";
+        };
+
+        "hyprland/window" = {
+          max-length = 200;
+          separate-outputs = true;
+        };
+
+        pulseaudio = {
+          format = " {icon} ";
+          format-muted = "ﱝ";
+          format-icons = ["奄" "奔" "墳"];
+          tooltip = true;
+          tooltip-format = "{volume}%";
+        };
+
+        network = {
+          format-wifi = " ";
+          format-disconnected = "睊";
+          format-ethernet = " ";
+          tooltip = true;
+          tooltip-format = "{signalStrength}%";
+        };
+
+        backlight = {
+          device = "intel_backlight";
+          format = "{icon}";
+          format-icons = ["" "" "" "" "" "" "" "" ""];
+          tooltip = true;
+          tooltip-format = "{percent}%";
+        };
+
+        battery = {
+          states = {
+            warning = 30;
+            critical = 15;
+          };
+          format = "{capacity}% {icon}";
+          format-charging = "";
+          format-plugged = "";
+          format-icons = ["" "" "" "" "" "" "" "" "" "" "" ""];
+          tooltip = true;
+          tooltip-format = "{capacity}%";
+        };
+
+        # "custom/power" = {
+        #   tooltip = false;
+        #   on-click = "powermenu";
+        #   format = "襤";
+        # };
+
+        clock = {
+          tooltip-format = ''
+            <big>{:%Y %B}</big>
+            <tt><small>{calendar}</small></tt>'';
+          format-alt = ''
+            {:%d %m %Y}'';
+          format = ''
+            {:%H %M}'';
+        };
+
+        tray = {
+          icon-size = 21;
+          spacing = 10;
+        };
+      };
+    };
+
+    #style = ./style.css;
+    systemd = {
+      enable = true;
+      target = "hyprland-session.target";
+    };
+  };
+}
diff --git a/hm/waybar/style.css b/hm/waybar/style.css
new file mode 100644
index 0000000..6565986
--- /dev/null
+++ b/hm/waybar/style.css
@@ -0,0 +1,139 @@
+/*
+*
+* Catppuccin Mocha palette
+* Maintainer: rubyowo
+*
+*/
+
+@define-color base   #1e1e2e;
+@define-color mantle #181825;
+@define-color crust  #11111b;
+
+@define-color text     #e8ead7;
+@define-color subtext0 #a6adc8;
+@define-color subtext1 #bac2de;
+
+@define-color surface0 #e8ead7;
+@define-color surface1 #e6e8da;
+@define-color surface2 #e5e5e3;
+
+@define-color overlay0 #6c7086;
+@define-color overlay1 #7f849c;
+@define-color overlay2 #9399b2;
+
+@define-color blue      #0765fc;
+@define-color lavender  #b4befe;
+@define-color sapphire  #74c7ec;
+@define-color sky       #89dceb;
+@define-color teal      #94e2d5;
+@define-color green     #2c8c1d;
+@define-color yellow    #cccc1c;
+@define-color peach     #fab387;
+@define-color maroon    #eba0ac;
+@define-color red       #d85252;
+@define-color mauve     #cba6f7;
+@define-color pink      #f909b9;
+@define-color flamingo  #ef7070;
+@define-color rosewater #f5e0dc;
+
+* {
+  font-family: FantasqueSansMono Nerd Font;
+  font-size: 15px;
+  min-height: 0;
+}
+
+window#waybar {
+	background-color: @surface0;
+}
+
+#workspaces {
+  border-radius: 1rem;
+  margin-top: 1rem;
+  margin: 2px 3px 0px 2px;
+  font-size: 7px;
+}
+
+#workspaces button {
+  color: @green;
+  border-radius: 1rem;
+  padding-left: 6px;
+  margin: 5px 0;
+  box-shadow: inset 0 -3px transparent;
+  transition: all 0.5s cubic-bezier(.55,-0.68,.48,1.68);
+}
+
+#workspaces button.active {
+  color: @red;
+  border-radius: 1rem;
+}
+
+#workspaces button:hover {
+  color: @rosewater;
+  border-radius: 1rem;
+}
+
+#tray,
+#network,
+#backlight,
+#clock,
+#battery,
+#pulseaudio,
+#custom-lock,
+#custom-power {
+  background-color: transparent;
+  margin: 5px 0px 0px 0px;
+  padding: 2px 10px 2px 10px;
+  border-radius: 1rem;
+}
+
+#clock {
+  color: @lavender;
+}
+
+#battery {
+  color: @green;
+	/*margin: 15px 0px 0px 10px;*/
+}
+
+#battery.charging {
+  color: @green;
+}
+
+#battery.warning:not(.charging) {
+  color: @red;
+}
+
+#network {
+    color: @flamingo;
+}
+
+#backlight {
+  color: @yellow;
+}
+
+#pulseaudio {
+  color: @pink;
+}
+
+#pulseaudio.muted {
+    color: @red;
+}
+
+#custom-power {
+    border-radius: 1rem;
+    color: @red;
+    margin-bottom: 1rem;
+}
+
+#tray {
+  border-radius: 1rem;
+}
+
+tooltip {
+    background: @base;
+    border: 1px solid @pink;
+}
+
+tooltip label {
+    color: @text;
+}