#+TITLE:AwesomeWM in Fennel
#+AUTHOR: Chris Cochrun
#+DESCRIPTION: This Awesome Window Manager config is written primarily in fennel. This is a lisp written in and compiled to lua. Fennel runs at lua speeds but is created to make a lisp syntax for lua and to provide a lisp macro system for lua. I prefer reading and writing lisps over lua so that is why my AwesomeWM is configured in fennel.

To get us started we need to bootstrap fennel in order to get Awesome to load .fnl files.

To do that, ensure that fennel is installed.
#+begin_src bash
pacman -Syu fennel
#+end_src

Then use this for you're rc.lua

#+begin_src lua
fennel = require("fennel")
local gears = require("gears")
local naughty = require("naughty")
cfgDir = os.getenv("HOME") .. "/.config/awesome/"
-- package.path = cfgDir .. "?.lua"
fennel.path = fennel.path .. ";" .. cfgDir .. "?.fnl;"


-- naughty.notification{ title = "YAY RC LOADED"}

searcher = fennel.make_searcher({
      correlate = true,
         useMetadata = true,
         -- disable strict checking.
         -- TODO: assemble a full list of globals so we can enable this
         -- allowedGlobals = false
   })

table.insert(package.loaders or package.searchers, fennel.searcher)
debug.traceback = fennel.traceback

-- require("lib")
require("init") -- load ~/.config/awesome/init.fnl
#+end_src

Now everything can be configured in your init.fnl.

To learn more about fennel go here. [[https://fennel-lang.org/tutorial]]
