rtfm-filemanager 1.6.3 → 1.7.1
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/bin/rtfm +74 -76
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89f43bcb4ae0440210a8dd8127d94ca1c41c2f5016f09b9432e6ec40385c904a
|
4
|
+
data.tar.gz: 113c228e891b75d0f766d95849a32c39b2d21b3df3156d7987b52e25154e7968
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50ca7f0d6f7337d8de2ccf2cfe41f23d7a691dddcbd308e96f45c3d53ab6c84399fcb3b79a4aeb9bb7275be102cdf3a2a8b85907f37244a07f8ab41bb5f76b89
|
7
|
+
data.tar.gz: 15270e29f1f4632f85c6bbce268ed929e055dc752d60e6da8dc2547c4a7b20c3c3e8b9db4d9e25c248a2b8281b6e5548b7fcc8781f159e0c31f219213a15f79a
|
data/bin/rtfm
CHANGED
@@ -20,76 +20,77 @@
|
|
20
20
|
RTFM - Ruby Terminal File Manager (https://github.com/isene/RTFM)
|
21
21
|
|
22
22
|
BASIC KEYS
|
23
|
-
?
|
24
|
-
r
|
25
|
-
R
|
26
|
-
W
|
27
|
-
|
28
|
-
q
|
29
|
-
Q
|
23
|
+
? = Show this help text
|
24
|
+
r = Refresh RTFM (recreates all windows. Use on terminal resize or when there is garbage somewhere)
|
25
|
+
R = Reload configuration (~/.rtfm.conf)
|
26
|
+
W = Write parameters to ~/.rtfm.conf
|
27
|
+
(@lsall, @lslong, @lsorder, @lsinvert, @border, @width, @preview, @tagged, @marks)
|
28
|
+
q = Quit
|
29
|
+
Q = QUIT (without writing changes to the config file)
|
30
30
|
|
31
31
|
MOTION
|
32
|
-
DOWN
|
33
|
-
UP
|
34
|
-
LEFT
|
35
|
-
RIGHT
|
36
|
-
|
37
|
-
|
38
|
-
PgDown
|
39
|
-
PgUp
|
40
|
-
END
|
41
|
-
HOME
|
32
|
+
j/DOWN = Go one item down in left pane (rounds to top)
|
33
|
+
k/UP = Go one item up in left pane (rounds to bottom)
|
34
|
+
h/LEFT = Go up one directory level
|
35
|
+
l/RIGHT = Enter directory or open file (using run-mailcap or xdg-open)
|
36
|
+
Use the key 'x' to force open using xdg-open (or run-mailcap) - used for opening html files
|
37
|
+
in a browser rather than editing the file in your text editor
|
38
|
+
PgDown = Go one page down in left pane
|
39
|
+
PgUp = Go one page up in left pane
|
40
|
+
END = Go to last item in left pane
|
41
|
+
HOME = Go to first item in left pane
|
42
42
|
|
43
43
|
JUMPING AND MARKS
|
44
|
-
m
|
45
|
-
|
46
|
-
|
47
|
-
M
|
48
|
-
'
|
49
|
-
/
|
50
|
-
n
|
51
|
-
N
|
52
|
-
h
|
53
|
-
f
|
54
|
-
L
|
44
|
+
m = Mark current dir (persistent). Next letter is the name of the mark [a-zA-Z']
|
45
|
+
The special mark "'" jumps to the last directory (makes toggling dirs easy)
|
46
|
+
Press '-' and a letter to delete that mark
|
47
|
+
M = Show marked items in right pane
|
48
|
+
' = Jump to mark (next letter is the name of the mark [a-zA-Z'])
|
49
|
+
/ = Enter search string in bottom window to highlight matching items and jump to the first match
|
50
|
+
n = Jump to the next item matched by '/'
|
51
|
+
N = Jump to the previous item matched by '/'
|
52
|
+
h = Jump to Home directory
|
53
|
+
f = Follow symlink to the directory where the target resides
|
54
|
+
L = Start 'locate' search for files, then use '#' to jump to desired line/directory
|
55
55
|
|
56
56
|
TAGGING
|
57
|
-
t
|
58
|
-
Ctrl-t
|
59
|
-
T
|
60
|
-
u
|
57
|
+
t = Tag item (toggles)
|
58
|
+
Ctrl-t = Add items matching a pattern to list of tagged items (Ctrl-t and then . will tag all items)
|
59
|
+
T = Show currently tagged items in right pane
|
60
|
+
u = Untag all tagged items
|
61
61
|
|
62
62
|
MANIPULATE ITEMS
|
63
|
-
p
|
64
|
-
P
|
65
|
-
s
|
66
|
-
d
|
67
|
-
c
|
63
|
+
p = Put (copy) tagged items here
|
64
|
+
P = PUT (move) tagged items here
|
65
|
+
s = Create symlink to tagged items here
|
66
|
+
d = Delete selected item and tagged items. Press 'd' to confirm
|
67
|
+
c = Change/rename selected (adds command to bottom window)
|
68
68
|
|
69
69
|
DIRECTORY VIEWS
|
70
|
-
a
|
71
|
-
l
|
72
|
-
o
|
73
|
-
i
|
74
|
-
O
|
75
|
-
G
|
76
|
-
H
|
77
|
-
|
78
|
-
S
|
70
|
+
a = Show all (also hidden) items
|
71
|
+
l = Show long info per item (show item attributes)
|
72
|
+
o = Change the order/sorting of directories (circular toggle)
|
73
|
+
i = Invert/reverse the sorting
|
74
|
+
O = Show the Ordering in the bottom window (the full ls command)
|
75
|
+
G = Show git status for current directory
|
76
|
+
H = Do a cryptographic hash of the current directory with subdirs
|
77
|
+
If a previous hash was made, compare and report if there has been any change
|
78
|
+
S = Show comprehensive system info (system, CPU, filesystem, latest dmesg messages)
|
79
79
|
|
80
80
|
RIGHT PANE
|
81
|
-
ENTER
|
82
|
-
TAB
|
83
|
-
S-TAB
|
84
|
-
w
|
85
|
-
-
|
81
|
+
ENTER = Refresh the right pane
|
82
|
+
TAB = Next page of the preview (if doc long and ∇ in the bottom right)
|
83
|
+
S-TAB = Previous page (if you have moved down the document first - ∆ in the top right)
|
84
|
+
w = Change the width of the left/right panes (left pane ⇒ ⅓ ⇒ ¼ ⇒ ⅕ ⇒ ⅙ ⇒ ½ ⇒ ⅓)
|
85
|
+
- = Toggle preview in right pane (turn it off for faster traversing of directories)
|
86
|
+
_ = Toggle preview of images in right pane
|
86
87
|
|
87
88
|
ADDITINAL COMMANDS
|
88
|
-
g
|
89
|
-
:
|
90
|
-
;
|
91
|
-
y
|
92
|
-
Y
|
89
|
+
g = Run 'grep' to show files that contains the MATCH in current directory
|
90
|
+
: = Enter "command mode" in bottom window (press ENTER to execute, press Ctrl-G to escape)
|
91
|
+
; = Show command history in right pane
|
92
|
+
y = Copy path of selected item to primary selection (for pasting with middle mouse button)
|
93
|
+
Y = Copy path of selected item to clipboard
|
93
94
|
|
94
95
|
COPYRIGHT: Geir Isene, 2020-1. No rights reserved. See http://isene.com for more.
|
95
96
|
HELPTEXT
|
@@ -242,7 +243,7 @@ def getchr # PROCESS KEY PRESSES
|
|
242
243
|
# Note: Curses.getch blanks out @w_t
|
243
244
|
# @w_l.getch makes Curses::KEY_DOWN etc not work
|
244
245
|
# Therefore resorting to the generic method
|
245
|
-
c = STDIN.getch(min: 0, time:
|
246
|
+
c = STDIN.getch(min: 0, time: 3)
|
246
247
|
case c
|
247
248
|
when "\e" # ANSI escape sequences
|
248
249
|
case $stdin.getc
|
@@ -300,17 +301,17 @@ def main_getkey # GET KEY FROM USER
|
|
300
301
|
@write_conf = false
|
301
302
|
exit 0
|
302
303
|
# MOTION
|
303
|
-
when 'DOWN'
|
304
|
+
when 'DOWN', 'j'
|
304
305
|
var_resets
|
305
306
|
@index = @index >= @max_index ? @min_index : @index + 1
|
306
307
|
@w_r.update = true
|
307
308
|
@w_b.update = true
|
308
|
-
when 'UP'
|
309
|
+
when 'UP', 'k'
|
309
310
|
var_resets
|
310
311
|
@index = @index <= @min_index ? @max_index : @index - 1
|
311
312
|
@w_r.update = true
|
312
313
|
@w_b.update = true
|
313
|
-
when 'LEFT'
|
314
|
+
when 'LEFT', 'h'
|
314
315
|
var_resets
|
315
316
|
cur_dir = Dir.pwd
|
316
317
|
@directory[Dir.pwd] = @selected # Store this directory before leaving
|
@@ -319,12 +320,11 @@ def main_getkey # GET KEY FROM USER
|
|
319
320
|
@directory[Dir.pwd] = File.basename(cur_dir) unless @directory.key?(Dir.pwd)
|
320
321
|
@w_r.update = true
|
321
322
|
@w_b.update = true
|
322
|
-
when 'RIGHT'
|
323
|
+
when 'RIGHT', 'l'
|
323
324
|
var_resets
|
324
325
|
@directory[Dir.pwd] = @selected # Store this directory before leaving
|
325
326
|
@marks["'"] = Dir.pwd
|
326
327
|
open_selected()
|
327
|
-
@change_tag = true
|
328
328
|
@w_r.update = true
|
329
329
|
@w_b.update = true
|
330
330
|
when 'x' # Force open with file opener (used to open HTML files in browser)
|
@@ -332,7 +332,6 @@ def main_getkey # GET KEY FROM USER
|
|
332
332
|
@directory[Dir.pwd] = @selected # Store this directory before leaving
|
333
333
|
@marks["'"] = Dir.pwd
|
334
334
|
open_selected(true)
|
335
|
-
@change_tag = true
|
336
335
|
@w_r.update = true
|
337
336
|
@w_b.update = true
|
338
337
|
when 'PgDOWN'
|
@@ -392,7 +391,7 @@ def main_getkey # GET KEY FROM USER
|
|
392
391
|
end
|
393
392
|
@w_r.update = true
|
394
393
|
@w_b.update = true
|
395
|
-
when '
|
394
|
+
when '.' # Go to home dir
|
396
395
|
var_resets
|
397
396
|
@directory[Dir.pwd] = @selected # Store this directory before leaving
|
398
397
|
@marks["'"] = Dir.pwd
|
@@ -463,17 +462,14 @@ def main_getkey # GET KEY FROM USER
|
|
463
462
|
copy_move_link("copy")
|
464
463
|
@w_r.update = true
|
465
464
|
@w_b.update = true
|
466
|
-
@change_tag = true
|
467
465
|
when 'P' # Move tagged items here
|
468
466
|
copy_move_link("move")
|
469
467
|
@w_r.update = true
|
470
468
|
@w_b.update = true
|
471
|
-
@change_tag = true
|
472
469
|
when 's' # Create symlink to tagged items here
|
473
470
|
copy_move_link("link")
|
474
471
|
@w_r.update = true
|
475
472
|
@w_b.update = true
|
476
|
-
@change_tag = true
|
477
473
|
when 'd' # Delete items tagged and @selected
|
478
474
|
tagged_info
|
479
475
|
w_b_info(" Delete selected and tagged? (press 'd' again to delete)")
|
@@ -502,8 +498,7 @@ def main_getkey # GET KEY FROM USER
|
|
502
498
|
@lsall == "" ? @lsall = "-a" : @lsall = ""
|
503
499
|
@w_r.update = true
|
504
500
|
@w_b.update = true
|
505
|
-
|
506
|
-
when 'l' # Show long info for all items
|
501
|
+
when 'A' # Show all info for all items
|
507
502
|
@lslong = !@lslong
|
508
503
|
@w_r.update = true
|
509
504
|
@w_b.update = true
|
@@ -524,7 +519,6 @@ def main_getkey # GET KEY FROM USER
|
|
524
519
|
end
|
525
520
|
@w_r.update = true
|
526
521
|
@orderchange = true
|
527
|
-
@change_tag = true
|
528
522
|
when 'i' # Invert the order/sorting of directory views
|
529
523
|
case @lsinvert
|
530
524
|
when ""
|
@@ -536,7 +530,6 @@ def main_getkey # GET KEY FROM USER
|
|
536
530
|
end
|
537
531
|
@w_r.update = true
|
538
532
|
@orderchange = true
|
539
|
-
@change_tag = true
|
540
533
|
when 'O' # Show the Ordering in the bottom window (the full ls command)
|
541
534
|
w_b_info(" Full 'ls' command: ls <@s> #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}")
|
542
535
|
when 'G' # Git status for selected item or current dir
|
@@ -641,6 +634,10 @@ def main_getkey # GET KEY FROM USER
|
|
641
634
|
@preview = !@preview
|
642
635
|
@break = true
|
643
636
|
@w_b.update = true
|
637
|
+
when '_'
|
638
|
+
@showimage = !@showimage
|
639
|
+
@break = true
|
640
|
+
@w_b.update = true
|
644
641
|
# ADDITIONAL COMMANDS
|
645
642
|
when '/' # Get search string to mark items that match the input
|
646
643
|
@w_b.nohistory = true
|
@@ -744,6 +741,8 @@ def conf_write
|
|
744
741
|
conf += "@border = #{@border}\n"
|
745
742
|
conf.sub!(/^@preview.*\n/, "")
|
746
743
|
conf += "@preview = #{@preview}\n"
|
744
|
+
conf.sub!(/^@showimage.*\n/, "")
|
745
|
+
conf += "@showimage = #{@showimage}\n"
|
747
746
|
w_r_info("Press W again to write this to .rtfm.conf:\n\n" + conf)
|
748
747
|
if getchr == 'W'
|
749
748
|
w_b_info(" Parameters written to .rtfm.conf")
|
@@ -1302,7 +1301,6 @@ def w_b_exec(cmd) # EXECUTE COMMAND FROM @W_B
|
|
1302
1301
|
pager_show
|
1303
1302
|
@w_r.update = false
|
1304
1303
|
end
|
1305
|
-
@change_tag = true
|
1306
1304
|
}
|
1307
1305
|
rescue
|
1308
1306
|
w_b_info(" Failed to execute command (#{cmd})")
|
@@ -1347,7 +1345,7 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
|
|
1347
1345
|
@w_r.update = false
|
1348
1346
|
end
|
1349
1347
|
@change = true
|
1350
|
-
@change_tag = true
|
1348
|
+
@change_tag = true # For future need to force @change
|
1351
1349
|
loop do # INNER, CORE LOOP
|
1352
1350
|
begin # Jump to home dir if current dir is externally removed
|
1353
1351
|
Dir.pwd
|
@@ -1388,10 +1386,10 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
|
|
1388
1386
|
system("printf \"\033]0;RTFM: #{Dir.pwd}\007\"") # Set Window title to path
|
1389
1387
|
# Top window (info line)
|
1390
1388
|
w_t_info
|
1391
|
-
@w_l.setpos(0,0)
|
1392
|
-
list_dir(true)
|
1393
|
-
@w_l.refresh
|
1394
1389
|
end
|
1390
|
+
@w_l.setpos(0,0)
|
1391
|
+
list_dir(true)
|
1392
|
+
@w_l.refresh
|
1395
1393
|
# Bottom window (command line) Before @w_r to avoid image dropping out on startup
|
1396
1394
|
w_b_info(nil) if @w_b.update
|
1397
1395
|
# Left and right windows (browser & content viewer)
|
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: 1.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
description: 'A full featured terminal browser with syntax highlighted files, images
|
34
34
|
shown in the terminal, videos thumbnailed, etc. You can bookmark and jump around
|
35
35
|
easily, delete, rename, copy, symlink and move files. RTFM has a a wide range of
|
36
|
-
other features. New in 1.
|
36
|
+
other features. New in 1.7.1: Added toggle of image preview in the right pane.'
|
37
37
|
email: g@isene.com
|
38
38
|
executables:
|
39
39
|
- rtfm
|