2024-09-13 01:50:53 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
with lib; let
|
2024-09-09 00:22:14 +00:00
|
|
|
wofi = "${config.home-manager.users.${config.custom.username}.programs.wofi.package}/bin/wofi";
|
|
|
|
|
|
|
|
cfg = config.custom.services.clipcat;
|
2024-09-13 01:50:53 +00:00
|
|
|
in {
|
|
|
|
options.custom.services.clipcat.enable = mkOption {default = false;};
|
2024-09-09 00:22:14 +00:00
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
# BUG: Random high CPU usage
|
|
|
|
# https://github.com/xrelkd/clipcat/issues/347
|
|
|
|
# https://github.com/xrelkd/clipcat
|
|
|
|
services.clipcat.enable = true;
|
|
|
|
|
|
|
|
# https://github.com/xrelkd/clipcat?tab=readme-ov-file#configuration
|
2024-11-17 23:27:14 +00:00
|
|
|
home-manager.users.${config.custom.username}.xdg.configFile = {
|
|
|
|
"clipcat/clipcatd.toml".text = ''
|
2024-09-09 00:22:14 +00:00
|
|
|
daemonize = false
|
|
|
|
max_history = 100
|
|
|
|
|
|
|
|
[watcher]
|
|
|
|
enable_clipboard = true
|
|
|
|
enable_primary = false
|
|
|
|
|
|
|
|
[grpc]
|
|
|
|
enable_http = false
|
|
|
|
'';
|
|
|
|
|
2024-11-17 23:27:14 +00:00
|
|
|
"clipcat/clipcat-menu.toml".text = ''
|
2024-09-09 00:22:14 +00:00
|
|
|
finder = "custom_finder"
|
|
|
|
|
|
|
|
[custom_finder]
|
|
|
|
program = "${wofi}"
|
|
|
|
args = ["--dmenu"]
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|