Skip to content

Separate config and automatically find root path#8

Open
maltoe wants to merge 2 commits intosos4nt:masterfrom
maltoe:feature/separate-config-and-dynamic-root-path
Open

Separate config and automatically find root path#8
maltoe wants to merge 2 commits intosos4nt:masterfrom
maltoe:feature/separate-config-and-dynamic-root-path

Conversation

@maltoe
Copy link

@maltoe maltoe commented Jan 9, 2015

Hi Stefan,

this adds automatic root path resolution. I wanted to symlink the script to my local bin directory instead of modifying PATH. Could have set the environment variable instead, but I figured it would be nice if the script would autolocate its data.

The second patch separates the configuration (i.e. the colorscheme file :) from the code, storing it at XDG_CONFIG_HOME or below HOME, if the former is not available.

Cheers
malte

Malte Rohde added 2 commits January 9, 2015 13:37
This patch adds a new function script_root() that determines
the root location of dynamic-colors based on the location of
the script itself (minus the '/bin'). Helpful if you do not want
to clutter your PATH with "~/.xyz" paths. Setting env variable
DYNAMIC_COLORS_ROOT would work too, but now you can simply symlink
the script to wherever you want.
So that the dynamic-colors source can live somewhere else
(e.g., /usr/local/dynamic-colors) and multiple users
can use the same script.
ceyes added a commit to ceyes/dynamic-colors that referenced this pull request May 25, 2016
From sos4nt#8

commit ee44b85
Author: Malte Rohde <malte.rohde@flavoursys.com>
Date:   Fri Jan 9 13:10:41 2015 +0100

    Store user configuration in appropriate config location.

    So that the dynamic-colors source can live somewhere else
    (e.g., /usr/local/dynamic-colors) and multiple users
    can use the same script.

commit f6f3332
Author: Malte Rohde <malte.rohde@flavoursys.com>
Date:   Fri Jan 9 13:01:52 2015 +0100

    Determine DYNAMIC_COLORS_ROOT based on script location.

    This patch adds a new function script_root() that determines
    the root location of dynamic-colors based on the location of
    the script itself (minus the '/bin'). Helpful if you do not want
    to clutter your PATH with "~/.xyz" paths. Setting env variable
    DYNAMIC_COLORS_ROOT would work too, but now you can simply symlink
    the script to wherever you want.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant