xtabbedwindow 0.1.2 → 0.1.3
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
 - checksums.yaml.gz.sig +0 -0
 - data.tar.gz.sig +0 -0
 - data/lib/xtabbedwindow.rb +21 -10
 - metadata +1 -1
 - metadata.gz.sig +0 -0
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 74d5a290405adfb95f058e3d2402c8e8340da60ae8e3c96a694eb157ecd70e9d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 05f397721e4a8cb5e6b9387fc030dddad891f161d6a88c72e6b3d323ea000d77
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 644e1b8fc7d95a85d3270dab77d3e1dddb7c35a1259d54c3121bbf79389773137a6ad021334271a8f386719708a8960171c418e0074739fd84682221afe9f88a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 1346fead1d70744cca4f2be978f8f23dc2bb883ed8c45a88213c5698602c7dc7ee41c063dcce2c342e45f3bd0a652fe994a410b7b60f611365d0bee99cee0d0b
         
     | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | 
         Binary file 
     | 
    
        data.tar.gz.sig
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/lib/xtabbedwindow.rb
    CHANGED
    
    | 
         @@ -14,9 +14,9 @@ class XTabbedWindow 
     | 
|
| 
       14 
14 
     | 
    
         
             
              # next_tab values e.g. Ctrl+Tab (default), Ctrl+Alt+Page_Up
         
     | 
| 
       15 
15 
     | 
    
         
             
              #
         
     | 
| 
       16 
16 
     | 
    
         
             
              def initialize(name, new_tab: "Ctrl+t", scan_tabs: true, 
         
     | 
| 
       17 
     | 
    
         
            -
                             next_tab: "Ctrl+Tab")
         
     | 
| 
      
 17 
     | 
    
         
            +
                             next_tab: "Ctrl+Tab", location_key: 'Ctrl+l')
         
     | 
| 
       18 
18 
     | 
    
         | 
| 
       19 
     | 
    
         
            -
                @new_tab, @next_tab = new_tab, next_tab
         
     | 
| 
      
 19 
     | 
    
         
            +
                @new_tab, @next_tab, @location_key = new_tab, next_tab, location_key
         
     | 
| 
       20 
20 
     | 
    
         
             
                a = WMCtrl.instance.windows
         
     | 
| 
       21 
21 
     | 
    
         
             
                @window = a.detect {|x| x.title =~ /#{name}/i}
         
     | 
| 
       22 
22 
     | 
    
         | 
| 
         @@ -45,18 +45,29 @@ class XTabbedWindow 
     | 
|
| 
       45 
45 
     | 
    
         
             
                  r = a.grep(regex)
         
     | 
| 
       46 
46 
     | 
    
         
             
                end
         
     | 
| 
       47 
47 
     | 
    
         | 
| 
       48 
     | 
    
         
            -
                 
     | 
| 
      
 48 
     | 
    
         
            +
                if r.empty? then
         
     | 
| 
      
 49 
     | 
    
         
            +
                        
         
     | 
| 
      
 50 
     | 
    
         
            +
                  new_tab()
         
     | 
| 
      
 51 
     | 
    
         
            +
                  
         
     | 
| 
      
 52 
     | 
    
         
            +
                  # open the document
         
     | 
| 
      
 53 
     | 
    
         
            +
                  XDo::Keyboard.char(@location_key)
         
     | 
| 
      
 54 
     | 
    
         
            +
                  
         
     | 
| 
      
 55 
     | 
    
         
            +
                  block_given? ? yield : return
         
     | 
| 
      
 56 
     | 
    
         
            +
                  
         
     | 
| 
      
 57 
     | 
    
         
            +
                else
         
     | 
| 
       49 
58 
     | 
    
         | 
| 
       50 
     | 
    
         
            -
             
     | 
| 
      
 59 
     | 
    
         
            +
                  i = a.index(r.first)
         
     | 
| 
       51 
60 
     | 
    
         | 
| 
       52 
     | 
    
         
            -
             
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
      
 61 
     | 
    
         
            +
                  @window.activate
         
     | 
| 
      
 62 
     | 
    
         
            +
                  sleep 0.1
         
     | 
| 
       54 
63 
     | 
    
         | 
| 
       55 
     | 
    
         
            -
             
     | 
| 
       56 
     | 
    
         
            -
             
     | 
| 
       57 
     | 
    
         
            -
             
     | 
| 
      
 64 
     | 
    
         
            +
                  XDo::Keyboard.char("Alt+1")
         
     | 
| 
      
 65 
     | 
    
         
            +
                  sleep 0.1
         
     | 
| 
      
 66 
     | 
    
         
            +
                  i.times { XDo::Keyboard.char(@next_tab) }
         
     | 
| 
      
 67 
     | 
    
         
            +
                  
         
     | 
| 
      
 68 
     | 
    
         
            +
                  true
         
     | 
| 
       58 
69 
     | 
    
         | 
| 
       59 
     | 
    
         
            -
                 
     | 
| 
      
 70 
     | 
    
         
            +
                end
         
     | 
| 
       60 
71 
     | 
    
         | 
| 
       61 
72 
     | 
    
         
             
              end
         
     | 
| 
       62 
73 
     | 
    
         | 
    
        metadata
    CHANGED
    
    
    
        metadata.gz.sig
    CHANGED
    
    | 
         Binary file 
     |