diff options
author | Mike Crute <crutem@amazon.com> | 2019-01-22 10:43:09 -0800 |
---|---|---|
committer | Mike Crute <crutem@amazon.com> | 2019-01-25 16:02:38 -0800 |
commit | 4db801babd1a7e4fe31dfcd446a3fb749f2b2ca8 (patch) | |
tree | 6701e5fcdabb5992c9ecfedb50b2619213e369cc /.config | |
parent | b09df8f0a14ba95962d55fd591524c22ea45cb06 (diff) | |
download | dotfiles-4db801babd1a7e4fe31dfcd446a3fb749f2b2ca8.tar.bz2 dotfiles-4db801babd1a7e4fe31dfcd446a3fb749f2b2ca8.tar.xz dotfiles-4db801babd1a7e4fe31dfcd446a3fb749f2b2ca8.zip |
Convert pomodor timer to lua
Diffstat (limited to '.config')
-rw-r--r-- | .config/awesome/icons/pomodoro.png | bin | 0 -> 237938 bytes | |||
-rw-r--r-- | .config/awesome/mcrute.lua | 22 |
2 files changed, 22 insertions, 0 deletions
diff --git a/.config/awesome/icons/pomodoro.png b/.config/awesome/icons/pomodoro.png new file mode 100644 index 0000000..4819d09 --- /dev/null +++ b/.config/awesome/icons/pomodoro.png | |||
Binary files differ | |||
diff --git a/.config/awesome/mcrute.lua b/.config/awesome/mcrute.lua index dd02c20..d4d6e34 100644 --- a/.config/awesome/mcrute.lua +++ b/.config/awesome/mcrute.lua | |||
@@ -237,6 +237,27 @@ function get_clock() | |||
237 | return wibox.widget.textclock(" %a %b %d, %H:%M ", 60, timezone) | 237 | return wibox.widget.textclock(" %a %b %d, %H:%M ", 60, timezone) |
238 | end | 238 | end |
239 | 239 | ||
240 | function pomodoro() | ||
241 | local positions = {"bottom_right", "bottom_left", "bottom_right"} | ||
242 | |||
243 | gears.timer { | ||
244 | timeout = 25 * 60, | ||
245 | autostart = true, | ||
246 | single_shot = true, | ||
247 | callback = function() | ||
248 | for s = 1, screen.count() do | ||
249 | naughty.notify({ | ||
250 | icon=gears.filesystem.get_dir("config") .. "icons/pomodoro.png", | ||
251 | position=positions[s], | ||
252 | timeout=30, | ||
253 | screen=s, | ||
254 | title = "Pomodoro Over", | ||
255 | }) | ||
256 | end | ||
257 | end | ||
258 | } | ||
259 | end | ||
260 | |||
240 | return { | 261 | return { |
241 | dump = dump, | 262 | dump = dump, |
242 | setup_device_handling = setup_device_handling, | 263 | setup_device_handling = setup_device_handling, |
@@ -249,4 +270,5 @@ return { | |||
249 | battery_low_warning = battery_low_warning, | 270 | battery_low_warning = battery_low_warning, |
250 | split_screen = split_screen, | 271 | split_screen = split_screen, |
251 | get_clock = get_clock, | 272 | get_clock = get_clock, |
273 | pomodoro = pomodoro, | ||
252 | } | 274 | } |