diff --git a/flake.lock b/flake.lock index c2e61ce..526f82f 100644 --- a/flake.lock +++ b/flake.lock @@ -790,11 +790,11 @@ "xwayland-satellite-unstable": "xwayland-satellite-unstable" }, "locked": { - "lastModified": 1738918638, - "narHash": "sha256-lQ02wFQ4GYXMXcq8V4pfZUbXMzA9nJjtXlwUgA+RiQA=", + "lastModified": 1739042449, + "narHash": "sha256-9zLFUpEebwhjCgtznsI61gTzefI3+fuXATHUOFzJi5w=", "owner": "sodiboo", "repo": "niri-flake", - "rev": "1df0adf742570d4f09233a63e58998261cef8ee5", + "rev": "98e3666a9dc4143cbf93d957a15d749b5acef046", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 31c09b8..5dc46e8 100644 --- a/flake.nix +++ b/flake.nix @@ -117,6 +117,8 @@ } ); + pkgs-stable = inputs.nixpkgs-stable.legacyPackages.x86_64-linux; + nixosModules = genAttrs (map nameOf (listFilesRecursive ./modules/system)) ( name: import ./modules/system/${name}.nix ); diff --git a/homes/emenel/dotfiles/dot_config/eww/eww.scss b/homes/emenel/dotfiles/dot_config/eww/eww.scss index e69de29..f2e9f59 100644 --- a/homes/emenel/dotfiles/dot_config/eww/eww.scss +++ b/homes/emenel/dotfiles/dot_config/eww/eww.scss @@ -0,0 +1,42 @@ +* { + all: unset; // Unsets everything so you can style everything from scratch +} + +// Global Styles +.bar { + background-color: rgba(0,0,0,0); + color: #b0b4bc; + padding: 10px; +} + +// Styles on classes (see eww.yuck for more information) + +.sidestuff slider { + all: unset; + color: #ffd5cd; +} + +.metric scale trough highlight { + all: unset; + background-color: #D35D6E; + color: #000000; + border-radius: 10px; +} + +.metric scale trough { + all: unset; + background-color: #4e4e4e; + border-radius: 50px; + min-height: 3px; + min-width: 50px; + margin-left: 10px; + margin-right: 20px; +} + +.label-ram { + font-size: large; +} + +.workspaces button:hover { + color: #D35D6E; +} diff --git a/homes/emenel/dotfiles/dot_config/eww/eww.yuck b/homes/emenel/dotfiles/dot_config/eww/eww.yuck index d461476..7057f7e 100644 --- a/homes/emenel/dotfiles/dot_config/eww/eww.yuck +++ b/homes/emenel/dotfiles/dot_config/eww/eww.yuck @@ -1,12 +1,73 @@ -(defwindow mainbar - :monitor 0 - :geometry (geometry :x "0%" - :y "20px" - :width "90%" - :height "30px" - :anchor "top center") - :stacking "fg" - :reserve (struts :distance "40px" :side "top") - :windowtype "dock" - :wm-ignore false - ) +(defwidget bar [] + (centerbox :orientation "h" + (workspaces) + (music) + (sidestuff))) + +(defwidget sidestuff [] + (box :class "sidestuff" :orientation "h" :space-evenly false :halign "end" + (metric :label "🔊" + :value volume + :onchange "amixer -D pulse sset Master {}%") + (metric :label "" + :value {EWW_RAM.used_mem_perc} + :onchange "") + (metric :label "💾" + :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)} + :onchange "") + time)) + +(defwidget workspaces [] + (box :class "workspaces" + :orientation "h" + :space-evenly true + :halign "start" + :spacing 10 + (button :onclick "wmctrl -s 0" 1) + (button :onclick "wmctrl -s 1" 2) + (button :onclick "wmctrl -s 2" 3) + (button :onclick "wmctrl -s 3" 4) + (button :onclick "wmctrl -s 4" 5) + (button :onclick "wmctrl -s 5" 6) + (button :onclick "wmctrl -s 6" 7) + (button :onclick "wmctrl -s 7" 8) + (button :onclick "wmctrl -s 8" 9))) + +(defwidget music [] + (box :class "music" + :orientation "h" + :space-evenly false + :halign "center" + {music != "" ? "🎵${music}" : ""})) + + +(defwidget metric [label value onchange] + (box :orientation "h" + :class "metric" + :space-evenly false + (box :class "label" label) + (scale :min 0 + :max 101 + :active {onchange != ""} + :value value + :onchange onchange))) + +(deflisten music :initial "" + "playerctl --follow metadata --format '{{ artist }} - {{ title }}' || true") + +(defpoll volume :interval "1s" + "scripts/getvol") + +(defpoll time :interval "10s" + "date '+%H:%M %b %d, %Y'") + +(defwindow bar + :monitor 0 + :windowtype "dock" + :geometry (geometry :x "0%" + :y "0%" + :width "90%" + :height "10px" + :anchor "top center") + :reserve (struts :side "top" :distance "4%") + (bar)) diff --git a/modules/home/music.nix b/modules/home/music.nix index 853d97e..bf4b6fd 100644 --- a/modules/home/music.nix +++ b/modules/home/music.nix @@ -1,4 +1,4 @@ -{ nix-config, lib, pkgs, ... }: +{ nix-config, inputs, lib, pkgs, ... }: { home.packages = lib.mkMerge [ (with nix-config.packages.x86_64-linux; [ @@ -16,15 +16,15 @@ paulxstretch ]) - (with pkgs; [ - bitwig-studio5-latest + (nix-config.pkgs-stable.yabridge.override { + wine = pkgs.wineWowPackages.stagingFull; + }) + (nix-config.pkgs-stable.yabridgectl.override { + wine = pkgs.wineWowPackages.stagingFull; + }) - (yabridge.override { - wine = wineWowPackages.stagingFull; - }) - (yabridgectl.override { - wine = wineWowPackages.stagingFull; - }) + (with pkgs; [ + bitwig-studio5-latest # from audio flake supercollider-with-plugins carla diff --git a/modules/home/niri.nix b/modules/home/niri.nix index e1c8028..87a6f9a 100644 --- a/modules/home/niri.nix +++ b/modules/home/niri.nix @@ -1,6 +1,6 @@ { config, pkgs, ... }: with pkgs.lib.nix-rice; -let strPalette = palette.toRGBHex pkgs.rice.colorPalette; +let strPalette = palette.toRGBAHex pkgs.rice.colorPalette; in { programs = { @@ -107,12 +107,8 @@ in { focus-ring = { enable = true; - active.gradient = { - from = strPalette.normal.magenta; - to = strPalette.dark.cyan; - angle = 180; - in' = "srgb-linear"; - }; + active.color = with pkgs.rice.colorPalette.normal.border; + "rgba(${toString r} ${toString g} ${toString b} ${toString a})"; width = 2; }; @@ -156,7 +152,18 @@ in { open-floating = true; } { matches = [{app-id="launcher";}]; - open-floating = true; } + open-floating = true; + focus-ring = { + enable = true; + active.gradient = { + from = strPalette.normal.magenta; + to = strPalette.dark.cyan; + angle = 180; + in' = "srgb-linear"; + }; + width = 2; + }; + } # Open the Firefox picture-in-picture player as floating by default. { # This app-id regular expression will work for both: diff --git a/overlays/rice.nix b/overlays/rice.nix index 61e740b..c570c23 100644 --- a/overlays/rice.nix +++ b/overlays/rice.nix @@ -24,6 +24,12 @@ in { }; cyan = theme.color6; white = theme.color7; + border = { + a = 0.5; + r = 198; + g = 120; + b = 221; + }; }; bright = palette.brighten 10 normal // { background = { @@ -37,7 +43,12 @@ in { green = theme.color10; yellow = theme.color11; blue = theme.color12; - magenta = theme.color13; + # magenta = { + # a = 1.0; + # r = 198; + # g = 120; + # b = 221; + # }; cyan = theme.color14; white = theme.color15; };