From 8a7a1c97c6c45ea1db2ee2030b8fd288db142e35 Mon Sep 17 00:00:00 2001 From: joshashtondev Date: Thu, 30 Jul 2026 22:16:59 -0600 Subject: [PATCH] =?UTF-8?q?nixos:=20gen=20164=20@=20nix-pad=20=E2=80=94=20?= =?UTF-8?q?2026-07-30=2022:16=2026.05.20260724.597283a=20(Yarara)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/desktop/niri.nix | 25 ++++++++++++++++++++++++- home/jashton.nix | 10 ++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/home/desktop/niri.nix b/home/desktop/niri.nix index 3e6f7e2..a0363ae 100644 --- a/home/desktop/niri.nix +++ b/home/desktop/niri.nix @@ -16,6 +16,28 @@ let -g "4,DU,*,*,P,dms ipc spotlight toggle && sleep 0.4" fi ''; + + launch-wvkbd = pkgs.writeShellScriptBin "launch-wvkbd" '' + # Adjust this path to wherever dank-material-shell drops its color file + THEME_CACHE="$HOME/.cache/DankMaterialShell/dms-colors.json" + + if [ -f "$THEME_CACHE" ]; then + # Parse hex tokens directly out of the active shell profile + BG=$(jq -r '.colors.surface' "$THEME_CACHE") + FG=$(jq -r '.colors.surface_container' "$THEME_CACHE") + TXT=$(jq -r '.colors.on_surface' "$THEME_CACHE") + PRIMARY=$(jq -r '.colors.primary' "$THEME_CACHE") + ON_PRIMARY=$(jq -r '.colors.on_primary' "$THEME_CACHE") + + ${pkgs.wvkbd}/bin/wvkbd-mobintl --layer overlay --hidden \ + --bg "$BG" --fg "$FG" --text "$TXT" \ + --fg-sp "$PRIMARY" --text-sp "$ON_PRIMARY" \ + -L 300 + else + # Default fallback if the shell cache isn't built yet + ${pkgs.wvkbd}/bin/wvkbd-wayland --layer overlay --hidden + fi + ''; in { @@ -24,8 +46,9 @@ in settings = { # Autostart DMS if you prefer launching it directly from Niri instead of systemd spawn-at-startup = [ - { command = [ "dms" "run" ]; } + { command = [ "${pkgs.dms}/bin/dms" "run" ]; } { command = [ "${launch-lisgd}/bin/launch-lisgd" ]; } # Spawns the daemon + { command = [ "${launch-wvkbd}/bin/launch-wvkbd" ]; } ]; input = { diff --git a/home/jashton.nix b/home/jashton.nix index b031696..81ba058 100644 --- a/home/jashton.nix +++ b/home/jashton.nix @@ -38,8 +38,18 @@ steam spotify vlc + wvkbd yt-dlp + (pkgs.writeShellScriptBin "wvkbd-toggle" '' + PIDs="$(pgrep -x wvkbd-mobintl)" + if [ -z "$PIDs" ]; then + ${wvkbd}/bin/wvkbd-mobintl -L 300 + else + ${killall}/bin/killall -34 wvkbd-mobintl + fi + '') + (pkgs.writeShellScriptBin "find-open-port" '' if [ -z "$1" ]; then echo "Please provide an application name, project directory, or other identifier."