sxalert

Simple notification system for X
Log | Files | Refs | README | LICENSE

commit 512573cf03cfa3f50c26f32330d2734a13fbbc07
parent 7e944e2b69f15583fae661eadff55338af9b5d76
Author: Michael Constantine Dimopoulos <mk@mcdim.xyz>
Date:   Sat, 18 Nov 2023 13:27:40 +0000

Fixed bugs on wal.diff

Diffstat:
Mpatches/wal_colors/wal.diff | 29+++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/patches/wal_colors/wal.diff b/patches/wal_colors/wal.diff @@ -1,6 +1,6 @@ ---- sxalert.c 2023-11-18 03:34:16.884065897 +0000 -+++ sxalertxr.c 2023-11-18 03:34:23.634028857 +0000 -@@ -70,6 +70,35 @@ +--- sxalert.c 2023-11-18 13:24:57.322378330 +0000 ++++ sxalertxr.c 2023-11-18 13:24:26.619213478 +0000 +@@ -70,6 +70,40 @@ return max; } @@ -8,6 +8,11 @@ +get_xresources_colors(void) +{ + FILE *f = fopen(xresources, "r"); ++ if (!f) { ++ fprintf(stderr, "Could not open file: %s\n", xresources); ++ exit(EXIT_FAILURE); ++ } ++ + char buffer[XR_BUFFER]; + + char colors[2][8]; @@ -36,17 +41,17 @@ static int get_width(Display *dpy, XftFont *font, char **lines, int length) { -@@ -200,6 +229,8 @@ - } - } +@@ -176,6 +210,8 @@ + char text[BUFFER]; + extern char *optarg; + get_xresources_colors(); + - int lines_len=argc-optind; - char** lines = argv + optind; /* get lines to print */ - draw(border_width, duration, lines, lines_len); ---- config.h 2023-11-18 03:35:59.083505083 +0000 -+++ configxr.h 2023-11-18 03:36:33.963313682 +0000 + while ((c = getopt(argc, argv, "d:b:t:g:r:vh")) != -1 ) { + switch (c) { + case 'v': +--- config.h 2023-11-18 13:25:05.212335034 +0000 ++++ configxr.h 2023-11-18 13:19:15.637586640 +0000 @@ -6,6 +6,7 @@ */ @@ -60,4 +65,4 @@ const char *fontname = "DejaVu Sans Mono:size=13:antialias=true"; static int text_height = 11; + -+const char *xresources = "/home/USER/.cache/wal/colors.Xresources"; /* wal */ ++const char *xresources = "/home/$USER/.cache/wal/colors.Xresources"; /* wal */