From cae48d231a82cd451658e3745ab23e1a2057d406 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Fri, 24 Oct 2025 18:20:09 +0530 Subject: Add manpage for documentation --- docs/daffm.1 | 145 ++++++++++++++++++++++++++++++++++++++++++ docs/daffm.md | 199 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 344 insertions(+) create mode 100644 docs/daffm.1 create mode 100644 docs/daffm.md (limited to 'docs') diff --git a/docs/daffm.1 b/docs/daffm.1 new file mode 100644 index 0000000..8fdbcde --- /dev/null +++ b/docs/daffm.1 @@ -0,0 +1,145 @@ +.TH DAFFM 1 daffm\-VERSION +.SH NAME +daffm \- dumb as fuck file manager +.SH SYNOPSIS +.B daffm +.RB [ \-c +.IR config-file ] +.RB [ directory_or_file ] +.SH DESCRIPTION +.B daffm +is a dumb file manager/directory explorer that is meant to integrate with system utils for file management features. + + +.SH OPTIONS +.TP +.B \-c, \-\-config " config-path" +Load toml config from file. If path is prefixed with @, will use alternate config. + Example: \-c @foo will load $XDG_CONFIG_HOME/daffm/config.foo.toml + Default: $XDG_CONFIG_HOME/daffm/config.toml +.TP +.B \-v +Prints version information. +.TP +.B \-h, \-\-help +Prints help information. + + +.SH CONFIGURATION +.TP +.B keymap +A mapping of key sequences to the commands. + Example: gdl = "cd ~/Downloads" + +.TP +.B extend +Which config file to extend. This can use file paths or @-prefix for alternate configs + Example: extend = "@custom-config" + +.TP +.B opener +Shell script that is executed when open command is invoked on a file. + Example: extend = "xdg-open %" # Opens file under cursor (ignores selections) + + +.SH COMMANDS + +.TP +.B back +Goes back one level in directory. + +.TP +.B cd +Change current directory shown. + +.TP +.B cmdline-enter +Switch focus to the command line input + +.TP +.B cmdline-leave +Exit cmdline if focused + +.TP +.B cmdline-set +Enter the command line input with given text prefilled + +.TP +.B eval [...args] +Runs command in shell. Any line in stdout that begins with is evaluated as a daffm command. This can be used to create more dynamic commands and keybinds. + +.TP +.B map +Add a new keymap to run given command when the key sequence is pressed + +.TP +.B move +Move the cursor to position. To move the cursor relative to current position, use +/- (eg: 'move +1' goes down 5 lines). You can also use 'move $' to move the cursor to the last item in the list. + +.TP +.B open +If cursor is on a directory, cd into the directory, otherwise, run opener + +.TP +.B quit +Quit + +.TP +.B reload +Reloads the current directory and shows the latest information. Daffm doesn't watch the directory for changes but after a call to a shell or eval command, the directory contents are reloaded. + +.TP +.B search [text] +Search the given text in the filenames in current directory. If text is empty, stops search highlighting + +.TP +.B search-next +Jump to next item in the search results + +.TP +.B search-prev +Jump to previous item in the search results + +.TP +.B selection-clear +Clear all selections + +.TP +.B selection-toggle +Toggle selection for file under cursor + +.TP +.B shell [...args] +Run a command in shell. If a command exits with non-zero status code, a "Press any key to continue" prompt is shown. + +.TP +.B shell! [...args] +Same as shell but it adds a "Press any key to continue" prompt after the command runs regardless of exit status code. + + + +.SH COMMAND SUBSTITUIONS +The following pattern (%,%d,%f,%s,%F,%S) are replaced with absolute paths + +%: File under cursor + +%d: Current directory + +%s: Selected files separated by spaces + +%S: Selected files separated by newlines + +%f: Same as %s but if there are no selections, uses file under cursor + +%F: Same as %S but if there are no selections, uses file under cursor + + +.SH AUTHORS +Akshay Nair + +.SH LICENSE +See the LICENSE file for the terms of redistribution. + +.SH BUGS AND FEATURE REQUESTS +https://github.com/phenax/daffm/issues + diff --git a/docs/daffm.md b/docs/daffm.md new file mode 100644 index 0000000..d89a429 --- /dev/null +++ b/docs/daffm.md @@ -0,0 +1,199 @@ +# NAME + +daffm - dumb as fuck file manager + +# SYNOPSIS + +**daffm** \[**-c** *config-file*\] \[**directory_or_file**\] + +# DESCRIPTION + +**daffm** is a dumb file manager/directory explorer that is meant to +integrate with system utils for file management features. + +# OPTIONS + +**-c, \--config config-path** + +: Load toml config from file. If path is prefixed with @, will use + alternate config. Example: -c \@foo will load + \$XDG_CONFIG_HOME/daffm/config.foo.toml Default: + \$XDG_CONFIG_HOME/daffm/config.toml + +**-v** + +: Prints version information. + +**-h, \--help** + +: Prints help information. + +# CONFIGURATION + +**keymap** + +: A mapping of key sequences to the commands. Example: gdl = \"cd + \~/Downloads\" + + + +**extend** + +: Which config file to extend. This can use file paths or @-prefix for + alternate configs Example: extend = \"@custom-config\" + + + +**opener** + +: Shell script that is executed when open command is invoked on a + file. Example: extend = \"xdg-open %\" \# Opens file under cursor + (ignores selections) + +# COMMANDS + +**back** + +: Goes back one level in directory. + + + +**cd \** + +: Change current directory shown. + + + +**cmdline-enter** + +: Switch focus to the command line input + + + +**cmdline-leave** + +: Exit cmdline if focused + + + +**cmdline-set \** + +: Enter the command line input with given text prefilled + + + +**eval \ \[\...args\]** + +: Runs command in shell. Any line in stdout that begins with \ + is evaluated as a daffm command. This can be used to create more + dynamic commands and keybinds. + + + +**map \ \** + +: Add a new keymap to run given command when the key sequence is + pressed + + + +**move \** + +: Move the cursor to position. To move the cursor relative to current + position, use +/- (eg: \'move +1\' goes down 5 lines). You can also + use \'move \$\' to move the cursor to the last item in the list. + + + +**open** + +: If cursor is on a directory, cd into the directory, otherwise, run + opener + + + +**quit** + +: Quit + + + +**reload** + +: Reloads the current directory and shows the latest information. + Daffm doesn\'t watch the directory for changes but after a call to a + shell or eval command, the directory contents are reloaded. + + + +**search \[text\]** + +: Search the given text in the filenames in current directory. If text + is empty, stops search highlighting + + + +**search-next** + +: Jump to next item in the search results + + + +**search-prev** + +: Jump to previous item in the search results + + + +**selection-clear** + +: Clear all selections + + + +**selection-toggle** + +: Toggle selection for file under cursor + + + +**shell \ \[\...args\]** + +: Run a command in shell. If a command exits with non-zero status + code, a \"Press any key to continue\" prompt is shown. + + + +**shell! \ \[\...args\]** + +: Same as shell but it adds a \"Press any key to continue\" prompt + after the command runs regardless of exit status code. + +# COMMAND SUBSTITUIONS + +The following pattern (%,%d,%f,%s,%F,%S) are replaced with absolute +paths + +%: File under cursor + +%d: Current directory + +%s: Selected files separated by spaces + +%S: Selected files separated by newlines + +%f: Same as %s but if there are no selections, uses file under cursor + +%F: Same as %S but if there are no selections, uses file under cursor + +# AUTHORS + +Akshay Nair \ + +# LICENSE + +See the LICENSE file for the terms of redistribution. + +# BUGS AND FEATURE REQUESTS + +https://github.com/phenax/daffm/issues -- cgit v1.3.1