2022-12-16 07:46:06 +00:00
|
|
|
# borrows from:
|
|
|
|
# - default config: <https://github.com/cspeterson/splatmoji/blob/master/splatmoji.config>
|
|
|
|
# - wayland: <https://github.com/cspeterson/splatmoji/issues/32#issuecomment-830862566>
|
2023-05-08 21:41:02 +00:00
|
|
|
{ pkgs, ... }:
|
2022-12-16 07:46:06 +00:00
|
|
|
|
|
|
|
{
|
2023-04-24 07:22:33 +00:00
|
|
|
sane.programs.splatmoji = {
|
2024-03-01 04:02:32 +00:00
|
|
|
packageUnwrapped = pkgs.splatmoji.overrideAttrs (upstream: {
|
2024-03-01 17:55:27 +00:00
|
|
|
nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
|
|
|
|
pkgs.copyDesktopItems
|
|
|
|
];
|
2024-03-01 04:02:32 +00:00
|
|
|
desktopItems = (upstream.desktopItems or []) ++ [
|
|
|
|
(pkgs.makeDesktopItem {
|
|
|
|
name = "splatmoji";
|
|
|
|
exec = "splatmoji -s medium-light type";
|
|
|
|
desktopName = "Splatmoji Emoji Picker";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
});
|
2024-01-23 16:01:27 +00:00
|
|
|
sandbox.method = "bwrap";
|
2024-02-28 01:18:51 +00:00
|
|
|
sandbox.whitelistWayland = true; # it calls into a dmenu helper
|
2024-02-28 15:19:53 +00:00
|
|
|
sandbox.extraHomePaths = [
|
|
|
|
".cache/rofi"
|
|
|
|
".config/rofi/config.rasi"
|
|
|
|
];
|
2024-02-28 01:18:51 +00:00
|
|
|
|
|
|
|
suggestedPrograms = [ "rofi" ];
|
2024-02-14 09:11:12 +00:00
|
|
|
|
2023-11-08 15:32:50 +00:00
|
|
|
persist.byStore.plaintext = [ ".local/state/splatmoji" ];
|
2023-05-08 21:41:02 +00:00
|
|
|
fs.".config/splatmoji/splatmoji.config".symlink.text = ''
|
2023-04-24 07:22:33 +00:00
|
|
|
# XXX doesn't seem to understand ~ as shorthand for `$HOME`
|
|
|
|
history_file=/home/colin/.local/state/splatmoji/history
|
|
|
|
history_length=5
|
2024-02-16 03:46:48 +00:00
|
|
|
# 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.
|
2023-07-14 22:09:43 +00:00
|
|
|
paste_command=${pkgs.wtype}/bin/wtype -M Ctrl -k v
|
2023-04-24 07:22:33 +00:00
|
|
|
xdotool_command=${pkgs.wtype}/bin/wtype
|
2023-07-14 22:09:43 +00:00
|
|
|
xsel_command=${pkgs.findutils}/bin/xargs ${pkgs.wl-clipboard}/bin/wl-copy
|
2023-04-24 07:22:33 +00:00
|
|
|
'';
|
2024-02-28 01:18:51 +00:00
|
|
|
# alternative tweaks:
|
|
|
|
# rofi_command=${pkgs.wofi}/bin/wofi --dmenu --insensitive --cache-file /dev/null
|
|
|
|
# rofi_command=${pkgs.fuzzel}/bin/fuzzel -d -i -w 60
|
2023-04-24 07:22:33 +00:00
|
|
|
};
|
2022-12-16 07:46:06 +00:00
|
|
|
}
|