Using global and tset

This commit is contained in:
Chris Cochrun 2021-02-03 11:30:36 -06:00
parent 0d454775ac
commit 2682f06437

View file

@ -64,10 +64,10 @@
(local alt "Mod1")
;; Set hostname so that we can utilize specific features on different machines
(var laptop false)
(global laptop false)
(awful.spawn.easy_async "hostname" (fn [ stdout stderr reason exit_code ]
(if (= "chris-linuxlaptop\n" stdout)
(set laptop true))))
(tset _G 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.