add(waybar): waybar_seek

lightweight python script
This commit is contained in:
kenji
2026-06-23 20:07:41 -05:00
parent f25e3326e5
commit 4fe5b5033b
2 changed files with 33 additions and 0 deletions
+1
View File
@@ -75,6 +75,7 @@ in {
];
};
imports = [
./waybar-seek.nix
./style.nix
];
+32
View File
@@ -0,0 +1,32 @@
{
config,
pkgs,
lib,
...
}: let
waybar_peek = pkgs.stdenv.mkDerivation {
pname = "waybar-peek";
version = "main";
src = pkgs.fetchFromGitHub {
owner = "waliori";
repo = "waybar_peek";
rev = "main"; # You can pin a specific commit hash here for stability
hash = lib.fakeHash; # Nix will error on first build and give you the correct hash to paste here
};
buildInputs = [pkgs.python3];
installPhase = ''
mkdir -p $out/bin
# Copies the script to the bin directory and ensures it is executable
cp waybar_peek.py $out/bin/waybar_peek
chmod +x $out/bin/waybar_peek
'';
};
in {
home.packages = [waybar_peek];
wayland.windowManager.hyprland.settings = {
exec-once = ["${waybar_peek}/bin/waybar_peek"];
};
}