From 9a9c4e4d747deca217ce3b471a957c965a39bb54 Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Mon, 29 Apr 2024 16:53:11 +0200 Subject: [PATCH] waybar styles --- flake.lock | 65 +++++++------------ flake.nix | 4 +- .../hyprland/styles/notifications.css | 3 +- home-manager/hyprland/styles/stats.css | 1 + home-manager/hyprland/styles/style.css | 23 +++++++ home-manager/hyprland/waybar.nix | 8 +-- home-manager/nvim.nix | 2 +- modules/collections/laptop.nix | 1 - modules/graphical/code.nix | 2 +- modules/services/kavita.nix | 8 +-- overlays.nix | 7 -- 11 files changed, 58 insertions(+), 66 deletions(-) diff --git a/flake.lock b/flake.lock index 34f7ad8..aa517f8 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1712079060, - "narHash": "sha256-/JdiT9t+zzjChc5qQiF+jhrVhRt8figYH29rZO7pFe4=", + "lastModified": 1714136352, + "narHash": "sha256-BtWQ2Th/jamO1SlD+2ASSW5Jaf7JhA/JLpQHk0Goqpg=", "owner": "ryantm", "repo": "agenix", - "rev": "1381a759b205dff7a6818733118d02253340fd5e", + "rev": "24a7ea390564ccd5b39b7884f597cfc8d7f6f44e", "type": "github" }, "original": { @@ -121,11 +121,11 @@ ] }, "locked": { - "lastModified": 1713713092, - "narHash": "sha256-rvyr6BBtn3cq5B/48rhJlbIOpxprwlO/71663sd9Gik=", + "lastModified": 1714377222, + "narHash": "sha256-UsDsjWCKlWn8vbXi8Zza9Hkq3xyk8fpvFNo2VM5S74E=", "owner": "nix-community", "repo": "home-manager", - "rev": "2846d5230a3c3923618eabb367deaf8885df580f", + "rev": "2af7c78b7bb9cf18406a193eba13ef9f99388f49", "type": "github" }, "original": { @@ -142,11 +142,11 @@ ] }, "locked": { - "lastModified": 1712386041, - "narHash": "sha256-dA82pOMQNnCJMAsPG7AXG35VmCSMZsJHTFlTHizpKWQ=", + "lastModified": 1714043624, + "narHash": "sha256-Xn2r0Jv95TswvPlvamCC46wwNo8ALjRCMBJbGykdhcM=", "owner": "nix-community", "repo": "home-manager", - "rev": "d6bb9f934f2870e5cbc5b94c79e9db22246141ff", + "rev": "86853e31dc1b62c6eeed11c667e8cdd0285d4411", "type": "github" }, "original": { @@ -177,11 +177,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1713521961, - "narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=", + "lastModified": 1714201532, + "narHash": "sha256-nk0W4rH7xYdDeS7k1SqqNtBaNrcgIBYNmOVc8P2puEY=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2", + "rev": "53db5e1070d07e750030bf65f1b9963df8f0c678", "type": "github" }, "original": { @@ -200,11 +200,11 @@ ] }, "locked": { - "lastModified": 1713528946, - "narHash": "sha256-IBQta+xrEaI2S5UmYrXcgV7Tu7rGLQu2V3TeJseLPSg=", + "lastModified": 1714355896, + "narHash": "sha256-rtv+nJJ12V7w68j8vIcGacfS1yuK1/dBgglSKWzYMTM=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "63c1247e12f269396ed2df8cdec3aed1f0f3928c", + "rev": "acb893461a4bee4e77b1a27b1410d4995b52174c", "type": "github" }, "original": { @@ -229,22 +229,6 @@ "type": "github" } }, - "nixpkgs-kavita-update": { - "locked": { - "lastModified": 1714284556, - "narHash": "sha256-/K0dIK4tsBYa3otMs2HqWXR+u6GNBddBa8rxLZ4OrUU=", - "owner": "nevivurn", - "repo": "nixpkgs", - "rev": "c6ffdd6a964698770fee1c5013cfd083f801d879", - "type": "github" - }, - "original": { - "owner": "nevivurn", - "ref": "feat/kavita-0.8.1", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-lib": { "locked": { "lastModified": 1697935651, @@ -262,11 +246,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1713537308, - "narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=", + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", "type": "github" }, "original": { @@ -277,11 +261,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1713564160, - "narHash": "sha256-YguPZpiejgzLEcO36/SZULjJQ55iWcjAmf3lYiyV1Fo=", + "lastModified": 1714272655, + "narHash": "sha256-3/ghIWCve93ngkx5eNPdHIKJP/pMzSr5Wc4rNKE1wOc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bc194f70731cc5d2b046a6c1b3b15f170f05999c", + "rev": "12430e43bd9b81a6b4e79e64f87c624ade701eaf", "type": "github" }, "original": { @@ -293,11 +277,11 @@ }, "nur": { "locked": { - "lastModified": 1713728331, - "narHash": "sha256-SqG/zCZlhSdfJGS2EooRLr+5me4z2ekQMrqT2YXSuMM=", + "lastModified": 1714395381, + "narHash": "sha256-lOlCnbW7NZrMKptx+Oi6e97ejLRBZzO7jOzuEdyOtbg=", "owner": "nix-community", "repo": "NUR", - "rev": "8f557dfa37b430807d1e4d001930896d23c04cec", + "rev": "4d6ea25b6eccac9c01e255b40d55a13cbda07ede", "type": "github" }, "original": { @@ -315,7 +299,6 @@ "nixos-hardware": "nixos-hardware", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_2", - "nixpkgs-kavita-update": "nixpkgs-kavita-update", "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur" } diff --git a/flake.nix b/flake.nix index 57c30f0..25182ef 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,6 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; - nixpkgs-kavita-update.url = "github:nevivurn/nixpkgs/feat/kavita-0.8.1"; home-manager = { url = "github:nix-community/home-manager/release-23.11"; inputs.nixpkgs.follows = "nixpkgs"; @@ -28,7 +27,6 @@ nixos-hardware, nixos-wsl, nixpkgs-unstable, - nixpkgs-kavita-update, agenix, home-manager, home-manager-unstable, @@ -47,7 +45,7 @@ ./users/anon ./modules/collections/server.nix ./systems/server/configuration.nix - ({ config, outputs, ... }: { nixpkgs.overlays = with outputs.overlays; [additions modifications unstable-packages kavita-update]; }) + ({ config, outputs, ... }: { nixpkgs.overlays = with outputs.overlays; [additions modifications unstable-packages]; }) home-manager-unstable.nixosModules.home-manager agenix.nixosModules.default ]; diff --git a/home-manager/hyprland/styles/notifications.css b/home-manager/hyprland/styles/notifications.css index b09bc5a..9151cb8 100644 --- a/home-manager/hyprland/styles/notifications.css +++ b/home-manager/hyprland/styles/notifications.css @@ -47,8 +47,7 @@ #custom-pipewire.muted, #pulseaudio.muted { - background-color: #90b1b1; - color: #2a5c45; + color: @red; } #keyboard-state { diff --git a/home-manager/hyprland/styles/stats.css b/home-manager/hyprland/styles/stats.css index 1f3e149..d3b4f0c 100644 --- a/home-manager/hyprland/styles/stats.css +++ b/home-manager/hyprland/styles/stats.css @@ -11,6 +11,7 @@ border: 2px solid @surface1; } #battery, +#backlight #cpu, #memory, #temperature, diff --git a/home-manager/hyprland/styles/style.css b/home-manager/hyprland/styles/style.css index f6928ec..b7fdaf7 100644 --- a/home-manager/hyprland/styles/style.css +++ b/home-manager/hyprland/styles/style.css @@ -61,6 +61,29 @@ box { #mpd { padding: 0 1em; } +/* Add spacing for right side modules */ +#pulseaudio, +#battery, +#backlight { + padding: 0 0.5em; +} + +#battery.charging, +#battery.plugged, +#battery.full +{ + color: @green; +} + +#battery.critical:not(.charging) { + background-color: #f38ba8; + color:#bf5673; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} #clock { font-size: 16px; diff --git a/home-manager/hyprland/waybar.nix b/home-manager/hyprland/waybar.nix index a369586..8591abe 100644 --- a/home-manager/hyprland/waybar.nix +++ b/home-manager/hyprland/waybar.nix @@ -73,17 +73,17 @@ in "pulseaudio" = { "format" = "{volume}% {icon}"; "format-bluetooth" = "{volume}% {icon}"; - "format-muted" = ""; + "format-muted" = "🚫"; "format-icons" = { - "headphone" = ""; + "headphone" = ""; "hands-free" = ""; "headset" = ""; "phone" = ""; "portable" = ""; "car" = ""; "default" = [ - "" - "" + "" + "" ]; }; "scroll-step" = 1; diff --git a/home-manager/nvim.nix b/home-manager/nvim.nix index d0c4af4..e64606f 100644 --- a/home-manager/nvim.nix +++ b/home-manager/nvim.nix @@ -17,7 +17,7 @@ nodePackages.pyright nodePackages.eslint ccls - nodejs_21 + nodejs_22 go ]; }; diff --git a/modules/collections/laptop.nix b/modules/collections/laptop.nix index d7ca06f..fa330a1 100644 --- a/modules/collections/laptop.nix +++ b/modules/collections/laptop.nix @@ -1,7 +1,6 @@ {pkgs, config, ...}: { imports = [ - ../graphical/hyprland.nix # TODO ../kernel.nix # use latest kernel ../docker.nix ]; diff --git a/modules/graphical/code.nix b/modules/graphical/code.nix index 383a0b6..5ace6d3 100644 --- a/modules/graphical/code.nix +++ b/modules/graphical/code.nix @@ -16,7 +16,7 @@ in jetbrains.idea-ultimate jetbrains.clion insomnia - nodejs_21 # needed for tabby extension + nodejs_22 # needed for tabby extension ]; #environment.sessionVariables = { diff --git a/modules/services/kavita.nix b/modules/services/kavita.nix index 079f014..0c95fa9 100644 --- a/modules/services/kavita.nix +++ b/modules/services/kavita.nix @@ -32,14 +32,10 @@ in lib.mkIf cfg.enable { enable = true; user = "kavita"; package = let - kavitaPkgs = (import inputs.nixpkgs-kavita-update { - inherit (config.nixpkgs) config; - inherit (pkgs.stdenv.hostPlatform) system; - }); - backend = kavitaPkgs.kavita.backend.overrideAttrs (old: { + backend = pkgs.kavita.backend.overrideAttrs (old: { patches = old.patches ++ [./kavita-patches.diff ]; }); - kavitaPatched = kavitaPkgs.kavita.overrideAttrs (old: { + kavitaPatched = pkgs.kavita.overrideAttrs (old: { backend = backend; }); in kavitaPatched; diff --git a/overlays.nix b/overlays.nix index c34e9e5..99f666c 100644 --- a/overlays.nix +++ b/overlays.nix @@ -20,11 +20,4 @@ config.allowUnfree = true; }; }; - - kavita-update = final: _prev: { - kavita-update = import inputs.nixpkgs-kavita-update { - system = final.system; - config.allowUnfree = true; - }; - }; }