xdg

Version, currently main branch1 version
  • main branchlatestJun 27, 2026

github.com/plambert/xdg.cr

Simple implementation of the Freedesktop XDG Base Directory specification

0 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  xdg:
    github: plambert/xdg.cr
    branch: main

main is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
>= 1.19.1
License
MIT
Author
Paul M. Lambert

Dependencies

This version declares no dependencies.

README

xdg

Simple implementation of the freedesktop.org XDG Base Directory Specification

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      xdg:
        github: plambert/xdg.cr
  2. Run shards install

Usage

require "xdg"

XDG.xdg_config_home # => Path["/home/user/.config"]
XDG.xdg_data_dirs   # => [Path["/usr/local/share/"], Path["/usr/share/"]]

The module is also available under the Freedesktop name for callers who prefer to name it after the specification:

Freedesktop.xdg_config_home # => Path["/home/user/.config"]

Development

TODO: Write development instructions here

Contributing

  1. Fork it (https://github.com/plambert/xdg.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors