From 5934c4ba6c2f5d7adccec6deadeb25366606d09f Mon Sep 17 00:00:00 2001 From: Matt Nish-Lapidus Date: Mon, 21 Oct 2024 14:23:56 -0400 Subject: [PATCH] config --- .../dot_config/fish/completions/maestral.fish | 18 ++++++++++++++++++ home/home.nix | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 dotfiles/dot_config/fish/completions/maestral.fish diff --git a/dotfiles/dot_config/fish/completions/maestral.fish b/dotfiles/dot_config/fish/completions/maestral.fish new file mode 100644 index 0000000..d588ba5 --- /dev/null +++ b/dotfiles/dot_config/fish/completions/maestral.fish @@ -0,0 +1,18 @@ +function _maestral_completion; + set -l response (env _MAESTRAL_COMPLETE=fish_complete COMP_WORDS=(commandline -cp) COMP_CWORD=(commandline -t) maestral); + + for completion in $response; + set -l metadata (string split "," $completion); + + if test $metadata[1] = "dir"; + __fish_complete_directories $metadata[2]; + else if test $metadata[1] = "file"; + __fish_complete_path $metadata[2]; + else if test $metadata[1] = "plain"; + echo $metadata[2]; + end; + end; +end; + +complete --no-files --command maestral --arguments "(_maestral_completion)"; + diff --git a/home/home.nix b/home/home.nix index 527b761..706bd85 100644 --- a/home/home.nix +++ b/home/home.nix @@ -35,7 +35,7 @@ silver-searcher xclip maestral - maestral-gui + sane-airscan xsane dbus