Pomodoro Offline Support for Habitica (Bash)
Go to file
maxmoon ded22d01f6 initial commit 2023-01-10 18:16:25 +01:00
LICENSE initial commit 2023-01-10 18:16:25 +01:00
README.md initial commit 2023-01-10 18:16:25 +01:00
posh.sh initial commit 2023-01-10 18:16:25 +01:00


posh.sh - Pomodoro Offline Support for Habitica

The initial intention was to have a timer for the Pomodoro Technique for Habitica, which works offline, because I don't want to be online the whole day and it's nothing I would recommend. But then I've impremented more and more features till it became some kind of task manager. A really ugly one with a lot of duct tape, but a task manager :D But in the end posh became a prototype of what I would call a good task manager. And based on this ideas and experience I will build another one soon (but this time in python, because it got more complex than I thought).


This bash script uses tools like awk, sed, date, tr and jq (JQuery) for Linux and for FreeBSD it uses gawk, gawk, gsed, etc. I never tested it for Windows and will never test it for it, because I didn't use Windows for years and don't want to own this system. But it would be very nice if you could test it for Windows and report if it works or what should be done to support Windows.

How to...

Just type ./posh.sh and it will show you a little help section. But the very first command should be ./posh.sh init to insert your Habitica api data in a config file.

Add a task

Type ./posh.sh add to add a task. A prompt will ask for the name and other information can be given by arguments: ./posh add "This is my task" short. short just stands for a short task and will be handled as a simple task on habitica, every other task will be handled as normal difficulty.

All tasks will be saved in the file ~/.posh_todos.csv.

Add a pom

Type ./posh.sh add "[POM] My first pom". The prefix [POM] is important! This will trigger a 25 minute timer.

Check off tasks

There are different lists.

  • The normal list, which will show all tasks (./posh checkoff)
  • The priority list, which will show only tasks with a higher priority (./posh checkoff prio)
  • The pom list, which will show only pomodoro tasks (./posh checkoff pom)

A list of all completed poms can be found in ~/.poms

Put an existing task to prio list

Just execute ./posh.sh checkoff doprio to add it to the priority list or ./posh.sh checkoff undoprio to add it to remove priority.

Remove a task

To remove a task from the list just execute ./posh.sh remove.

Show completed task

To get an overview of your last completed task just execute ./posh.sh show. It will show the last 20 checked off tasks as a default, but the second argument can be any number to show n completed tasks.

Mark tasks with current date as high priority

All tasks, which include the current date in iso form in the name, will be added to the prio list with this command: ./posh.sh mark For example: If today is the 21st of March 2021 and a todo name is "[2021-03-21] Improove Posh", it will be added to the prio list. This becomes handy if you planed a whole week in advance and put this command in your init script of your operating system to add all urgend tasks to the priority script automatically after your system started.

Handy aliases for unix systems

alias todos='posh.sh checkoff'
alias todos_prio='posh.sh checkoff prio'
alias pom='posh.sh pom'