nix-files/hosts/common/programs/splatmoji.nix
Colin 409a4db232 splatmoji: use rofi instead of fuzzel
will be best if i can port everything to one dmenu helper
2024-02-28 01:18:51 +00:00

31 lines
1.3 KiB
Nix

# borrows from:
# - default config: <https://github.com/cspeterson/splatmoji/blob/master/splatmoji.config>
# - wayland: <https://github.com/cspeterson/splatmoji/issues/32#issuecomment-830862566>
{ pkgs, ... }:
{
sane.programs.splatmoji = {
sandbox.method = "bwrap";
sandbox.wrapperType = "wrappedDerivation";
sandbox.whitelistWayland = true; # it calls into a dmenu helper
suggestedPrograms = [ "rofi" ];
persist.byStore.plaintext = [ ".local/state/splatmoji" ];
fs.".config/splatmoji/splatmoji.config".symlink.text = ''
# XXX doesn't seem to understand ~ as shorthand for `$HOME`
history_file=/home/colin/.local/state/splatmoji/history
history_length=5
# XXX: hardcode the package paths here. all these packages are sandboxed identically
# to `splatmoji` itself, so there's zero benefit to acquiring them via the environment;
# doing so would in fact be costlier.
paste_command=${pkgs.wtype}/bin/wtype -M Ctrl -k v
xdotool_command=${pkgs.wtype}/bin/wtype
xsel_command=${pkgs.findutils}/bin/xargs ${pkgs.wl-clipboard}/bin/wl-copy
'';
# alternative tweaks:
# rofi_command=${pkgs.wofi}/bin/wofi --dmenu --insensitive --cache-file /dev/null
# rofi_command=${pkgs.fuzzel}/bin/fuzzel -d -i -w 60
};
}