add(waybar): waybar_seek
lightweight python script
This commit is contained in:
@@ -75,6 +75,7 @@ in {
|
||||
];
|
||||
};
|
||||
imports = [
|
||||
./waybar-seek.nix
|
||||
./style.nix
|
||||
];
|
||||
|
||||
|
||||
@@ -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"];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user