parent
f682519ea9
commit
78d7daed12
14
dunst.c
14
dunst.c
@ -559,7 +559,11 @@ void draw_win(void)
|
||||
width = 0;
|
||||
} else if (geometry.mask & WidthValue) {
|
||||
/* fixed width */
|
||||
width = geometry.w;
|
||||
if (geometry.negative_width) {
|
||||
width = scr.dim.w - geometry.w;
|
||||
} else {
|
||||
width = geometry.w;
|
||||
}
|
||||
} else {
|
||||
/* across the screen */
|
||||
width = scr.dim.w;
|
||||
@ -1559,10 +1563,18 @@ int main(int argc, char *argv[])
|
||||
init_shortcut(&history_ks);
|
||||
|
||||
|
||||
if (geom[0] == '-') {
|
||||
geometry.negative_width = True;
|
||||
geom++;
|
||||
} else {
|
||||
geometry.negative_width = False;
|
||||
}
|
||||
|
||||
geometry.mask = XParseGeometry(geom,
|
||||
&geometry.x, &geometry.y,
|
||||
&geometry.w, &geometry.h);
|
||||
|
||||
|
||||
screensaver_info = XScreenSaverAllocInfo();
|
||||
|
||||
initdbus();
|
||||
|
1
dunst.h
1
dunst.h
@ -23,6 +23,7 @@ typedef struct _dimension_t {
|
||||
unsigned int h;
|
||||
unsigned int w;
|
||||
int mask;
|
||||
int negative_width;
|
||||
} dimension_t;
|
||||
|
||||
typedef struct _screen_info {
|
||||
|
2
dunstrc
2
dunstrc
@ -43,6 +43,8 @@
|
||||
# the window expands to the longest message displayed.
|
||||
# A positive x is measured from the left, a negative from the
|
||||
# right side of the screen. Y is measured from the top and down respectevly.
|
||||
# The width can be negative. In this case the actual width is the
|
||||
# screen width minus the width defined in within the geometry option.
|
||||
geometry = "0x3-30+20"
|
||||
|
||||
# The transparency of the window. range: [0; 100]
|
||||
|
Loading…
x
Reference in New Issue
Block a user