about summary refs log tree commit diff stats
Commit message (Expand)AuthorAgeFilesLines
...
* simplified unmanageAnselm R. Garbe2006-09-071-8/+2
* using a global stack for focus recovery on arrange() - seems to work greatAnselm R. Garbe2006-09-074-8/+26
* made markups in dwm.1 more consistentAnselm R. Garbe2006-09-071-95/+38
* small addition to dwm.1Anselm R. Garbe2006-09-071-4/+4
* this patch keeps track of global z-layer order of clients which are floating ...Anselm R. Garbe2006-09-061-12/+7
* no this is betterAnselm R. Garbe2006-09-062-11/+11
* does this preserve z order for anthony?Anselm R. Garbe2006-09-062-8/+10
* maybe this might workAnselm R. Garbe2006-09-063-4/+9
* Added tag 1.4 for changeset 3cff9403766bf83a9fc2a0aef230115d68de2a8eAnselm R. Garbe2006-09-061-0/+1
* prepared dwm-1.4 update 1.4Anselm R. Garbe2006-09-062-2/+1
* drawstatus even if no client existsAnselm R. Garbe2006-09-061-1/+3
* sanders solution is convincing and elegantAnselm R. Garbe2006-09-062-49/+9
* seems to preserve floating client z-layer order (even with reorder() calls)Anselm R. Garbe2006-09-062-1/+9
* Added tag 1.4 for changeset a6b8994af16491220db0199623bd57d061e06143Anselm R. Garbe2006-09-061-0/+1
* small fixAnselm R. Garbe2006-09-062-2/+3
* made args mode symbols the default ones (the default ones look too ugly)Anselm R. Garbe2006-09-061-2/+2
* moved transient_for tag inheritance to settagsAnselm R. Garbe2006-09-063-10/+10
* no, reodering floating clients definately breaks the manage() policy which at...Anselm R. Garbe2006-09-063-16/+18
* no, ordering floating clients at the end seems betterAnselm R. Garbe2006-09-053-19/+17
* fixAnselm R. Garbe2006-09-051-1/+1
* this makes sure the issue mentioned by sanderAnselm R. Garbe2006-09-051-2/+8
* fixing zoomAnselm R. Garbe2006-09-051-3/+4
* fixing two off-by-onesAnselm R. Garbe2006-09-051-2/+2
* ach ich will auch Alt-sAnselm R. Garbe2006-09-051-0/+1
* applied checking existance of >2 tiles patch (proposed by sander) to zoom and...Anselm R. Garbe2006-09-051-5/+14
* renamed resizetile into resizecolAnselm R. Garbe2006-09-054-5/+5
* well ok, added Mod-s to default bindings (however, I don't need it)Anselm R. Garbe2006-09-052-0/+7
* s/growcol/resizetile/gAnselm R. Garbe2006-09-054-15/+15
* right, multihead issue is not involved with growcolAnselm R. Garbe2006-09-051-1/+1
* hotfixAnselm R. Garbe2006-09-051-1/+3
* applied a fix related to Sanders remark to growcolAnselm R. Garbe2006-09-051-1/+1
* sanders toggletag patch is much more elegantAnselm R. Garbe2006-09-051-1/+1
* I really need column growing, now pushing upstreamAnselm R. Garbe2006-09-055-0/+27
* don't access sel in restack without checking for NULL (multihead crashing bug)Anselm R. Garbe2006-09-051-7/+9
* fixing c->weight handlingAnselm R. Garbe2006-09-051-2/+3
* removed some useless tagsAnselm R. Garbe2006-09-041-2/+0
* after 1.3Anselm R. Garbe2006-09-041-1/+1
* Added tag 1.3 for changeset f5f5cbf016a94b48a8fe9c47f0736e96d166d5d4Anselm R. Garbe2006-09-041-0/+1
* retagged 1.3Anselm R. Garbe2006-09-041-1/+1
* simplified manageAnselm R. Garbe2006-09-041-5/+2
* removed html crapAnselm R. Garbe2006-09-043-128/+1
* Added tag 1.3 for changeset dd44dc937e8b0a46abf1a15a333dba5304e4fe89Anselm R. Garbe2006-09-041-0/+1
* hotfixing with sanders hintAnselm R. Garbe2006-09-041-1/+3
* Added tag 1.3 for changeset 6413ea66b1c2496cfc2173fe58df67cb965eb1daAnselm R. Garbe2006-09-041-0/+1
* fixing the issue that new clients appear loweredAnselm R. Garbe2006-09-041-0/+2
* removed unused varsAnselm R. Garbe2006-09-041-2/+2
* reducing focus calls (sanders patch)Anselm R. Garbe2006-09-041-6/+4
* applied Sanders max_and_focus.patchAnselm R. Garbe2006-09-045-44/+48
* simplified buttonpressAnselm R. Garbe2006-09-011-23/+12
* applied sanders patchAnselm R. Garbe2006-09-012-11/+20
ss='alt'>
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

                  

                                                                                  
                                                
                                    
                                              
          

                                                            
                                                       

   
                                   
                   
                         

                         
                        

                         
                          

                                                                       
                        
                         



                      
 
                                
                                                                                

   
                        
                                                                 


                       
                                                               


                         
                                                                   

   
                       
                                                               

   



                                                                                              


















                              
   
-- Keyboard driver

Modifiers = {'lctrl', 'rctrl', 'lalt', 'ralt', 'lshift', 'rshift', 'lgui', 'rgui'}

function App.keypressed(key, scancode, isrepeat)
  if array.find(Modifiers, key) then
    -- do nothing when the modifier is pressed
    return
  end
  -- include the modifier(s) when the non-modifer is pressed
  App.keychord_pressed(App.combine_modifiers(key), key)
end

function App.combine_modifiers(key)
  local result = ''
  if App.ctrl_down() then
    result = result..'C-'
  end
  if App.alt_down() then
    result = result..'M-'
  end
  if App.shift_down() then
    result = result..'S-'  -- don't try to use this with letters/digits
  end
  if App.cmd_down() then
    result = result..'s-'
  end
  result = result..key
  return result
end

function App.any_modifier_down()
  return App.ctrl_down() or App.alt_down() or App.shift_down() or App.cmd_down()
end

function App.ctrl_down()
  return App.modifier_down('lctrl') or App.modifier_down('rctrl')
end

function App.alt_down()
  return App.modifier_down('lalt') or App.modifier_down('ralt')
end

function App.shift_down()
  return App.modifier_down('lshift') or App.modifier_down('rshift')
end

function App.cmd_down()
  return App.modifier_down('lgui') or App.modifier_down('rgui')
end

function App.is_cursor_movement(key)
  return array.find({'left', 'right', 'up', 'down', 'home', 'end', 'pageup', 'pagedown'}, key)
end

array = {}

function array.find(arr, elem)
  for i,x in ipairs(arr) do
    if x == elem then
      return i
    end
  end
  return nil
end

function array.any(arr, f)
  for i,x in ipairs(arr) do
    local result = f(x)
    if result then
      return result
    end
  end
  return false
end