#!/usr/bin/env bash # ***This script was made by Clay Gomera (Drake)*** # - Description: A simple script for file editing in dmenu # - Dependencies: dmenu (Everything else can be changed) # Show list of options EDITOR="emacsclient -c -a emacs" cd "$HOME" || exit 0 file=1 while [ "$file" ]; do file=$(fd -LHpd 1 | dmenu -i -l 10 -fn "mononoki Nerd Font-10" -nb \#1d2021 -nf \#fbf1c7 -sb \#cc241d -sf \#fbf1c7 -p "file to edit: $(basename "$(pwd)")") if [ -e "$file" ]; then owd=$(pwd) if [ -d "$file" ]; then cd "$file" || exit 0 else [ -f "$file" ] if [ "$file" ]; then $EDITOR "$owd/$file" & exit 0 else exit 0 fi fi fi done