Use XDG dirs for config data (eg. ~/.config/cwtch/ instead of ~/.cwtch)
#69
Closed
opened 11 months ago by dan
·
3 comments
No Branch/Tag Specified
1.4.0-release
1.5-upgrades
add_contact_hook
androMessage
androTor
android-fix
androidFlags
appbarColor
cache
cache3.0
cachefixes
custom_profile_fixes
custom_profile_images
custom_tor_config
cwtch1.6.1-fixes
cwtch_prefix
cy
da
de
debuginfo
droneGherkin
es
fastercwtch
file-fixes
file_bubble_pop_fix
fix-settings
fix297
fix457
fixAcceptBlock
fixAndroidAttrInv
fixLeave
fixSaveHist
fix_295
fix_debug_error_add_contact
getinfo
gherkin
i18n
import_export
ios_build_port
kotlinResult
l10nup
lb
lcg160
linuxNotif
macNotifications
maclcg
mainActivityPort
message-formatting
messageCache
message_row_fixes
messagedate
models
no
notificationSettings
ns
perf
pl_intl
power
profileNotify
profile_images
ps160
pubspecBump
quote
replyFix
ro
sender_size
serverProgress
small_edits
splashExit
state
theme-updates
torcache
trunk
unreadSync
v152
winFocus
winNotify
winUninstall
wintoasts
v.1.7.0
v1.0.0
v1.1.0
v1.1.1
v1.2.0
v1.2.1
v1.3.0
v1.4.0
v1.4.1
v1.4.2
v1.5.0
v1.5.1
v1.5.2
v1.6.0
v1.6.1
v1.6.2
v1.7.1
Labels
Something is not working cwtch-beta-1.1 cwtch-beta-1.2 cwtch-beta-1.3 cwtch-beta-1.4 cwtch-beta-1.5 cwtch-beta-1.5.x
point release vug fixes for 1.5 cwtch-beta-1.6 cwtch-beta-1.7 cwtch-beta-1.8 cwtch-beta-1.9 design duplicate
This issue or pull request already exists enhancement
New feature flutter help wanted
Need some help in-nightly invalid
Something is wrong ios linux mac need-replication-or-investigation ops question
More information is needed requires-more-effort-than-we-can-spare rust testing-needed tor waiting-on-new-flutter-feature windows wontfix
This won't be fixed
Apply labels
Clear labels
android
arch
bug
Something is not working cwtch-beta-1.1 cwtch-beta-1.2 cwtch-beta-1.3 cwtch-beta-1.4 cwtch-beta-1.5 cwtch-beta-1.5.x
point release vug fixes for 1.5 cwtch-beta-1.6 cwtch-beta-1.7 cwtch-beta-1.8 cwtch-beta-1.9 design duplicate
This issue or pull request already exists enhancement
New feature flutter help wanted
Need some help in-nightly invalid
Something is wrong ios linux mac need-replication-or-investigation ops question
More information is needed requires-more-effort-than-we-can-spare rust testing-needed tor waiting-on-new-flutter-feature windows wontfix
This won't be fixed
No Label
android
arch
bug
cwtch-beta-1.1
cwtch-beta-1.2
cwtch-beta-1.3
cwtch-beta-1.4
cwtch-beta-1.5
cwtch-beta-1.5.x
cwtch-beta-1.6
cwtch-beta-1.7
cwtch-beta-1.8
cwtch-beta-1.9
design
duplicate
enhancement
flutter
help wanted
in-nightly
invalid
ios
linux
mac
need-replication-or-investigation
ops
question
requires-more-effort-than-we-can-spare
rust
testing-needed
tor
waiting-on-new-flutter-feature
windows
wontfix
Milestone
Set milestone
Clear milestone
No items
No Milestone
Projects
Clear projects
No project
Assignees
Assign users
Clear assignees
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.
No due date set.
Dependencies
This issue currently doesn't have any dependencies.
Reference in new issue
There is no content yet.
Delete Branch '%!s(MISSING)'
Deleting a branch is permanent. It CANNOT be undone. Continue?
No
Yes
From a beta tester:
Please use the XDG base dir spec for application data: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
eg. ~/.config/cwtch/, ~/.local/share/cwtch/, instead of ~/.cwtch/
For cross-platform compatibility, https://golang.org/pkg/os/#UserConfigDir would be the API for this. See also https://github.com/golang/go/issues/29960 for the discussions re: specific paths on macOS and Windows that led to
UserConfigDir
.As a side-note, version 3 of the
dirs
Rust crate is consistent with the GoUserConfigDir
across all platforms (versions prior to that differed on macOS).for now we seem to be putting a pin in this. After some internal team discussion we view core cwtch data like keys etc don't just belong to this specific instance of a UI but to the cwtch platform and future suite of tools. As such we think its data is more inline with ssh and gpg which both have .ssh and .gpg dirs in the home directory.
however it looks like many apps do take an env var to control their config directory so as a compromise we could work to having the ui respect that
https://superuser.com/questions/874901/what-are-the-step-to-move-all-your-dotfiles-into-xdg-directories
will start work on :)
Cwtch now looks for and will use a
CWTCH_HOME
environment variable that can be used to specify your location of choice :)