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