indent --no-tabs -linux
This commit is contained in:
parent
fa6f7e24c0
commit
4a5778ec2f
15
dunst.c
15
dunst.c
@ -26,7 +26,6 @@
|
|||||||
#include "ini.h"
|
#include "ini.h"
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
|
|
||||||
|
|
||||||
#define INRECT(x,y,rx,ry,rw,rh) ((x) >= (rx) && (x) < (rx)+(rw) && (y) >= (ry) && (y) < (ry)+(rh))
|
#define INRECT(x,y,rx,ry,rw,rh) ((x) >= (rx) && (x) < (rx)+(rw) && (y) >= (ry) && (y) < (ry)+(rh))
|
||||||
#define LENGTH(X) (sizeof X / sizeof X[0])
|
#define LENGTH(X) (sizeof X / sizeof X[0])
|
||||||
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
#define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||||
@ -112,7 +111,6 @@ void warn(const char * text, int urg);
|
|||||||
void init_shortcut(keyboard_shortcut * shortcut);
|
void init_shortcut(keyboard_shortcut * shortcut);
|
||||||
KeySym string_to_mask(char *str);
|
KeySym string_to_mask(char *str);
|
||||||
|
|
||||||
|
|
||||||
static int GrabKeyXErrorHandler(Display * display, XErrorEvent * e)
|
static int GrabKeyXErrorHandler(Display * display, XErrorEvent * e)
|
||||||
{
|
{
|
||||||
dunst_grab_key_errored = True;
|
dunst_grab_key_errored = True;
|
||||||
@ -142,7 +140,6 @@ int grab_key(keyboard_shortcut *ks)
|
|||||||
XGrabKey(dc->dpy, ks->code, ks->mask, root,
|
XGrabKey(dc->dpy, ks->code, ks->mask, root,
|
||||||
True, GrabModeAsync, GrabModeAsync);
|
True, GrabModeAsync, GrabModeAsync);
|
||||||
|
|
||||||
|
|
||||||
XFlush(dc->dpy);
|
XFlush(dc->dpy);
|
||||||
XSync(dc->dpy, False);
|
XSync(dc->dpy, False);
|
||||||
|
|
||||||
@ -364,7 +361,8 @@ void update_lists()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int next_split(char *source, int max_width) {
|
int next_split(char *source, int max_width)
|
||||||
|
{
|
||||||
int last_word = 0;
|
int last_word = 0;
|
||||||
for (int i = 0; i < strlen(source); i++) {
|
for (int i = 0; i < strlen(source); i++) {
|
||||||
if (isspace(source[i])) {
|
if (isspace(source[i])) {
|
||||||
@ -421,8 +419,7 @@ void fill_notification_buffer(notification * n, notification_buffer * buf)
|
|||||||
size -= snprintf(end, size, " (%dm %ds old)",
|
size -= snprintf(end, size, " (%dm %ds old)",
|
||||||
minutes, seconds);
|
minutes, seconds);
|
||||||
} else {
|
} else {
|
||||||
size -=
|
size -= snprintf(end, size, " (%ds old)", seconds);
|
||||||
snprintf(end, size, " (%ds old)", seconds);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (size <= 0)
|
if (size <= 0)
|
||||||
@ -502,7 +499,6 @@ void draw_win(void)
|
|||||||
width = scr.dim.w;
|
width = scr.dim.w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* calculate dc_height */
|
/* calculate dc_height */
|
||||||
if (word_wrap) {
|
if (word_wrap) {
|
||||||
for (int i = 0; i < height; i++) {
|
for (int i = 0; i < height; i++) {
|
||||||
@ -997,7 +993,6 @@ int is_idle(void)
|
|||||||
return screensaver_info->idle / 1000 > idle_threshold;
|
return screensaver_info->idle / 1000 > idle_threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void run(void)
|
void run(void)
|
||||||
{
|
{
|
||||||
while (True) {
|
while (True) {
|
||||||
@ -1605,9 +1600,9 @@ int main(int argc, char *argv[])
|
|||||||
color_strings[ColBG][CRIT] = critbgcolor;
|
color_strings[ColBG][CRIT] = critbgcolor;
|
||||||
setup();
|
setup();
|
||||||
|
|
||||||
|
|
||||||
if (depricated_mod)
|
if (depricated_mod)
|
||||||
warn("-mod is depricated. Use \"-key mod+key\" instead\n", CRIT);
|
warn("-mod is depricated. Use \"-key mod+key\" instead\n",
|
||||||
|
CRIT);
|
||||||
if (depricated_dunstrc_shortcuts)
|
if (depricated_dunstrc_shortcuts)
|
||||||
warn("You are using depricated settings. Please update your dunstrc. SEE [shortcuts]", CRIT);
|
warn("You are using depricated settings. Please update your dunstrc. SEE [shortcuts]", CRIT);
|
||||||
run();
|
run();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user