25
hosts/common/configs/user/gui/clipbook/rofi.nix
Normal file
25
hosts/common/configs/user/gui/clipbook/rofi.nix
Normal 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";
|
||||
}
|
Reference in New Issue
Block a user