Giter VIP home page Giter VIP logo

tomato.c's Introduction


tomatowelcome tomatocoffee tomatomachine tomatobeach
Tomato.C

A pomodoro timer written in pure C.

License Buy Me A Coffee Give me a Star

DependenciesHow to InstallHow to UseControlsPreferences

The Pomodoro MethodTo-doContributeLicense

🍅 The Pomodoro Method

tomatomethod

The technique basically consists of using a timer to break down work into intervals, follow the steps:

  1. Get a to-do list;

  2. Start Tomato.C and focus on a single task for 25 minutes straight until notification pops up;

  3. Then record what you completed and enjoy a 5 minutes break;

  4. After 4 pomodoros (steps 2 and 3), take a longer, 30 minutes break;

  5. Restart.

🚀 How to Use

Note: Never! Run the app with admin privilages. Just type it in the terminal:

$ tomato

Tip: For the best terminal resolution use setsid (the geometry depends on your font size):

$ setsid -f "$TERMINAL" -g 49x25 -c Tomato.C -e tomato

🕹️ Controls

noises

Use the following keys to control the application:

  • Mouse: To select, toggle and increase or decrease.
  • Mouse Scroll Wheel: To increase or decrease noises volume.
  • Arrows or VIM Keys: To move and select;
  • ENTER: To select;
  • CTRL+X: To return to the main menu wherever you are;
  • P or CTRL+P: To toggle pause;
  • ESC or Q: To quit.
  • (R F W T) or (1 2 3 4): To toggle noise;
  • CTRL+(R F W T): To decrease noise volume;
  • SHIFT+(R F W T): To increase noise volume;

⚙️ Preferences

You can configure the following settings at run time:

  • Pomodoros Amount;
  • Work Time;
  • Short Pause Time;
  • Long Pause Time.
  • Noises Volume.

And change the default configurations editing the config.h, then sudo make install to take effect. You can change those configs:

preferences

  • WSL: 0/1;
  • ICONS: iconsoff - iconson - nerdicons;
  • NOTIFY: 0/1;
  • SOUND: 0/1;
  • NOISE: 0/1;
  • RAINVOLUME: 10-100;
  • FIREVOLUME: 10-100;
  • WINDVOLUME: 10-100;
  • THUNDERVOLUME: 10-100;
  • BGTRANSPARENCY: 0/1;
  • POMODOROS: 1-8;
  • WORKTIME: 5-50;
  • SHORTPAUSE: 1-10;
  • LONGPAUSE: 5-60.
  • WORKLOG: 0/1;
  • TIMERLOG: 0/1;

⏰ Time to system bar

polybar module

Using of the -t flag you can pretty much do anything you want with the output.

For exemple, if you're using polybar, you can use it to get the time of your current pomodoro cycle to the bar. Just include the module at your polybar config:

modules-right = <other-modules> tomato <other-modules>

[module/tomato]
type = custom/script

exec = tomato -t
interval = 0
tail = true

format = <label>
format-background = ${colors.bg}
format-foreground = ${colors.fg}
format-padding = 1

label = %output%

⚓ Dependencies

It only needs gcc to compile, ncurses as the graphic library and pkg-config to proper library's linking.

But optionally you can install libnotify to show notifications, mpv for the notifications sounds and a Nerd Font for the icons:

ARCH LINUX
$ sudo pacman -S base-devel ncurses mpv pkgconf libnotify
UBUNTU
$ sudo apt install build-essential libncurses5-dev libncursesw5-dev mpv pkg-config libnotify4
FEDORA
$ sudo dnf groupinstall 'Development Tools' && sudo dnf install ncurses-devel mpv pkgconf libnotify
MACOS (MacPorts needed)
$ brew install gcc && sudo port install ncurses mpv

Note: if you're using WSL, install wsl-notify-send to get the notifications and then toggle it in the config.h. Saddly mpv don't work at WSL, so there's not custom sounds.

💾 How to Install

Note: a good practice is to clone the repo at $HOME/.local/src/

Note: first install all the dependencies!

NIXOS:
$ git clone https://github.com/gabrielzschmitz/Tomato.C.git
$ cd Tomato.C
$ nix-build default.nix

NORMAL:
$ git clone https://github.com/gabrielzschmitz/Tomato.C.git
$ cd Tomato.C
$ sudo make install

📝 To-do

  • Make a welcome screen
  • Rewrite using ncurses
  • Implement input controls
  • Implement user options
  • Make it auto center
  • Add notifications
  • Add notifications sound
  • Implement mouse support
  • Implement save current state
  • Current Time to file
  • Add white noise functionality
  • Implement simple note taking (maybe using a nvim instance)

🤝 Contribute

Feel free to contribute to the project, the only requirement is to follow the commit tittle pattern:

  • File-Related-Emoji Tittle

📜 License

This software is licensed under the GPL-3 license.

tomato.c's People

Contributors

gabrielzschmitz avatar luisnquin avatar

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.