making init work with a slightly updated fennel
This commit is contained in:
parent
eebfc39eb9
commit
c4cd1393a5
7 changed files with 46 additions and 27 deletions
|
@ -363,10 +363,10 @@ package.preload["fennel.repl"] = package.preload["fennel.repl"] or function(...)
|
|||
_571_ = _572_
|
||||
end
|
||||
end
|
||||
if ((_G.type(_571_) == "table") and (nil ~= (_571_).source) and ((_571_).what == "Lua") and (nil ~= (_571_).linedefined) and (nil ~= (_571_).short_src)) then
|
||||
local source = (_571_).source
|
||||
local line = (_571_).linedefined
|
||||
if ((_G.type(_571_) == "table") and (nil ~= (_571_).short_src) and (nil ~= (_571_).linedefined) and ((_571_).what == "Lua") and (nil ~= (_571_).source)) then
|
||||
local src = (_571_).short_src
|
||||
local line = (_571_).linedefined
|
||||
local source = (_571_).source
|
||||
local fnlsrc
|
||||
do
|
||||
local t_576_ = compiler.sourcemap
|
||||
|
|
|
@ -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)))))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,20 @@
|
|||
pcall(require, "luarocks.loader")
|
||||
fennel = require("fennel")
|
||||
local gears = require("gears")
|
||||
fennel.path = fennel.path .. ";.config/awesome/?.fnl"
|
||||
table.insert(package.loaders or package.searchers, fennel.searcher)
|
||||
local naughty = require("naughty")
|
||||
cfgDir = os.getenv("HOME") .. "/.config/awesome/"
|
||||
-- package.path = cfgDir .. "?.lua"
|
||||
fennel.path = fennel.path .. ";" .. cfgDir .. "?.fnl;"
|
||||
|
||||
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("init") -- load ~/.config/awesome/init.fnl
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
(local awful (require "awful"))
|
||||
(local naughty (require "naughty"))
|
||||
(local gears (require "gears"))
|
||||
(local beautiful (require "beautiful"))
|
||||
(local keybindings (require "keybindings"))
|
||||
(local xresources (require "beautiful.xresources"))
|
||||
(local dpi xresources.apply_dpi)
|
||||
|
||||
|
@ -38,7 +38,9 @@
|
|||
:floating true
|
||||
:raise true
|
||||
:height (dpi 1000)
|
||||
:screen (screen.count)
|
||||
:screen (if (= (screen.count) 3)
|
||||
2
|
||||
(screen.count))
|
||||
:sticky true
|
||||
:placement awful.placement.centered
|
||||
}
|
||||
|
@ -168,7 +170,9 @@
|
|||
]
|
||||
}
|
||||
:properties {
|
||||
:screen (screen.count)
|
||||
:screen (if (= (screen.count) 3)
|
||||
2
|
||||
(screen.count))
|
||||
:focus awful.client.focus.filter
|
||||
:raise true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue