From 0d454775ac0b355b78b3a444591e66486cb5eee8 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 3 Feb 2021 11:28:30 -0600 Subject: [PATCH] Using var instead of global --- awesome/init.fnl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/awesome/init.fnl b/awesome/init.fnl index 94d5c54..35cef36 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -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.