Module: Caligari::XDG
- Defined in:
- lib/caligari/xdg.rb
Overview
This module contains constants representing XDG configuration directories and files for Caligari as specified by the XDG Base Directory Specification.
Constant Summary collapse
- CONFIG_DIRS =
The global XDG configuration directories as an array of ‘Pathname` instances.
collect_xdg_config_dirs- CONFIG_HOME =
The user XDG configuration directory as a ‘Pathname` instance.
Pathname.new(ENV['XDG_CONFIG_HOME'] || '~/.config')..freeze
- CONFIG_FILES =
The existent XDG configuration files for Caligari as a ‘Pathname` instance.
(CONFIG_DIRS + [CONFIG_HOME]).map! do |dir| (dir + 'caligari.yml').freeze end.select! { |file| file.exist? }.freeze