xdg_basedir¶
Functions¶
-
jnrbase.xdg_basedir.
user_cache
(__pkg: str) → pathlib.Path¶ Return a cache location honouring
XDG_CACHE_HOME
.-
XDG_CACHE_HOME
¶ See XDG base directory spec.
-
-
jnrbase.xdg_basedir.
user_config
(__pkg: str) → pathlib.Path¶ Return a config location honouring
XDG_CONFIG_HOME
.-
XDG_CONFIG_HOME
¶ See XDG base directory spec.
-
-
jnrbase.xdg_basedir.
user_data
(__pkg: str) → pathlib.Path¶ Return a data location honouring
XDG_DATA_HOME
.-
XDG_DATA_HOME
¶ See XDG base directory spec.
-
-
jnrbase.xdg_basedir.
get_configs
(__pkg, __name='config')[source]¶ Return all configs for given package.
Examples¶
>>> user_cache('rdial')
'/home/jay/.cache/rdial'
>>> user_config('awesome')
'/home/jay/.config/awesome'
>>> user_data('gnupg')
'/home/jay/.local/share/gnupg'
>>> get_configs('taskwarrior', 'uda.rc')
['/home/jay/.config/taskwarrior/uda.rc']
>>> get_data('git_certs', 'github.com.pem')
'/home/jay/.local/share/git_certs/github.com.pem'
>>> get_data('awesome', 'icons/awesome.svg')
'/usr/share/awesome/icons/awesome.svg'