Skip to content

Instantly share code, notes, and snippets.

@vinipsmaker
Created August 30, 2018 05:19
Show Gist options
  • Save vinipsmaker/78897450118f87dae4c5899ba614300d to your computer and use it in GitHub Desktop.
Save vinipsmaker/78897450118f87dae4c5899ba614300d to your computer and use it in GitHub Desktop.
local finnapomowidget = wibox.container.background(
wibox.widget{
text = '____',
align = 'center',
valign = 'center',
widget = wibox.widget.textbox
},
'green'
)
dbus.add_match(
"session", "interface='io.github.finna_pomodoro_project.Pomodoro'"
)
dbus.connect_signal(
"io.github.finna_pomodoro_project.Pomodoro",
function(data)
if (data.member == 'pomodoro_paused'
or data.member == 'work_session_stopped') then
finnapomowidget.bg = 'green'
elseif data.member == 'work_session_started' then
finnapomowidget.bg = 'red'
end
end
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment