-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$XDG_DATA_DIRS and $XDG_DATA_HOME support #74
Comments
On Fri, 27 Jan 2023 16:52:35 -0800 Temmie Yao ***@***.***> wrote:
Would you consider adding support for looking in $XDG_DATA_DIRS and the paths
listed in $XDG_DATA_HOME for fortunes? This would allow fortunes to be put in
places other than the directories that are built into the binary, and allow
them to use used without specifying the path to them.
Specific usecases include:
- allowing users to add their own personal fortunes and use them without
needing to specify the path -- e.g. creating
`~/.local/share/fortunes/myfortunes` and running `fortune myfortunes`
- adding fortunes when can't write to the default fortune dirs e.g. on
multi-user systems, on systems with read-only filesystems
- more info about those vars:
https://wiki.archlinux.org/title/XDG_Base_Directory#Specification
- specification:
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
I'm happy to help implement this, just kinda want your thoughts on it first
before I go ahead.
sounds great! Please add a cmake option and automated tests [
https://github.com/shlomif/what-you-should-know-about-automated-testing ].
…--
Shlomi Fish https://www.shlomifish.org/
Star Trek: “We, the Living Dead” - https://shlom.in/st-wtld
Dumbledore Two: No, me is his successor: Dumbledore Two.
[He takes a 2-like number from behind his back, and eats it.]
Dumbledore Two: Num num num… delicious!
— https://is.gd/zsmond
Please reply to list if it's a mailing list post - https://shlom.in/reply .
|
@ralismark : ping. |
@shlomif still working on this! been pretty busy with other stuff the past few weeks, plus getting an understanding of the source code. I'm probably going to completely rework the file lookup logic since it's pretty messy and has a few bugs |
3 tasks
that would be awesome. Does the closed PR work already ? I could use it 'till it makes it to upstream |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Would you consider adding support for looking in $XDG_DATA_DIRS and the paths listed in $XDG_DATA_HOME for fortunes? This would allow fortunes to be put in places other than the directories that are built into the binary, and allow them to use used without specifying the path to them.
Specific usecases include:
allowing users to add their own personal fortunes and use them without needing to specify the path -- e.g. creating
~/.local/share/fortunes/myfortunes
and runningfortune myfortunes
adding fortunes when can't write to the default fortune dirs e.g. on multi-user systems, on systems with read-only filesystems
more info about those vars: https://wiki.archlinux.org/title/XDG_Base_Directory#Specification
specification: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
I'm happy to help implement this, just kinda want your thoughts on it first before I go ahead.
The text was updated successfully, but these errors were encountered: