From acd72dd08300780e9942bb7196a1940b767607aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20Dud=C3=ADk?=
<24730635+dudik@users.noreply.github.com>
Date: Tue, 1 Sep 2020 18:08:20 +0200
Subject: [PATCH 01/15] Update README.md
---
README.md | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index bd6129c..8ea64fd 100644
--- a/README.md
+++ b/README.md
@@ -5,14 +5,22 @@
-## Usage
+## Table of contents
+* [Patches](#patches)
* [Dismiss a notification](#dismiss-a-notification)
* [Actions](#actions)
* [Newlines](#newlines)
* [Multiple notifications](#multiple-notifications)
* [Notifications don't show up](#notifications-dont-show-up)
+### Patches
+[List of available patches](https://github.com/dudik/herbe/pulls?q=is%3Aopen+is%3Apr+label%3Apatch)
+
+To create a new patch you'll have to open a pull request with your changes. Append `.diff` to the pull request URL to get a downloadable diff file. Don't forget to prefix the title with `patch:` and to apply the `patch` label to it. For inspiration, look at [my Xresources patch](https://github.com/dudik/herbe/pull/11). Thank you.
+
+_Note: This patching method was heavily inspired by [dylan's sowm](https://github.com/dylanaraps/sowm)._
+
### Dismiss a notification
A notification can be dismissed either by clicking on it with `DISMISS_BUTTON` (set in config.h, defaults to left mouse button) or sending a `SIGUSR1` signal to it:
```shell
From c30d3081e05c1a51e956bf5ff0f4f9028710e2b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20Dud=C3=ADk?=
<24730635+dudik@users.noreply.github.com>
Date: Sat, 5 Sep 2020 09:45:47 +0200
Subject: [PATCH 02/15] Add information about packages to README.md
---
README.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/README.md b/README.md
index 8ea64fd..37f1582 100644
--- a/README.md
+++ b/README.md
@@ -79,6 +79,10 @@ $ pkill -SIGUSR2 herbe
And you should be fine. That's all you really need to interact with `herbe`.
## Installation
+[](https://repology.org/project/herbe/versions)
+
+**Only the [herbe-git AUR package](https://aur.archlinux.org/packages/herbe-git/) is maintained by me.**
+
### Dependencies
* X11 (Xlib)
* Xft
From 2e6dd07f36216e52911d7d4dba61349c771abada Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20Dud=C3=ADk?=
<24730635+dudik@users.noreply.github.com>
Date: Sun, 6 Sep 2020 07:40:45 +0200
Subject: [PATCH 03/15] Update table of contents in README.md
---
README.md | 22 ++++++++++++++++------
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/README.md b/README.md
index 37f1582..692a108 100644
--- a/README.md
+++ b/README.md
@@ -7,12 +7,21 @@
## Table of contents
-* [Patches](#patches)
-* [Dismiss a notification](#dismiss-a-notification)
-* [Actions](#actions)
-* [Newlines](#newlines)
-* [Multiple notifications](#multiple-notifications)
-* [Notifications don't show up](#notifications-dont-show-up)
+* [Usage](#usage)
+ * [Patches](#patches)
+ * [Dismiss a notification](#dismiss-a-notification)
+ * [Actions](#actions)
+ * [Newlines](#newlines)
+ * [Multiple notifications](#multiple-notifications)
+ * [Notifications don't show up](#notifications-dont-show-up)
+* [Installation](#installation)
+ * [Packages](#packages)
+ * [Dependencies](#dependencies)
+ * [Build](#build)
+* [Configuration](#configuration)
+* [Contribute](#contribute)
+
+## Usage
### Patches
[List of available patches](https://github.com/dudik/herbe/pulls?q=is%3Aopen+is%3Apr+label%3Apatch)
@@ -79,6 +88,7 @@ $ pkill -SIGUSR2 herbe
And you should be fine. That's all you really need to interact with `herbe`.
## Installation
+### Packages
[](https://repology.org/project/herbe/versions)
**Only the [herbe-git AUR package](https://aur.archlinux.org/packages/herbe-git/) is maintained by me.**
From 829210456e07d806c0b0c5626507510dc6d022bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20Dud=C3=ADk?=
<24730635+dudik@users.noreply.github.com>
Date: Wed, 9 Sep 2020 16:52:13 +0200
Subject: [PATCH 04/15] Add mention of OpenBSD patch to README.md
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 692a108..6f21d08 100644
--- a/README.md
+++ b/README.md
@@ -91,6 +91,8 @@ And you should be fine. That's all you really need to interact with `herbe`.
### Packages
[](https://repology.org/project/herbe/versions)
+[OpenBSD patch](https://github.com/dudik/herbe/pull/4)
+
**Only the [herbe-git AUR package](https://aur.archlinux.org/packages/herbe-git/) is maintained by me.**
### Dependencies
From 75f2bf4b3fd136a886df8913fdd54b5f56d5c259 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20Dud=C3=ADk?=
<24730635+dudik@users.noreply.github.com>
Date: Sun, 13 Sep 2020 07:24:35 +0200
Subject: [PATCH 05/15] Add mention of Xresources patch to Configuration
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 6f21d08..4ab141d 100644
--- a/README.md
+++ b/README.md
@@ -119,5 +119,7 @@ You can also use `make clean` to remove the binary from the build folder, `sudo
## Configuration
herbe is configured at compile-time by editing `config.h`. Every option should be self-explanatory. There is no `height` option because height is determined by font size and text padding.
+[Xresources patch](https://github.com/dudik/herbe/pull/11)
+
## Contribute
If you want to report a bug or you have a feature request, feel free to [open an issue](https://github.com/dudik/herbe/issues).
From 33ae07423dc425aa3baf8f1d31e1d4459d479db3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20Dud=C3=ADk?=
<24730635+dudik@users.noreply.github.com>
Date: Fri, 18 Sep 2020 18:39:15 +0200
Subject: [PATCH 06/15] Add mention of FreeBSD patch to README.md
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 4ab141d..c71b079 100644
--- a/README.md
+++ b/README.md
@@ -93,6 +93,8 @@ And you should be fine. That's all you really need to interact with `herbe`.
[OpenBSD patch](https://github.com/dudik/herbe/pull/4)
+[FreeBSD patch](https://github.com/dudik/herbe/pull/16)
+
**Only the [herbe-git AUR package](https://aur.archlinux.org/packages/herbe-git/) is maintained by me.**
### Dependencies
From e2091908a984b2a38ff18fda94ecff48d4c09032 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20Dud=C3=ADk?=
<24730635+dudik@users.noreply.github.com>
Date: Sun, 20 Sep 2020 15:22:51 +0200
Subject: [PATCH 07/15] Add list of features to README.md
---
README.md | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index c71b079..7c321e1 100644
--- a/README.md
+++ b/README.md
@@ -5,6 +5,14 @@
+## Features
+* Under 200 lines of code
+* Doesn't run in the background, just displays the notification and exits
+* No external dependencies except Xlib and Xft
+* Configurable through `config.h` or Xresources ([using this patch](https://github.com/dudik/herbe/pull/11))
+* [Actions support](#actions)
+* Extensible through [patches](https://github.com/dudik/herbe/pulls?q=is%3Aopen+is%3Apr+label%3Apatch)
+
## Table of contents
* [Usage](#usage)
@@ -100,7 +108,6 @@ And you should be fine. That's all you really need to interact with `herbe`.
### Dependencies
* X11 (Xlib)
* Xft
-* freetype2
The names of packages are different depending on which distribution you use.
For example, if you use [Void Linux](https://voidlinux.org/) you will have to install these dependencies:
From a773e568e5543c59d9e1432ee8eb9c6e1b88f28a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Samuel=20Dud=C3=ADk?=
<24730635+dudik@users.noreply.github.com>
Date: Mon, 21 Sep 2020 19:15:32 +0200
Subject: [PATCH 08/15] Add mention of Wayland port to README.md
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index 7c321e1..096455c 100644
--- a/README.md
+++ b/README.md
@@ -103,6 +103,8 @@ And you should be fine. That's all you really need to interact with `herbe`.
[FreeBSD patch](https://github.com/dudik/herbe/pull/16)
+[Wayland port](https://github.com/muevoid/Wayherb) by [muevoid](https://github.com/muevoid)
+
**Only the [herbe-git AUR package](https://aur.archlinux.org/packages/herbe-git/) is maintained by me.**
### Dependencies
From da58d3afbdf477bb873ac44cba81ee4bcb1c0889 Mon Sep 17 00:00:00 2001
From: Florian Bruhin
Date: Sat, 27 Mar 2021 22:09:17 +0100
Subject: [PATCH 09/15] Add projects integrating herbe to readme
---
README.md | 3 +++
1 file changed, 3 insertions(+)
diff --git a/README.md b/README.md
index 096455c..25eb20c 100644
--- a/README.md
+++ b/README.md
@@ -134,3 +134,6 @@ herbe is configured at compile-time by editing `config.h`. Every option should b
## Contribute
If you want to report a bug or you have a feature request, feel free to [open an issue](https://github.com/dudik/herbe/issues).
+
+## Projects with herbe integration
+- [qutebrowser](https://qutebrowser.org/) supports showing web notifications via herbe, via the `content.notifications.presenter` setting.
From 6d42a53968b1dd6148f448c46e66cca9055f6e65 Mon Sep 17 00:00:00 2001
From: Umgeher Torgersen
Date: Tue, 4 Oct 2022 18:18:20 +0000
Subject: [PATCH 10/15] gitignore: added *.~undo-tree~
---
.gitignore | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitignore b/.gitignore
index fba990b..aee2678 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
herbe
config.h
.ccls-cache
+*.~undo-tree~
From bccd2a0a76719d09b1f2dbb0c54f1a3daa9d7c02 Mon Sep 17 00:00:00 2001
From: Umgeher Torgersen
Date: Tue, 4 Oct 2022 18:19:12 +0000
Subject: [PATCH 11/15] ident
---
herbe.c | 296 ++++++++++++++++++++++++++++----------------------------
1 file changed, 148 insertions(+), 148 deletions(-)
diff --git a/herbe.c b/herbe.c
index 51d3990..e000dba 100644
--- a/herbe.c
+++ b/herbe.c
@@ -21,200 +21,200 @@ int exit_code = EXIT_DISMISS;
static void die(const char *format, ...)
{
- va_list ap;
- va_start(ap, format);
- vfprintf(stderr, format, ap);
- fprintf(stderr, "\n");
- va_end(ap);
- exit(EXIT_FAIL);
+ va_list ap;
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+ exit(EXIT_FAIL);
}
int get_max_len(char *string, XftFont *font, int max_text_width)
{
- int eol = strlen(string);
- XGlyphInfo info;
- XftTextExtentsUtf8(display, font, (FcChar8 *)string, eol, &info);
+ int eol = strlen(string);
+ XGlyphInfo info;
+ XftTextExtentsUtf8(display, font, (FcChar8 *)string, eol, &info);
- if (info.width > max_text_width)
- {
- eol = max_text_width / font->max_advance_width;
- info.width = 0;
+ if (info.width > max_text_width)
+ {
+ eol = max_text_width / font->max_advance_width;
+ info.width = 0;
- while (info.width < max_text_width)
- {
- eol++;
- XftTextExtentsUtf8(display, font, (FcChar8 *)string, eol, &info);
- }
+ while (info.width < max_text_width)
+ {
+ eol++;
+ XftTextExtentsUtf8(display, font, (FcChar8 *)string, eol, &info);
+ }
- eol--;
- }
+ eol--;
+ }
- for (int i = 0; i < eol; i++)
- if (string[i] == '\n')
- {
- string[i] = ' ';
- return ++i;
- }
+ for (int i = 0; i < eol; i++)
+ if (string[i] == '\n')
+ {
+ string[i] = ' ';
+ return ++i;
+ }
- if (info.width <= max_text_width)
- return eol;
+ if (info.width <= max_text_width)
+ return eol;
- int temp = eol;
+ int temp = eol;
- while (string[eol] != ' ' && eol)
- --eol;
+ while (string[eol] != ' ' && eol)
+ --eol;
- if (eol == 0)
- return temp;
- else
- return ++eol;
+ if (eol == 0)
+ return temp;
+ else
+ return ++eol;
}
void expire(int sig)
{
- XEvent event;
- event.type = ButtonPress;
- event.xbutton.button = (sig == SIGUSR2) ? (ACTION_BUTTON) : (DISMISS_BUTTON);
- XSendEvent(display, window, 0, 0, &event);
- XFlush(display);
+ XEvent event;
+ event.type = ButtonPress;
+ event.xbutton.button = (sig == SIGUSR2) ? (ACTION_BUTTON) : (DISMISS_BUTTON);
+ XSendEvent(display, window, 0, 0, &event);
+ XFlush(display);
}
int main(int argc, char *argv[])
{
- if (argc == 1)
- {
- sem_unlink("/herbe");
- die("Usage: %s body", argv[0]);
- }
+ if (argc == 1)
+ {
+ sem_unlink("/herbe");
+ die("Usage: %s body", argv[0]);
+ }
- struct sigaction act_expire, act_ignore;
+ struct sigaction act_expire, act_ignore;
- act_expire.sa_handler = expire;
- act_expire.sa_flags = SA_RESTART;
- sigemptyset(&act_expire.sa_mask);
+ act_expire.sa_handler = expire;
+ act_expire.sa_flags = SA_RESTART;
+ sigemptyset(&act_expire.sa_mask);
- act_ignore.sa_handler = SIG_IGN;
- act_ignore.sa_flags = 0;
- sigemptyset(&act_ignore.sa_mask);
+ act_ignore.sa_handler = SIG_IGN;
+ act_ignore.sa_flags = 0;
+ sigemptyset(&act_ignore.sa_mask);
- sigaction(SIGALRM, &act_expire, 0);
- sigaction(SIGTERM, &act_expire, 0);
- sigaction(SIGINT, &act_expire, 0);
+ sigaction(SIGALRM, &act_expire, 0);
+ sigaction(SIGTERM, &act_expire, 0);
+ sigaction(SIGINT, &act_expire, 0);
- sigaction(SIGUSR1, &act_ignore, 0);
- sigaction(SIGUSR2, &act_ignore, 0);
+ sigaction(SIGUSR1, &act_ignore, 0);
+ sigaction(SIGUSR2, &act_ignore, 0);
- if (!(display = XOpenDisplay(0)))
- die("Cannot open display");
+ if (!(display = XOpenDisplay(0)))
+ die("Cannot open display");
- int screen = DefaultScreen(display);
- Visual *visual = DefaultVisual(display, screen);
- Colormap colormap = DefaultColormap(display, screen);
+ int screen = DefaultScreen(display);
+ Visual *visual = DefaultVisual(display, screen);
+ Colormap colormap = DefaultColormap(display, screen);
- int screen_width = DisplayWidth(display, screen);
- int screen_height = DisplayHeight(display, screen);
+ int screen_width = DisplayWidth(display, screen);
+ int screen_height = DisplayHeight(display, screen);
- XSetWindowAttributes attributes;
- attributes.override_redirect = True;
- XftColor color;
- XftColorAllocName(display, visual, colormap, background_color, &color);
- attributes.background_pixel = color.pixel;
- XftColorAllocName(display, visual, colormap, border_color, &color);
- attributes.border_pixel = color.pixel;
+ XSetWindowAttributes attributes;
+ attributes.override_redirect = True;
+ XftColor color;
+ XftColorAllocName(display, visual, colormap, background_color, &color);
+ attributes.background_pixel = color.pixel;
+ XftColorAllocName(display, visual, colormap, border_color, &color);
+ attributes.border_pixel = color.pixel;
- int num_of_lines = 0;
- int max_text_width = width - 2 * padding;
- int lines_size = 5;
- char **lines = malloc(lines_size * sizeof(char *));
- if (!lines)
- die("malloc failed");
+ int num_of_lines = 0;
+ int max_text_width = width - 2 * padding;
+ int lines_size = 5;
+ char **lines = malloc(lines_size * sizeof(char *));
+ if (!lines)
+ die("malloc failed");
- XftFont *font = XftFontOpenName(display, screen, font_pattern);
+ XftFont *font = XftFontOpenName(display, screen, font_pattern);
- for (int i = 1; i < argc; i++)
- {
- for (unsigned int eol = get_max_len(argv[i], font, max_text_width); eol; argv[i] += eol, num_of_lines++, eol = get_max_len(argv[i], font, max_text_width))
- {
- if (lines_size <= num_of_lines)
- {
- lines = realloc(lines, (lines_size += 5) * sizeof(char *));
- if (!lines)
- die("realloc failed");
- }
+ for (int i = 1; i < argc; i++)
+ {
+ for (unsigned int eol = get_max_len(argv[i], font, max_text_width); eol; argv[i] += eol, num_of_lines++, eol = get_max_len(argv[i], font, max_text_width))
+ {
+ if (lines_size <= num_of_lines)
+ {
+ lines = realloc(lines, (lines_size += 5) * sizeof(char *));
+ if (!lines)
+ die("realloc failed");
+ }
- lines[num_of_lines] = malloc((eol + 1) * sizeof(char));
- if (!lines[num_of_lines])
- die("malloc failed");
+ lines[num_of_lines] = malloc((eol + 1) * sizeof(char));
+ if (!lines[num_of_lines])
+ die("malloc failed");
- strncpy(lines[num_of_lines], argv[i], eol);
- lines[num_of_lines][eol] = '\0';
- }
- }
+ strncpy(lines[num_of_lines], argv[i], eol);
+ lines[num_of_lines][eol] = '\0';
+ }
+ }
- unsigned int x = pos_x;
- unsigned int y = pos_y;
- unsigned int text_height = font->ascent - font->descent;
- unsigned int height = (num_of_lines - 1) * line_spacing + num_of_lines * text_height + 2 * padding;
+ unsigned int x = pos_x;
+ unsigned int y = pos_y;
+ unsigned int text_height = font->ascent - font->descent;
+ unsigned int height = (num_of_lines - 1) * line_spacing + num_of_lines * text_height + 2 * padding;
- if (corner == TOP_RIGHT || corner == BOTTOM_RIGHT)
- x = screen_width - width - border_size * 2 - pos_x;
+ if (corner == TOP_RIGHT || corner == BOTTOM_RIGHT)
+ x = screen_width - width - border_size * 2 - pos_x;
- if (corner == BOTTOM_LEFT || corner == BOTTOM_RIGHT)
- y = screen_height - height - border_size * 2 - pos_y;
+ if (corner == BOTTOM_LEFT || corner == BOTTOM_RIGHT)
+ y = screen_height - height - border_size * 2 - pos_y;
- window = XCreateWindow(display, RootWindow(display, screen), x, y, width, height, border_size, DefaultDepth(display, screen),
- CopyFromParent, visual, CWOverrideRedirect | CWBackPixel | CWBorderPixel, &attributes);
+ window = XCreateWindow(display, RootWindow(display, screen), x, y, width, height, border_size, DefaultDepth(display, screen),
+ CopyFromParent, visual, CWOverrideRedirect | CWBackPixel | CWBorderPixel, &attributes);
- XftDraw *draw = XftDrawCreate(display, window, visual, colormap);
- XftColorAllocName(display, visual, colormap, font_color, &color);
+ XftDraw *draw = XftDrawCreate(display, window, visual, colormap);
+ XftColorAllocName(display, visual, colormap, font_color, &color);
- XSelectInput(display, window, ExposureMask | ButtonPress);
- XMapWindow(display, window);
+ XSelectInput(display, window, ExposureMask | ButtonPress);
+ XMapWindow(display, window);
- sem_t *mutex = sem_open("/herbe", O_CREAT, 0644, 1);
- sem_wait(mutex);
+ sem_t *mutex = sem_open("/herbe", O_CREAT, 0644, 1);
+ sem_wait(mutex);
- sigaction(SIGUSR1, &act_expire, 0);
- sigaction(SIGUSR2, &act_expire, 0);
+ sigaction(SIGUSR1, &act_expire, 0);
+ sigaction(SIGUSR2, &act_expire, 0);
- if (duration != 0)
- alarm(duration);
+ if (duration != 0)
+ alarm(duration);
- for (;;)
- {
- XEvent event;
- XNextEvent(display, &event);
+ for (;;)
+ {
+ XEvent event;
+ XNextEvent(display, &event);
- if (event.type == Expose)
- {
- XClearWindow(display, window);
- for (int i = 0; i < num_of_lines; i++)
- XftDrawStringUtf8(draw, &color, font, padding, line_spacing * i + text_height * (i + 1) + padding,
- (FcChar8 *)lines[i], strlen(lines[i]));
- }
- else if (event.type == ButtonPress)
- {
- if (event.xbutton.button == DISMISS_BUTTON)
- break;
- else if (event.xbutton.button == ACTION_BUTTON)
- {
- exit_code = EXIT_ACTION;
- break;
- }
- }
- }
+ if (event.type == Expose)
+ {
+ XClearWindow(display, window);
+ for (int i = 0; i < num_of_lines; i++)
+ XftDrawStringUtf8(draw, &color, font, padding, line_spacing * i + text_height * (i + 1) + padding,
+ (FcChar8 *)lines[i], strlen(lines[i]));
+ }
+ else if (event.type == ButtonPress)
+ {
+ if (event.xbutton.button == DISMISS_BUTTON)
+ break;
+ else if (event.xbutton.button == ACTION_BUTTON)
+ {
+ exit_code = EXIT_ACTION;
+ break;
+ }
+ }
+ }
- sem_post(mutex);
- sem_close(mutex);
+ sem_post(mutex);
+ sem_close(mutex);
- for (int i = 0; i < num_of_lines; i++)
- free(lines[i]);
+ for (int i = 0; i < num_of_lines; i++)
+ free(lines[i]);
- free(lines);
- XftDrawDestroy(draw);
- XftColorFree(display, visual, colormap, &color);
- XftFontClose(display, font);
- XCloseDisplay(display);
+ free(lines);
+ XftDrawDestroy(draw);
+ XftColorFree(display, visual, colormap, &color);
+ XftFontClose(display, font);
+ XCloseDisplay(display);
- return exit_code;
-}
\ No newline at end of file
+ return exit_code;
+}
From 27581edf32f70e25875baf7dadc199c62d572721 Mon Sep 17 00:00:00 2001
From: Umgeher Torgersen
Date: Tue, 4 Oct 2022 18:19:19 +0000
Subject: [PATCH 12/15] new settings
---
Makefile | 2 +-
config.def.h | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 3225e36..eb5b382 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-CFLAGS = -Wall -Wextra -pedantic -lX11 -lXft -I/usr/include/freetype2 -pthread
+CFLAGS = -Wall -Wextra -pedantic -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lXft -I/usr/X11R6/include/freetype2 -pthread
PREFIX ?= /usr/local
CC ?= cc
diff --git a/config.def.h b/config.def.h
index 86b7e76..8ee2335 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1,14 +1,14 @@
-static const char *background_color = "#3e3e3e";
-static const char *border_color = "#ececec";
-static const char *font_color = "#ececec";
-static const char *font_pattern = "monospace:size=10";
+static const char *background_color = "#282828";
+static const char *border_color = "#98971a";
+static const char *font_color = "#98971a";
+static const char *font_pattern = "Hack:pixelsize=12:antialias=true:autohint=true";
static const unsigned line_spacing = 5;
static const unsigned int padding = 15;
static const unsigned int width = 450;
-static const unsigned int border_size = 2;
-static const unsigned int pos_x = 30;
-static const unsigned int pos_y = 60;
+static const unsigned int border_size = 1;
+static const unsigned int pos_x = 140;
+static const unsigned int pos_y = 20;
enum corners { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT };
enum corners corner = TOP_RIGHT;
From 58884c99287cb2846462b40e8c58dff392d5361c Mon Sep 17 00:00:00 2001
From: Umgeher Torgersen
Date: Tue, 4 Oct 2022 18:22:32 +0000
Subject: [PATCH 13/15] new makefile
---
Makefile | 20 +++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)
diff --git a/Makefile b/Makefile
index eb5b382..b2f9aa1 100644
--- a/Makefile
+++ b/Makefile
@@ -3,22 +3,16 @@ CFLAGS = -Wall -Wextra -pedantic -I/usr/X11R6/include -L/usr/X11R6/lib -lX11 -lX
PREFIX ?= /usr/local
CC ?= cc
-all: herbe
-
-config.h: config.def.h
+compile:
cp config.def.h config.h
-
-herbe: herbe.c config.h
$(CC) herbe.c $(CFLAGS) -o herbe
-install: herbe
- mkdir -p ${DESTDIR}${PREFIX}/bin
- cp -f herbe ${DESTDIR}${PREFIX}/bin
+install: compile
+ mkdir -p ~/bin
+ cp -f herbe ~/bin
+ chmod +x ~/bin/herbe
uninstall:
- rm -f ${DESTDIR}${PREFIX}/bin/herbe
+ rm -f ~/bin/herbe
-clean:
- rm -f herbe
-
-.PHONY: all install uninstall clean
+.PHONY: compile install uninstall
From 705cf6cb5841dfaa2e39063151d8fc9955191926 Mon Sep 17 00:00:00 2001
From: Umgeher Torgersen
Date: Tue, 6 Dec 2022 14:27:25 +0000
Subject: [PATCH 14/15] border and text colors changed to gruvbox dark orange
---
config.def.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/config.def.h b/config.def.h
index 8ee2335..4de278a 100644
--- a/config.def.h
+++ b/config.def.h
@@ -1,17 +1,17 @@
static const char *background_color = "#282828";
-static const char *border_color = "#98971a";
-static const char *font_color = "#98971a";
+static const char *border_color = "#d65d0e";
+static const char *font_color = "#d65d0e";
static const char *font_pattern = "Hack:pixelsize=12:antialias=true:autohint=true";
static const unsigned line_spacing = 5;
static const unsigned int padding = 15;
static const unsigned int width = 450;
static const unsigned int border_size = 1;
-static const unsigned int pos_x = 140;
+static const unsigned int pos_x = 20;
static const unsigned int pos_y = 20;
enum corners { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT };
-enum corners corner = TOP_RIGHT;
+enum corners corner = TOP_LEFT;
static const unsigned int duration = 5; /* in seconds */
From 3868acc272c97d5f2b7b425f16e9376254621d70 Mon Sep 17 00:00:00 2001
From: Umgeher Torgersen
Date: Sun, 17 Sep 2023 21:26:38 +0000
Subject: [PATCH 15/15] using TOP_RIGHT
---
config.def.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/config.def.h b/config.def.h
index 4de278a..ef0ebfc 100644
--- a/config.def.h
+++ b/config.def.h
@@ -11,7 +11,7 @@ static const unsigned int pos_x = 20;
static const unsigned int pos_y = 20;
enum corners { TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT };
-enum corners corner = TOP_LEFT;
+enum corners corner = TOP_RIGHT;
static const unsigned int duration = 5; /* in seconds */