rtfm-filemanager 1.8.5 → 1.8.9
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 +24 -20
- 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: bf493d83fee60a64a7e96aa22ce90f194e921cbaa2f43978ab27372b76f4358c
|
4
|
+
data.tar.gz: 05237ec325e5ad63750ded55a7ca0fbcfd6adb8492b88be3b664376f494ab17a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d8bf1b20d5208b0336a41499613100b9c9a8b49d7540c1d8d675140ecc026e2ce40085b4475326f639baccd32afff9b6537b8b4ec7a4fe17f08a3a0264fe399
|
7
|
+
data.tar.gz: 4fd143cca5f4460f8fffb13cecca3a61f0cec8072638fa9b28f39382e8734905581eec50eeaa0f3117a08bd00bf0ad9d7533bf3f2fd4e7b2a209c0b724ab1ebc
|
data/bin/rtfm
CHANGED
@@ -137,7 +137,7 @@ begin # BASIC SETUP
|
|
137
137
|
end
|
138
138
|
|
139
139
|
if cmd?('/usr/lib/w3m/w3mimgdisplay')
|
140
|
-
@
|
140
|
+
@imgdisplay = "/usr/lib/w3m/w3mimgdisplay"
|
141
141
|
@showimage = true
|
142
142
|
else
|
143
143
|
@showimage = false
|
@@ -234,9 +234,26 @@ def get_ls_color(type) # GET THE COLOR FOR THE FILETYPE FROM IMPORTED LS_COLORS
|
|
234
234
|
end
|
235
235
|
return color.to_i, bold
|
236
236
|
end
|
237
|
+
def syntax_highlight(input) # SYNTAX HIGHLIGHTING FROM ANSI COLOR CODES
|
238
|
+
color_ary = color_parse(input)
|
239
|
+
color_ary.each do | pair |
|
240
|
+
begin
|
241
|
+
fg = pair[0].to_i
|
242
|
+
atr = pair[1].to_i
|
243
|
+
atr == 1 ? atr = Curses::A_BOLD : atr = 0
|
244
|
+
text = pair[2]
|
245
|
+
text.gsub!(/\t/, '')
|
246
|
+
init_pair(fg, fg, 0)
|
247
|
+
@w_r.attron(color_pair(fg) | atr) { @w_r << text }
|
248
|
+
rescue
|
249
|
+
end
|
250
|
+
end
|
251
|
+
end
|
237
252
|
def color_parse(input) # PARSE ANSI COLOR SEQUENCES
|
238
253
|
input.gsub!( /\e\[\d;38;5;(\d+);*(\d*)m/, '¤¤\1¤¤\2¤¤')
|
239
254
|
input.gsub!( /\e\[38;5;(\d+);*(\d*)m/, '¤¤\1¤¤\2¤¤')
|
255
|
+
input.gsub!( /\e\[\d;38;2;(\d+);*(\d*);\d*m/, '¤¤\1¤¤\2¤¤')
|
256
|
+
input.gsub!( /\e\[38;2;(\d+);*(\d*);\d*m/, '¤¤\1¤¤\2¤¤')
|
240
257
|
input.gsub!( /\e\[0m/, "\t")
|
241
258
|
color_array = input.split("¤¤")
|
242
259
|
color_array = color_array.drop(1)
|
@@ -1071,21 +1088,6 @@ def tagged_info # SHOW THE LIST OF TAGGED ITEMS IN @w_r
|
|
1071
1088
|
@tagged.empty? ? info += "(None)" : info += @tagged.join("\n")
|
1072
1089
|
w_r_info(info)
|
1073
1090
|
end
|
1074
|
-
def syntax_highlight(input) # SYNTAX HIGHLIGHTING FROM ANSI COLOR CODES
|
1075
|
-
color_ary = color_parse(input)
|
1076
|
-
color_ary.each do | pair |
|
1077
|
-
begin
|
1078
|
-
fg = pair[0].to_i
|
1079
|
-
atr = pair[1].to_i
|
1080
|
-
atr == 1 ? atr = Curses::A_BOLD : atr = 0
|
1081
|
-
text = pair[2]
|
1082
|
-
text.gsub!(/\t/, '')
|
1083
|
-
init_pair(fg, fg, 0)
|
1084
|
-
@w_r.attron(color_pair(fg) | atr) { @w_r << text }
|
1085
|
-
rescue
|
1086
|
-
end
|
1087
|
-
end
|
1088
|
-
end
|
1089
1091
|
def image_show(image)# SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW
|
1090
1092
|
# Pass "clear" to clear the window for previous image
|
1091
1093
|
return unless @showimage
|
@@ -1100,10 +1102,11 @@ def image_show(image)# SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW
|
|
1100
1102
|
img_max_w = char_w * (Curses.cols - Curses.cols/@width - 2)
|
1101
1103
|
img_max_h = char_h * (Curses.lines - 4)
|
1102
1104
|
if image == "clear"
|
1105
|
+
`clear`
|
1103
1106
|
img_x -= char_w
|
1104
1107
|
img_max_w += char_w + 2
|
1105
1108
|
img_max_h += 2
|
1106
|
-
`echo "6;#{img_x};#{img_y};#{img_max_w};#{img_max_h};\n4;\n3;" | #{@
|
1109
|
+
`echo "6;#{img_x};#{img_y};#{img_max_w};#{img_max_h};\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
|
1107
1110
|
else
|
1108
1111
|
img_w,img_h = `identify -format "%[fx:w]x%[fx:h]" #{image} 2>/dev/null`.split('x')
|
1109
1112
|
img_w = img_w.to_i
|
@@ -1116,7 +1119,7 @@ def image_show(image)# SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW
|
|
1116
1119
|
img_w = img_w * img_max_h / img_h
|
1117
1120
|
img_h = img_max_h
|
1118
1121
|
end
|
1119
|
-
`echo "0;1;#{img_x};#{img_y};#{img_w};#{img_h};;;;;\"#{image}\"\n4;\n3;" | #{@
|
1122
|
+
`echo "0;1;#{img_x};#{img_y};#{img_w};#{img_h};;;;;\"#{image}\"\n4;\n3;" | #{@imgdisplay} 2>/dev/null`
|
1120
1123
|
end
|
1121
1124
|
rescue
|
1122
1125
|
@w_r.clr
|
@@ -1315,10 +1318,11 @@ def w_b_exec(cmd) # EXECUTE COMMAND FROM @W_B
|
|
1315
1318
|
status = Timeout::timeout(15) {
|
1316
1319
|
@w_r.clr
|
1317
1320
|
begin
|
1318
|
-
@w_r.pager_cmd = "#{cmd} | #{bat} -n --color=always 2>/dev/null"
|
1321
|
+
@w_r.pager_cmd = "#{cmd} | #{@bat} -n --color=always 2>/dev/null"
|
1319
1322
|
@w_r.text = `#{@w_r.pager_cmd} 2>/dev/null`
|
1320
1323
|
rescue
|
1321
|
-
@w_r.
|
1324
|
+
@w_r.pager_cmd = "#{cmd} 2>/dev/null"
|
1325
|
+
@w_r.text = `#{@w_r.pager_cmd} 2>/dev/null`
|
1322
1326
|
end
|
1323
1327
|
unless @w_r.text == "" or @w_r.text == nil
|
1324
1328
|
pager_start
|
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.8.
|
4
|
+
version: 1.8.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geir Isene
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-02-13 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.8.
|
36
|
+
other features. New in 1.8.9: Fixed images overlap in the kitty terminal'
|
37
37
|
email: g@isene.com
|
38
38
|
executables:
|
39
39
|
- rtfm
|