aboutsummaryrefslogtreecommitdiff
path: root/share/cfg/tofi.nix
diff options
context:
space:
mode:
Diffstat (limited to 'share/cfg/tofi.nix')
-rw-r--r--share/cfg/tofi.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/share/cfg/tofi.nix b/share/cfg/tofi.nix
new file mode 100644
index 0000000..e4f2ff9
--- /dev/null
+++ b/share/cfg/tofi.nix
@@ -0,0 +1,38 @@
+# IMPORTANT: this is the config for a custom module that's located at
+# /share/hm-modules/tofi.nix. In order to use this config you have to also
+# import that module.
+{ lib, config, ... }: {
+
+ # Tofi's cache seems to get messed up sometimes, so we regenerate it when
+ # building the system.
+ # https://github.com/philj56/tofi/issues/115#issuecomment-1701748297
+ home.activation = {
+ regenerateTofiCache = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
+ tofi_cache=${config.xdg.cacheHome}/tofi-drun
+ [[ -f "$tofi_cache" ]] && rm "$tofi_cache"
+ '';
+ };
+
+ programs.tofi = {
+ settings = {
+ anchor = "top";
+ width = "100%";
+ height = 30;
+ horizontal = true;
+ font-size = 14;
+ prompt-text = " run: ";
+ font = "monospace";
+ outline-width = 0;
+ border-width = 0;
+ background-color = "#000000";
+ min-input-width = 120;
+ result-spacing = 15;
+ padding-top = 0;
+ padding-right = 0;
+ padding-bottom = 0;
+ padding-left = 0;
+ drun-launch = true;
+ terminal = "kitty";
+ };
+ };
+}