chore(hammerspoon): unload app name toast
This commit is contained in:
1 parent
d37d12e5d8
commit
a75a04c814
1 file changed
+1
-16
@@ -1,28 +1,13 @@
|
|||||||
-- Reload: Hammerspoon menu -> Reload Config
|
-- Reload: Hammerspoon menu -> Reload Config
|
||||||
|
|
||||||
local config = require("config")
|
local config = require("config")
|
||||||
local AppNameToast = require("modules.app_name_toast")
|
|
||||||
local WindowHighlight = require("modules.window_highlight")
|
local WindowHighlight = require("modules.window_highlight")
|
||||||
|
|
||||||
local appNameToast = AppNameToast.new(config.appNameToast)
|
local windowHighlight = WindowHighlight.new(config.windowHighlight)
|
||||||
local windowHighlight = WindowHighlight.new(config.windowHighlight, {
|
|
||||||
onWindowFocused = function()
|
|
||||||
if config.appNameToast.showOnFocus then
|
|
||||||
appNameToast:showOnFocus()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
appNameToast:setShouldShow(function()
|
|
||||||
return not windowHighlight:isMissionControlActive()
|
|
||||||
end)
|
|
||||||
|
|
||||||
appNameToast:start()
|
|
||||||
windowHighlight:start()
|
windowHighlight:start()
|
||||||
|
|
||||||
-- Keep module state and watchers alive until the next reload.
|
-- Keep module state and watchers alive until the next reload.
|
||||||
_G.hammerspoonModules = {
|
_G.hammerspoonModules = {
|
||||||
appNameToast = appNameToast,
|
|
||||||
windowHighlight = windowHighlight,
|
windowHighlight = windowHighlight,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user