{ config, lib, pkgs, ... }: let cfg = config.kassouni.palette; in { imports = [ ./bluetooth.nix ./reboot.nix ./rebuild.nix ./screenshot.nix ./shutdown.nix ]; options.kassouni.palette.commands = lib.mkOption { type = lib.types.listOf ( lib.types.submodule { options = { name = lib.mkOption { type = lib.types.str; description = "Label shown in the palette menu."; }; icon = lib.mkOption { type = lib.types.str; description = "Nerd Font glyph shown before the label."; }; exe = lib.mkOption { type = lib.types.package; description = "Executable to run when the entry is selected."; }; }; } ); default = [ ]; description = '' Entries shown in the rofi command palette. ''; }; config.home.packages = [ (pkgs.writers.writeBashBin "open-palette" '' set -eu exes=(${lib.concatMapStringsSep " " (c: "${c.exe}") cfg.commands}) idx=$(${pkgs.rofi}/bin/rofi -dmenu -i -format i -p palette <