From a28f6f6ba7941f4ab959e184e8b53e4dcabb20c8 Mon Sep 17 00:00:00 2001 From: notohh Date: Sat, 10 Jun 2023 21:06:19 -0400 Subject: [PATCH] wayland: init river --- home/wayland/river/waybar/default.nix | 62 ++++++++++++++++++++++++ home/wayland/river/waybar/style.scss | 69 +++++++++++++++++++++++++++ 2 files changed, 131 insertions(+) create mode 100644 home/wayland/river/waybar/default.nix create mode 100644 home/wayland/river/waybar/style.scss diff --git a/home/wayland/river/waybar/default.nix b/home/wayland/river/waybar/default.nix new file mode 100644 index 0000000..013a415 --- /dev/null +++ b/home/wayland/river/waybar/default.nix @@ -0,0 +1,62 @@ +{ + pkgs, + lib, + ... +}: let + compileSCSS = name: source: "${pkgs.runCommandLocal name {} '' + mkdir -p $out + ${lib.getExe pkgs.sassc} -t expanded '${source}' > $out/${name}.css + ''}/${name}.css"; +in { + programs.waybar = { + enable = true; + systemd.enable = true; + settings = { + bar = { + layer = "top"; + position = "top"; + height = 30; + modules-left = ["river/tags"]; + modules-center = ["river/window"]; + modules-right = ["cpu" "memory" "clock" "battery" "tray"]; + }; + "river/tags" = { + num-tags = 5; + }; + "river/window" = { + format = "{}"; + }; + "cpu" = { + interval = 10; + format = "{}%"; + max-length = 10; + }; + "memory" = { + interval = 10; + format = "{}%"; + max-length = 10; + }; + "battery" = { + format = "{capacity}% {icon}"; + format-icons = [ + "" + "" + "" + "" + "" + ]; + interval = 60; + }; + "clock" = { + interval = 60; + format = "{:%H:%M}"; + max-length = 25; + }; + "tray" = { + icon-size = 21; + spacing = 5; + }; + }; + style = builtins.readFile (compileSCSS "style" ./style.scss); + }; +} diff --git a/home/wayland/river/waybar/style.scss b/home/wayland/river/waybar/style.scss new file mode 100644 index 0000000..bc530ab --- /dev/null +++ b/home/wayland/river/waybar/style.scss @@ -0,0 +1,69 @@ + +$rosewater: #f5e0dc; +$flamingo: #f2cdcd; +$pink: #f5c2e7; +$mauve: #cba6f7; +$red: #f38ba8; +$maroon: #eba0ac; +$peach: #fab387; +$yellow: #f9e2af; +$green: #a6e3a1; +$teal: #94e2d5; +$sky: #89dceb; +$sapphire: #74c7ec; +$blue: #89b4fa; +$lavender: #b4befe; + +$text: #cdd6f4; +$subtext1: #bac2de; +$subtext0: #a6adc8; +$overlay2: #9399b2; +$overlay1: #7f849c; +$overlay0: #6c7086; + +$surface2: #585b70; +$surface1: #45475a; +$surface0: #313244; + +$base: #1e1e2e; +$mantle: #181825; +$crust: #11111b; + +@mixin module-spacing { + padding: 0 0.5rem 0 0.5rem; +} + +* { + all: unset; + font-family: JetBrainsMono Nerd Font; + font-size: 10px; + color: $text; +} + +window#waybar { + background-color: $base; +} + +#tags { + button { + padding: 0.5rem; + focused { + color: $overlay2; + } + urgent { + color: $red; + } + } +} + +#window { + +} + +#cpu, +#memory, +#clock, +#battery, +#tray { + @include module-spacing; +} \ No newline at end of file