Facebook
From xor512, 3 Years ago, written in Lua.
Embed
Download Paste or View Raw
Hits: 165
  1. globalkeys = gears.table.join(
  2.  
  3. --- skip ---
  4.  
  5.     -- {{{ Layout manipulation
  6.    
  7. --- skip ---
  8.         awful.key({ modkey, "Control"   }, "m",      
  9.             function ()
  10.                 local all_clients_minimized = true
  11.                 for _, c in ipairs(mouse.screen.selected_tag:clients()) do
  12.                     if c.minimized == false then
  13.                         all_clients_minimized = false
  14.                         break
  15.                     end
  16.                 end
  17.  
  18.                 for _, c in ipairs(mouse.screen.selected_tag:clients()) do
  19.                     if all_clients_minimized then
  20.                         c:emit_signal(
  21.                             "request::activate",
  22.                             "tasklist",
  23.                             {raise = true}
  24.                         )
  25.                     else
  26.                         c.minimized = true
  27.                     end
  28.                 end
  29.             end,
  30.                   {description = "minimize/maximize all windows in current tag", group = "client"}),
  31.     -- }}}
  32.    
  33.