all repos

dotfiles @ f383433

my dotfiles
2 files changed, 0 insertions(+), 112 deletions(-)
bin: cleaning
Author: Oleksandr Smirnov olexsmir@gmail.com
Committed at: 2026-02-06 19:57:31 +0200
Parent: 377c329
D bin/pomodoro

@@ -1,74 +0,0 @@

-#!/usr/bin/bash -# credits: https://github.com/gpanders/dotfiles/blob/master/.local/bin/pomodoro - -usage() { - echo "Usage: $(basename "$0") [focus time] [short break] [long break]" -} - -if [ "$1" = "-h" ]; then - usage - exit 0 -fi - -focus_time=${1:-25} -short_break=${2:-5} -long_break=${3:-15} - -# Ensure all arguments are numbers -case $focus_time$short_break$long_break in - *[!0-9]*) - echo "Arguments must be positive integer numbers" >&2 - usage >&2 - exit 1 - ;; -esac - -notify() { - echo "$1" - if command -v terminal-notifier >/dev/null 2>&1; then - terminal-notifier -title 'Pomodoro' -message "$1" - elif command -v notify-send >/dev/null 2>&1; then - notify-send "$1" - fi -} - -countdown() { - timer=$(($1 * 60)) - while true; do - minutes=$((timer / 60)) - seconds=$((timer - 60*minutes)) - printf '\e[0K\r' # Clear current line - printf 'Remaining: %02d:%02d' "$minutes" "$seconds" - - [ $timer -eq 0 ] && break - timer=$((timer - 1)) - sleep 1 - done - printf '\n' -} - -while true; do - notify "Focus for $focus_time minutes" - countdown "$focus_time" - - notify "Take a short break for $short_break minutes (1/4)" - countdown "$short_break" - - notify "Focus for $focus_time minutes" - countdown "$focus_time" - - notify "Take a short break for $short_break minutes (2/4)" - countdown "$short_break" - - notify "Focus for $focus_time minutes" - countdown "$focus_time" - - notify "Take a short break for $short_break minutes (3/4)" - countdown "$short_break" - - notify "Focus for $focus_time minutes" - countdown "$focus_time" - - notify "Take a long break for $long_break minutes (4/4)" - countdown "$long_break" -done
D bin/time.sh

@@ -1,38 +0,0 @@

-#!/usr/bin/env bash -set -euo pipefail - -CATEGORIES=( - "stop" - "programming" - "notes" - "chat" - "chore" - "study" - "wasted" -) - -_stop() { timew stop; } - -_status() { - if current=$(timew get dom.active.tags 2>/dev/null); then - echo "$current" - else - echo "none" - fi -} - -_select() { - selected=$(printf "%s\n" "${CATEGORIES[@]}" | sk --margin 25% --color="bw" --reverse) - [[ "$selected" == "" ]] && exit 1 - - if [[ "$selected" == "stop" ]] - then _stop - else timew start "$selected" - fi -} - -case "${1:-}" in - status) _status ;; - stop) _stop ;; - *) _select ;; -esac