Git Product home page Git Product logo

awesome-pomodoro's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

awesome-pomodoro's Issues

Error on master: module 'impl' not found

With 5c4db06 I am getting:

error while running function!
stack traceback:
        /home/user/.config/awesome/pomodoro/init.lua:7: in main chunk
        [C]: in function 'require'
        /home/user/.config/awesome/rc.lua:688: in main chunk
error: /home/user/.config/awesome/pomodoro/init.lua:7: module 'impl' not found:
        no field package.preload['impl']
        no file './impl.lua'
        no file '/usr/share/luajit-2.0.5/impl.lua'
        no file '…/lua/5.1/impl.lua'
        no file '…/lua/5.1/impl/init.lua'
        no file '/usr/share/lua/5.1/impl.lua'
        no file '/usr/share/lua/5.1/impl/init.lua'
        no file '/home/user/.config/awesome/impl.lua'
        no file '/home/user/.config/awesome/impl/init.lua'
        no file '/etc/xdg/awesome/impl.lua'
        no file '/etc/xdg/awesome/impl/init.lua'
        no file '/usr/share/awesome/lib/impl.lua'
        no file '/usr/share/awesome/lib/impl/init.lua'
        no file './impl.so'
        no file '/usr/local/lib/lua/5.1/impl.so'
        no file '/usr/lib/lua/5.1/impl.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
        no file '/home/user/.config/awesome/impl.so'
        no file '/etc/xdg/awesome/impl.so'
        no file '/usr/share/awesome/lib/impl.so'

I am using just require("pomodoro").
require("pomodoro/init") might be a workaround (mentioned in #34), but that should not be necessary.

The following patch fixes it:

diff --git i/init.lua w/init.lua
index 021d2d2..f8b9089 100644
--- i/init.lua
+++ w/init.lua
@@ -2,8 +2,8 @@ local wibox     = require("wibox")
 local awful     = require("awful")
 local naughty   = require("naughty")
 local beautiful = require("beautiful")
-local module_path = (...):match ("(.+/)[^/]+$") or ""
-local createPomodoro  = require(module_path..'impl')
+local module_path = (...)
+local createPomodoro  = require(module_path..'.impl')
 local timer     = (type(timer) == 'table' and timer or require("gears.timer"))
 local awesome   = awesome

But it should probably handle the case where people are using /init (or .init ?!) at the end already.

Keep state across restarts: remember running/stopped state

The remembering of the state does not appear to remember the running/paused state: if awesome restarts, the timer which was stopped before (at the beginning of a break) will start running.

It seems like not only the current time, but also the state(s) should get saved and restored.

Improve the init function design

The init function is called after we have done the customization to the global state. This is ok for now because we have few options but as the time passes it might be better to pass those parameters to the init function itself so we will get something like the following:

pomodoro = require('pomodoro').init{
     pause_duration = 10
}

Mouseover error

When I mouseover the widget I get the red notification "Oops, an error happened!", probably some missing library, I don't have time for debugging it yet, but I wanted to let you know about it.

awesome v3.5.5 (Kansas City Shuffle)
• Build: Apr 11 2014 09:36:33 for x86_64 by gcc version 4.8.2 (nobody@)
• Compiled against Lua 5.2.3 (running with Lua 5.2)
• D-Bus support: ✔

When I have more information, I'll update this issue.

Thanks and regards,
Germán.

Keep state across awesome restarts

I am often restarting awesome for config changes, and then awesome-pomodoro will be reset.

It would be nice, if the current state could be kept across awesome restarts.

I am not sure how to achieve this best, but one way might be to use X resources. I have the following function, which keeps track of which programs have been autostarted already:

-- Source: http://awesome.naquadah.org/wiki/Autostart#The_X_Resources_way
xrun = function(cmd, late)
    local xresources = awful.util.pread("xrdb -query")
    local myxr = xresources:match("^awesome%.xrun:%s+.-\n")
                 or xresources:match("\nawesome%.xrun:%s+.-\n")
                 or "awesome.xrun:"
    myxr = myxr:gsub("\n", "")
    if not string.find(myxr, cmd, 1, true) then
        -- use pread so that this runs synchronously
        awful.util.pread("echo '" .. myxr .. " " .. cmd:gsub("'", "\\'") .. "'|xrdb -merge")

        if late then
            local stimer = timer { timeout = late }
            local run = function()
                stimer:stop()
                awful.util.spawn(cmd, false)
            end
            stimer:connect_signal("timeout", run)
            stimer:start()
        else
            awful.util.spawn(cmd, false)
        end
    end
end

The same mechanism might be used from awesome-pomodoro.

There's a new API to query/set X properties in awesome Git: awesomeWM/awesome@62e2dee - you could just use this, if it exists.

Time representation when exceeds 1 hour

 t = os.date("%X", t-3600)

This is only valid for UTC+1. I'm at UTC+7 and to get valid result, i need to substract 25200 from t. Example:

> print(os.date("%X", 0))
07:00:00

As of lua wiki the format should be preceeded by an exclamation sign for the passed value to be treated as UTC:

> print(os.date("!%X", 0))
00:00:00

This should work for all time zones, no substraction required.

Time offset by 30 minutes

Hi, I'm not sure if this is an issue with the widget or not, but irrespective of what durations I specify, my timer seems to always start from 30:00. It counts down and resets accordingly at the 30 minute mark, never going to 0:00. What could the possible issue be? I'm using Awesome 4.0 at the time of posting, and apart from this small issue your widget works perfectly! Thanks!

Not working with Awesome 4.0

Hello,

It seems that the widget does not work with Awesome 4.0. It does not even allow me to load the widget with the require function.

Is it possible to have the widget working with Awesome >= 4.0?

Thank you.

[Question] Tooltip font

I have a HiDPI display which results in the default tool tip font being too small. I tried customising it by setting theme.tooltip_font in my custom them as the Beautiful documentation advises, to no effect. I am not very proficient in customising Awesome, and have run out of ideas. Any advice would be appreciated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.