Separate config and automatically find root path#8
Open
maltoe wants to merge 2 commits intosos4nt:masterfrom
Open
Separate config and automatically find root path#8maltoe wants to merge 2 commits intosos4nt:masterfrom
maltoe wants to merge 2 commits intosos4nt:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Stefan,
this adds automatic root path resolution. I wanted to symlink the script to my local
bindirectory instead of modifyingPATH. 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
colorschemefile :) from the code, storing it atXDG_CONFIG_HOMEor belowHOME, if the former is not available.Cheers
malte