From ed4eb4bf282354886e52ae6fa92bf68078edfef6 Mon Sep 17 00:00:00 2001 From: Stephane Fontaine Date: Sat, 24 Feb 2018 21:10:35 +0400 Subject: Add new option to disable display of free disk space in statusbar Fixes #1087 Useful on high-latency filesystems as it avoid calls to statvfs system call which costs: (number of redraw) * latency. --- doc/ranger.1 | 3 +++ doc/ranger.pod | 4 ++++ 2 files changed, 7 insertions(+) (limited to 'doc') diff --git a/doc/ranger.1 b/doc/ranger.1 index fca30604..9ec79cfd 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -766,6 +766,9 @@ Display the file size in the main column? Display the file size in the status bar? .IP "display_tags_in_all_columns [bool]" 4 .IX Item "display_tags_in_all_columns [bool]" +Display the free disk space in the status bar? +.IP "display_free_space_in_status_bar [bool]" 4 +.IX Item "display_free_space_in_status_bar [bool]" Display tags in all columns? .IP "draw_borders [bool]" 4 .IX Item "draw_borders [bool]" diff --git a/doc/ranger.pod b/doc/ranger.pod index 523d8d9d..04598bd2 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -752,6 +752,10 @@ Display the file size in the main column? Display the file size in the status bar? +=item display_free_space_in_status_bar [bool] + +Display the free disk space in the status bar? + =item display_tags_in_all_columns [bool] Display tags in all columns? -- cgit 1.4.1-2-gfad0 From 4d9d271d458aa65a69a897ab26a64771fd63f056 Mon Sep 17 00:00:00 2001 From: toonn Date: Sat, 31 Mar 2018 16:43:07 +0200 Subject: Added positional arguments section to manpage The optional positional argument "path" wasn't documented, changed the argument to "path ..." because you can provide more than one and documented what happens. Added a sentence to the `--selectfile` item pointing out it's superceded by the positional arguments. --- doc/ranger.1 | 17 ++++++++++++----- doc/ranger.pod | 17 +++++++++++++++-- 2 files changed, 27 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/ranger.1 b/doc/ranger.1 index f362d263..7f307490 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) +.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.9.1" "05.03.2018" "ranger manual" +.TH RANGER 1 "ranger-1.9.1" "2018-03-31" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -145,7 +145,7 @@ ranger \- visual file manager [\fB\-\-choosedir\fR=\fItarget\fR] [\fB\-\-selectfile\fR=\fIfilepath\fR] [\fB\-\-show\-only\-dirs\fR] [\fB\-\-list\-unused\-keys\fR] [\fB\-\-list\-tagged\-files\fR=\fItag\fR] -[\fB\-\-profile\fR] [\fB\-\-cmd\fR=\fIcommand\fR] [\fIpath\fR] +[\fB\-\-profile\fR] [\fB\-\-cmd\fR=\fIcommand\fR] [\fIpath ...\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" ranger is a console file manager with \s-1VI\s0 key bindings. @@ -172,6 +172,12 @@ with other software. They are usually installed to The man page of \fIrifle\fR\|(1) describes the functions of the file opener .PP The section \fI\s-1LINKS\s0\fR of this man page contains further resources. +.SH "POSITIONAL ARGUMENTS" +.IX Header "POSITIONAL ARGUMENTS" +.IP "\fIpath ...\fR" 14 +.IX Item "path ..." +Each path will be opened in a tab and if the path is a file it will be selected. +Omitting this is equivalent to providing the current directory. .SH "OPTIONS" .IX Header "OPTIONS" .IP "\fB\-d\fR, \fB\-\-debug\fR" 14 @@ -225,7 +231,8 @@ Allows you to pick a directory with ranger. When you exit ranger, it will write the last visited directory into \fItargetfile\fR. .IP "\fB\-\-selectfile\fR=\fItargetfile\fR" 14 .IX Item "--selectfile=targetfile" -Open ranger with \fItargetfile\fR selected. +Open ranger with \fItargetfile\fR selected. This is a legacy option, superseded by +the behavior for the \s-1POSITIONAL ARGUMENTS.\s0 .IP "\fB\-\-show\-only\-dirs\fR" 14 .IX Item "--show-only-dirs" Display only the directories. May be used in conjunction with @@ -599,7 +606,7 @@ Toggle the mark-status of all files .IP "V" 14 .IX Item "V" Starts the visual mode, which selects all files between the starting point and -the cursor until you press \s-1ESC. \s0 To unselect files in the same way, use \*(L"uV\*(R". +the cursor until you press \s-1ESC.\s0 To unselect files in the same way, use \*(L"uV\*(R". .IP "/" 14 Search for files in the current directory. .IP ":" 14 diff --git a/doc/ranger.pod b/doc/ranger.pod index 8599a1a6..470eaa7e 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -14,7 +14,7 @@ B [B<--version>] [B<--help>] [B<--debug>] [B<--clean>] [B<--choosedir>=I] [B<--selectfile>=I] [B<--show-only-dirs>] [B<--list-unused-keys>] [B<--list-tagged-files>=I] -[B<--profile>] [B<--cmd>=I] [I] +[B<--profile>] [B<--cmd>=I] [I] @@ -53,6 +53,18 @@ The section I of this man page contains further resources. +=head1 POSITIONAL ARGUMENTS + +=over 14 + +=item I + +Each path will be opened in a tab and if the path is a file it will be selected. +Omitting this is equivalent to providing the current directory. + + + + =head1 OPTIONS =over 14 @@ -117,7 +129,8 @@ write the last visited directory into I. =item B<--selectfile>=I -Open ranger with I selected. +Open ranger with I selected. This is a legacy option, superseded by +the behavior for the POSITIONAL ARGUMENTS. =item B<--show-only-dirs> -- cgit 1.4.1-2-gfad0 From a938392ddb43169712dda6809f3b55e396c46dfb Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 1 Apr 2018 13:21:17 +0200 Subject: Apply patch from debian package: 0004-fix-type-in-manpage.patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: Fix typo in manpage Author: Mateusz Łukasik --- doc/ranger.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/ranger.1 b/doc/ranger.1 index f362d263..745f1032 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -702,7 +702,7 @@ in ranger. .IP "automatically_count_files [bool]" 4 .IX Item "automatically_count_files [bool]" Should ranger count and display the number of files in each directory -as soon as it's visible? This gets slow with remote file sytems. Turning it +as soon as it's visible? This gets slow with remote file systems. Turning it off will still allow you to see the number of files after entering the directory. .IP "autosave_bookmarks [bool]" 4 -- cgit 1.4.1-2-gfad0 From 3c430ba0f1b3fe2e17225788866f37bcd1f85c3b Mon Sep 17 00:00:00 2001 From: toonn Date: Tue, 3 Apr 2018 14:10:35 +0200 Subject: Document change in :cd behavior Added a sentence about the file selecting behavior of `:cd` to the docstring and the manpage. Added missing `=back` to POSITIONAL ARGUMENTS section in the manpage. --- doc/ranger.1 | 12 ++++++------ doc/ranger.pod | 10 ++++++---- ranger/config/commands.py | 3 ++- 3 files changed, 14 insertions(+), 11 deletions(-) (limited to 'doc') diff --git a/doc/ranger.1 b/doc/ranger.1 index 7f307490..bd6116d1 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.9.1" "2018-03-31" "ranger manual" +.TH RANGER 1 "ranger-1.9.1" "2018-04-03" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -996,7 +996,7 @@ ranger. For your convenience, this is a list of the \*(L"public\*(R" commands i .Vb 10 \& alias [newcommand] [oldcommand] \& bulkrename -\& cd [directory] +\& cd [path] \& chain command1[; command2[; command3...]] \& chmod octal_number \& cmap key command @@ -1072,10 +1072,10 @@ renaming according to the changes you did in the file. .Sp This shell script is opened in an editor for you to review. After you close it, it will be executed. -.IP "cd [\fIdirectory\fR]" 2 -.IX Item "cd [directory]" -The cd command changes the directory. The command \f(CW\*(C`:cd \-\*(C'\fR is equivalent to -typing ``. +.IP "cd [\fIpath\fR]" 2 +.IX Item "cd [path]" +The cd command changes the directory. If path is a file, selects that file. +The command \f(CW\*(C`:cd \-\*(C'\fR is equivalent to typing ``. .IP "chain \fIcommand1\fR[; \fIcommand2\fR[; \fIcommand3\fR...]]" 2 .IX Item "chain command1[; command2[; command3...]]" Combines multiple commands into one, separated by semicolons. diff --git a/doc/ranger.pod b/doc/ranger.pod index 470eaa7e..4b0e90b1 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -62,6 +62,8 @@ The section I of this man page contains further resources. Each path will be opened in a tab and if the path is a file it will be selected. Omitting this is equivalent to providing the current directory. +=back + @@ -1033,7 +1035,7 @@ ranger. For your convenience, this is a list of the "public" commands including alias [newcommand] [oldcommand] bulkrename - cd [directory] + cd [path] chain command1[; command2[; command3...]] chmod octal_number cmap key command @@ -1113,10 +1115,10 @@ renaming according to the changes you did in the file. This shell script is opened in an editor for you to review. After you close it, it will be executed. -=item cd [I] +=item cd [I] -The cd command changes the directory. The command C<:cd -> is equivalent to -typing ``. +The cd command changes the directory. If path is a file, selects that file. +The command C<:cd -> is equivalent to typing ``. =item chain I[; I[; I...]] diff --git a/ranger/config/commands.py b/ranger/config/commands.py index a3837d8e..2f1480b9 100755 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -120,9 +120,10 @@ class echo(Command): class cd(Command): - """:cd [-r] + """:cd [-r] The cd command changes the directory. + If the path is a file, selects that file. The command 'cd -' is equivalent to typing ``. Using the option "-r" will get you to the real path. """ -- cgit 1.4.1-2-gfad0 From 107b72e74cf740489c8eae7464b9ee24dcaeed6e Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 16 Apr 2018 12:38:01 +0200 Subject: Add support for mutool pdf previews in scope.sh --- README.md | 2 +- doc/ranger.1 | 10 +++++----- doc/ranger.pod | 2 +- ranger/data/scope.sh | 1 + 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/README.md b/README.md index ef644ae6..df17f731 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Optional, for enhanced file previews (with `scope.sh`): * `highlight` or `pygmentize` for syntax highlighting of code * `atool`, `bsdtar` and/or `unrar` for previews of archives * `lynx`, `w3m` or `elinks` for previews of html pages -* `pdftotext` for pdf previews +* `pdftotext` or `mutool` for pdf previews * `transmission-show` for viewing bit-torrent information * `mediainfo` or `exiftool` for viewing information about media files * `odt2txt` for OpenDocument text files (`odt`, `ods`, `odp` and `sxw`) diff --git a/doc/ranger.1 b/doc/ranger.1 index 745f1032..71310541 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) +.\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.9.1" "05.03.2018" "ranger manual" +.TH RANGER 1 "ranger-1.9.1" "2018-04-16" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -270,7 +270,7 @@ scripts by setting the option \f(CW\*(C`use_preview_script\*(C'\fR and \f(CW\*(C This default script is \fI~/.config/ranger/scope.sh\fR. It contains more documentation and calls to the programs \fIlynx\fR and \fIelinks\fR for html, \&\fIhighlight\fR for text/code, \fIimg2txt\fR for images, \fIatool\fR for archives, -\&\fIpdftotext\fR for PDFs and \fImediainfo\fR for video and audio files. +\&\fIpdftotext\fR or \fImutool\fR for PDFs and \fImediainfo\fR for video and audio files. .PP Install these programs (just the ones you need) and scope.sh will automatically use them. @@ -599,7 +599,7 @@ Toggle the mark-status of all files .IP "V" 14 .IX Item "V" Starts the visual mode, which selects all files between the starting point and -the cursor until you press \s-1ESC. \s0 To unselect files in the same way, use \*(L"uV\*(R". +the cursor until you press \s-1ESC.\s0 To unselect files in the same way, use \*(L"uV\*(R". .IP "/" 14 Search for files in the current directory. .IP ":" 14 @@ -702,7 +702,7 @@ in ranger. .IP "automatically_count_files [bool]" 4 .IX Item "automatically_count_files [bool]" Should ranger count and display the number of files in each directory -as soon as it's visible? This gets slow with remote file systems. Turning it +as soon as it's visible? This gets slow with remote file sytems. Turning it off will still allow you to see the number of files after entering the directory. .IP "autosave_bookmarks [bool]" 4 diff --git a/doc/ranger.pod b/doc/ranger.pod index 8599a1a6..41bafdd3 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -177,7 +177,7 @@ scripts by setting the option C and C to true This default script is F<~/.config/ranger/scope.sh>. It contains more documentation and calls to the programs I and I for html, I for text/code, I for images, I for archives, -I for PDFs and I for video and audio files. +I or I for PDFs and I for video and audio files. Install these programs (just the ones you need) and scope.sh will automatically use them. diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index 540a910e..f7a0f589 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -61,6 +61,7 @@ handle_extension() { pdf) # Preview as text conversion pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - && exit 5 + mutool draw -F txt -i -- "${FILE_PATH}" 1-10 && exit 5 exiftool "${FILE_PATH}" && exit 5 exit 1;; -- cgit 1.4.1-2-gfad0 From f6af1ebad94b902d61f73b00978272018e2ef438 Mon Sep 17 00:00:00 2001 From: toonn Date: Mon, 16 Apr 2018 14:13:49 +0200 Subject: Refix typo "sytem" --- doc/ranger.1 | 2 +- doc/ranger.pod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ranger.1 b/doc/ranger.1 index 71310541..238aafd5 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -702,7 +702,7 @@ in ranger. .IP "automatically_count_files [bool]" 4 .IX Item "automatically_count_files [bool]" Should ranger count and display the number of files in each directory -as soon as it's visible? This gets slow with remote file sytems. Turning it +as soon as it's visible? This gets slow with remote file systems. Turning it off will still allow you to see the number of files after entering the directory. .IP "autosave_bookmarks [bool]" 4 diff --git a/doc/ranger.pod b/doc/ranger.pod index 41bafdd3..0a34209a 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -678,7 +678,7 @@ in ranger. =item automatically_count_files [bool] Should ranger count and display the number of files in each directory -as soon as it's visible? This gets slow with remote file sytems. Turning it +as soon as it's visible? This gets slow with remote file systems. Turning it off will still allow you to see the number of files after entering the directory. -- cgit 1.4.1-2-gfad0 From 5ddfc6477643ffd3690d430f2f04d2b340d5e6a3 Mon Sep 17 00:00:00 2001 From: toonn Date: Tue, 8 May 2018 12:15:43 +0200 Subject: Document system-wide configuration files. --- doc/ranger.1 | 9 ++++++--- doc/ranger.pod | 7 +++++-- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/ranger.1 b/doc/ranger.1 index ab47de61..352b6a27 100644 --- a/doc/ranger.1 +++ b/doc/ranger.1 @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "RANGER 1" -.TH RANGER 1 "ranger-1.9.0" "2018-01-28" "ranger manual" +.TH RANGER 1 "ranger-1.9.0" "2018-05-08" "ranger manual" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -267,7 +267,7 @@ typing \fI"\fR. By default, only text files are previewed, but you can enable external preview scripts by setting the option \f(CW\*(C`use_preview_script\*(C'\fR and \f(CW\*(C`preview_files\*(C'\fR to true. .PP -This default script is \fI~/.config/ranger/scope.sh\fR. It contains more +This default script is \fI\f(CI%rangerdir\fI/data/scope.sh\fR. It contains more documentation and calls to the programs \fIlynx\fR and \fIelinks\fR for html, \&\fIhighlight\fR for text/code, \fIimg2txt\fR for images, \fIatool\fR for archives, \&\fIpdftotext\fR for PDFs and \fImediainfo\fR for video and audio files. @@ -463,7 +463,7 @@ sample plugins in the \fI/usr/share/doc/ranger/examples/\fR directory, including hello-world plugin that describes this procedure. .SH "KEY BINDINGS" .IX Header "KEY BINDINGS" -Key bindings are defined in the file \fIranger/config/rc.conf\fR. Check this +Key bindings are defined in the file \fI\f(CI%rangerdir\fI/config/rc.conf\fR. Check this file for a list of all key bindings. You can copy it to your local configuration directory with the \-\-copy\-config=rc option. .PP @@ -1421,6 +1421,9 @@ being bound despite the corresponding line being removed from the user's copy of the configuration file. This behavior may be disabled with an environment variable (see also: \fB\s-1ENVIRONMENT\s0\fR). Note: All other configuration files only read from one source; i.e. default \s-1OR\s0 user, not both. +\&\fIrc.conf\fR and \fIcommands.py\fR are additionally read from \fI/etc/ranger\fR if they +exist for system-wide configuration, user configuration overrides system +configuration which overrides the default configuration. .PP When starting ranger with the \fB\-\-clean\fR option, it will not access or create any of these files. diff --git a/doc/ranger.pod b/doc/ranger.pod index ee869393..69adc78e 100644 --- a/doc/ranger.pod +++ b/doc/ranger.pod @@ -174,7 +174,7 @@ typing I<">. By default, only text files are previewed, but you can enable external preview scripts by setting the option C and C to true. -This default script is F<~/.config/ranger/scope.sh>. It contains more +This default script is F<%rangerdir/data/scope.sh>. It contains more documentation and calls to the programs I and I for html, I for text/code, I for images, I for archives, I for PDFs and I for video and audio files. @@ -364,7 +364,7 @@ hello-world plugin that describes this procedure. =head1 KEY BINDINGS -Key bindings are defined in the file F. Check this +Key bindings are defined in the file F<%rangerdir/config/rc.conf>. Check this file for a list of all key bindings. You can copy it to your local configuration directory with the --copy-config=rc option. @@ -1507,6 +1507,9 @@ being bound despite the corresponding line being removed from the user's copy of the configuration file. This behavior may be disabled with an environment variable (see also: B). Note: All other configuration files only read from one source; i.e. default OR user, not both. +F and F are additionally read from F if they +exist for system-wide configuration, user configuration overrides system +configuration which overrides the default configuration. When starting ranger with the B<--clean> option, it will not access or create any of these files. -- cgit 1.4.1-2-gfad0