rtfm-filemanager 3.14.1 → 3.14.159
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/bin/rtfm +18 -20
- data/rtfm-kb.png +0 -0
- 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: e855728341fc36cac457175402892a96bf01531e7c078c97aca18b3d2ab1487b
|
4
|
+
data.tar.gz: 5afa14779f3f74d3e7c47be256a5a4e640792515d650699625a81c047b11994c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5534f8c70ab1ce40519ef68411c8c93ee3dc0264abb9b6ad109a6ad3628d9add63b47c7c2f1e6f12435fd336dcfc26fcc54a535ce99adefdbea018707fda4bb5
|
7
|
+
data.tar.gz: 7ec0837be6947b7cc30a0824088589f878b2ef98e9cfcb58194ff5d0bcba8e81f6a37e6157ebbd2a64f1c93bfe4bc1137094d915560e41dd9d6214e1f91055db
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# RTFM - Ruby Terminal File Manager
|
2
|
-
|
2
|
+
|
3
3
|
 [](https://badge.fury.io/rb/rtfm-filemanager)  
|
4
4
|
|
5
5
|
What other features can I cram into this file manager?
|
@@ -263,8 +263,9 @@ B | Toggle border
|
|
263
263
|
y | Copy path of selected item to primary selection (for pasting with middle mouse button)
|
264
264
|
Y | Copy path of selected item to clipboard
|
265
265
|
Ctrl-y | Copy content of right pane to clipboard
|
266
|
-
|
266
|
+
Ctrl-d | Create a new directory (a shortcut for ":mkdir ")
|
267
267
|
Ctrl-n | Invoke navi (see https://github.com/denisidoro/navi) with any output in right pane
|
268
|
+
S | Show comprehensive system info (system, CPU, filesystem, latest dmesg messages)
|
268
269
|
|
269
270
|
## Keyboard cheat sheet
|
270
271
|

|
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 = "3.14"
|
17
|
+
@version = "3.14.159"
|
18
18
|
|
19
19
|
# PRELIMINARIES
|
20
20
|
@help = <<HELPTEXT
|
@@ -111,10 +111,11 @@ ADDITIONAL COMMANDS
|
|
111
111
|
y = Copy path of selected item to primary selection (for pasting with middle mouse button)
|
112
112
|
Y = Copy path of selected item to clipboard
|
113
113
|
Ctrl-y = Copy content of right pane to clipboard
|
114
|
-
|
114
|
+
Ctrl-d = Create a new directory (a shortcut for ":mkdir ")
|
115
115
|
Ctrl-n = Invoke navi (see https://github.com/denisidoro/navi) with any output in right window
|
116
|
+
S = Show comprehensive System info (system, CPU, filesystem, latest dmesg messages)
|
116
117
|
|
117
|
-
COPYRIGHT: Geir Isene, 2020-
|
118
|
+
COPYRIGHT: Geir Isene, 2020-4. No rights reserved. See http://isene.com for more.
|
118
119
|
HELPTEXT
|
119
120
|
def firstrun
|
120
121
|
@firstrun = <<~FIRSTRUN
|
@@ -347,6 +348,7 @@ def getchr # PROCESS KEY PRESSES
|
|
347
348
|
when "" then chr = "WBACK"
|
348
349
|
when "" then chr = "LDEL"
|
349
350
|
when "" then chr = "C-C"
|
351
|
+
when "" then chr = "C-D"
|
350
352
|
when "" then chr = "C-G"
|
351
353
|
when "" then chr = "C-L"
|
352
354
|
when "" then chr = "C-N"
|
@@ -868,6 +870,9 @@ def main_getkey # GET KEY FROM USER
|
|
868
870
|
system("echo -n '#{@cont}' | #{clip}")
|
869
871
|
when 'S' # Show comprehensive system info
|
870
872
|
sysinfo
|
873
|
+
when 'C-D' # Create new directory (shortcut for ":mkdir ")
|
874
|
+
cmd = w_b_getstr(": ", "mkdir ")
|
875
|
+
w_b_exec(cmd)
|
871
876
|
when 'C-N' # navi integration (https://github.com/denisidoro/navi)
|
872
877
|
begin
|
873
878
|
@navi = `navi`
|
@@ -1073,7 +1078,7 @@ def list_dir(active) # LIST CONTENT OF A DIRECTORY (BOTH active AND RIGHT WINDOW
|
|
1073
1078
|
win.attron(file_marker) { win << str } # Implement color/bold to the item
|
1074
1079
|
win.clrtoeol
|
1075
1080
|
win << "\n"
|
1076
|
-
ix += 1; t
|
1081
|
+
ix += 1; t += 1
|
1077
1082
|
end
|
1078
1083
|
(win.maxy - win.cury).times {win.deleteln()} # Clear to bottom of window
|
1079
1084
|
if active
|
@@ -1100,12 +1105,12 @@ def open_selected(html = nil) # OPEN SELECTED ITEM (when pressing RIGHT)
|
|
1100
1105
|
if File.read(@selected).force_encoding("UTF-8").valid_encoding? and not html
|
1101
1106
|
system("exec $EDITOR #{@selected_safe}")
|
1102
1107
|
else
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
end
|
1108
|
+
if @runmailcap
|
1109
|
+
Thread.new { system("run-mailcap #{@selected_safe} 2>/dev/null") }
|
1110
|
+
else
|
1111
|
+
Thread.new { system("xdg-open #{@selected_safe} 2>/dev/null") }
|
1108
1112
|
end
|
1113
|
+
end
|
1109
1114
|
@break = true
|
1110
1115
|
rescue
|
1111
1116
|
end
|
@@ -1623,8 +1628,8 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
|
|
1623
1628
|
maxx = Curses.cols
|
1624
1629
|
maxy = Curses.lines
|
1625
1630
|
# Curses::Window.new(h,w,y,x)
|
1626
|
-
@w_t = Curses::Window.new(1,
|
1627
|
-
@w_b = Curses::Window.new(1,
|
1631
|
+
@w_t = Curses::Window.new(1, maxx, 0, 0)
|
1632
|
+
@w_b = Curses::Window.new(1, maxx, maxy - 1, 0)
|
1628
1633
|
@w_l = Curses::Window.new(maxy - 3, (maxx * @width / 10) - 1, 2, 0)
|
1629
1634
|
@w_r = Curses::Window.new(maxy - 4, maxx - (maxx * @width / 10), 2, maxx * @width / 10)
|
1630
1635
|
@w_p = Curses::Window.new(1, maxx - (maxx * @width / 10), maxy - 2, maxx * @width / 10)
|
@@ -1643,8 +1648,6 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
|
|
1643
1648
|
tagged_info
|
1644
1649
|
@w_r.update = false
|
1645
1650
|
end
|
1646
|
-
@change = true
|
1647
|
-
@change_tag = true # For future need to force @change
|
1648
1651
|
loop do # INNER, CORE LOOP
|
1649
1652
|
begin # Jump to home dir if current dir is externally removed
|
1650
1653
|
Dir.pwd
|
@@ -1676,13 +1679,8 @@ loop do # OUTER LOOP - CATCHING REFRESHES VIA 'r'
|
|
1676
1679
|
@selected = @files[@index] # Get text of selected item
|
1677
1680
|
sel_old = @selected_safe
|
1678
1681
|
@selected_safe = "\"#{@selected}\"" # Make it safe for commands
|
1679
|
-
|
1680
|
-
|
1681
|
-
if @change
|
1682
|
-
system("printf \"\033]0;RTFM: #{Dir.pwd}\007\"") # Set Window title to path
|
1683
|
-
# Top window (info line)
|
1684
|
-
w_t_info
|
1685
|
-
end
|
1682
|
+
system("printf \"\033]0;RTFM: #{Dir.pwd}\007\"") # Set Window title to path
|
1683
|
+
w_t_info # Top window (info line)
|
1686
1684
|
@w_l.setpos(0,0)
|
1687
1685
|
list_dir(true)
|
1688
1686
|
@w_l.refresh
|
data/rtfm-kb.png
CHANGED
Binary file
|
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: 3.14.
|
4
|
+
version: 3.14.159
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: curses
|
@@ -48,7 +48,8 @@ description: 'A full featured terminal browser with syntax highlighted files, im
|
|
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
50
|
other features. New in 3.14: Better error handling. 3.14.1: Fixed bug in launching
|
51
|
-
rtfm without the launcher ''r''.
|
51
|
+
rtfm without the launcher ''r''. 3.14.159: Added Ctrl-d as a shortcut for :mkdir
|
52
|
+
.'
|
52
53
|
email: g@isene.com
|
53
54
|
executables:
|
54
55
|
- rtfm
|