From 2d7442c991f117646920d792e1b7080f760137ae Mon Sep 17 00:00:00 2001 From: Anish Lakhwara Date: Sun, 4 Jun 2023 20:04:50 +1000 Subject: [PATCH] curve: add kitaab unlinked fzf command --- home/profiles/desktop/bin/ku | 11 +++++++++++ home/profiles/desktop/default.nix | 1 + 2 files changed, 12 insertions(+) create mode 100755 home/profiles/desktop/bin/ku diff --git a/home/profiles/desktop/bin/ku b/home/profiles/desktop/bin/ku new file mode 100755 index 00000000..265f4803 --- /dev/null +++ b/home/profiles/desktop/bin/ku @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +# Use fzf to select a file and capture the output +selected_file=$(python3 poonam/main.py report --titles=false | head -n -2 | fzf --preview 'bat --color=always --terminal-width -1 ./vimwiki/{}') + +# Add additional details to the file path +file_path="./vimwiki/${selected_file}" + +# Open the file in vim for editing +vim "${file_path}" + diff --git a/home/profiles/desktop/default.nix b/home/profiles/desktop/default.nix index 31b8c805..9761ac3a 100644 --- a/home/profiles/desktop/default.nix +++ b/home/profiles/desktop/default.nix @@ -135,6 +135,7 @@ in ".local/bin/screenshot".source = ./bin/screenshot; ".local/bin/mpv-ify".source = ./bin/mpv-ify; ".local/bin/bspswallow".source = ./bin/bspswallow; + ".local/bin/ku".source = ./bin/ku; ".config/bspwm/terminals".text = "Kitty"; ".config/eww/eww.yuck".source = ./eww/eww.yuck; ".config/eww/eww.scss".source = ./eww/eww.scss;