From d60aa6a4bc08afe847ca9bdaf2509379a9fb5dd7 Mon Sep 17 00:00:00 2001 From: agryphus Date: Sun, 9 Feb 2025 22:20:34 -0500 Subject: [PATCH] Add fzf --- misc/.config/fzf/config | 1 + misc/.config/zsh/.zshenv | 1 + misc/.config/zsh/.zshrc | 1 - misc/.local/bin/menu-man | 7 ++++--- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 misc/.config/fzf/config diff --git a/misc/.config/fzf/config b/misc/.config/fzf/config new file mode 100644 index 0000000..eb23750 --- /dev/null +++ b/misc/.config/fzf/config @@ -0,0 +1 @@ +--layout=reverse diff --git a/misc/.config/zsh/.zshenv b/misc/.config/zsh/.zshenv index a35bb31..0943012 100644 --- a/misc/.config/zsh/.zshenv +++ b/misc/.config/zsh/.zshenv @@ -39,6 +39,7 @@ export XDG_STATE_HOME="$HOME/.local/state" export CARGO_HOME="$XDG_DATA_HOME/cargo" export CUDA_CACHE_PATH="$XDG_CACHE_HOME/nv" export EMACS_INIT_FILE="$XDG_CONFIG_HOME/emacs" +export FZF_DEFAULT_OPTS_FILE="$XDG_CONFIG_HOME/fzf/config" export GIT_CONFIG="$XDG_CONFIG_HOME/git/config" export GNUPGHOME="$XDG_DATA_HOME/gnupg" export INPUTRC="$XDG_CONFIG_HOME/readline/inputrc" diff --git a/misc/.config/zsh/.zshrc b/misc/.config/zsh/.zshrc index f4a2b30..b077ad0 100755 --- a/misc/.config/zsh/.zshrc +++ b/misc/.config/zsh/.zshrc @@ -59,7 +59,6 @@ alias asciiquarium='asciiquarium -t' alias ll='ls -l' alias la='ls -A' alias l='ls -CF' -alias python='python3' alias xournal='xournalpp' alias wget='wget --hsts-file="$XDG_CACHE_HOME/wget-hsts"' alias sxiv='nsxiv' diff --git a/misc/.local/bin/menu-man b/misc/.local/bin/menu-man index ac39f4f..24487c7 100755 --- a/misc/.local/bin/menu-man +++ b/misc/.local/bin/menu-man @@ -1,12 +1,13 @@ #!/bin/sh -sel="$(man -k . | fuzzel --dmenu -i -p "Man page:")" +sel="$(man -k . | fzf --prompt "Man page: ")" [ "$sel" = "" ] && exit # Exit on no selection # Selection comes in the form of: # $program ($num) - $desc # Need to run `man $num $program` page="$(echo "$sel" | awk -F'[()]' '{print $2" "$1}')" -# nohup $TERMINAL -e man $page >/dev/null 2>&1 & -hyprctl dispatch exec [floating] "foot -W 78x38 -e man $page" +# hyprctl dispatch exec [floating] "foot -W 78x38 -e man $page" + +man $page