From 2564684eeaaf21436b6324f1967d7dc87c6facde Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 3 Feb 2021 14:29:10 -0600 Subject: [PATCH] Trying to use var --- awesome/init.fnl | 20 ++++++++++++-------- awesome/keybindings.fnl | 4 +++- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/awesome/init.fnl b/awesome/init.fnl index 489a0a4..4aed1c2 100644 --- a/awesome/init.fnl +++ b/awesome/init.fnl @@ -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") diff --git a/awesome/keybindings.fnl b/awesome/keybindings.fnl index 77de5f9..11b8d91 100644 --- a/awesome/keybindings.fnl +++ b/awesome/keybindings.fnl @@ -124,8 +124,10 @@ {:description "launch mu4e in new emacs frame" :group "apps" }) (awful.key [ modkey shift ] "Return" (fn [] (awful.spawn "emacsclient -c -e '(+eshell/frame)'")) {:description "launch eshell in new emacs frame" :group "apps" }) - (awful.key [ modkey ] "e" (fn [] (awful.spawn "env GDK_SCALE=2 emacsclient -c -a 'emacs'")) + (awful.key [ modkey ] "e" (fn [] (awful.spawn "emacsclient -c -a 'emacs'")) {:description "launch new emacs frame" :group "apps" }) + (awful.key [ modkey ] "p" (fn [] (awful.spawn "emacsclient -c -e '(pass)'")) + {:description "select pass" :group "apps" }) ;; rofi (awful.key [] "Menu" (fn [] (awful.spawn "/home/chris/.dotfiles/rofi/launchers-git/launcher.sh")) {:description "launch rofi" :group "launcher"})