rtfm-filemanager 7.4.3 → 7.5.0

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 (5) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +30 -0
  3. data/README.md +2 -2
  4. data/bin/rtfm +50 -11
  5. metadata +10 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dedec26a74a7588dd2702c5e021d310b3a0f75c04aa0f9d6fe77b1faa3cd8d94
4
- data.tar.gz: 55c68915ea8ecac08e7e9569efb0c2372a14b6b15eb20f780027384ba75aef38
3
+ metadata.gz: 18d2abf32d35fbe13e8c5ff3b3844b9c7db92161d20a997a87d61a8afd084020
4
+ data.tar.gz: 2b136306fcf627c432f159671ccc9fe8210028df6b4955ed29dfb7422ae759d3
5
5
  SHA512:
6
- metadata.gz: 79bb1f74a96e280a4170048d3dfc8c61f4cd523c313699eeec59187dddbe070cac6612244ea5ca898d8062ea9aa09e9125853592d223210b5dcc556b2fb79eee
7
- data.tar.gz: aca0a8cdf19728ce003e8065a15339afd9bfe5e9dcfa87c789ceea9225c27ba72f1c824bf8d34d611c9ea06926b6986903e0f363b9f9f901e4d91e21d47832a4
6
+ metadata.gz: '0259ce617aee78996ba25cb4338712d0cac66905ceff53240ddc0a0076996c78ca863cc9826892ea6d520c03c714389ccf83d06a09823dd6e2307a6df51165b9'
7
+ data.tar.gz: a2334d014d7534233e1059bbd6bcb78fd126e4c0e38db645a95024bbd9d6a3db4797bac142b60016ff439b43f6790e94cdd827237b5d9eb5cf66616e89c2af4d
data/CHANGELOG.md CHANGED
@@ -5,6 +5,36 @@ All notable changes to RTFM will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [7.5.0] - 2026-01-16
9
+
10
+ ### Added
11
+ - **Native Kitty graphics protocol** - Images now display perfectly in kitty terminal
12
+ - No more flash during image-to-image navigation
13
+ - Requires termpix 0.3.0+
14
+ - Automatic protocol detection (kitty, sixel, or w3m)
15
+ - Proper aspect ratio preservation
16
+
17
+ ### Changed
18
+ - Updated image positioning for kitty protocol compatibility
19
+ - Optimized image clearing logic - skips unnecessary clears for atomic-replace protocols
20
+
21
+ ### Fixed
22
+ - Fixed `getch` → `getchr` typo in toggle_image function
23
+
24
+ ## [7.4.4] - 2026-01-09
25
+
26
+ ### Fixed
27
+ - **Extract command ('z') improvements** - Fixed two issues with archive extraction:
28
+ - Now uses current file when nothing is tagged (was empty command before)
29
+ - Auto-detects archive type and suggests correct command:
30
+ - `.zip` → `unzip`
31
+ - `.rar` → `unrar x`
32
+ - `.7z` → `7z x`
33
+ - `.tar.bz2`/`.tbz2` → `tar xfj`
34
+ - `.tar.xz`/`.txz` → `tar xfJ`
35
+ - `.tar.zst` → `tar --zstd -xf`
36
+ - Others → `tar xfz`
37
+
8
38
  ## [7.4.3] - 2025-12-09
9
39
 
10
40
  ### Fixed
