making init work with a slightly updated fennel

This commit is contained in:
Chris Cochrun 2022-04-01 13:19:29 -05:00
parent eebfc39eb9
commit c4cd1393a5
7 changed files with 46 additions and 27 deletions

View file

@ -18,29 +18,30 @@
(local ruled (require "ruled"))
;; my splits
(local clientrules (require "rules"))
(local keybindings (require "keybindings"))
(local notifications (require "notifications"))
(local clientrules (require :rules))
(local keybindings (require :keybindings))
(local notifications (require :notifications))
;; Error handling
;; Check if awesome encountered an error during startup and fall back to
;; another config (This code will only ever execute for the fallback config)
(when awesome.startup_errors
(naughty.notify {:preset naughty.config.presets.critical
:title "Oops, there were errors during startup!"
:text awesome.startup_errors}))
:title "Oops, there were errors during startup!"
:text awesome.startup_errors}))
;; Handle runtime errors after startup
(do
(var in_error false)
(awesome.connect_signal "debug::error" (fn [err]
;; Make sure we don't go into an endless error loop
(when (not in_error)
(set in_error true)
(naughty.notify {:preset naughty.config.presets.critical
:title "Oops, an error happened!"
:text (tostring err)})
(set in_error false)))))
(var in_error false)
(awesome.connect_signal "debug::error" (fn [err]
;; Make sure we don't go into an endless error loop
(when (not in_error)
(set in_error true)
(naughty.notify {:preset naughty.config.presets.critical
:title "Oops, an error happened!"
:text (tostring err)})
(set in_error false)))))