rtfm-filemanager 7.4.4 → 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 +16 -0
  3. data/README.md +2 -2
  4. data/bin/rtfm +29 -8
  5. metadata +10 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 440ceb07d691f73f54c697705ba7fbf12a9b99dadef6ca8d0000c55a4b700388
4
- data.tar.gz: b3f74a7003436a6da9ecc72ba4372d67a148635d79e1444695e4af91e91a60c2
3
+ metadata.gz: 18d2abf32d35fbe13e8c5ff3b3844b9c7db92161d20a997a87d61a8afd084020
4
+ data.tar.gz: 2b136306fcf627c432f159671ccc9fe8210028df6b4955ed29dfb7422ae759d3
5
5
  SHA512:
6
- metadata.gz: e39e16a338f15eb3f226990c011273060396fb2a2fa6a60844a8c993e3ed032e98951d0e5e7d2f90ea939193928953a9a9950b53dbfe5b15ee7d87c264c531f8
7
- data.tar.gz: 7955536ab5b28817ca0eb41a8ce6a86b0671037346f3bdd8c003cbbb819c4ec15de41c57b6a1dadf5383a39c722d2218995bcce11fa6f00c3b831f106157ea16
6
+ metadata.gz: '0259ce617aee78996ba25cb4338712d0cac66905ceff53240ddc0a0076996c78ca863cc9826892ea6d520c03c714389ccf83d06a09823dd6e2307a6df51165b9'
7
+ data.tar.gz: a2334d014d7534233e1059bbd6bcb78fd126e4c0e38db645a95024bbd9d6a3db4797bac142b60016ff439b43f6790e94cdd827237b5d9eb5cf66616e89c2af4d
data/CHANGELOG.md CHANGED
@@ -5,6 +5,22 @@ 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
+
8
24
  ## [7.4.4] - 2026-01-09
9
25
 
10
26
  ### 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.4' # Fix 'z' command to use current file when nothing tagged and detect archive type
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
@@ -4863,8 +4863,10 @@ def render # RENDER ALL PANES {{{2
4863
4863
 
4864
4864
  # RIGHT pane (or Preview pane in dual-pane mode) {{{3
4865
4865
  if @pR.update && @preview
4866
- # Actually clear the image overlay when rendering new content
4867
- 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
4868
4870
  @image = false
4869
4871
  righttext = @pR.text
4870
4872
 
@@ -4903,6 +4905,11 @@ def render # RENDER ALL PANES {{{2
4903
4905
  end
4904
4906
  end
4905
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
+
4906
4913
  @pR.full_refresh unless @pR.text == righttext || @image
4907
4914
  end
4908
4915
 
@@ -5527,9 +5534,14 @@ end
5527
5534
  def showcontent # SHOW CONTENTS IN THE RIGHT WINDOW {{{2
5528
5535
  # Only process content if preview is enabled
5529
5536
  return unless @preview
5530
-
5537
+
5538
+ # Track if we had an image (for deferred clear with kitty)
5539
+ had_image = @image
5540
+
5531
5541
  if @pR.update
5532
- 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
5533
5545
  @image = false
5534
5546
  @pR.clear
5535
5547
  end
@@ -5724,6 +5736,13 @@ def showcontent # SHOW CONTENTS IN THE RIGHT WINDOW {{{2
5724
5736
  rescue StandardError => e
5725
5737
  errormsg("⚠ Error while previewing #{@selected}", e)
5726
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
+
5727
5746
  @pR.update = false
5728
5747
  end
5729
5748
 
@@ -5754,11 +5773,13 @@ def showimage(image) # SHOW THE SELECTED IMAGE IN THE RIGHT WINDOW {{{2
5754
5773
  term_height: @h)
5755
5774
  @current_image_path = nil
5756
5775
  else
5757
- # Display image using termpix (use original absolute row 2)
5776
+ # Display image using termpix
5758
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
5759
5780
  @termpix.show(img_path,
5760
5781
  x: @pR.x,
5761
- y: 2,
5782
+ y: img_y,
5762
5783
  max_width: @pR.w - 2,
5763
5784
  max_height: @pR.h - 1)
5764
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.4
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: 2026-01-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.4: Fixed 'z' (extract) command to use current file when nothing tagged and auto-detect archive type (zip, rar, 7z, tar.bz2, tar.xz, tar.zst).
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