From 3daffdca1604ccbf6cfc1972b39c2f5f36b3496d Mon Sep 17 00:00:00 2001 From: Vlad Glagolev Date: Thu, 6 Jun 2019 18:25:12 +0000 Subject: nall: new spell, simple, non-intrusive, everything notifier in the system tray --- wm-addons/nall/DEPENDS | 12 ++++++ wm-addons/nall/DETAILS | 17 ++++++++ wm-addons/nall/HISTORY | 3 ++ wm-addons/nall/PRE_BUILD | 6 +++ wm-addons/nall/libnotify-0.7.patch | 84 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 122 insertions(+) create mode 100755 wm-addons/nall/DEPENDS create mode 100755 wm-addons/nall/DETAILS create mode 100644 wm-addons/nall/HISTORY create mode 100755 wm-addons/nall/PRE_BUILD create mode 100644 wm-addons/nall/libnotify-0.7.patch (limited to 'wm-addons') diff --git a/wm-addons/nall/DEPENDS b/wm-addons/nall/DEPENDS new file mode 100755 index 0000000000..d22719da84 --- /dev/null +++ b/wm-addons/nall/DEPENDS @@ -0,0 +1,12 @@ +depends glib2 && +depends gtk+2 && + +optional_depends gettext \ + "--enable-nls" \ + "--disable-nls" \ + "for Native Language Support" && + +optional_depends libnotify \ + "--enable-notifications" \ + "--disable-notifications" \ + "for notifications support" diff --git a/wm-addons/nall/DETAILS b/wm-addons/nall/DETAILS new file mode 100755 index 0000000000..d12a093bde --- /dev/null +++ b/wm-addons/nall/DETAILS @@ -0,0 +1,17 @@ + SPELL=nall + VERSION=1.0 + SOURCE=${SPELL}-${VERSION}.tar.gz + SOURCE_URL[0]=https://github.com/be1/${SPELL}/archive/v${VERSION}.tar.gz + SOURCE_HASH=sha512:53207543064fb0b31c24ffc450ed84a2d6998253defc957065c4a4c928dabb057cdf87442ecd1850f08c313f89a08b54988881300b0bc88a1745ffae42d7e9f7 +SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}" + WEB_SITE=https://github.com/be1/nall + LICENSE[0]=GPL + ENTERED=20190606 + SHORT="simple, non-intrusive, everything notifier in the system tray" +cat << EOF +Nall is a small gtk+ application that discretely fits into your freedesktop +system tray. Its purpose is to spawn periodically every kind of script and +display a one-line output in the tooltip window. The main usage of nall is +monitoring or just notifying of almost everything (it just depends upon your +imagination and ability to script). +EOF diff --git a/wm-addons/nall/HISTORY b/wm-addons/nall/HISTORY new file mode 100644 index 0000000000..ff67a9aae1 --- /dev/null +++ b/wm-addons/nall/HISTORY @@ -0,0 +1,3 @@ +2019-06-06 Vlad Glagolev + * DEPENDS, DETAILS, PRE_BUILD, libnotify-0.7.patch: created spell, + version 1.0 diff --git a/wm-addons/nall/PRE_BUILD b/wm-addons/nall/PRE_BUILD new file mode 100755 index 0000000000..f109bc527e --- /dev/null +++ b/wm-addons/nall/PRE_BUILD @@ -0,0 +1,6 @@ +default_pre_build && +cd "${SOURCE_DIRECTORY}" && + +patch -p1 < "${SPELL_DIRECTORY}/libnotify-0.7.patch" && + +./bootstrap.sh diff --git a/wm-addons/nall/libnotify-0.7.patch b/wm-addons/nall/libnotify-0.7.patch new file mode 100644 index 0000000000..09d8c7bff9 --- /dev/null +++ b/wm-addons/nall/libnotify-0.7.patch @@ -0,0 +1,84 @@ +From b248989852e5ef2d83a0dee28b27695b0ae315ca Mon Sep 17 00:00:00 2001 +From: Ingo van Lil +Date: Tue, 13 Jul 2010 21:22:28 +0200 +Subject: [PATCH 1/2] Manage Scripts: Disable Delete button if no entry is + selected. + +--- + src/manage.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/manage.c b/src/manage.c +index 0cbf9b1..cc1b475 100644 +--- a/src/manage.c ++++ b/src/manage.c +@@ -207,10 +207,10 @@ static void manage_dialog_on_enabled_toggled(GtkCellRendererToggle* cell, gchar* + gtk_tree_path_free(tree_path); + } + +-void manage_dialog_on_selection_changed(GtkTreeSelection* selection, gpointer editbutton) ++void manage_dialog_on_selection_changed(GtkTreeSelection* selection, gpointer button) + { + gboolean sensitive = (gtk_tree_selection_count_selected_rows(selection) > 0); +- gtk_widget_set_sensitive(GTK_WIDGET(editbutton), sensitive); ++ gtk_widget_set_sensitive(GTK_WIDGET(button), sensitive); + } + + void manage_dialog_on_row_activated(GtkTreeView* tree_view, GtkTreePath* path, GtkTreeViewColumn* column, gpointer data) +@@ -258,7 +258,9 @@ static GtkDialog* manage_dialog_create(void) + GtkTreeSelection* selection = gtk_tree_view_get_selection(tree_view); + gboolean sensitive = (gtk_tree_selection_count_selected_rows(selection) > 0); + gtk_widget_set_sensitive(GTK_WIDGET(button_edit), sensitive); ++ gtk_widget_set_sensitive(GTK_WIDGET(button_delete), sensitive); + g_signal_connect(selection, "changed", G_CALLBACK(manage_dialog_on_selection_changed), button_edit); ++ g_signal_connect(selection, "changed", G_CALLBACK(manage_dialog_on_selection_changed), button_delete); + + g_signal_connect(button_add, "clicked", G_CALLBACK(manage_dialog_on_button_add), tree_view); + g_signal_connect(button_edit, "clicked", G_CALLBACK(manage_dialog_on_button_edit), tree_view); + +From ba55c03f10a5e3060b649e215a0ecdec19117cb5 Mon Sep 17 00:00:00 2001 +From: Ingo van Lil +Date: Sat, 13 Nov 2010 00:54:33 +0100 +Subject: [PATCH 2/2] Support for libnotify >= 0.7.0 + +The most recent developer version of libnotify changed the signature for +notify_notification_new(). Make the configure script detect the version +of libnotify and use the according function signature. +--- + configure.ac | 6 ++++++ + src/notify.c | 4 ++++ + 2 files changed, 10 insertions(+) + +diff --git a/configure.ac b/configure.ac +index a8cd6fe..93dd8e6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -42,6 +42,12 @@ Use --disable-notifications to disable desktop notifications.]) ] + ) + AC_SUBST(LIBNOTIFY_CFLAGS) + AC_SUBST(LIBNOTIFY_LIBS) ++ PKG_CHECK_MODULES(LIBNOTIFY_OLD, libnotify < 0.7.0, ++ [ AC_MSG_NOTICE([Using old libnotify API.]) ++ AC_DEFINE([HAVE_LIBNOTIFY_OLD], [1], ++ [Define to 1 if libnotify version is below 0.7.0]) ], ++ [ AC_MSG_NOTICE([Using new libnotify API.]) ] ++ ) + fi + + # Checks for header files. +diff --git a/src/notify.c b/src/notify.c +index 3fbbae9..fcb8e91 100644 +--- a/src/notify.c ++++ b/src/notify.c +@@ -12,7 +12,11 @@ void nall_notify_init(void) + + void nall_notify(run_data_t* s) + { ++#ifdef HAVE_LIBNOTIFY_OLD + NotifyNotification* notification = notify_notification_new(s->name, s->buf, NULL, NULL); ++#else ++ NotifyNotification* notification = notify_notification_new(s->name, s->buf, NULL); ++#endif + if (s->status == 0) + notify_notification_set_urgency(notification, NOTIFY_URGENCY_NORMAL); + else -- cgit v1.2.3