File manager written in awk
- cd on exit:
cd $(command fm.awk) - last path:
export LASTPATH="$HOME/.cache/lastpath"; cd $(cat -u $LASTPATH) && $TERMINAL -e fm.awk
NUMBERS:
[num] - move cursor to entry [num]
[num]+G - Go to page [num]
NAVIGATION:
k/↑ - up j/↓ - down
l/→ - right h/← - left
n/PageDown - PageDown p/PageUp - PageUp
g/Home - first page G/End - last page
H - first entry L - last entry
M - middle entry
MODES:
/ - search
: - commandline mode
SELECTION:
␣ - bulk (de-)selection V - bulk (de-)selection all
PREVIEW:
v - toggle preview
> - more directory ratio < - less directory ratio
MISC:
r - refresh a - actions
- - previous directory ! - spawn shell
? - show keybinds q - quit
- Bulk selection
- Bulk selection all
- Directory / File preview
- Actions:
- History
mvcp -Rln -sfrm -rf&& yes-no prompt
edit fm.awk, modify the first configuration section:
###################
# Configuration #
###################
OPENER = ( ENVIRON["OSTYPE"] ~ /darwin.*/ ? "open" : "xdg-open" )
LASTPATH = ( ENVIRON["LASTPATH"] == "" ? ( ENVIRON["HOME"] "/.cache/lastpath" ) : ENVIRON["LASTPATH"] )
HISTORY = ( ENVIRON["HISTORY"] == "" ? ( ENVIRON["HOME"] "/.cache/history" ) : ENVIRON["HISTORY"] )
CMDHIST = ( ENVIRON["CMDHIST"] == "" ? ( ENVIRON["HOME"] "/.cache/cmdhist" ) : ENVIRON["CMDHIST"] )
PREVIEW = 0
RATIO = 0.35
HIST_MAX = 5000OPENERis the default file opener.LASTPATHis path whichfm.awkwere last time.HISTORYis the history for directory visited.CMDHISTis the command line history, which only the unique command will be left.PREVIEWis a boolean value which toggles preview or not.RATIOis the ratio for directory / preview.HIST_MAXis the maximum number ofHISTORY.
:cd /path/to/destination- can be relative:
:cd ../../goes to parents two tiers
- can be relative:
:cmdon each selected item.- e.g., After selection,
:chmod +xto give execution permission on selected entries.
- e.g., After selection,
:cmd {} destinationto replace{}with each selected item and execute the whole command.- e.g., After selection,
:mv {} ~will move selected item to$HOMEdirectory.
- e.g., After selection,
cmdcan be shell alias (bashandzshconfirmed.fishnot sure).- tab completion on
:cdand search (/) - tab completion on command line mode based on command line history.
- left / right arrow to move cursor; up / down arrow to access command line history.
- Image preview (start using ueberzug)
- Make preview script be independent
- Make cmd bottom line can be scrollable horizontally even when the string is over the dimension
- Eliminate action menu by implementing all of those in cmd mode
- Fix some bugs