Advertisement
Guest User

Untitled

a guest
Feb 28th, 2015
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.73 KB | None | 0 0
  1. --- /home/crypt/awesome-config/redflat/float/appswitcher.lua    2015-02-22 02:16:28.231999007 +0600
  2. +++ ./appswitcher.lua   2015-02-28 22:21:36.397014007 +0600
  3. @@ -33,9 +33,9 @@ local cache = { titlebar = {}, border_co
  4.  
  5.  -- key bindings
  6.  appswitcher.keys = {
  7. -   next  = { "a", "A" },
  8. +   next  = { "a", "Tab" },
  9.     prev  = { "q", "Q" },
  10. -   close = { "Super_L" },
  11. +   close = { "Alt_L" },
  12.  }
  13.  
  14.  
  15. @@ -131,9 +131,16 @@ function appswitcher:init()
  16.     end
  17.  
  18.     self.keygrabber = function(mod, key, event)
  19. -       if event == "press" then return false
  20. -       elseif awful.util.table.hasitem(self.keys.close, key) then self:hide()
  21. -       elseif awful.util.table.hasitem(self.keys.next,  key) then self:switch()
  22. +
  23. +       if event == "release" then
  24. +           if awful.util.table.hasitem(self.keys.close, key) then
  25. +               self:hide()
  26. +           end
  27. +       end
  28. +
  29. +       if event == "release" then return false
  30. +       elseif awful.util.table.hasitem(self.keys.next,  key) then
  31. +           self:switch()
  32.         elseif awful.util.table.hasitem(self.keys.prev,  key) then self:switch({ reverse = true })
  33.         elseif awful.util.table.hasitem(style.hotkeys,   key) then focus_by_key(key)
  34.         else
  35. @@ -163,7 +170,7 @@ function appswitcher:init()
  36.         end
  37.     end
  38.  
  39. -   -- Function to correct wibox size for given namber of icons
  40. +   -- Function to correct wibox size for given number of icons
  41.     --------------------------------------------------------------------------------
  42.     function self.size_correction(inum)
  43.         local w, h
  44. @@ -337,7 +344,7 @@ function appswitcher:show(args)
  45.  
  46.     self.index = awful.util.table.hasitem(self.clients_list, client.focus) or 1
  47.     self.winmark(self.clients_list[self.index], true)
  48. -   self:switch(args)
  49. +   --self:switch({ reverse = true })
  50.     self.widget:emit_signal("widget::updated")
  51.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement