rtfm-filemanager 1.6.4 → 1.7.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rtfm +79 -79
  3. metadata +4 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ab7aa344d67306f6be697c6886fa425f264220619ccf164c507511c8a4585b47
4
- data.tar.gz: 1f9c97a257b4f9945b3e9d7e7c1b8d46455e4ea119de7c7e0903891b70bbc388
3
+ metadata.gz: 9f217884d5c1629f2efe87c616c6a51b1536088387db09dfd0e4e04d6db6d499
4
+ data.tar.gz: '024197c33320b734f775363b86850e9f0fadf1ae4460e12992d552bc1c1dee41'
5
5
  SHA512:
6
- metadata.gz: 216aa9d14b5e0dc39ecbc6906016d1f543d2a4a7d8a7b25c13b4ec95a3a6ae36d8f23d80d0910d1ff393a307de5a9706706a1832bcfff2057a2008942fdaa32b
7
- data.tar.gz: 6dbcf4e00f813cf917ff3aa512c2f479ea0a9b40c5c1ec151b8f9076dc6857bc38dc884688eaff3bdbf0b197bc5c91a8b6b49b53ab6c28c88a493e01a3c53ef1
6
+ metadata.gz: 6dd3979dda6781c6ab1d72c904191c2604b251bd7ea29cf3914dad248c5b0efa43c791676b3b3c0e753b33d7330f0743736211708ca85553789707e4b97ac3b3
7
+ data.tar.gz: 66dd19314c400833b1cc80e7413a4a68c4fe06aaf7f416666aa53f1ad0300465a8d36724114aa90f266eb5c7cb6bbf30de600eab65eda1b6fcb8a6855c828320
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
- ? = 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)
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 = Go one item down in left pane (rounds to top)
33
- UP = Go one item up in left pane (rounds to bottom)
34
- LEFT = Go up one directory level
35
- 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
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 = 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
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 = 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
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 = 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)
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 = 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)
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 = 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)
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 = Run 'grep' to show files that contains the MATCH in current directory
89
- : = Enter "command mode" in bottom window (press ENTER to execute, press Ctrl-G to escape)
90
- ; = Show command history in right pane
91
- y = Copy path of selected item to primary selection (for pasting with middle mouse button)
92
- Y = Copy path of selected item to clipboard
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: 1)
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,14 +391,13 @@ def main_getkey # GET KEY FROM USER
392
391
  end
393
392
  @w_r.update = true
394
393
  @w_b.update = true
395
- when 'h' # Go to home dir
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
399
398
  Dir.chdir
400
399
  @w_r.update = true
401
400
  @w_b.update = true
402
- @change_tag = true
403
401
  when 'f' # Follow symlink
404
402
  @directory[Dir.pwd] = @selected # Store this directory before leaving
405
403
  @marks["'"] = Dir.pwd
@@ -444,7 +442,6 @@ def main_getkey # GET KEY FROM USER
444
442
  @index += 1
445
443
  @w_r.update = true
446
444
  @w_b.update = true
447
- @change_tag = true
448
445
  when 'C-T' # Tag items matching a pettern
449
446
  @w_b.nohistory = true
450
447
  @tag = w_b_getstr("~ ", "")
@@ -465,17 +462,14 @@ def main_getkey # GET KEY FROM USER
465
462
  copy_move_link("copy")
466
463
  @w_r.update = true
467
464
  @w_b.update = true
468
- @change_tag = true
469
465
  when 'P' # Move tagged items here
470
466
  copy_move_link("move")
471
467
  @w_r.update = true
472
468
  @w_b.update = true
473
- @change_tag = true
474
469
  when 's' # Create symlink to tagged items here
475
470
  copy_move_link("link")
476
471
  @w_r.update = true
477
472
  @w_b.update = true
478
- @change_tag = true
479
473
  when 'd' # Delete items tagged and @selected
480
474
  tagged_info
481
475
  w_b_info(" Delete selected and tagged? (press 'd' again to delete)")
@@ -504,8 +498,7 @@ def main_getkey # GET KEY FROM USER
504
498
  @lsall == "" ? @lsall = "-a" : @lsall = ""
