rtfm-filemanager 1.3.8 → 1.4.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.
- checksums.yaml +4 -4
- data/bin/rtfm +46 -28
- 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: 4cb8c1afd7b4f2cf1ab8175432956159e52dc715f25568cc7882c7ee0f5358d0
         | 
| 4 | 
            +
              data.tar.gz: efd18775dfbfe3e7a8780b4e971b116b73d278cc63f7dd8a17dfdedadaa97120
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 9975653d0d5b99418cf0f710bcfa8f314489cd5b9f4369f47f69a41ee2979be0645a1570e83f8eaba322f29d6a0560ba97d40a7607f3608a44007819ebed8dd9
         | 
| 7 | 
            +
              data.tar.gz: 78cbd09e08d1c8754ad75fc5b1cd8ad7e8e8b79df56259822234778abe0152042fddd33a82425876ba6704a9ee8533cd5176d97100db86725fbce92503adb23a
         | 
    
        data/bin/rtfm
    CHANGED
    
    | @@ -46,6 +46,8 @@ JUMPING AND MARKS | |
| 46 46 | 
             
                      Press '-' and a letter to delete that mark
         | 
| 47 47 | 
             
             M      = Show marked items in right pane
         | 
| 48 48 | 
             
             '      = Jump to mark (next letter is the name of the mark [a-zA-Z'])
         | 
| 49 | 
            +
             j      = Jump to the item in the left pane that matches the entry
         | 
| 50 | 
            +
             J      = Jump to the next matched item (as entered via 'j') if any
         | 
| 49 51 | 
             
             h      = Jump to Home directory
         | 
| 50 52 | 
             
             f      = Follow symlink to the directory where the target resides
         | 
| 51 53 | 
             
             L      = Start 'locate' search for files, then use '#' to jump to desired line/directory
         | 
| @@ -170,6 +172,7 @@ begin # BASIC SETUP | |
| 170 172 | 
             
              ## These should not be set by user in .rtfm.conf
         | 
| 171 173 | 
             
              @directory  = {}    # Initialize the directory hash for remembering directories visited
         | 
| 172 174 | 
             
              @searched   = ""    # Initialize the active searched for items
         | 
| 175 | 
            +
              @jump       = ""    # Initialize the "jump-to-file"
         | 
| 173 176 | 
             
              @index      = 0     # Set chosen item to first on startup
         | 
| 174 177 | 
             
              @marks["'"] = Dir.pwd
         | 
| 175 178 | 
             
              ## File type recognizers
         | 
| @@ -560,31 +563,32 @@ def main_getkey # GET KEY FROM USER | |
| 560 563 | 
             
                @w_r.update = true
         | 
| 561 564 | 
             
                @w_b.update = false
         | 
| 562 565 | 
             
              when 'S' # Show comprehensive system info
         | 
| 563 | 
            -
                 | 
| 564 | 
            -
             | 
| 565 | 
            -
                 | 
| 566 | 
            -
             | 
| 567 | 
            -
             | 
| 568 | 
            -
             | 
| 569 | 
            -
             | 
| 570 | 
            -
             | 
| 571 | 
            -
             | 
| 572 | 
            -
             | 
| 573 | 
            -
             | 
| 574 | 
            -
             | 
| 575 | 
            -
                 | 
| 576 | 
            -
             | 
| 577 | 
            -
                 | 
| 578 | 
            -
             | 
| 579 | 
            -
                 | 
| 580 | 
            -
             | 
| 581 | 
            -
                 | 
| 582 | 
            -
                 | 
| 583 | 
            -
             | 
| 584 | 
            -
                 | 
| 585 | 
            -
             | 
| 586 | 
            -
                 | 
| 587 | 
            -
             | 
| 566 | 
            +
                begin
         | 
| 567 | 
            +
                  @w_r.pager_cmd = ""
         | 
| 568 | 
            +
                  uname    = `uname -o`.chop + "  "
         | 
| 569 | 
            +
                  uname   += `uname -r`.chop + "  "
         | 
| 570 | 
            +
                  uname   += `uname -v`.chop + "  "
         | 
| 571 | 
            +
                  uname   += `uname -p` + "\n"
         | 
| 572 | 
            +
                  text     = [[253, 1, uname]]
         | 
| 573 | 
            +
                  cpu      = "CPUs = " + `nproc`.chop + "  "
         | 
| 574 | 
            +
                  cpuinfo  = `lscpu`
         | 
| 575 | 
            +
                  cpu     += cpuinfo[/^.*Model name:\s*(.*)/, 1] + "  "
         | 
| 576 | 
            +
                  cpu     += "Max: " + cpuinfo[/^.*CPU max MHz:\s*(.*)/, 1][/(.*),.*/, 1] + "MHz  "
         | 
| 577 | 
            +
                  cpu     += "Min: " + cpuinfo[/^.*CPU min MHz:\s*(.*)/, 1][/(.*),.*/, 1] + "MHz\n\n"
         | 
| 578 | 
            +
                  text    += [[154, 0, cpu]]
         | 
| 579 | 
            +
                  mem      = `free -h`  + "\n"
         | 
| 580 | 
            +
                  text    += [[229, 0, mem]]
         | 