data/README.md CHANGED
@@ -556,7 +556,7 @@ RTFM uses the [termpix](https://github.com/isene/termpix) gem for modern multi-p
556
556
  | urxvt | w3m | ✓ Perfect |
557
557
  | xterm | Sixel | ✓ Perfect |
558
558
  | mlterm | Sixel | ✓ Perfect |
559
- | kitty | w3m | ✓ Works (brief flash) |
559
+ | kitty | Kitty | ✓ Perfect |
560
560
  | foot | Sixel | ✓ Perfect |
561
561
 
562
562
  ### Features
@@ -569,7 +569,7 @@ RTFM uses the [termpix](https://github.com/isene/termpix) gem for modern multi-p
569
569
 
570
570
  ### Terminal Compatibility
571
571
 
572
- Best image experience with: urxvt, xterm, mlterm, Eterm
572
+ Best image experience with: kitty, urxvt, xterm, mlterm, foot
573
573
 
574
574
  ---
575
575
 
data/bin/rtfm CHANGED
@@ -18,7 +18,7 @@
18
18
  # get a great understanding of the code itself by simply sending
19
19
  # or pasting this whole file into you favorite AI for coding with
20
20
  # a prompt like this: "Help me understand every part of this code".
21
- @version = '7.4.3' # Fix docx preview corrupting left pane display by filtering carriage returns
21
+ @version = '7.5.0' # Native Kitty graphics protocol - no more flash in kitty terminal
22
22
 
23
23
  # SAVE & STORE TERMINAL {{{1
24
24
  ORIG_STTY = `stty -g`.chomp
@@ -1220,7 +1220,7 @@ def toggle_image # {{{3
1220
1220
  end
1221
1221
  @showimage = !@showimage
1222
1222
  @pB.say("Image preview = #{@showimage ? 'On' : 'Off'}")
1223
- getch
1223
+ getchr
1224
1224
  end
1225
1225
 
1226
1226
  def toggle_syntax # {{{3
@@ -3645,9 +3645,27 @@ end
3645
3645
 
3646
3646
  # ARCHIVES {{{2
3647
3647
  def unzip_items # {{{3
3648
- first = @tagged.first
3649
- tar = Shellwords.escape(first)
3650
- cmd = @pCmd.ask('Command: ', "tar xfz #{tar}")
3648
+ first = @tagged.empty? ? @selected : @tagged.first
3649
+ return unless first
3650
+ escaped = Shellwords.escape(first)
3651
+ # Detect archive type and suggest appropriate command
3652
+ default_cmd = case first.downcase
3653
+ when /\.zip$/
3654
+ "unzip #{escaped}"
3655
+ when /\.rar$/
3656
+ "unrar x #{escaped}"
3657
+ when /\.7z$/
3658
+ "7z x #{escaped}"
3659
+ when /\.tar\.bz2$|\.tbz2?$/
3660
+ "tar xfj #{escaped}"
3661
+ when /\.tar\.xz$|\.txz$/
3662
+ "tar xfJ #{escaped}"
3663
+ when /\.tar\.zst$/
3664
+ "tar --zstd -xf #{escaped}"
3665
+ else
3666
+ "tar xfz #{escaped}"
3667
+ end
3668
+ cmd = @pCmd.ask('Command: ', default_cmd)
3651
3669
  # Reset bottom pane after command input
3652
3670
  @pB.clear; @pB.update = true
3653
3671
  shellexec(cmd) unless cmd.nil? || cmd.strip.empty?
@@ -4845,8 +4863,10 @@ def render # RENDER ALL PANES {{{2
4845
4863
 
4846
4864
  # RIGHT pane (or Preview pane in dual-pane mode) {{{3
4847
4865
  if @pR.update && @preview
4848
- # Actually clear the image overlay when rendering new content
4849
- showimage('clear') if @image
4866
+ # Track if we had an image (for kitty deferred clear)
4867
+ had_image_render = @image
4868
+ # Clear image overlay unless protocol supports atomic replace (kitty)
4869
+ showimage('clear') if @image && @termpix.protocol != :kitty
4850
4870
  @image = false
4851
4871
  righttext = @pR.text
4852
4872
 
@@ -4885,6 +4905,11 @@ def render # RENDER ALL PANES {{{2
4885
4905
  end
4886
4906
  end
4887
4907
 
4908
+ # Deferred clear for kitty: if we had an image but now don't, clear it
4909
+ if had_image_render && !@image && @termpix.protocol == :kitty
4910
+ showimage('clear')
4911
+ end
4912
+
4888
4913
  @pR.full_refresh unless @pR.text == righttext || @image
4889
4914
  end
4890
4915
 
@@ -5509,9 +5534,14 @@ end
5509
5534
  def showcontent # SHOW CONTENTS IN THE RIGHT WINDOW {{{2
5510
5535
  # Only process content if preview is enabled
5511
5536
  return unless @preview
5512
-
5537
+
5538
+ # Track if we had an image (for deferred clear with kitty)
5539
+ had_image = @image
5540
+
5513
5541
  if @pR.update
5514
- showimage('clear') if @image
5542
+ # Clear image unless protocol supports atomic replace (kitty)
5543
+ # Kitty will clear later only if new content is not an image
5544
+ showimage('clear') if @image && @termpix.protocol != :kitty
5515
5545
  @image = false
5516
5546
  @pR.clear
5517
5547
  end
@@ -5706,6 +5736,13 @@ def showcontent # SHOW CONTENTS IN THE RIGHT WINDOW {{{2
5706
5736
  rescue StandardError => e
5707
5737
  errormsg("⚠ Error while previewing #{@selected}", e)
5708
5738
  end
5739
+
5740
+ # Deferred clear for kitty: if we had an image but now don't, clear it
5741
+ # This happens after content is determined, so image→image has no flash
5742
+ if had_image && !@image && @termpix.protocol == :kitty
5743
+ showimage('clear')
5744
+ end
5745
+
5709
5746
  @pR.update = false
5710
5747
  end
5711
5748
 
@@ -5736,11 +5773,13 @@ def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
5736
5773
  term_height: @h)
5737
5774
  @current_image_path = nil
5738
5775
  else
5739
- # Display image using termpix (use original absolute row 2)
5776
+ # Display image using termpix
5740
5777
  img_path = File.absolute_path(image)
5778
+ # Kitty needs y+1 to account for border (uses character positions directly)
5779
+ img_y = @termpix.protocol == :kitty ? 3 : 2
5741
5780
  @termpix.show(img_path,
5742
5781
  x: @pR.x,
5743
- y: 2,
5782
+ y: img_y,
5744
5783
  max_width: @pR.w - 2,
5745
5784
  max_height: @pR.h - 1)
5746
5785
  @current_image_path = img_path
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: 7.4.3
4
+ version: 7.5.0
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-12-09 00:00:00.000000000 Z
11
+ date: 2026-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rcurses
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.2'
33
+ version: '0.3'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.2'
40
+ version: '0.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bootsnap
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -66,9 +66,12 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '7.4'
69
- description: |-
70
- RTFM v7.4.3: Fixed display corruption when viewing .docx files by filtering carriage returns from docx2txt output.
71
- A full featured terminal browser with syntax highlighted files, images shown in the terminal, videos thumbnailed, etc. Features include remote SSH/SFTP browsing, interactive SSH shell, comprehensive undo system, bookmarks, and much more. You can bookmark and jump around easily, delete, rename, copy, symlink and move files. RTFM is one of the most feature-packed terminal file managers.
69
+ description: 'RTFM v7.5.0: Native Kitty graphics protocol - images now display perfectly
70
+ in kitty terminal with no flash. A full featured terminal browser with syntax highlighted
71
+ files, images shown in the terminal, videos thumbnailed, etc. Features include remote
72
+ SSH/SFTP browsing, interactive SSH shell, comprehensive undo system, bookmarks,
73
+ and much more. You can bookmark and jump around easily, delete, rename, copy, symlink
74
+ and move files. RTFM is one of the most feature-packed terminal file managers.'
72
75
  email: g@isene.com
73
76
  executables:
74
77
  - rtfm