From 085ff668ab45ac8d57c093e502b1175a86f2c14e Mon Sep 17 00:00:00 2001 From: Arpit Chakladar <54011232+arpitchakladar@users.noreply.github.com> Date: Thu, 10 Jul 2025 01:29:48 +0530 Subject: Removed unnecessary packages. --- .../desktop/application-launcher/fzf/default.nix | 22 ----------------- modules/desktop/application-launcher/fzf/launch.sh | 28 ---------------------- 2 files changed, 50 deletions(-) delete mode 100644 modules/desktop/application-launcher/fzf/default.nix delete mode 100644 modules/desktop/application-launcher/fzf/launch.sh (limited to 'modules/desktop/application-launcher/fzf') diff --git a/modules/desktop/application-launcher/fzf/default.nix b/modules/desktop/application-launcher/fzf/default.nix deleted file mode 100644 index a7d12d3..0000000 --- a/modules/desktop/application-launcher/fzf/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options.desktop.application-launcher.fzf = { - enable = lib.mkEnableOption "Enables fzf to be used as a application launcher."; - }; - - config = lib.mkIf config.desktop.application-launcher.fzf.enable { - assertions = [ - { - assertion = config.tools.utils.fzf.enable; - message ="Module desktop.application-launcher.fzf requires tools.utils.fzf module to be enabled."; - } - ]; - - desktop.application-launcher.default = lib.mkDefault "fzf"; - desktop.application-launcher.command = - lib.mkIf - (config.desktop.application-launcher.default == "fzf") - "${config.tools.terminal.command} --title 'Application Launcher' --class floating-termial -e ${(pkgs.writeShellScript "fzf-launch.sh" (builtins.readFile ./launch.sh))}"; - }; -} diff --git a/modules/desktop/application-launcher/fzf/launch.sh b/modules/desktop/application-launcher/fzf/launch.sh deleted file mode 100644 index 53987f6..0000000 --- a/modules/desktop/application-launcher/fzf/launch.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh - -# Function to get executables from PATH and display them with Nerd Font icons -get_executables() { - for dir in $(echo "$PATH" | tr ':' ' '); do - [ -d "$dir" ] && ls "$dir" 2>/dev/null | awk -F/ '{print "\033[31m \033[0m " $NF}' - done | sort -u -} - -# Function to run fzf and select an executable -select_executable() { - fzf --ansi --height=100% --border=none --layout=reverse --no-multi --prompt " " -} - -# Function to remove ANSI codes and icons from the selected executable -clean_selection() { - sed 's/\x1B\[[0-9;]*m//g' | awk '{$1=""; print $0}' | sed 's/^ //' -} - -# Main script execution -selected_executable=$(get_executables | select_executable | clean_selection) - -# If an executable is selected, run it -if [ -n "$selected_executable" ]; then - setsid "$selected_executable" >/dev/null 2>&1 & - sleep 0.01 - kill -9 $PPID -fi -- cgit v1.2.3