@ -18,9 +18,11 @@ local hotkeys_popup = require("awful.hotkeys_popup").widget
 
			
		
	
		
		
			
				
					
					-- Check if awesome encountered an error during startup and fell back to -- Check if awesome encountered an error during startup and fell back to  
			
		
	
		
		
			
				
					
					-- another config (This code will only ever execute for the fallback config) -- another config (This code will only ever execute for the fallback config)  
			
		
	
		
		
			
				
					
					if  awesome.startup_errors  then if  awesome.startup_errors  then  
			
		
	
		
		
			
				
					
					    naughty.notify ( {  preset  =  naughty.config . presets.critical , 
    naughty.notify ( { 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					      preset  =  naughty.config . presets.critical , 
 
			
		
	
		
		
			
				
					
					      title  =  " Oops, there were errors during startup! " , 
      title  =  " Oops, there were errors during startup! " , 
 
			
		
	
		
		
			
				
					
					                     text  =  awesome.startup_errors  } ) 
      text  =  awesome.startup_errors 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					  } ) 
 
			
		
	
		
		
			
				
					
					end end  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- Handle runtime errors after startup -- Handle runtime errors after startup  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -31,9 +33,11 @@ do
 
			
		
	
		
		
			
				
					
					        if  in_error  then  return  end 
        if  in_error  then  return  end 
 
			
		
	
		
		
			
				
					
					        in_error  =  true 
        in_error  =  true 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        naughty.notify ( {  preset  =  naughty.config . presets.critical , 
        naughty.notify ( { 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            preset  =  naughty.config . presets.critical , 
 
			
		
	
		
		
			
				
					
					            title  =  " Oops, an error happened! " , 
            title  =  " Oops, an error happened! " , 
 
			
		
	
		
		
			
				
					
					                         text  =  tostring ( err )  } ) 
            text  =  tostring ( err ) 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					          } ) 
 
			
		
	
		
		
			
				
					
					        in_error  =  false 
        in_error  =  false 
 
			
		
	
		
		
			
				
					
					    end ) 
    end ) 
 
			
		
	
		
		
			
				
					
					end end  
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -102,13 +106,17 @@ myawesomemenu = {
 
			
		
	
		
		
			
				
					
					    {  " quit " ,  function ( )  awesome.quit ( )  end } 
    {  " quit " ,  function ( )  awesome.quit ( )  end } 
 
			
		
	
		
		
			
				
					
					} }  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					mymainmenu  =  awful.menu ( {  items  =  {  {  " awesome " ,  myawesomemenu ,  beautiful.awesome_icon  } , mymainmenu  =  awful.menu ( {  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    items  =  { 
 
			
		
	
		
		
			
				
					
					        {  " awesome " ,  myawesomemenu ,  beautiful.awesome_icon  } , 
 
			
		
	
		
		
			
				
					
					        {  " open terminal " ,  terminal  } 
        {  " open terminal " ,  terminal  } 
 
			
		
	
		
		
			
				
					
					    } 
    } 
 
			
		
	
		
		
			
				
					
					} ) } )  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					mylauncher  =  awful.widget . launcher ( {  image  =  beautiful.awesome_icon , mylauncher  =  awful.widget . launcher ( {  
			
				
				
			
		
	
		
		
			
				
					
					                                     menu  =  mymainmenu  } ) 
    image  =  beautiful.awesome_icon , 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					    menu  =  mymainmenu 
 
			
		
	
		
		
			
				
					
					} )  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- Menubar configuration -- Menubar configuration  
			
		
	
		
		
			
				
					
					menubar.utils . terminal  =  terminal  -- Set the terminal for applications that require it menubar.utils . terminal  =  terminal  -- Set the terminal for applications that require it  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -123,24 +131,51 @@ mytextclock = wibox.widget.textclock()
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- Create a wibox for each screen and add it -- Create a wibox for each screen and add it  
			
		
	
		
		
			
				
					
					local  taglist_buttons  =  awful.util . table.join ( local  taglist_buttons  =  awful.util . table.join (  
			
		
	
		
		
			
				
					
					                    awful.button ( {  } ,  1 ,  function ( t )  t : view_only ( )  end ) , 
    awful.button ( 
 
			
				
				
			
		
	
		
		
			
				
					
					                    awful.button ( {  modkey  } ,  1 ,  function ( t ) 
        {  } , 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					        1 , 
 
			
		
	
		
		
			
				
					
					        function ( t )  t : view_only ( )  end 
 
			
		
	
		
		
			
				
					
					    ) , 
 
			
		
	
		
		
			
				
					
					    awful.button ( 
 
			
		
	
		
		
			
				
					
					        {  modkey  } , 
 
			
		
	
		
		
			
				
					
					        1 , 
 
			
		
	
		
		
			
				
					
					        function ( t ) 
 
			
		
	
		
		
			
				
					
					            if  client.focus  then 
            if  client.focus  then 
 
			
		
	
		
		
			
				
					
					                client.focus : move_to_tag ( t ) 
                client.focus : move_to_tag ( t ) 
 
			
		
	
		
		
			
				
					
					            end 
            end 
 
			
		
	
		
		
			
				
					
					                                          end ) , 
        end 
 
			
				
				
			
		
	
		
		
			
				
					
					                    awful.button ( {  } ,  3 ,  awful.tag . viewtoggle ) , 
    ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                    awful.button ( {  modkey  } ,  3 ,  function ( t ) 
    awful.button ( 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					        {  } , 
 
			
		
	
		
		
			
				
					
					        3 , 
 
			
		
	
		
		
			
				
					
					        awful.tag . viewtoggle 
 
			
		
	
		
		
			
				
					
					    ) , 
 
			
		
	
		
		
			
				
					
					    awful.button ( 
 
			
		
	
		
		
			
				
					
					        {  modkey  } , 
 
			
		
	
		
		
			
				
					
					        3 , 
 
			
		
	
		
		
			
				
					
					        function ( t ) 
 
			
		
	
		
		
			
				
					
					            if  client.focus  then 
            if  client.focus  then 
 
			
		
	
		
		
			
				
					
					                client.focus : toggle_tag ( t ) 
                client.focus : toggle_tag ( t ) 
 
			
		
	
		
		
			
				
					
					            end 
            end 
 
			
		
	
		
		
			
				
					
					                                          end ) , 
        end 
 
			
				
				
			
		
	
		
		
			
				
					
					                    awful.button ( {  } ,  4 ,  function ( t )  awful.tag . viewnext ( t.screen )  end ) , 
    ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                    awful.button ( {  } ,  5 ,  function ( t )  awful.tag . viewprev ( t.screen )  end ) 
    awful.button ( 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					        {  } , 
 
			
		
	
		
		
			
				
					
					        4 , 
 
			
		
	
		
		
			
				
					
					        function ( t )  awful.tag . viewnext ( t.screen )  end 
 
			
		
	
		
		
			
				
					
					    ) , 
 
			
		
	
		
		
			
				
					
					    awful.button ( 
 
			
		
	
		
		
			
				
					
					        {  } , 
 
			
		
	
		
		
			
				
					
					        5 , 
 
			
		
	
		
		
			
				
					
					        function ( t )  awful.tag . viewprev ( t.screen )  end 
 
			
		
	
		
		
			
				
					
					    ) 
 
			
		
	
		
		
			
				
					
					) )  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					local  tasklist_buttons  =  awful.util . table.join ( local  tasklist_buttons  =  awful.util . table.join (  
			
		
	
		
		
			
				
					
					                     awful.button ( {  } ,  1 ,  function  ( c ) 
    awful.button ( 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        {  } , 
 
			
		
	
		
		
			
				
					
					        1 , 
 
			
		
	
		
		
			
				
					
					        function  ( c ) 
 
			
		
	
		
		
			
				
					
					            if  c  ==  client.focus  then 
            if  c  ==  client.focus  then 
 
			
		
	
		
		
			
				
					
					                c.minimized  =  true 
                c.minimized  =  true 
 
			
		
	
		
		
			
				
					
					            else 
            else 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -155,14 +190,28 @@ local tasklist_buttons = awful.util.table.join(
 
			
		
	
		
		
			
				
					
					                client.focus  =  c 
                client.focus  =  c 
 
			
		
	
		
		
			
				
					
					                c : raise ( ) 
                c : raise ( ) 
 
			
		
	
		
		
			
				
					
					            end 
            end 
 
			
		
	
		
		
			
				
					
					                                          end ) , 
        end 
 
			
				
				
			
		
	
		
		
			
				
					
					                     awful.button ( {  } ,  3 ,  client_menu_toggle_fn ( ) ) , 
    ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					                     awful.button ( {  } ,  4 ,  function  ( ) 
    awful.button ( 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					        {  } , 
 
			
		
	
		
		
			
				
					
					        3 , 
 
			
		
	
		
		
			
				
					
					        client_menu_toggle_fn ( ) 
 
			
		
	
		
		
			
				
					
					    ) , 
 
			
		
	
		
		
			
				
					
					    awful.button ( 
 
			
		
	
		
		
			
				
					
					        {  } , 
 
			
		
	
		
		
			
				
					
					        4 , 
 
			
		
	
		
		
			
				
					
					        function  ( ) 
 
			
		
	
		
		
			
				
					
					            awful.client . focus.byidx ( 1 ) 
            awful.client . focus.byidx ( 1 ) 
 
			
		
	
		
		
			
				
					
					                                          end ) , 
        end 
 
			
				
				
			
		
	
		
		
			
				
					
					                     awful.button ( {  } ,  5 ,  function  ( ) 
    ) , 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					    awful.button ( 
 
			
		
	
		
		
			
				
					
					        {  } , 
 
			
		
	
		
		
			
				
					
					        5 , 
 
			
		
	
		
		
			
				
					
					        function  ( ) 
 
			
		
	
		
		
			
				
					
					            awful.client . focus.byidx ( - 1 ) 
            awful.client . focus.byidx ( - 1 ) 
 
			
		
	
		
		
			
				
					
					                                          end ) ) 
        end 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    ) 
 
			
		
	
		
		
			
				
					
					)  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					local  function  set_wallpaper ( s ) local  function  set_wallpaper ( s )  
			
		
	
		
		
			
				
					
					    -- Wallpaper 
    -- Wallpaper 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -176,10 +225,70 @@ local function set_wallpaper(s)
 
			
		
	
		
		
			
				
					
					    end 
    end 
 
			
		
	
		
		
			
				
					
					end end  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					local  iostat_tooltiptext  =  " "  
			
		
	
		
		
			
				
					
					-- Widget de monitoring de l'activité des disques https://awesomewm.org/recipes/watch/  
			
		
	
		
		
			
				
					
					-- disk I/O using iostat from sysstat utilities  
			
		
	
		
		
			
				
					
					local  iotable  =  { }  
			
		
	
		
		
			
				
					
					local  iostat  =  awful.widget . watch ( " iostat -dm -y 1 1 " ,  2 ,  -- in Kb, use -dm for Mb  
			
		
	
		
		
			
				
					
					    function ( widget ,  stdout ) 
 
			
		
	
		
		
			
				
					
					        for  line  in  stdout : match ( " (sd.*) \n " ) : gmatch ( " (.-) \n " )  do 
 
			
		
	
		
		
			
				
					
					            local  device ,  tps ,  read_s ,  wrtn_s ,  read ,  wrtn  = 
 
			
		
	
		
		
			
				
					
					            line : match ( " (%w+)%s*(%d+,?%d*)%s*(%d+,?%d*)%s*(%d+,?%d*)%s*(%d+,?%d*)%s*(%d+,?%d*) " ) 
 
			
		
	
		
		
			
				
					
					            --                  [1]  [2]     [3]     [4]   [5] 
 
			
		
	
		
		
			
				
					
					            iotable [ device ]  =  {  tps ,  read_s ,  wrtn_s ,  read ,  wrtn  } 
 
			
		
	
		
		
			
				
					
					        end 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        local  label  =  " " 
 
			
		
	
		
		
			
				
					
					        for  device , values  in  spairs ( iotable )  do 
 
			
		
	
		
		
			
				
					
					          label  =  label .. ( device .. " :  " .. iotable [ device ] [ 2 ] .. "  MB_read/s  | " .. iotable [ device ] [ 3 ] .. "  MB_wrtn/s " ) .. " \n " 
 
			
		
	
		
		
			
				
					
					        end 
 
			
		
	
		
		
			
				
					
					        iostat_tooltiptext  =  label 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        -- customize here 
 
			
		
	
		
		
			
				
					
					        --widget:set_text("sda: "..iotable["sda"][2].."/"..iotable["sda"][3]) -- read_s/wrtn_s 
 
			
		
	
		
		
			
				
					
					        widget : set_text ( " iostat " ) 
 
			
		
	
		
		
			
				
					
					    end 
 
			
		
	
		
		
			
				
					
					)  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					iostat_t  =  awful.tooltip ( {  
			
		
	
		
		
			
				
					
					 --objects = {  }, 
 
			
		
	
		
		
			
				
					
					 timer_function  =  function ( ) 
 
			
		
	
		
		
			
				
					
					         return  iostat_tooltiptext 
 
			
		
	
		
		
			
				
					
					     end , 
 
			
		
	
		
		
			
				
					
					 } ) 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					iostat_t : add_to_object ( iostat )  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- tris d'un tableau par la clef https://stackoverflow.com/questions/15706270/sort-a-table-in-lua  
			
		
	
		
		
			
				
					
					function  spairs ( t ,  order )  
			
		
	
		
		
			
				
					
					    -- collect the keys 
 
			
		
	
		
		
			
				
					
					    local  keys  =  { } 
 
			
		
	
		
		
			
				
					
					    for  k  in  pairs ( t )  do  keys [ # keys + 1 ]  =  k  end 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					    -- if order function given, sort by it by passing the table and keys a, b, 
 
			
		
	
		
		
			
				
					
					    -- otherwise just sort the keys 
 
			
		
	
		
		
			
				
					
					    if  order  then 
 
			
		
	
		
		
			
				
					
					        table.sort ( keys ,  function ( a , b )  return  order ( t ,  a ,  b )  end ) 
 
			
		
	
		
		
			
				
					
					    else 
 
			
		
	
		
		
			
				
					
					        table.sort ( keys ) 
 
			
		
	
		
		
			
				
					
					    end 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					    -- return the iterator function 
 
			
		
	
		
		
			
				
					
					    local  i  =  0 
 
			
		
	
		
		
			
				
					
					    return  function ( ) 
 
			
		
	
		
		
			
				
					
					        i  =  i  +  1 
 
			
		
	
		
		
			
				
					
					        if  keys [ i ]  then 
 
			
		
	
		
		
			
				
					
					            return  keys [ i ] ,  t [ keys [ i ] ] 
 
			
		
	
		
		
			
				
					
					        end 
 
			
		
	
		
		
			
				
					
					    end 
 
			
		
	
		
		
			
				
					
					end  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)  
			
		
	
		
		
			
				
					
					screen.connect_signal ( " property::geometry " ,  set_wallpaper ) screen.connect_signal ( " property::geometry " ,  set_wallpaper )  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					awful.screen . connect_for_each_screen ( function ( s ) awful.screen . connect_for_each_screen (  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    function ( s ) 
 
			
		
	
		
		
			
				
					
					        -- Wallpaper 
        -- Wallpaper 
 
			
		
	
		
		
			
				
					
					        set_wallpaper ( s ) 
        set_wallpaper ( s ) 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -195,7 +304,8 @@ awful.screen.connect_for_each_screen(function(s)
 
			
		
	
		
		
			
				
					
					            awful.button ( {  } ,  1 ,  function  ( )  awful.layout . inc (  1 )  end ) , 
            awful.button ( {  } ,  1 ,  function  ( )  awful.layout . inc (  1 )  end ) , 
 
			
		
	
		
		
			
				
					
					            awful.button ( {  } ,  3 ,  function  ( )  awful.layout . inc ( - 1 )  end ) , 
            awful.button ( {  } ,  3 ,  function  ( )  awful.layout . inc ( - 1 )  end ) , 
 
			
		
	
		
		
			
				
					
					            awful.button ( {  } ,  4 ,  function  ( )  awful.layout . inc (  1 )  end ) , 
            awful.button ( {  } ,  4 ,  function  ( )  awful.layout . inc (  1 )  end ) , 
 
			
		
	
		
		
			
				
					
					                           awful.button ( {  } ,  5 ,  function  ( )  awful.layout . inc ( - 1 )  end ) ) ) 
            awful.button ( {  } ,  5 ,  function  ( )  awful.layout . inc ( - 1 )  end ) 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        ) ) 
 
			
		
	
		
		
			
				
					
					        -- Create a taglist widget 
        -- Create a taglist widget 
 
			
		
	
		
		
			
				
					
					        s.mytaglist  =  awful.widget . taglist ( s ,  awful.widget . taglist.filter . all ,  taglist_buttons ) 
        s.mytaglist  =  awful.widget . taglist ( s ,  awful.widget . taglist.filter . all ,  taglist_buttons ) 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -212,18 +322,22 @@ awful.screen.connect_for_each_screen(function(s)
 
			
		
	
		
		
			
				
					
					                layout  =  wibox.layout . fixed.horizontal , 
                layout  =  wibox.layout . fixed.horizontal , 
 
			
		
	
		
		
			
				
					
					                mylauncher , 
                mylauncher , 
 
			
		
	
		
		
			
				
					
					                s.mytaglist , 
                s.mytaglist , 
 
			
		
	
		
		
			
				
					
					            s.mypromptbox , 
                 s.mypromptbox 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            } , 
            } , 
 
			
		
	
		
		
			
				
					
					            s.mytasklist ,  -- Middle widget 
            s.mytasklist ,  -- Middle widget 
 
			
		
	
		
		
			
				
					
					            {  -- Right widgets 
            {  -- Right widgets 
 
			
		
	
		
		
			
				
					
					              layout  =  wibox.layout . fixed.horizontal , 
              layout  =  wibox.layout . fixed.horizontal , 
 
			
		
	
		
		
			
				
					
					              wibox.widget . textbox ( '  |  ' ) , 
 
			
		
	
		
		
			
				
					
					              iostat , 
 
			
		
	
		
		
			
				
					
					              wibox.widget . textbox ( '  |  ' ) , 
 
			
		
	
		
		
			
				
					
					              mykeyboardlayout , 
              mykeyboardlayout , 
 
			
		
	
		
		
			
				
					
					              wibox.widget . systray ( ) , 
              wibox.widget . systray ( ) , 
 
			
		
	
		
		
			
				
					
					              mytextclock , 
              mytextclock , 
 
			
		
	
		
		
			
				
					
					            s.mylayoutbox , 
              s.mylayoutbox 
 
			
				
				
			
		
	
		
		
			
				
					
					        } , 
 
			
		
	
		
		
	
		
		
			
				
					
					            } 
            } 
 
			
		
	
		
		
			
				
					
					end )         } 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    end 
 
			
		
	
		
		
			
				
					
					)  
			
		
	
		
		
			
				
					
					-- }}} -- }}}  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- {{{ Mouse bindings -- {{{ Mouse bindings  
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -236,89 +350,42 @@ root.buttons(awful.util.table.join(
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- {{{ Key bindings -- {{{ Key bindings  
			
		
	
		
		
			
				
					
					globalkeys  =  awful.util . table.join ( globalkeys  =  awful.util . table.join (  
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " s " ,       hotkeys_popup.show_help , 
    awful.key ( {  modkey ,            } ,  " s " ,       hotkeys_popup.show_help ,                                { description = " show help " ,  group = " awesome " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description = " show help " ,  group = " awesome " } ) , 
    awful.key ( {  modkey ,            } ,  " Left " ,    awful.tag . viewprev ,                                     { description  =  " view previous " ,  group  =  " tag " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " Left " ,    awful.tag . viewprev , 
    awful.key ( {  modkey ,            } ,  " Right " ,   awful.tag . viewnext ,                                     { description  =  " view next " ,  group  =  " tag " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " view previous " ,  group  =  " tag " } ) , 
    awful.key ( {  modkey ,            } ,  " Escape " ,  awful.tag . history.restore ,                              { description  =  " go back " ,  group  =  " tag " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " Right " ,   awful.tag . viewnext , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " view next " ,  group  =  " tag " } ) , 
    awful.key ( {  modkey ,            } ,  " j " ,  function  ( )  awful.client . focus.byidx (  1 )  end ,                { description  =  " focus next by index " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " Escape " ,  awful.tag . history.restore , 
    awful.key ( {  modkey ,            } ,  " k " ,  function  ( )  awful.client . focus.byidx ( - 1 )  end ,                { description  =  " focus previous by index " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " go back " ,  group  =  " tag " } ) , 
    awful.key ( {  modkey ,            } ,  " w " ,  function  ( )  mymainmenu : show ( )  end ,                           { description  =  " show main menu " ,  group  =  " awesome " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " j " , 
 
			
		
	
		
		
			
				
					
					        function  ( ) 
 
			
		
	
		
		
			
				
					
					            awful.client . focus.byidx (  1 ) 
 
			
		
	
		
		
			
				
					
					        end , 
 
			
		
	
		
		
			
				
					
					        { description  =  " focus next by index " ,  group  =  " client " } 
 
			
		
	
		
		
			
				
					
					    ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " k " , 
 
			
		
	
		
		
			
				
					
					        function  ( ) 
 
			
		
	
		
		
			
				
					
					            awful.client . focus.byidx ( - 1 ) 
 
			
		
	
		
		
			
				
					
					        end , 
 
			
		
	
		
		
			
				
					
					        { description  =  " focus previous by index " ,  group  =  " client " } 
 
			
		
	
		
		
			
				
					
					    ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " w " ,  function  ( )  mymainmenu : show ( )  end , 
 
			
		
	
		
		
			
				
					
					              { description  =  " show main menu " ,  group  =  " awesome " } ) , 
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					    -- Layout manipulation 
    -- Layout manipulation 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " j " ,  function  ( )  awful.client . swap.byidx (   1 )     end , 
    awful.key ( {  modkey ,  " Shift "    } ,  " j " ,  function  ( )  awful.client . swap.byidx (   1 )     end ,             { description  =  " swap with next client by index " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " swap with next client by index " ,  group  =  " client " } ) , 
    awful.key ( {  modkey ,  " Shift "    } ,  " k " ,  function  ( )  awful.client . swap.byidx (  - 1 )     end ,             { description  =  " swap with previous client by index " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " k " ,  function  ( )  awful.client . swap.byidx (  - 1 )     end , 
    awful.key ( {  modkey ,  " Control "  } ,  " j " ,  function  ( )  awful.screen . focus_relative (  1 )  end ,             { description  =  " focus the next screen " ,  group  =  " screen " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " swap with previous client by index " ,  group  =  " client " } ) , 
    awful.key ( {  modkey ,  " Control "  } ,  " k " ,  function  ( )  awful.screen . focus_relative ( - 1 )  end ,             { description  =  " focus the previous screen " ,  group  =  " screen " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Control "  } ,  " j " ,  function  ( )  awful.screen . focus_relative (  1 )  end , 
    awful.key ( {  modkey ,            } ,  " u " ,  awful.client . urgent.jumpto ,                                  { description  =  " jump to urgent client " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " focus the next screen " ,  group  =  " screen " } ) , 
    awful.key ( {  modkey ,            } ,  " Tab " ,  function  ( )  awful.client . focus.history . previous ( )  if  client.focus  then  client.focus : raise ( )  end  end , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Control "  } ,  " k " ,  function  ( )  awful.screen . focus_relative ( - 1 )  end , 
 
			
		
	
		
		
			
				
					
					              { description  =  " focus the previous screen " ,  group  =  " screen " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " u " ,  awful.client . urgent.jumpto , 
 
			
		
	
		
		
			
				
					
					              { description  =  " jump to urgent client " ,  group  =  " client " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " Tab " , 
 
			
		
	
		
		
			
				
					
					        function  ( ) 
 
			
		
	
		
		
			
				
					
					            awful.client . focus.history . previous ( ) 
 
			
		
	
		
		
			
				
					
					            if  client.focus  then 
 
			
		
	
		
		
			
				
					
					                client.focus : raise ( ) 
 
			
		
	
		
		
			
				
					
					            end 
 
			
		
	
		
		
			
				
					
					        end , 
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					                                                                                                      { description  =  " go back " ,  group  =  " client " } ) , 
                                                                                                      { description  =  " go back " ,  group  =  " client " } ) , 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					    -- Standard program 
    -- Standard program 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " Return " ,  function  ( )  awful.spawn ( terminal )  end , 
    awful.key ( {  modkey ,            } ,  " Return " ,  function  ( )  awful.spawn ( terminal )  end ,                  { description  =  " open a terminal " ,  group  =  " launcher " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " open a terminal " ,  group  =  " launcher " } ) , 
    awful.key ( {  modkey ,  " Control "  } ,  " r " ,  awesome.restart ,                                             { description  =  " reload awesome " ,  group  =  " awesome " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Control "  } ,  " r " ,  awesome.restart , 
    awful.key ( {  modkey ,  " Shift "    } ,  " q " ,  awesome.quit ,                                                { description  =  " quit awesome " ,  group  =  " awesome " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " reload awesome " ,  group  =  " awesome " } ) , 
    awful.key ( {  modkey ,            } ,  " l " ,      function  ( )  awful.tag . incmwfact (  0.05 )           end ,     { description  =  " increase master width factor " ,  group  =  " layout " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " q " ,  awesome.quit , 
    awful.key ( {  modkey ,            } ,  " h " ,      function  ( )  awful.tag . incmwfact ( - 0.05 )           end ,     { description  =  " decrease master width factor " ,  group  =  " layout " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " quit awesome " ,  group  =  " awesome " } ) , 
    awful.key ( {  modkey ,  " Shift "    } ,  " h " ,      function  ( )  awful.tag . incnmaster (  1 ,  nil ,  true )  end ,     { description  =  " increase the number of master clients " ,  group  =  " layout " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					
    awful.key ( {  modkey ,  " Shift "    } ,  " l " ,      function  ( )  awful.tag . incnmaster ( - 1 ,  nil ,  true )  end ,     { description  =  " decrease the number of master clients " ,  group  =  " layout " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " l " ,      function  ( )  awful.tag . incmwfact (  0.05 )           end , 
    awful.key ( {  modkey ,  " Control "  } ,  " h " ,      function  ( )  awful.tag . incncol (  1 ,  nil ,  true )     end ,     { description  =  " increase the number of columns " ,  group  =  " layout " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " increase master width factor " ,  group  =  " layout " } ) , 
    awful.key ( {  modkey ,  " Control "  } ,  " l " ,      function  ( )  awful.tag . incncol ( - 1 ,  nil ,  true )     end ,     { description  =  " decrease the number of columns " ,  group  =  " layout " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " h " ,      function  ( )  awful.tag . incmwfact ( - 0.05 )           end , 
    awful.key ( {  modkey ,            } ,  " space " ,  function  ( )  awful.layout . inc (  1 )                 end ,     { description  =  " select next " ,  group  =  " layout " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " decrease master width factor " ,  group  =  " layout " } ) , 
    awful.key ( {  modkey ,  " Shift "    } ,  " space " ,  function  ( )  awful.layout . inc ( - 1 )                 end ,     { description  =  " select previous " ,  group  =  " layout " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " h " ,      function  ( )  awful.tag . incnmaster (  1 ,  nil ,  true )  end , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " increase the number of master clients " ,  group  =  " layout " } ) , 
    awful.key ( {  modkey ,  " Control "  } ,  " n " ,  function  ( )  local  c  =  awful.client . restore ( )  --[[ Focus restored client ]]  if  c  then  client.focus  =  c  c : raise ( )  end  end , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " l " ,      function  ( )  awful.tag . incnmaster ( - 1 ,  nil ,  true )  end , 
 
			
		
	
		
		
			
				
					
					              { description  =  " decrease the number of master clients " ,  group  =  " layout " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Control "  } ,  " h " ,      function  ( )  awful.tag . incncol (  1 ,  nil ,  true )     end , 
 
			
		
	
		
		
			
				
					
					              { description  =  " increase the number of columns " ,  group  =  " layout " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Control "  } ,  " l " ,      function  ( )  awful.tag . incncol ( - 1 ,  nil ,  true )     end , 
 
			
		
	
		
		
			
				
					
					              { description  =  " decrease the number of columns " ,  group  =  " layout " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " space " ,  function  ( )  awful.layout . inc (  1 )                 end , 
 
			
		
	
		
		
			
				
					
					              { description  =  " select next " ,  group  =  " layout " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " space " ,  function  ( )  awful.layout . inc ( - 1 )                 end , 
 
			
		
	
		
		
			
				
					
					              { description  =  " select previous " ,  group  =  " layout " } ) , 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Control "  } ,  " n " , 
 
			
		
	
		
		
			
				
					
					              function  ( ) 
 
			
		
	
		
		
			
				
					
					                  local  c  =  awful.client . restore ( ) 
 
			
		
	
		
		
			
				
					
					                  -- Focus restored client 
 
			
		
	
		
		
			
				
					
					                  if  c  then 
 
			
		
	
		
		
			
				
					
					                      client.focus  =  c 
 
			
		
	
		
		
			
				
					
					                      c : raise ( ) 
 
			
		
	
		
		
			
				
					
					                  end 
 
			
		
	
		
		
			
				
					
					              end , 
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					                                                                                                      { description  =  " restore minimized " ,  group  =  " client " } ) , 
                                                                                                      { description  =  " restore minimized " ,  group  =  " client " } ) , 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					    -- Prompt 
    -- Prompt 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey  } ,             " r " ,      function  ( )  awful.screen . focused ( ) . mypromptbox : run ( )  end , 
    awful.key ( {  modkey  } ,             " r " ,  function  ( )  awful.screen . focused ( ) . mypromptbox : run ( )  end ,    { description  =  " run prompt " ,  group  =  " launcher " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " run prompt " ,  group  =  " launcher " } ) , 
 
			
		
	
		
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey  } ,  " x " , 
    awful.key ( {  modkey  } ,  " x " , 
 
			
		
	
		
		
			
				
					
					    function  ( ) 
    function  ( ) 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -331,66 +398,49 @@ globalkeys = awful.util.table.join(
 
			
		
	
		
		
			
				
					
					    end , 
    end , 
 
			
		
	
		
		
			
				
					
					                                                                                                      { description  =  " lua execute prompt " ,  group  =  " awesome " } ) , 
                                                                                                      { description  =  " lua execute prompt " ,  group  =  " awesome " } ) , 
 
			
		
	
		
		
			
				
					
					    -- Menubar 
    -- Menubar 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey  } ,  " p " ,  function ( )  menubar.show ( )  end , 
    awful.key ( {  modkey  } ,  " p " ,  function ( )  menubar.show ( )  end ,                                          { description  =  " show the menubar " ,  group  =  " launcher " } ) ,  
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " show the menubar " ,  group  =  " launcher " } ) ,  
  
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					    -- Lanceurs perso 
    -- Lanceurs perso 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey             } ,  " F1 " ,  function  ( )  awful.util . spawn ( " firefox " )  end ) , 
    awful.key ( {  modkey             } ,  " F1 " ,   function  ( )  awful.util . spawn ( " firefox " )  end ,               { description  =  " Lance Firefox " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey             } ,  " F2 " ,  function  ( )  awful.util . spawn ( " firefox " )  end ) , 
    awful.key ( {  modkey             } ,  " F2 " ,   function  ( )  awful.util . spawn ( " firefox " )  end ,               { description  =  " Lance Firefox " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					--  awful.key({ modkey            }, "F3", function () awful.util.spawn("") end),     awful.key ( {  modkey             } ,  " F3 " ,   function  ( )  awful.util . spawn ( " gqrx " )  end ,                  { description  =  " Lance gqrx " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey             } ,  " F4 " ,  function  ( )  awful.util . spawn ( " chromium " )  end ) , 
    awful.key ( {  modkey             } ,  " F4 " ,   function  ( )  awful.util . spawn ( " chromium " )  end ,              { description  =  " Lance Chromium " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey             } ,  " F5 " ,  function  ( )  awful.util . spawn ( " spacefm " )  end ) , 
    awful.key ( {  modkey             } ,  " F5 " ,   function  ( )  awful.util . spawn ( " spacefm " )  end ,               { description  =  " Lance spacefm " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey             } ,  " F6 " ,  function  ( )  awful.util . spawn ( " vlc " )  end ) , 
    awful.key ( {  modkey             } ,  " F6 " ,   function  ( )  awful.util . spawn ( " vlc " )  end ,                   { description  =  " Lance vlc " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey             } ,  " F7 " ,  function  ( )  awful.util . spawn ( " claws-mail " )  end ) , 
    awful.key ( {  modkey             } ,  " F7 " ,   function  ( )  awful.util . spawn ( " claws-mail " )  end ,            { description  =  " Lance claws " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey             } ,  " F11 " ,  function  ( )  awful.util . spawn ( " xrandr-auto " )  end ) , 
    awful.key ( {  modkey             } ,  " F11 " ,  function  ( )  awful.util . spawn ( " xrandr-auto " )  end ,           { description  =  " Lance le script xrandr-auto " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey             } ,  " F12 " ,  function  ( )  awful.util . spawn ( " slock " )  end ) , 
    awful.key ( {  modkey             } ,  " F12 " ,  function  ( )  awful.util . spawn ( " slock " )  end ,                 { description  =  " Verouille la session avec slock " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " F1 " ,  function  ( )  awful.util . spawn ( " claws-mail " )  end ) , 
    awful.key ( {  modkey ,  " Shift "    } ,  " F1 " ,   function  ( )  awful.util . spawn ( " claws-mail " )  end ,            { description  =  " Lance claws " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " F3 " ,  function  ( )  awful.util . spawn ( " pcmanfm " )  end ) , 
    awful.key ( {  modkey ,  " Shift "    } ,  " F3 " ,   function  ( )  awful.util . spawn ( " pcmanfm " )  end ,               { description  =  " Lance pcmanfm " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " F6 " ,  function  ( )  awful.util . spawn ( " clementine " )  end ) , 
    awful.key ( {  modkey ,  " Shift "    } ,  " F6 " ,   function  ( )  awful.util . spawn ( " clementine " )  end ,            { description  =  " Lance clementine " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " F11 " ,  function  ( )  awful.util . spawn ( " xrandr-auto-2 " )  end ) 
    awful.key ( {  modkey ,  " Shift "    } ,  " F11 " ,  function  ( )  awful.util . spawn ( " xrandr-auto-2 " )  end ,         { description  =  " Lance le script xrandr-auto-2 " ,  group  =  " Lanceurs personnels " } ) , 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					    awful.key ( {  modkey   } ,  " l " ,  function  ( )  awful.util . spawn ( " slock systemctl suspend -i " )  end ,  { description  =  " Verouille la session avec slock " ,  group  =  " Lanceurs personnels " } ) 
 
			
		
	
		
		
			
				
					
					    --  awful.key({ modkey, "Shift"   }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-left") end), 
    --  awful.key({ modkey, "Shift"   }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-left") end), 
 
			
		
	
		
		
			
				
					
					    --  awful.key({ modkey, "Control" }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-right") end), 
    --  awful.key({ modkey, "Control" }, "F11", function () awful.util.spawn("/home/taeradan/bin/xrandr-right") end), 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					) )  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					clientkeys  =  awful.util . table.join ( clientkeys  =  awful.util . table.join (  
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " f " , 
    awful.key ( {  modkey ,            } ,  " f " ,  function  ( c )  c.fullscreen  =  not  c.fullscreen  c : raise ( )  end ,  { description  =  " toggle fullscreen " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					        function  ( c ) 
    awful.key ( {  modkey ,  " Shift "    } ,  " c " ,       function  ( c )  c : kill ( )                          end ,      { description  =  " close " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					            c.fullscreen  =  not  c.fullscreen 
    awful.key ( {  modkey ,  " Control "  } ,  " space " ,   awful.client . floating.toggle                      ,      { description  =  " toggle floating " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					            c : raise ( ) 
    awful.key ( {  modkey ,  " Control "  } ,  " Return " ,  function  ( c )  c : swap ( awful.client . getmaster ( ) )  end ,      { description  =  " move to master " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					        end , 
    awful.key ( {  modkey ,            } ,  " o " ,       function  ( c )  c : move_to_screen ( )                end ,      { description  =  " move to screen " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					        { description  =  " toggle fullscreen " ,  group  =  " client " } ) , 
    awful.key ( {  modkey ,            } ,  " t " ,       function  ( c )  c.ontop  =  not  c.ontop             end ,      { description  =  " toggle keep on top " ,  group  =  " client " } ) , 
 
			
				
				
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Shift "    } ,  " c " ,       function  ( c )  c : kill ( )                          end , 
    awful.key ( {  modkey ,            } ,  " n " ,       function  ( c )  --[[ The client currently has the input focus, so it cannot be minimized, since minimized clients can't have the focus. ]]   c.minimized  =  true  end  , 
 
			
				
				
			
		
	
		
		
			
				
					
					              { description  =  " close " ,  group  =  " client " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Control "  } ,  " space " ,   awful.client . floating.toggle                      , 
 
			
		
	
		
		
			
				
					
					              { description  =  " toggle floating " ,  group  =  " client " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,  " Control "  } ,  " Return " ,  function  ( c )  c : swap ( awful.client . getmaster ( ) )  end , 
 
			
		
	
		
		
			
				
					
					              { description  =  " move to master " ,  group  =  " client " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " o " ,       function  ( c )  c : move_to_screen ( )                end , 
 
			
		
	
		
		
			
				
					
					              { description  =  " move to screen " ,  group  =  " client " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " t " ,       function  ( c )  c.ontop  =  not  c.ontop             end , 
 
			
		
	
		
		
			
				
					
					              { description  =  " toggle keep on top " ,  group  =  " client " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " n " , 
 
			
		
	
		
		
			
				
					
					        function  ( c ) 
 
			
		
	
		
		
			
				
					
					            -- The client currently has the input focus, so it cannot be 
 
			
		
	
		
		
			
				
					
					            -- minimized, since minimized clients can't have the focus. 
 
			
		
	
		
		
			
				
					
					            c.minimized  =  true 
 
			
		
	
		
		
			
				
					
					        end  , 
 
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					                                                                                                      { description  =  " minimize " ,  group  =  " client " } ) , 
                                                                                                      { description  =  " minimize " ,  group  =  " client " } ) , 
 
			
		
	
		
		
			
				
					
					    awful.key ( {  modkey ,            } ,  " m " , 
    awful.key ( {  modkey ,            } ,  " m " ,  function  ( c )  c.maximized  =  not  c.maximized  c : raise ( )  end  ,   { description  =  " maximize " ,  group  =  " client " } ) 
 
			
				
				
			
		
	
		
		
			
				
					
					        function  ( c ) 
 
			
		
	
		
		
			
				
					
					            c.maximized  =  not  c.maximized 
 
			
		
	
		
		
			
				
					
					            c : raise ( ) 
 
			
		
	
		
		
			
				
					
					        end  , 
 
			
		
	
		
		
			
				
					
					        { description  =  " maximize " ,  group  =  " client " } ) 
 
			
		
	
		
		
	
		
		
			
				
					
					) )  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- Bind all key numbers to tags. -- Bind all key numbers to tags.  
			
		
	
		
		
			
				
					
					-- Be careful: we use keycodes to make it works on any keyboard layout. -- Be careful: we use keycodes to make it works on any keyboard layout.  
			
		
	
		
		
			
				
					
					-- This should map on the top row of your keyboard, usually 1 to 9. -- This should map on the top row of your keyboard, usually 1 to 9.  
			
		
	
		
		
			
				
					
					for  i  =  1 ,  9  do for  i  =  1 ,  9  do  
			
		
	
		
		
			
				
					
					    globalkeys  =  awful.util . table.join ( globalkeys , 
    globalkeys  =  awful.util . table.join ( 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        globalkeys , 
 
			
		
	
		
		
			
				
					
					        -- View tag only. 
        -- View tag only. 
 
			
		
	
		
		
			
				
					
					        awful.key ( {  modkey  } ,  " # "  ..  i  +  9 , 
        awful.key ( 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            {  modkey  } , 
 
			
		
	
		
		
			
				
					
					            " # "  ..  i  +  9 , 
 
			
		
	
		
		
			
				
					
					            function  ( ) 
            function  ( ) 
 
			
		
	
		
		
			
				
					
					                local  screen  =  awful.screen . focused ( ) 
                local  screen  =  awful.screen . focused ( ) 
 
			
		
	
		
		
			
				
					
					                local  tag  =  screen.tags [ i ] 
                local  tag  =  screen.tags [ i ] 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -398,9 +448,12 @@ for i = 1, 9 do
 
			
		
	
		
		
			
				
					
					                    tag : view_only ( ) 
                    tag : view_only ( ) 
 
			
		
	
		
		
			
				
					
					                end 
                end 
 
			
		
	
		
		
			
				
					
					            end , 
            end , 
 
			
		
	
		
		
			
				
					
					                  { description  =  " view tag # " .. i ,  group  =  " tag " } ) , 
            { description  =  " view tag # " .. i ,  group  =  " tag " } 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        ) , 
 
			
		
	
		
		
			
				
					
					        -- Toggle tag display. 
        -- Toggle tag display. 
 
			
		
	
		
		
			
				
					
					        awful.key ( {  modkey ,  " Control "  } ,  " # "  ..  i  +  9 , 
        awful.key ( 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            {  modkey ,  " Control "  } , 
 
			
		
	
		
		
			
				
					
					            " # "  ..  i  +  9 , 
 
			
		
	
		
		
			
				
					
					            function  ( ) 
            function  ( ) 
 
			
		
	
		
		
			
				
					
					                local  screen  =  awful.screen . focused ( ) 
                local  screen  =  awful.screen . focused ( ) 
 
			
		
	
		
		
			
				
					
					                local  tag  =  screen.tags [ i ] 
                local  tag  =  screen.tags [ i ] 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -408,9 +461,12 @@ for i = 1, 9 do
 
			
		
	
		
		
			
				
					
					                    awful.tag . viewtoggle ( tag ) 
                    awful.tag . viewtoggle ( tag ) 
 
			
		
	
		
		
			
				
					
					                end 
                end 
 
			
		
	
		
		
			
				
					
					            end , 
            end , 
 
			
		
	
		
		
			
				
					
					                  { description  =  " toggle tag # "  ..  i ,  group  =  " tag " } ) , 
            { description  =  " toggle tag # "  ..  i ,  group  =  " tag " } 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        ) , 
 
			
		
	
		
		
			
				
					
					        -- Move client to tag. 
        -- Move client to tag. 
 
			
		
	
		
		
			
				
					
					        awful.key ( {  modkey ,  " Shift "  } ,  " # "  ..  i  +  9 , 
        awful.key ( 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            {  modkey ,  " Shift "  } , 
 
			
		
	
		
		
			
				
					
					            " # "  ..  i  +  9 , 
 
			
		
	
		
		
			
				
					
					            function  ( ) 
            function  ( ) 
 
			
		
	
		
		
			
				
					
					                if  client.focus  then 
                if  client.focus  then 
 
			
		
	
		
		
			
				
					
					                    local  tag  =  client.focus . screen.tags [ i ] 
                    local  tag  =  client.focus . screen.tags [ i ] 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -419,9 +475,12 @@ for i = 1, 9 do
 
			
		
	
		
		
			
				
					
					                    end 
                    end 
 
			
		
	
		
		
			
				
					
					                end 
                end 
 
			
		
	
		
		
			
				
					
					            end , 
            end , 
 
			
		
	
		
		
			
				
					
					                  { description  =  " move focused client to tag # " .. i ,  group  =  " tag " } ) , 
            { description  =  " move focused client to tag # " .. i ,  group  =  " tag " } 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        ) , 
 
			
		
	
		
		
			
				
					
					        -- Toggle tag on focused client. 
        -- Toggle tag on focused client. 
 
			
		
	
		
		
			
				
					
					        awful.key ( {  modkey ,  " Control " ,  " Shift "  } ,  " # "  ..  i  +  9 , 
        awful.key ( 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            {  modkey ,  " Control " ,  " Shift "  } , 
 
			
		
	
		
		
			
				
					
					            " # "  ..  i  +  9 , 
 
			
		
	
		
		
			
				
					
					            function  ( ) 
            function  ( ) 
 
			
		
	
		
		
			
				
					
					                if  client.focus  then 
                if  client.focus  then 
 
			
		
	
		
		
			
				
					
					                    local  tag  =  client.focus . screen.tags [ i ] 
                    local  tag  =  client.focus . screen.tags [ i ] 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -430,7 +489,8 @@ for i = 1, 9 do
 
			
		
	
		
		
			
				
					
					                    end 
                    end 
 
			
		
	
		
		
			
				
					
					                end 
                end 
 
			
		
	
		
		
			
				
					
					            end , 
            end , 
 
			
		
	
		
		
			
				
					
					                  { description  =  " toggle focused client on tag # "  ..  i ,  group  =  " tag " } ) 
            { description  =  " toggle focused client on tag # "  ..  i ,  group  =  " tag " } 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					        ) 
 
			
		
	
		
		
			
				
					
					    ) 
    ) 
 
			
		
	
		
		
			
				
					
					end end  
			
		
	
		
		
			
				
					
					
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -447,8 +507,10 @@ root.keys(globalkeys)
 
			
		
	
		
		
			
				
					
					-- Rules to apply to new clients (through the "manage" signal). -- Rules to apply to new clients (through the "manage" signal).  
			
		
	
		
		
			
				
					
					awful.rules . rules  =  { awful.rules . rules  =  {  
			
		
	
		
		
			
				
					
					    -- All clients will match this rule. 
    -- All clients will match this rule. 
 
			
		
	
		
		
			
				
					
					    {  rule  =  {  } , 
    { 
 
			
				
				
			
		
	
		
		
			
				
					
					      properties  =  {  border_width  =  beautiful.border_width , 
        rule  =  {  } , 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					        properties  =  { 
 
			
		
	
		
		
			
				
					
					            border_width  =  beautiful.border_width , 
 
			
		
	
		
		
			
				
					
					            border_color  =  beautiful.border_normal , 
            border_color  =  beautiful.border_normal , 
 
			
		
	
		
		
			
				
					
					            focus  =  awful.client . focus.filter , 
            focus  =  awful.client . focus.filter , 
 
			
		
	
		
		
			
				
					
					            raise  =  true , 
            raise  =  true , 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -458,9 +520,9 @@ awful.rules.rules = {
 
			
		
	
		
		
			
				
					
					            placement  =  awful.placement . no_overlap + awful.placement . no_offscreen 
            placement  =  awful.placement . no_overlap + awful.placement . no_offscreen 
 
			
		
	
		
		
			
				
					
					          } 
          } 
 
			
		
	
		
		
			
				
					
					      } , 
      } , 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					      -- Floating clients. 
      -- Floating clients. 
 
			
		
	
		
		
			
				
					
					    {  rule_any  =  { 
      { 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					          rule_any  =  { 
 
			
		
	
		
		
			
				
					
					              instance  =  { 
              instance  =  { 
 
			
		
	
		
		
			
				
					
					                  " DTA " ,   -- Firefox addon DownThemAll. 
                  " DTA " ,   -- Firefox addon DownThemAll. 
 
			
		
	
		
		
			
				
					
					                  " copyq " ,   -- Includes session name in class. 
                  " copyq " ,   -- Includes session name in class. 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -474,8 +536,8 @@ awful.rules.rules = {
 
			
		
	
		
		
			
				
					
					                  " Wpa_gui " , 
                  " Wpa_gui " , 
 
			
		
	
		
		
			
				
					
					                  " pinentry " , 
                  " pinentry " , 
 
			
		
	
		
		
			
				
					
					                  " veromix " , 
                  " veromix " , 
 
			
		
	
		
		
			
				
					
					          " xtightvncviewer " } , 
                   " xtightvncviewer " 
 
			
				
				
			
		
	
		
		
			
				
					
					
               } ,   
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					              name  =  { 
              name  =  { 
 
			
		
	
		
		
			
				
					
					                  " Event Tester " ,   -- xev. 
                  " Event Tester " ,   -- xev. 
 
			
		
	
		
		
			
				
					
					              } , 
              } , 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -483,11 +545,16 @@ awful.rules.rules = {
 
			
		
	
		
		
			
				
					
					                  " AlarmWindow " ,   -- Thunderbird's calendar. 
                  " AlarmWindow " ,   -- Thunderbird's calendar. 
 
			
		
	
		
		
			
				
					
					                  " pop-up " ,        -- e.g. Google Chrome's (detached) Developer Tools. 
                  " pop-up " ,        -- e.g. Google Chrome's (detached) Developer Tools. 
 
			
		
	
		
		
			
				
					
					              } 
              } 
 
			
		
	
		
		
			
				
					
					      } ,  properties  =  {  floating  =  true  } } , 
          } , 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					          properties  =  {  floating  =  true  } 
 
			
		
	
		
		
			
				
					
					      } , 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					      -- Add titlebars to normal clients and dialogs 
      -- Add titlebars to normal clients and dialogs 
 
			
		
	
		
		
			
				
					
					    {  rule_any  =  { type  =  {  " normal " ,  " dialog "  } 
      { 
 
			
				
				
			
		
	
		
		
			
				
					
					      } ,  properties  =  {  titlebars_enabled  =  false  } 
          rule_any  =  { 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					              type  =  {  " normal " ,  " dialog "  } 
 
			
		
	
		
		
			
				
					
					          } , 
 
			
		
	
		
		
			
				
					
					          properties  =  {  titlebars_enabled  =  false  } 
 
			
		
	
		
		
			
				
					
					      } , 
      } , 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					      -- Set Firefox to always map on the tag named "2" on screen 1. 
      -- Set Firefox to always map on the tag named "2" on screen 1. 
 
			
		
	
	
		
		
			
				
					
						
						
						
							
								 
						
					 
					@ -498,33 +565,45 @@ awful.rules.rules = {
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- {{{ Signals -- {{{ Signals  
			
		
	
		
		
			
				
					
					-- Signal function to execute when a new client appears. -- Signal function to execute when a new client appears.  
			
		
	
		
		
			
				
					
					client.connect_signal ( " manage " ,  function  ( c ) client.connect_signal (  
			
				
				
			
		
	
		
		
			
				
					
					    -- Set the windows at the slave, 
    " manage " , 
 
			
				
				
			
		
	
		
		
			
				
					
					    -- i.e. put it at the end of others instead of setting it master. 
    function  ( c ) 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					
					        --[[ Set the windows at the slave, i.e. put it at the end of others instead of setting it master.]] 
 
			
		
	
		
		
			
				
					
					        -- if not awesome.startup then awful.client.setslave(c) end 
        -- if not awesome.startup then awful.client.setslave(c) end 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        if  awesome.startup  and 
        if  awesome.startup  and 
 
			
		
	
		
		
			
				
					
					            not  c.size_hints . user_position 
            not  c.size_hints . user_position 
 
			
		
	
		
		
			
				
					
					            and  not  c.size_hints . program_position  then 
            and  not  c.size_hints . program_position  then 
 
			
		
	
		
		
			
				
					
					        -- 
            --[[   Prevent clients from being unreachable after screen count changes.]] 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            awful.placement . no_offscreen ( c ) 
            awful.placement . no_offscreen ( c ) 
 
			
		
	
		
		
			
				
					
					        end 
        end 
 
			
		
	
		
		
			
				
					
					end )     end 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					)  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- Add a titlebar if titlebars_enabled is set to true in the rules. -- Add a titlebar if titlebars_enabled is set to true in the rules.  
			
		
	
		
		
			
				
					
					client.connect_signal ( " request::titlebars " ,  function ( c ) client.connect_signal (  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    " request::titlebars " , 
 
			
		
	
		
		
			
				
					
					    function ( c ) 
 
			
		
	
		
		
			
				
					
					        -- buttons for the titlebar 
        -- buttons for the titlebar 
 
			
		
	
		
		
			
				
					
					        local  buttons  =  awful.util . table.join ( 
        local  buttons  =  awful.util . table.join ( 
 
			
		
	
		
		
			
				
					
					        awful.button ( {  } ,  1 ,  function ( ) 
            awful.button ( 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					                {  } , 
 
			
		
	
		
		
			
				
					
					                1 , 
 
			
		
	
		
		
			
				
					
					                function ( ) 
 
			
		
	
		
		
			
				
					
					                    client.focus  =  c 
                    client.focus  =  c 
 
			
		
	
		
		
			
				
					
					                    c : raise ( ) 
                    c : raise ( ) 
 
			
		
	
		
		
			
				
					
					                    awful.mouse . client.move ( c ) 
                    awful.mouse . client.move ( c ) 
 
			
		
	
		
		
			
				
					
					        end ) , 
                end 
 
			
				
				
			
		
	
		
		
			
				
					
					        awful.button ( {  } ,  3 ,  function ( ) 
            ) , 
 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					            awful.button ( 
 
			
		
	
		
		
			
				
					
					                {  } , 
 
			
		
	
		
		
			
				
					
					                3 , 
 
			
		
	
		
		
			
				
					
					                function ( ) 
 
			
		
	
		
		
			
				
					
					                    client.focus  =  c 
                    client.focus  =  c 
 
			
		
	
		
		
			
				
					
					                    c : raise ( ) 
                    c : raise ( ) 
 
			
		
	
		
		
			
				
					
					                    awful.mouse . client.resize ( c ) 
                    awful.mouse . client.resize ( c ) 
 
			
		
	
		
		
			
				
					
					        end ) 
                end 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					            ) 
 
			
		
	
		
		
			
				
					
					        ) 
        ) 
 
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					        awful.titlebar ( c )  :  setup  { 
        awful.titlebar ( c )  :  setup  { 
 
			
		
	
	
		
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
					@ -551,15 +630,19 @@ client.connect_signal("request::titlebars", function(c)
 
			
		
	
		
		
			
				
					
					            } , 
            } , 
 
			
		
	
		
		
			
				
					
					            layout  =  wibox.layout . align.horizontal 
            layout  =  wibox.layout . align.horizontal 
 
			
		
	
		
		
			
				
					
					        } 
        } 
 
			
		
	
		
		
			
				
					
					end )     end 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					)  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					-- Enable sloppy focus, so that focus follows mouse. -- Enable sloppy focus, so that focus follows mouse.  
			
		
	
		
		
			
				
					
					client.connect_signal ( " mouse::enter " ,  function ( c ) client.connect_signal (  
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					    " mouse::enter " , 
 
			
		
	
		
		
			
				
					
					    function ( c ) 
 
			
		
	
		
		
			
				
					
					        if  awful.layout . get ( c.screen )  ~=  awful.layout . suit.magnifier 
        if  awful.layout . get ( c.screen )  ~=  awful.layout . suit.magnifier 
 
			
		
	
		
		
			
				
					
					        and  awful.client . focus.filter ( c )  then 
        and  awful.client . focus.filter ( c )  then 
 
			
		
	
		
		
			
				
					
					            client.focus  =  c 
            client.focus  =  c 
 
			
		
	
		
		
			
				
					
					        end 
        end 
 
			
		
	
		
		
			
				
					
					end )     end 
 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					)  
			
		
	
		
		
			
				
					
					
 
			
		
	
		
		
			
				
					
					client.connect_signal ( " focus " ,  function ( c )  c.border_color  =  beautiful.border_focus  end ) client.connect_signal ( " focus " ,  function ( c )  c.border_color  =  beautiful.border_focus  end )  
			
		
	
		
		
			
				
					
					client.connect_signal ( " unfocus " ,  function ( c )  c.border_color  =  beautiful.border_normal  end ) client.connect_signal ( " unfocus " ,  function ( c )  c.border_color  =  beautiful.border_normal  end )