├── LICENSE ├── README.md └── pomo.sh /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Arijit Basu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pomo 2 | Probably the simplest pomodoro timer CLI for Linux 3 | 4 | ### Installation 5 | 6 | You don't have to install it. Just copy the following snippet in your `.profile` / `.bashrc` / `.zshrc`. 7 | 8 | ```bash 9 | function pomo() { 10 | arg1=$1 11 | shift 12 | args="$*" 13 | 14 | min=${arg1:?Example: pomo 15 Take a break} 15 | sec=$((min * 60)) 16 | msg="${args:?Example: pomo 15 Take a break}" 17 | 18 | while true; do 19 | date '+%H:%M' && sleep "${sec:?}" && notify-send -u critical -t 0 -a pomo "${msg:?}" 20 | done 21 | } 22 | ``` 23 | 24 | ### Usage 25 | 26 | ``` 27 | pomo 15 Take a break 28 | ``` 29 | -------------------------------------------------------------------------------- /pomo.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | arg1=$1 4 | shift 5 | args="$*" 6 | 7 | min=${arg1:?Example: pomo 15 Take a break} 8 | sec=$((min * 60)) 9 | msg="${args:?Example: pomo 15 Take a break}" 10 | 11 | while true; do 12 | date '+%H:%M' && sleep "${sec:?}" && notify-send -u critical -t 0 -a pomo "${msg:?}" 13 | done 14 | --------------------------------------------------------------------------------