rtfm-filemanager 3.36 → 4.05
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +29 -6
- data/bin/rtfm +12 -4
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 434f36ccbb28a3179e74a85ce846a12e7b896ba23f40949be60d07ba2cc52d61
|
4
|
+
data.tar.gz: 22abde55bf362804f49a6115d403d49d135955e738237a51cf5436a90eeb3f11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6993b37af607b5b4532a769f6691fb6ecb88747bef96b785a1e30ac2973ded21ef4a21c55f3d3b068358d03d54bf0c8c04864896b15609f6c37af60ea2e28f89
|
7
|
+
data.tar.gz: 6b8fe07dd3a32f226c80df6ad60e6ce8c497cffbc963d6f295758f33cc9981b0ebb4bdceb43efe157f1de27418d89d73802e6c7433f2f72f6339439cbdd1fc70
|
data/README.md
CHANGED
@@ -5,7 +5,6 @@
|
|
5
5
|
What other features can I cram into this file manager?
|
6
6
|
|
7
7
|
## What?
|
8
|
-
|
9
8
|
<img src="img/logo.jpg" align="left" width="150" height="150"> RTFM is a
|
10
9
|
terminal file manager jam packed with features.
|
11
10
|
|
@@ -17,8 +16,8 @@ much more.
|
|
17
16
|
Note: RTFM (Ruby Terminal File Manager) works best with the (u)rxvt, xterm and
|
18
17
|
Eterm terminal emulators.
|
19
18
|
|
20
|
-
## Features
|
21
19
|
|
20
|
+
## Features
|
22
21
|
RTFM is one of the more feature rich terminal file managers. Some of the
|
23
22
|
features are:
|
24
23
|
|
@@ -48,6 +47,8 @@ features are:
|
|
48
47
|
* Show comprehensive system info (processes running, disk space, dmesg, etc.)
|
49
48
|
* See if a directory (with sub dirs) has changed using cryptographic hashes
|
50
49
|
* Integration with OpenAI to get an executive summary of file content
|
50
|
+
* Possibility to change top line background when matching a path
|
51
|
+
|
51
52
|
|
52
53
|
## Why?
|
53
54
|
RTFM parses your LS_COLORS to ensure color consistency with the terminal experience.
|
@@ -60,6 +61,7 @@ should parse LS_COLORS as default rather than implement their own themes. This
|
|
60
61
|
became an itch that I kept scratching until I could happily replace ranger two
|
61
62
|
weeks later.
|
62
63
|
|
64
|
+
|
63
65
|
## How?
|
64
66
|
RTFM is a two-pane file manager. You navigate in the left pane and the content
|
65
67
|
of the selected item (directory or file) is shown in the right pane. The right
|
@@ -77,8 +79,8 @@ complete directories and file names and ENTER to issue the command, while
|
|
77
79
|
Ctrl-u deletes the line. Issuing ENTER on a blank line has no effect. Use
|
78
80
|
Ctrl-g to leave the command bar without executing anything.
|
79
81
|
|
80
|
-
## Installation
|
81
82
|
|
83
|
+
## Installation
|
82
84
|
You can install RTFM by coloning this repo and put the file `rtfm` in your
|
83
85
|
"bin" directory. Or you can simply run `gem install rtfm-filemanager`.
|
84
86
|
|
@@ -123,12 +125,12 @@ sudo apt install ruby-full git libncurses-dev x11-utils xdotool bat poppler-util
|
|
123
125
|
gem install rtfm-filemanager
|
124
126
|
```
|
125
127
|
|
126
|
-
## Screenshot
|
127
128
|
|
129
|
+
## Screenshot
|
128
130
|

|
129
131
|
|
130
|
-
## Image preview in the terminal
|
131
132
|
|
133
|
+
## Image preview in the terminal
|
132
134
|
RTFM uses w3mimgdisplay (part of the w3m package) to show images in the
|
133
135
|
terminal. Some terminals have an issue with this - either the images don't
|
134
136
|
show, the previous image is not cleared (new image overlaps the previous) or
|
@@ -155,7 +157,6 @@ qterminal | X | |
|
|
155
157
|
|
156
158
|
|
157
159
|
## Keys
|
158
|
-
|
159
160
|
These are the set of keys to move around and do actions within RTFM:
|
160
161
|
|
161
162
|
### Basic keys
|
@@ -269,9 +270,11 @@ Ctrl-d | Create a new directory (a shortcut for ":mkdir ")
|
|
269
270
|
Ctrl-n | Invoke navi (see https://github.com/denisidoro/navi) with any output in right pane
|
270
271
|
S | Show comprehensive system info (system, CPU, filesystem, latest dmesg messages)
|
271
272
|
|
273
|
+
|
272
274
|
## Keyboard cheat sheet
|
273
275
|

|
274
276
|
|
277
|
+
|
275
278
|
## First run
|
276
279
|
The first time you run RTFM, you are greeted with a welcome message. RTFM will
|
277
280
|
then create a file (`.rtfm.launch`) in your home directory that will let you
|
@@ -348,6 +351,26 @@ square brackets at the end of the top info line. Image files will have the
|
|
348
351
|
size of the image included while pdf files will have the number of pages. More
|
349
352
|
file specific information will be included when I feel like adding such.
|
350
353
|
|
354
|
+
|
355
|
+
## Top line background color when matching a path
|
356
|
+
You can set the variable `@topmatch` in your `.rtfm.conf` so that it will change
|
357
|
+
the background color of the top line/pane when you are in a directory matching
|
358
|
+
a pattern.
|
359
|
+
|
360
|
+
Example:
|
361
|
+
```
|
362
|
+
@topmatch = [["passionfruit", 165], ["dualog", 50], ["", 238]]
|
363
|
+
```
|
364
|
+
With this, the background color of the top line/pane will be set to `165` if
|
365
|
+
you are in a directory path that includes "passionfruits". The last pair is
|
366
|
+
the default background color when no match is found. If you don't set this
|
367
|
+
variable in your `.rtfm.conf`, rtfm will set this value to:
|
368
|
+
```
|
369
|
+
@topmatch = [["", 238]]
|
370
|
+
```
|
371
|
+
Make sure to have a default value set as the last pair in `@topmatch`.
|
372
|
+
|
373
|
+
|
351
374
|
## Screencast
|
352
375
|
[](https://youtu.be/ANUOlDryUng)
|
353
376
|
|
data/bin/rtfm
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
# for any damages resulting from its use. Further, I am under no
|
15
15
|
# obligation to maintain or extend this software. It is provided
|
16
16
|
# on an 'as is' basis without any expressed or implied warranty.
|
17
|
-
@version = "
|
17
|
+
@version = "4.05" # Visual cue when entering commands or Ruby code in bottom line/pane
|
18
18
|
|
19
19
|
# PRELIMINARIES
|
20
20
|
@help = <<HELPTEXT
|
@@ -115,7 +115,7 @@ ADDITIONAL COMMANDS
|
|
115
115
|
Ctrl-n = Invoke navi (see https://github.com/denisidoro/navi) with any output in right window
|
116
116
|
S = Show comprehensive System info (system, CPU, filesystem, latest dmesg messages)
|
117
117
|
|
118
|
-
COPYRIGHT: Geir Isene, 2020-
|
118
|
+
COPYRIGHT: Geir Isene, 2020-5. No rights reserved. See http://isene.com for more.
|
119
119
|
HELPTEXT
|
120
120
|
def firstrun
|
121
121
|
@firstrun = <<~FIRSTRUN
|
@@ -251,10 +251,11 @@ begin # BASIC SETUP
|
|
251
251
|
@history = [] # Initialize the command line history array
|
252
252
|
@rubyhistory = [] # Initialize the command line history array for ruby commands
|
253
253
|
@border = false
|
254
|
+
@topmatch = [["", 249]]
|
254
255
|
@preview = true
|
255
256
|
@runmailcap = false # Set to 'true' in .rtfm.conf if you want to use run-mailcap instead of xdg-open
|
256
257
|
@batuse = true # Use batcat for syntax highlighting
|
257
|
-
@aimodel = "gpt-
|
258
|
+
@aimodel = "gpt-4o-mini" # The default OpenAI model, set another in .rtfm.conf if you like
|
258
259
|
## These are automatically written on exit
|
259
260
|
@marks = {} # Initialize (book)marks hash
|
260
261
|
@hash = {} # Initialize the sha directory hashing
|
@@ -876,6 +877,7 @@ def main_getkey # GET KEY FROM USER
|
|
876
877
|
@w_r.nohistory = false
|
877
878
|
cmd = w_b_getstr(": ", "")
|
878
879
|
w_b_exec(cmd)
|
880
|
+
@w_b.update = true
|
879
881
|
when ';' # Show command history
|
880
882
|
w_r_info("Command history (latest on top):\n\n" + @history.join("\n"))
|
881
883
|
@w_b.update = true
|
@@ -1497,7 +1499,11 @@ def w_b_getstr(pretext, text, ruby=false) # A SIMPLE READLINE-LIKE ROUTINE
|
|
1497
1499
|
pos = @history_copy[stk].length
|
1498
1500
|
while chr != "ENTER"
|
1499
1501
|
@w_b.setpos(0,0)
|
1500
|
-
|
1502
|
+
if ruby
|
1503
|
+
init_pair(250, 250, 52)
|
1504
|
+
else
|
1505
|
+
init_pair(250, 250, 22)
|
1506
|
+
end
|
1501
1507
|
text = pretext + @history_copy[stk]
|
1502
1508
|
text += " " * (@w_b.maxx - text.length) if text.length < @w_b.maxx
|
1503
1509
|
@w_b.attron(color_pair(250)) { @w_b << text }
|
@@ -1706,6 +1712,8 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
|
|
1706
1712
|
@index = 0
|
1707
1713
|
end
|
1708
1714
|
end
|
1715
|
+
dir_path = Dir.pwd.downcase
|
1716
|
+
@w_t.bg = @topmatch.find { |name, _| name == "" || dir_path.include?(name.downcase) }&.last
|
1709
1717
|
dir_old = Dir.pwd
|
1710
1718
|
@index = 0 if @index == nil
|
1711
1719
|
index_old = @index
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rtfm-filemanager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '
|
4
|
+
version: '4.05'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -47,7 +47,8 @@ dependencies:
|
|
47
47
|
description: 'A full featured terminal browser with syntax highlighted files, images
|
48
48
|
shown in the terminal, videos thumbnailed, etc. You can bookmark and jump around
|
49
49
|
easily, delete, rename, copy, symlink and move files. RTFM has a a wide range of
|
50
|
-
other features. New in
|
50
|
+
other features. New in 4.05: Visual cue when entering commands or Ruby code in bottom
|
51
|
+
line/pane.'
|
51
52
|
email: g@isene.com
|
52
53
|
executables:
|
53
54
|
- rtfm
|