From 1474caa8f624aa568ea011629d1aec4ae2aca3c1 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Thu, 3 Oct 2024 22:03:12 +0530 Subject: Using fzf as the application launcher. --- modules/desktop/application-launcher/fzf/launch.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 modules/desktop/application-launcher/fzf/launch.sh (limited to 'modules/desktop/application-launcher/fzf/launch.sh') diff --git a/modules/desktop/application-launcher/fzf/launch.sh b/modules/desktop/application-launcher/fzf/launch.sh new file mode 100644 index 0000000..16e2565 --- /dev/null +++ b/modules/desktop/application-launcher/fzf/launch.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +selected_executable=$(find -L $(echo $PATH | tr ':' ' ') -maxdepth 1 -executable -type f 2>/dev/null | xargs -n 1 basename | sort -u | fzf --height=100% --layout=reverse --prompt " ") + +if [[ -n "$selected_executable" ]]; then + setsid "$selected_executable" >/dev/null 2>&1 & + disown + sleep + kill -9 $PPID +fi -- cgit v1.2.3