rtfm-filemanager 7.3.1 → 7.3.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 +30 -8
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '093129751d7817064ef4574c62f9c13e2c37f16e8cd33b4460348106f0539873'
4
- data.tar.gz: f5d75638cf2cda6d05941a0d57644dbe65253ba9493afc6abc78812e5c755474
3
+ metadata.gz: 9ad1d9581fc33576497a4af185ce404251e71e1df5e6f080cf19b3e29fb8eb41
4
+ data.tar.gz: 2007300af7b17fdb161c2510f6d8594a169e5f7001f7ff0e17d73524e8bded4b
5
5
  SHA512:
6
- metadata.gz: 4b77c9557d19bb63de13048e2f03a991e26b692bd1f24cea7cc3383899e6c14816e624f211f05f54903d662ce932640b0afc19fc9cc09e71321dd8d772b9dc97
7
- data.tar.gz: 1971e0a8861185de393dc51f717729b3d70650c9dd670565aee8d6279d7bb6f4e5d75c8db15f5154c70fc29839c8d5cde498b4747b85b6fa4662c8df2cd405f2
6
+ metadata.gz: fb256db6d25e7b19474f425282c5d2d012cd2380bff08bb5e78665aed9c4f2dd5ebdf416c2e13cabe5a78ef446e68b3bbc6d587e5f81a7bffa68d7fcd24a105d
7
+ data.tar.gz: b3972f6e8a57d02478384b65b83a5ee3222b633a37cf10381511b0b50dbc838e9dbd6df00d3872c937ad1aa94dbceaee489d944ac1bbf995ad22e4ac39eed69e
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.3.1' # Fixed image positioning and EXIF orientation
21
+ @version = '7.3.2' # Image persistence and C-Y copies images
22
22
 
23
23
  # SAVE & STORE TERMINAL {{{1
24
24
  ORIG_STTY = `stty -g`.chomp
@@ -290,7 +290,7 @@ CONFIG_FILE = File.join(RTFM_HOME, 'conf')
290
290
  CLIPBOARD COPY
291
291
  y = Copy path of selected item to primary selection (for pasting with middle mouse button)
292
292
  Y = Copy path of selected item to clipboard
293
- Ctrl-y = Copy content of right pane to clipboard
293
+ Ctrl-y = Copy content of right pane to clipboard (images: copies image file, text: copies text)
294
294
  Turn off batcat syntax highlighting with 'b' for a clean copy of content
295
295
 
296
296
  SYSTEM SHORTCUTS
@@ -1049,8 +1049,8 @@ def getkey # {{{3
1049
1049
 
1050
1050
  return unless chr
1051
1051
 
1052
- showimage('clear') if @image
1053
- @image = false
1052
+ # Don't clear image here - let render system handle it when @pR.update is true
1053
+ # This preserves images during operations that don't change the selected item
1054
1054
  if handler = KEYMAP[chr] # rubocop:disable Lint/AssignmentInCondition
1055
1055
  m = method(handler)
1056
1056
  m.arity == 1 ? m.call(chr) : m.call
@@ -3945,10 +3945,32 @@ def get_selected_full_path # {{{3
3945
3945
  end
3946
3946
 
3947
3947
  def copy_right # {{{3
3948
- clip = 'xclip -selection clipboard'
3949
- @pB.say(' Right pane copied to clipboard')
3950
- # We drop the trailing & in the string itself…
3951
- shell("echo -n #{Shellwords.escape(@pR.text.pure)} | #{clip} > /dev/null 2>&1", background: true)
3948
+ if @image && @selected && @selected.match(@imagefile)
3949
+ # Copy the image file to clipboard
3950
+ escaped_path = Shellwords.escape(@selected)
3951
+ # Detect image type from extension
3952
+ ext = File.extname(@selected).downcase
3953
+ mime_type = case ext
3954
+ when '.png' then 'image/png'
3955
+ when '.jpg', '.jpeg' then 'image/jpeg'
3956
+ when '.gif' then 'image/gif'
3957
+ when '.bmp' then 'image/bmp'
3958
+ when '.webp' then 'image/webp'
3959
+ else 'image/png'
3960
+ end
3961
+
3962
+ # Use cat to pipe file contents to xclip
3963
+ if system("cat #{escaped_path} | xclip -selection clipboard -target #{mime_type} 2>/dev/null")
3964
+ @pB.say(' Image copied to clipboard')
3965
+ else
3966
+ @pB.say(' Failed to copy image - xclip may not be installed')
3967
+ end
3968
+ else
3969
+ # Copy right pane text content
3970
+ clip = 'xclip -selection clipboard'
3971
+ @pB.say(' Right pane text copied to clipboard')
3972
+ shell("echo -n #{Shellwords.escape(@pR.text.pure)} | #{clip} > /dev/null 2>&1", background: true)
3973
+ end
3952
3974
  end
3953
3975
 
3954
3976
  # SYSTEM SHORTCUTS {{{2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtfm-filemanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.1
4
+ version: 7.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geir Isene
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '7.4'
69
69
  description: |-
70
- RTFM v7.3.1: Fixed image positioning and EXIF orientation handling via termpix 0.2.0.
70
+ RTFM v7.3.2: Image persistence during operations and C-Y copies images to clipboard.
71
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.
72
72
  email: g@isene.com
73
73
  executables: