4fe5b5033b
lightweight python script
33 lines
800 B
Nix
33 lines
800 B
Nix
{
|
|
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"];
|
|
};
|
|
}
|