1

Add initial rofi lib

This commit is contained in:
2023-05-25 11:53:23 +02:00
parent 6d22fcfb8e
commit 3d72b59df5
4 changed files with 28 additions and 0 deletions

21
lib/rofi.nix Normal file
View File

@ -0,0 +1,21 @@
{
inputs,
pkgs,
lib,
...
}: rec {
# Receives attrs like:
# {
# "Poweroff" = "poweroff";
# "Reload Hyprland" = "hyprctl reload";
# }
mkSimpleMenu = let
# Makes a string like ''"Poweroff" "Reload Hyprland"''
unpack-options = attrs: "\"${lib.concatStringsSep "\" \"" builtins.attrNames attrs}\"";
in
prompt: attrs: ''
#! ${pkgs.fish}/bin/fish
set OPTIONS ${unpack-options attrs}
'';
}