Skip to content

Conversation

@omroux
Copy link

@omroux omroux commented Nov 28, 2025

Why

Add support for XDG base directory config to stop polluting home directory using github.com/adrg/xdg library while keeping support for legacy ~/.pomodoro.

This fixes #32

Tested With

Starting with no config directory at all I initialized ~/.pomodoro and used my version to test backwards compatibility:

$ rm -rf ~/.pomodoro/ ~/.config/pomodoro/
$ pomodoro start
24:59⏱  1🍅
$ ls ~/.pomodoro/
current  history
$ go run . status
24:50⏱  1🍅
$ ls ~/.pomodoro/
current  history
$ ls ~/.config/pomodoro/
ls: cannot access '/home/omroux/.config/pomodoro/': No such file or directory

And when using just my version:

$ rm -rf ~/.pomodoro/ ~/.config/pomodoro/
$ go run . start
$ ls ~/.config/pomodoro/
current  history
$ ls ~/.pomodoro/
ls: cannot access '/home/omroux/.pomodoro/': No such file or directory

Making sure --directory still works:

$ go run . --directory pomodoro start
24:59⏱  1🍅
$ ls pomodoro/
current  history

@omroux omroux marked this pull request as draft November 28, 2025 10:07
@omroux omroux force-pushed the support-xdg-config branch 4 times, most recently from 7a3853a to c431d2a Compare November 28, 2025 10:37
@omroux omroux marked this pull request as ready for review November 28, 2025 10:38
@omroux omroux force-pushed the support-xdg-config branch from 88ba472 to e745494 Compare November 28, 2025 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Should use XDG config directory instead of poluting home.

1 participant