Add clipbook

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-02-13 13:41:03 +00:00
parent 97a042adcd
commit c907cdeca6
11 changed files with 203 additions and 31 deletions

View File

@@ -0,0 +1,25 @@
{
rofi ? throw "rofi package is required",
bookmarks ? throw "bookmarks argument is required",
lib,
pkgs,
...
}:
let
copy = lib.meta.getExe (
pkgs.writeShellApplication {
name = "copy";
runtimeInputs = with pkgs; [
jq
wl-clipboard
];
runtimeEnv.BOOKMARKS = (pkgs.formats.json { }).generate "bookmarks.json" bookmarks;
text = builtins.readFile ./copy.sh;
}
);
in
pkgs.writeShellApplication {
name = "clipbook-rofi";
runtimeInputs = [ rofi ];
text = "rofi -modi \"copy:${copy}\" -show copy";
}