From a25954f8a6cedc7f0f8757e9af914c695f211c13 Mon Sep 17 00:00:00 2001 From: Giuliano Schneider Date: Tue, 30 Apr 2013 14:54:55 +0200 Subject: [PATCH] added shrink option --- README.pod | 6 +++++- config.def.h | 1 + dunstrc | 3 +++ settings.c | 4 ++++ settings.h | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/README.pod b/README.pod index 2ede7cf..ab2eeea 100644 --- a/README.pod +++ b/README.pod @@ -4,7 +4,7 @@ dunst - A customizable and lightweight notification-daemon =head1 SYNOPSIS -dunst [-geometry geom] [-fn font] [-nf/nb/lf/lb/cf/cb color] +dunst [-geometry geom] [-shrink shrink] [-fn font] [-nf/nb/lf/lb/cf/cb color] [-to/nto/lto/cto secs] [-format fmt] [-key key] [-mod mod] [-mon n] [-v] =head1 DESCRIPTION @@ -84,6 +84,10 @@ a negative from the right side of the screen. Y is measured from the top and down respectevly. see also EXAMPLES show the notification on monitor n. +=item B<-shrink> + +TODO + =item B<-lh/-line_height> height The height of a single line in pixel. If the height is smaller than the font height, it will get raised to the font height. diff --git a/config.def.h b/config.def.h index 9cfc2b5..e4be36d 100644 --- a/config.def.h +++ b/config.def.h @@ -14,6 +14,7 @@ int timeouts[] = { 10, 10, 0 }; /* low, normal, critical */ unsigned int transparency = 0; /* transparency */ char *geom = "0x0"; /* geometry */ +int shrink = False; /* shrinking */ int sort = True; /* sort messages by urgency */ int indicate_hidden = True; /* show count of hidden messages */ int idle_threshold = 0; /* don't timeout notifications when idle for x seconds */ diff --git a/dunstrc b/dunstrc index df23c16..ece15f0 100644 --- a/dunstrc +++ b/dunstrc @@ -61,6 +61,9 @@ # screen width minus the width defined in within the geometry option. geometry = "300x5-30+20" + # TODO + shrink = no + # The transparency of the window. range: [0; 100] # This option will only work if a compositing windowmanager is present (e.g. xcompmgr, compiz, etc..) transparency = 0 diff --git a/settings.c b/settings.c index 7d4066d..47a5924 100644 --- a/settings.c +++ b/settings.c @@ -101,6 +101,10 @@ void load_settings(char *cmdline_config_path) settings.geom = option_get_string("global", "geometry", "-geom/-geometry", geom, "Geometry for the window"); + settings.shrink = + option_get_bool("global", "shrink", "-shrink", + shrink, + ""); // TODO settings.line_height = option_get_int("global", "line_height", "-lh/-line_height", line_height, diff --git a/settings.h b/settings.h index ec3554d..fed0a70 100644 --- a/settings.h +++ b/settings.h @@ -15,6 +15,7 @@ typedef struct _settings { int timeouts[3]; unsigned int transparency; char *geom; + int shrink; int sort; int indicate_hidden; int idle_threshold;