summaryrefslogtreecommitdiffstats
path: root/src/pacman/conf.h
diff options
context:
space:
mode:
authorSimon Gomizelj <simongmzlj@gmail.com>2013-03-01 20:27:40 +0100
committerAllan McRae <allan@archlinux.org>2013-03-07 06:55:04 +0100
commitc8c7a5137473770eb4b2d9d54495c2a39b32cbe3 (patch)
tree4582021cba970256c6fa4efeb0fe9e557e8a89ae /src/pacman/conf.h
parentea42d03ea153a17edc792844c572f0d3d0803bd6 (diff)
downloadpacman-c8c7a5137473770eb4b2d9d54495c2a39b32cbe3.tar.gz
pacman-c8c7a5137473770eb4b2d9d54495c2a39b32cbe3.tar.xz
add a config settings and flag for colours
Colours can be enabled in two ways: - Add Color to pacman.conf. This enables colours automatically. - Use --color=WHEN where WHEN is none/auto/always. WHEN as 'never' disables colours (overrides config file), as 'auto' enables colours when stdout is a tty, and 'always' enables colours no matter what. Signed-off-by: Simon Gomizelj <simongmzlj@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'src/pacman/conf.h')
-rw-r--r--src/pacman/conf.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pacman/conf.h b/src/pacman/conf.h
index d85d11f2..6cabd33e 100644
--- a/src/pacman/conf.h
+++ b/src/pacman/conf.h
@@ -34,6 +34,7 @@ typedef struct __config_t {
unsigned short print;
unsigned short checkspace;
unsigned short usesyslog;
+ unsigned short color;
double deltaratio;
char *arch;
char *print_format;
@@ -129,7 +130,8 @@ enum {
OP_PRINTFORMAT,
OP_GPGDIR,
OP_DBONLY,
- OP_FORCE
+ OP_FORCE,
+ OP_COLOR
};
/* clean method */
@@ -145,6 +147,11 @@ enum {
PKG_LOCALITY_FOREIGN = (1 << 1)
};
+enum {
+ PM_COLOR_UNSET = 0,
+ PM_COLOR_OFF,
+ PM_COLOR_ON
+};
/* global config variable */
extern config_t *config;