libmsgmng.lib: allow users to write and select customized color schemes (~/.autospec.d/color-theme.<color_scheme>)
Signed-off-by: Davide Madrisan <davide.madrisan@gmail.com>
This commit is contained in:
parent
a2056ba9d5
commit
c8faaf8a70
@ -1,4 +1,5 @@
|
||||
Changes in version 1.14.2
|
||||
--- Nov -- 2012 Davide Madrisan <davide.madrisan(a)gmail.com>
|
||||
|
||||
+ bugfix
|
||||
* plugins/* - Davide Madrisan:
|
||||
@ -45,6 +46,11 @@ Changes in version 1.14.2
|
||||
* autospec, autospec.conf, plugins/* - Davide Madrisan:
|
||||
Replace the option '--colorize' by '--colors <color-theme>'.
|
||||
|
||||
+ improvement
|
||||
* libmsgmng.lib - Davide Madrisan:
|
||||
Allow users to write and select customized color schemes:
|
||||
~/.autospec.d/color-theme.<color_scheme>"
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
Changes in version 1.14.1 - _TO*Hacklab release
|
||||
|
@ -50,9 +50,11 @@ function notify.note() {
|
||||
# args:
|
||||
# none
|
||||
function notify.enable_colors() {
|
||||
local color_scheme="$1"
|
||||
[ "$color_scheme" ] || color_scheme="default"
|
||||
if [ -r /etc/@package@.d/color-theme.${color_scheme} ]; then
|
||||
local color_scheme="${1:-default}"
|
||||
if [ -r ~/.@package@.d/color-theme.${color_scheme} ]; then
|
||||
. ~/.@package@.d/color-theme.${color_scheme}
|
||||
notify.debug "loading ~/.@package@.d/color-theme.${color_scheme}"
|
||||
elif [ -r /etc/@package@.d/color-theme.${color_scheme} ]; then
|
||||
. /etc/@package@.d/color-theme.${color_scheme}
|
||||
notify.debug "loading /etc/@package@.d/color-theme.${color_scheme}"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user