| 581 | 
            +
                  ps       = `ps -eo comm,pid,user,pcpu,pmem,stat --sort -pcpu,-pmem | head` + "\n"
         | 
| 582 | 
            +
                  text    += [[195, 0, ps]]
         | 
| 583 | 
            +
                  disk     = `df -H | head -8`
         | 
| 584 | 
            +
                  text    += [[172, 0, disk]]
         | 
| 585 | 
            +
                  dmesg    = "\nDMESG:\n"
         | 
| 586 | 
            +
                  dmesg   += `dmesg | tail -6`
         | 
| 587 | 
            +
                  text    += [[219, 0, dmesg]]
         | 
| 588 | 
            +
                  w_r_info(ansifix(text))
         | 
| 589 | 
            +
                rescue
         | 
| 590 | 
            +
                  w_r_info("Unable to show system info")
         | 
| 591 | 
            +
                end
         | 
| 588 592 | 
             
              # RIGHT PANE
         | 
| 589 593 | 
             
              when 'ENTER' # Refresh right pane
         | 
| 590 594 | 
             
                @w_r.clr # First clear the window, then clear any previously showing image
         | 
| @@ -616,7 +620,21 @@ def main_getkey # GET KEY FROM USER | |
| 616 620 | 
             
                @break = true
         | 
| 617 621 | 
             
                @w_b.update = true
         | 
| 618 622 | 
             
              # ADDITIONAL COMMANDS
         | 
| 619 | 
            -
              when ' | 
| 623 | 
            +
              when 'j' # Get the jump-to-file in the current dir from input
         | 
| 624 | 
            +
                @w_b.nohistory = true
         | 
| 625 | 
            +
                @jump = w_b_getstr("Jump to: ", @jump)
         | 
| 626 | 
            +
                l = `ls #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}`.split
         | 
| 627 | 
            +
                m = l.each_index.select{|n| l[n] =~ /#{@jump}/}
         | 
| 628 | 
            +
                i = m.find { |n| n > @index }
         | 
| 629 | 
            +
                @index = i if i > @index unless i == nil
         | 
| 630 | 
            +
                @w_r.update = true
         | 
| 631 | 
            +
              when 'J'
         | 
| 632 | 
            +
                l = `ls #{@lsbase} #{@lsall} #{@lsorder} #{@lsinvert} #{@lsuser}`.split
         | 
| 633 | 
            +
                m = l.each_index.select{|n| l[n] =~ /#{@jump}/}
         | 
| 634 | 
            +
                i = m.find { |n| n > @index }
         | 
| 635 | 
            +
                @index = i if i > @index unless i == nil
         | 
| 636 | 
            +
                @w_r.update = true
         | 
| 637 | 
            +
              when '/' # Get search string to mark items that match the input 
         | 
| 620 638 | 
             
                @w_b.nohistory = true
         | 
| 621 639 | 
             
                @searched = w_b_getstr("/ ", "")
         | 
| 622 640 | 
             
                @w_r.update = true
         | 
| @@ -1052,7 +1070,6 @@ def pager_show # SHOW THE CURRENT PAGE CONTENT | |
| 1052 1070 | 
             
              end_l = beg_l + @w_r.maxy - 2
         | 
| 1053 1071 | 
             
              input = @w_r.text.lines[beg_l..end_l].join() + "\n"
         | 
| 1054 1072 | 
             
              input.lines.count > @w_r.maxy - 2 ? @w_r.pager_more = true : @w_r.pager_more = false
         | 
| 1055 | 
            -
              #if @w_r.pager_cmd.match(/batcat/)
         | 
| 1056 1073 | 
             
              if @w_r.text.match(/^\e\[/)
         | 
| 1057 1074 | 
             
                syntax_highlight(input)
         | 
| 1058 1075 | 
             
              else
         | 
| @@ -1062,7 +1079,8 @@ def pager_show # SHOW THE CURRENT PAGE CONTENT | |
| 1062 1079 | 
             
                else 
         | 
| 1063 1080 | 
             
                  init_pair(@w_r.fg, @w_r.fg, 0)
         | 
| 1064 1081 | 
             
                end
         | 
| 1065 | 
            -
                @w_r. | 
| 1082 | 
            +
                @w_r.attr = 0 if @w_r.attr == nil
         | 
| 1083 | 
            +
                @w_r.attron(color_pair(@w_r.fg) | @w_r.attr) { @w_r << input }
         | 
| 1066 1084 | 
             
              end
         | 
| 1067 1085 | 
             
              (@w_r.maxy - @w_r.cury).times {@w_r.deleteln()} # Clear to bottom of window
         | 
| 1068 1086 | 
             
              pager_add_markers
         | 
    
        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. | 
| 4 | 
            +
              version: 1.4.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: 2021- | 
| 11 | 
            +
            date: 2021-11-13 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: curses
         | 
| @@ -33,7 +33,8 @@ 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. | 
| 36 | 
            +
              other features. New in 1.4.0: Added jumping to an item in the current dir via the
         | 
| 37 | 
            +
              ''j'' and ''J'' keys.'
         | 
| 37 38 | 
             
            email: g@isene.com
         | 
| 38 39 | 
             
            executables:
         | 
| 39 40 | 
             
            - rtfm
         |