kevinschoon / pomo Goto Github PK
View Code? Open in Web Editor NEWPomodoro CLI
Home Page: https://kevinschoon.github.io/pomo
License: MIT License
Pomodoro CLI
Home Page: https://kevinschoon.github.io/pomo
License: MIT License
@kevinschoon hey , during refactoring for more test friendly code you made a small bug. How to reproduce.
Run pomo list
the output is
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x639f2c]
goroutine 1 [running]:
github.com/jawher/mow.cli/internal/flow.(*Step).Run(0xc0000751d0, 0x718ea0, 0xb09ed0)
/home/strogiyotec/go/pkg/mod/github.com/jawher/[email protected]/internal/flow/flow.go:39 +0xd4
github.com/jawher/mow.cli/internal/flow.(*Step).Run(0xc0000752c0, 0x718ea0, 0xb09ed0)
/home/strogiyotec/go/pkg/mod/github.com/jawher/[email protected]/internal/flow/flow.go:29 +0xb6
github.com/jawher/mow.cli/internal/flow.(*Step).Run(0xc0000753b0, 0x718ea0, 0xb09ed0)
/home/strogiyotec/go/pkg/mod/github.com/jawher/[email protected]/internal/flow/flow.go:29 +0xb6
github.com/jawher/mow.cli/internal/flow.(*Step).callDo.func1(0xc0000753e0, 0x0, 0x0)
/home/strogiyotec/go/pkg/mod/github.com/jawher/[email protected]/internal/flow/flow.go:52 +0x4e
panic(0x718ea0, 0xb09ed0)
/usr/lib/go-1.15/src/runtime/panic.go:969 +0x175
github.com/kevinschoon/pomo/pkg/cmd.list.func1.1()
/home/strogiyotec/IdeaProjects/GoLang/my_pomo/pomo/pkg/cmd/cmd.go:167 +0xac
The reason
func Run() { New(nil).Run(os.Args) }
You passes nil as a config option. I will fix it with my refactored version of delete multiple task branch
https://github.com/kevinschoon/pomo#source
I had to do the following to build from source:
cd cmd/pomo
go build
chmod +x pomo
cp pomo ~/bin/
Is the above a standard/acceptable workflow to build from source or should I be doing something different?
I'd like to add the "right thing" to the README
so that others can easily build this package by just reading the README
Hi,
The idea is great but installing this app should be easier/smoother. I don't like to move an executable stuff into some folders etc. :) So, it'd be really nice to create a formula for this app imho.
Nice work! Thanks for sharing it.
Best,
G.
I love the idea behind "publish" mode, but enabling it causes pomo status
to hang. I believe this is because pomo status
relies on the socket that normal mode writes to.
My suggestion is to always listen on the normal socket, and have the "publish" mode use a different socket path to publish to, so it is no longer publish or listen, but publish and listen.
Also, I am happy to work on this, but wanted to get feedback on the strategy before I dive in...
Pomo is dependent on an old version of termui which has since had a full rewrite, we will need to do some refactoring to support this new version.
Readme should include prerequisites and other details, like:
https://gist.github.com/somahargitai/cd2843de67ce676309d9a9cf976de61e
Pomo should support the XDG Base Directory specification and not default to polluting the home directory with ~/.pomo
.
I am trying to set onEvent
action script but onEvent
does not get discovered by the config and I cannot use this option.
Steps to reproduce:
pomo config
onEvent
is runningPlease let me know if something can be done about this or how can I solve this by myself.
I am using aur/pomo 0.8.1-1 (+4 1.12) (Installed)
There is another project called openpomodoro-cli which has a CLI interface and an accompanying specification called the open-pomodoro-format. Formal specifications are a good thing and pomo
should consider contributing to that project.
install.sh
states:
Pomo 0.7.1 installed, copy ./pomo to somewhere on your path.
I tried to add it, but didn't work. I even created ./pomo and put binary file in that directory, but no luck.
The aur pomo package has a man page committed to it's build repository, we should add a man page here in the source.
Great software!
Feature Request(?):
I think adding this option for pomo to act as a daemon would be great.
The Second Thing/Question:
Is there a way of sending the 'Enter' key to pomo.sock to automate these tasks of unpausing? Like sending ASCII value of Enter key?
As mentioned in #20, I love how scriptable pomo
is. It would be useful to be able to start a timer without having the ncurses UI. Instead, I would just be checking the status with pomo status
.
I totally understand if this is not in line with what you think this should be. I figured I'd add the feature request in case it works for you :)
Thanks again for pomo CLI!!!
OS=Ubuntu 16.04.5 LTS
Kernel=4.4.0-141-generic
Hello,
The dynamically linked binary release generates the following error on my system:
./pomo: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by ./pomo)
After googling around, I installed the following package
apt-get install libc6
With no changes. It I'm not sure how libc is managed by default on Ubuntu since that package did install, however I cannot remove it anymore (other binaries depend on it).
Here is the file
command output against the binary:
pomo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=49487bb8d010bb7dfa52de73c04974c1e50b820e, not stripped
After I cd pomo
, I type and enter make
but this is the output I get
go test ./... make: go: No such file or directory make: *** [Makefile:25: test] Error 127
What is it?
Accidentally pressing p
from the break screen seems to cause some sort of lock to occur. The UI accepts no input or interrupts and I've only been able to kill it by closing the tmux pane pomo is running in. I haven't dug in too deep, but I think this might be fixable by adding some checks to TaskRunner.Pause().
Hi @kevinschoon,
Most of the time, when I try to start
or begin
a pomodoros, I get this error:
Error:
listen unix /home/cyril/.pomo/pomo.sock: bind: address already in use
I think it happens when I don't/can't leave the pomo timer with the proper p
command.
The quick fix I found is to remove the pomo.sock
file: rm /home/cyril/.pomo/pomo.sock
Cordially,
Cyril
Is this currently wip? If not, I'd like to volunteer to try to do this on osx.
For those of us with attention issues, would it be possible to display the currently running task message while pomo is running? Especially when I get into a multi pomo cycle and come back to the computer I tend to loose track of the exact goal of the session. It would also be nice to output the task with pomo status, maybe with a -m flag.
Hi, where can I find a complete documentation?
First off, I am finding pomo
super useful. I especially like how scriptable it is, which allows me to set up a pomodoro and have its status show up in my tmux status line or in my prompt.
On that note, It would be super nice to get the pomo status
in json format, just like pomo list --json
. This would make the scripting even more flexible.
Pomo has a user contributed AUR repo that is out of date, it needs to be updated and added to the documentation.
go-sqlite3 is built as static-linked. So if you compile pomo without tag -tags libsqlite3
, it works without sqlite3 runtime.
@kevinschoon Hey, I noticed that in some tickets you mentioned rewriting in dev branch , what is the state of this branch , which features were implemented, when are you going to merge it to master ?
@kevinschoon Found one bug
Here is my config.json
{
}
So it's empty. When I run pomo list
I got this error
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x62efaf]
goroutine 1 [running]:
github.com/jawher/mow.cli/internal/flow.(*Step).Run(0xc00009b230, 0x719c60, 0xb0aed0)
/home/strogiyotec/go/pkg/mod/github.com/jawher/[email protected]/internal/flow/flow.go:39 +0xd4
github.com/jawher/mow.cli/internal/flow.(*Step).Run(0xc00009b320, 0x719c60, 0xb0aed0)
/home/strogiyotec/go/pkg/mod/github.com/jawher/[email protected]/internal/flow/flow.go:29 +0xb6
github.com/jawher/mow.cli/internal/flow.(*Step).Run(0xc00009b410, 0x719c60, 0xb0aed0)
/home/strogiyotec/go/pkg/mod/github.com/jawher/[email protected]/internal/flow/flow.go:29 +0xb6
github.com/jawher/mow.cli/internal/flow.(*Step).callDo.func1(0xc00009b440, 0x0, 0x0)
/home/strogiyotec/go/pkg/mod/github.com/jawher/[email protected]/internal/flow/flow.go:52 +0x4e
panic(0x719c60, 0xb0aed0)
/usr/lib/go-1.15/src/runtime/panic.go:969 +0x175
I checked, the problem is in util.go
if color := config.Colors.Get(tag); color != nil {
So if Colors are nil then it fails. Is it expected behavior or a bug ? If it's a bug then I make a PR, it shouldn't be hard just add additional condition
As a result, you end up needing to do 3 pomodoros to finish a task if you switch tasks 1 pomodoro into a 2 pomodoro task.
If [enter]
is accidentally pressed after completion, the program doesn't quit and can only be killed.
Can we allow [enter]
to quit at completion?
$ pomo -v
0.7.1
It would be very great if we can see how much time we have rested by showing a stopwatch. pomo status
could also show the time.
This may be helpful in avoiding spending too much time resting without knowing it.
An example is gnome-pomodoro
, which counts down 5 mins for short breaks.
Is there a way to start an existing task? Maybe by ID given from list
When pomo is in break, hitting p
crashes the application. q
is working. Version is 0.7.2-15-g12616f0
Hi @kevinschoon,
It would be nice to have a --tag
option on the pomo list
command.
It would behave this way: pomo l -t project1
prints all pomodoros created with the project1
tag.
Thank you!
Let's say I start a task and I overestimate the time that task will take.
pomo start -p 10 "Do something for a long time"
But after 2 pomodoros have passed the task is complete. Can I mark the task as complete somehow so that pomo list
does not show 8 red X-es ?
Would it be possible to implement the alarm for terminals?
Sometimes I don't see the notification in my secondary screen (I have it flipped for reading and other stuff) and I miss the notification.
For me it would be quite useful to implement this as an option as it would produce a color change in my terminal and I would see it even if I'm not in the same workspace.
I'm not sure how this would be in Go, but in bash it's just printing an escape sequence:
sleep 3; echo -e "\a"
It also works in C++, so I assume it's a standard thing.
If you're busy or not wanting to implement this I could try to do it, but I would need a bit of support with Go :).
Thanks!
I noticed this Pomodoro does not time the intervals. That would be a welcome addition.
Thanks!
System: Ubuntu 18.10 64-bit running in WSL2
Executable location: /usr/bin/
Input:
$ pomo -p
Expected output:
/home/user/.pomo
Actual output:
Error: incorrect usage
Usage: pomo [OPTIONS] COMMAND [arg...]
Pomodoro CLI
Options:
-p, --path path to the pomo config directory (default "/home/DZZR-STATION/.pomo")
-v, --version Show the version and exit
Commands:
start, s start a new task
init initialize the sqlite database
create, c create a new task without starting
begin, b begin requested pomodoro
list, l list historical tasks
delete, d delete a stored task
status, st output the current status
Run 'pomo COMMAND --help' for more information on a command.
I tried today to build pomo on Windows 10 and it's successfully done:
go get github.com/kevinschoon/pomo
package github.com/gizak/termui: no Go files in C:\Users\YOURUSERID\go\src\github.com\gizak\termui
C:\Users\YOURUSERID\go\src\github.com\kevinschoon\pomo
and run: go build .
. pomo.exe
is created and readyA declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.