Trying to use var
This commit is contained in:
		
							parent
							
								
									482ac6e28e
								
							
						
					
					
						commit
						2564684eea
					
				
					 2 changed files with 15 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -20,7 +20,7 @@
 | 
			
		|||
;; my splits
 | 
			
		||||
(local rules (require "rules"))
 | 
			
		||||
(local keybindings (require "keybindings"))
 | 
			
		||||
;; (local notifications (require "notifications")) ||#
 | 
			
		||||
;; (local notifications (require "notifications"))
 | 
			
		||||
 | 
			
		||||
;; Error handling
 | 
			
		||||
;; Check if awesome encountered an error during startup and fell back to
 | 
			
		||||
| 
						 | 
				
			
			@ -63,11 +63,14 @@
 | 
			
		|||
(local ctrl "Control")
 | 
			
		||||
(local alt "Mod1")
 | 
			
		||||
 | 
			
		||||
;; Set hostname so that we can utilize specific features on different machines
 | 
			
		||||
(local laptop (awful.spawn.easy_async "hostname" (fn [ stdout stderr reason exit_code ]
 | 
			
		||||
;; Set hostname so that we can utilize specific features on different machines|#
 | 
			
		||||
(var laptop false)
 | 
			
		||||
(awful.spawn.easy_async "hostname" (fn [ stdout stderr reason exit_code ]
 | 
			
		||||
                                       (if (= "chris-linuxlaptop\n" stdout)
 | 
			
		||||
                                           true))))
 | 
			
		||||
(if laptop (naughty.notify {:text "laptop detected"}) (naughty.notify {:text "laptop not detected"}))
 | 
			
		||||
                                           (set laptop true)
 | 
			
		||||
                                           (set laptop true))))
 | 
			
		||||
(naughty.notify {:text (tostring laptop)})
 | 
			
		||||
;; (if laptop (naughty.notify {:text "laptop detected"}) (naughty.notify {:text "laptop not detected"}))
 | 
			
		||||
 | 
			
		||||
;; Table of layouts to cover with awful.layout.inc, order matters.
 | 
			
		||||
(set awful.layout.layouts [
 | 
			
		||||
| 
						 | 
				
			
			@ -76,14 +79,14 @@
 | 
			
		|||
                           ;; awful.layout.suit.tile.left
 | 
			
		||||
                           ;; awful.layout.suit.tile.bottom
 | 
			
		||||
                           ;; awful.layout.suit.tile.top
 | 
			
		||||
                           awful.layout.suit.fair
 | 
			
		||||
                           ;; awful.layout.suit.fair
 | 
			
		||||
                           ;; awful.layout.suit.fair.horizontal
 | 
			
		||||
                           awful.layout.suit.spiral
 | 
			
		||||
                           ;; awful.layout.suit.spiral
 | 
			
		||||
                           ;; awful.layout.suit.spiral.dwindle
 | 
			
		||||
                           awful.layout.suit.max
 | 
			
		||||
                           ;; awful.layout.suit.max.fullscreen
 | 
			
		||||
                           awful.layout.suit.magnifier
 | 
			
		||||
                           awful.layout.suit.corner.nw
 | 
			
		||||
                           ;; awful.layout.suit.corner.nw
 | 
			
		||||
                           ;; awful.layout.suit.corner.ne
 | 
			
		||||
                           ;; awful.layout.suit.corner.sw
 | 
			
		||||
                           ;; awful.layout.suit.corner.se
 | 
			
		||||
| 
						 | 
				
			
			@ -466,3 +469,4 @@
 | 
			
		|||
;; (awful.spawn "nextcloud --background")
 | 
			
		||||
(awful.spawn "libinput-gestures-setup start")
 | 
			
		||||
(awful.spawn "bluetoothctl power on")
 | 
			
		||||
(awful.spawn "emacs --daemon")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue