detached 445f033

fix(config): use XDG_DATA_HOME for database with .db extension

commit
445f0334cb0779f139a3308180d42d30407444f2
author
bnema · · 2025-12-17 20:45 UTC
parent
a531dc8
signature
unsigned
2 files · +4 -4
M docs/CONFIG.md +1 -1
@@ -19,7 +19,7 @@ You can still use JSON or YAML if you prefer - dumber automatically detects the
1919
2020 | Key | Type | Default | Description |
2121 |-----|------|---------|-------------|
22-| `database.path` | string | `~/.local/state/dumber/dumber.sqlite` | Database file path |
22+| `database.path` | string | `~/.local/share/dumber/dumber.db` | Database file path |
2323
2424 ## History
2525
@@ -19,7 +19,7 @@ You can still use JSON or YAML if you prefer - dumber automatically detects the
19 19
20 | Key | Type | Default | Description |20 | Key | Type | Default | Description |
21 |-----|------|---------|-------------|21 |-----|------|---------|-------------|
22-| `database.path` | string | `~/.local/state/dumber/dumber.sqlite` | Database file path |22+| `database.path` | string | `~/.local/share/dumber/dumber.db` | Database file path |
23 23
24 ## History24 ## History
25 25
M internal/infrastructure/config/xdg.go +3 -3
@@ -14,7 +14,7 @@ const (
1414
1515 const (
1616 appName = "dumber"
17- databaseName = "dumber.sqlite"
17+ databaseName = "dumber.db"
1818 )
1919
2020 // XDGDirs holds the XDG Base Directory paths for the application.
@@ -134,8 +134,8 @@ func GetConfigFile() (string, error) {
134134 }
135135
136136 // GetDatabaseFile returns the path to the database file in the data directory.
137-// The database contains important user data (history, cookies, preferences) and
138-// therefore belongs in XDG_DATA_HOME, not XDG_STATE_HOME.
137+// The database contains user data (history, favorites, preferences) that should
138+// be backed up, so it belongs in XDG_DATA_HOME per the XDG specification.
139139 func GetDatabaseFile() (string, error) {
140140 dataDir, err := GetDataDir()
141141 if err != nil {
@@ -14,7 +14,7 @@ const (
14 14
15 const (15 const (
16 appName = "dumber"16 appName = "dumber"
17- databaseName = "dumber.sqlite"17+ databaseName = "dumber.db"
18 )18 )
19 19
20 // XDGDirs holds the XDG Base Directory paths for the application.20 // XDGDirs holds the XDG Base Directory paths for the application.
@@ -134,8 +134,8 @@ func GetConfigFile() (string, error) {
134 }134 }
135 135
136 // GetDatabaseFile returns the path to the database file in the data directory.136 // GetDatabaseFile returns the path to the database file in the data directory.
137-// The database contains important user data (history, cookies, preferences) and137+// The database contains user data (history, favorites, preferences) that should
138-// therefore belongs in XDG_DATA_HOME, not XDG_STATE_HOME.138+// be backed up, so it belongs in XDG_DATA_HOME per the XDG specification.
139 func GetDatabaseFile() (string, error) {139 func GetDatabaseFile() (string, error) {
140 dataDir, err := GetDataDir()140 dataDir, err := GetDataDir()
141 if err != nil {141 if err != nil {

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 8

Tags 42

↑↓ moveenter openesc close