505
499
  @w_r.update = true
506
500
  @w_b.update = true
507
- @change_tag = true
508
- when 'l' # Show long info for all items
501
+ when 'A' # Show all info for all items
509
502
  @lslong = !@lslong
510
503
  @w_r.update = true
511
504
  @w_b.update = true
@@ -526,7 +519,6 @@ def main_getkey # GET KEY FROM USER
526
519
  end
527
520
  @w_r.update = true
528
521
  @orderchange = true
529
- @change_tag = true
530
522
  when 'i' # Invert the order/sorting of directory views
531
523
  case @lsinvert
532
524
  when ""
@@ -538,7 +530,6 @@ def main_getkey # GET KEY FROM USER
538
530
  end
539
531
  @w_r.update = true
540
532
  @orderchange = true
541
- @change_tag = true
542
533
  when 'O' # Show the Ordering in the bottom window (the full ls command)
543
534
  w_b_info(" Full 'ls' command: ls <@s> #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}")
544
535
  when 'G' # Git status for selected item or current dir
@@ -641,8 +632,16 @@ def main_getkey # GET KEY FROM USER
641
632
  @w_b.update = true
642
633
  when '-'
643
634
  @preview = !@preview
635
+ @preview ? p = "On" : p = "Off"
636
+ w_b_info("Preview = " + p)
637
+ getch
638
+ @break = true
639
+ when '_'
640
+ @showimage = !@showimage
641
+ @showimage ? i = "On" : i = "Off"
642
+ w_b_info("Image preview = " + i)
643
+ getch
644
644
  @break = true
645
- @w_b.update = true
646
645
  # ADDITIONAL COMMANDS
647
646
  when '/' # Get search string to mark items that match the input
648
647
  @w_b.nohistory = true
@@ -746,6 +745,8 @@ def conf_write
746
745
  conf += "@border = #{@border}\n"
747
746
  conf.sub!(/^@preview.*\n/, "")
748
747
  conf += "@preview = #{@preview}\n"
748
+ conf.sub!(/^@showimage.*\n/, "")
749
+ conf += "@showimage = #{@showimage}\n"
749
750
  w_r_info("Press W again to write this to .rtfm.conf:\n\n" + conf)
750
751
  if getchr == 'W'
751
752
  w_b_info(" Parameters written to .rtfm.conf")
@@ -1304,7 +1305,6 @@ def w_b_exec(cmd) # EXECUTE COMMAND FROM @W_B
1304
1305
  pager_show
1305
1306
  @w_r.update = false
1306
1307
  end
1307
- @change_tag = true
1308
1308
  }
1309
1309
  rescue
1310
1310
  w_b_info(" Failed to execute command (#{cmd})")
@@ -1349,7 +1349,7 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
1349
1349
  @w_r.update = false
1350
1350
  end
1351
1351
  @change = true
1352
- @change_tag = true
1352
+ @change_tag = true # For future need to force @change
1353
1353
  loop do # INNER, CORE LOOP
1354
1354
  begin # Jump to home dir if current dir is externally removed
1355
1355
  Dir.pwd
@@ -1390,10 +1390,10 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
1390
1390
  system("printf \"\033]0;RTFM: #{Dir.pwd}\007\"") # Set Window title to path
1391
1391
  # Top window (info line)
1392
1392
  w_t_info
1393
- @w_l.setpos(0,0)
1394
- list_dir(true)
1395
- @w_l.refresh
1396
1393
  end
1394
+ @w_l.setpos(0,0)
1395
+ list_dir(true)
1396
+ @w_l.refresh
1397
1397
  # Bottom window (command line) Before @w_r to avoid image dropping out on startup
1398
1398
  w_b_info(nil) if @w_b.update
1399
1399
  # 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.6.4
4
+ version: 1.7.2
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-12-01 00:00:00.000000000 Z
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,8 @@ 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.6.4: .Added dir refresh when jumping via ''h'''
36
+ other features. New in 1.7.2: Showing (image)preview status in statusline on ''-''
37
+ and ''_''.'
37
38
  email: g@isene.com
38
39
  executables:
39
40
  - rtfm