Using var instead of global
This commit is contained in:
		
							parent
							
								
									a693dd565b
								
							
						
					
					
						commit
						0d454775ac
					
				
					 1 changed files with 3 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -64,11 +64,10 @@
 | 
			
		|||
(local alt "Mod1")
 | 
			
		||||
 | 
			
		||||
;; Set hostname so that we can utilize specific features on different machines
 | 
			
		||||
(global laptop false)
 | 
			
		||||
(global laptop (awful.spawn.easy_async "hostname" (fn [ stdout stderr reason exit_code ]
 | 
			
		||||
(var laptop false)
 | 
			
		||||
(awful.spawn.easy_async "hostname" (fn [ stdout stderr reason exit_code ]
 | 
			
		||||
                                       (if (= "chris-linuxlaptop\n" stdout)
 | 
			
		||||
                                           true
 | 
			
		||||
                                           false))))
 | 
			
		||||
                                           (set laptop true))))
 | 
			
		||||
(if laptop (naughty.notify {:text "laptop detected"}) (naughty.notify {:text "laptop not detected"}))
 | 
			
		||||
 | 
			
		||||
;; Table of layouts to cover with awful.layout.inc, order matters.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue