Skip to content

Commit

Permalink
Revert update to handleSignal() in config.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamWagner committed Sep 27, 2020
1 parent 9baac7d commit 6b1798e
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions stackline/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,19 @@ function StackConfig:registerWatchers() -- {{{
end)
return self
end -- }}}

local handleSignal = function(_, msgID, msg) -- {{{
if msgID == 900 then
return "version:2.0a"
end

-- TODO: integrate with StackConfig() module

local handlers = { -- {{{
['900'] = function() return "version:2.0a" end,

['500'] = function()
if msgID == 500 then
local key, _value = msg:match(".+:([%a_-]+):([%a%d_-]+)")
if key == "toggle_icons" then
stackline.config:toggle('showIcons') -- global var
stackline.config:toggle('showIcons') -- global var
end
end
} -- }}}

local function handleSignal(_, msgID, msg) -- {{{
print('msgID', msgID)
print('msg', msg)
return handlers[tostring(msgID)]
return "ok"
end -- }}}

-- luacheck: ignore
Expand Down

0 comments on commit 6b1798e

Please sign in to comment.