diff --git a/Makefile b/Makefile index c086231ff..7c61a0d67 100644 --- a/Makefile +++ b/Makefile @@ -128,7 +128,7 @@ functional-tests: dunst dunstify PREFIX=. ./test/functional-tests/test.sh .PHONY: doc doc-doxygen -doc: docs/dunst.1 docs/dunst.5 docs/dunstctl.1 +doc: docs/dunst.1 docs/dunst.5 docs/dunstctl.1 docs/dunstify.1 # Can't dedup this as we need to explicitly provide the name and title text to # pod2man :( @@ -138,6 +138,8 @@ docs/dunst.5: docs/dunst.5.pod ${POD2MAN} --name=dunst -c "Dunst Reference" --section=5 --release=${VERSION} $< > $@ docs/dunstctl.1: docs/dunstctl.pod ${POD2MAN} --name=dunstctl -c "dunstctl reference" --section=1 --release=${VERSION} $< > $@ +docs/dunstify.1: docs/dunstify.pod + ${POD2MAN} --name=dunstify -c "dunstify reference" --section=1 --release=${VERSION} $< > $@ doc-doxygen: ${DOXYGEN} docs/internal/Doxyfile @@ -195,6 +197,7 @@ clean-doc: rm -f docs/dunst.1 rm -f docs/dunst.5 rm -f docs/dunstctl.1 + rm -f docs/dunstify.1 rm -fr docs/internal/html rm -fr docs/internal/coverage @@ -224,6 +227,7 @@ install-dunst: dunst doc install -Dm644 docs/dunst.1 ${DESTDIR}${MANPREFIX}/man1/dunst.1 install -Dm644 docs/dunst.5 ${DESTDIR}${MANPREFIX}/man5/dunst.5 install -Dm644 docs/dunstctl.1 ${DESTDIR}${MANPREFIX}/man1/dunstctl.1 + install -Dm644 docs/dunstify.1 ${DESTDIR}${MANPREFIX}/man1/dunstify.1 install-dunstctl: dunstctl install -Dm755 dunstctl ${DESTDIR}${BINDIR}/dunstctl @@ -273,6 +277,7 @@ uninstall-keepconf: uninstall-service uninstall-dunstctl uninstall-completions rm -f ${DESTDIR}${MANPREFIX}/man1/dunst.1 rm -f ${DESTDIR}${MANPREFIX}/man5/dunst.5 rm -f ${DESTDIR}${MANPREFIX}/man1/dunstctl.1 + rm -f ${DESTDIR}${MANPREFIX}/man1/dunstify.1 uninstall-dunstrc: rm -f ${DESTDIR}${SYSCONFFILE} diff --git a/docs/dunst.1.pod b/docs/dunst.1.pod index 8806b2018..558d3c236 100644 --- a/docs/dunst.1.pod +++ b/docs/dunst.1.pod @@ -1,6 +1,6 @@ =head1 NAME -dunst - A customizable and lightweight notification-daemon +dunst - a customizable and lightweight notification-daemon =head1 SYNOPSIS @@ -197,4 +197,4 @@ If you feel that copyrights are violated, please send me an email. =head1 SEE ALSO -dunst(5), dunstctl(1), dmenu(1), notify-send(1) +dunst(5), dunstctl(1), dmenu(1), notify-send(1), dunstify(1) diff --git a/docs/dunst.5.pod b/docs/dunst.5.pod index f5391cb6b..8972cdd7a 100644 --- a/docs/dunst.5.pod +++ b/docs/dunst.5.pod @@ -1235,4 +1235,4 @@ If you feel that copyrights are violated, please send me an email. =head1 SEE ALSO -dunst(1), dunstctl(1), dmenu(1), notify-send(1) +dunst(1), dunstctl(1), dmenu(1), notify-send(1), dunstify(1) diff --git a/docs/dunstctl.pod b/docs/dunstctl.pod index f6c93cef4..5e24334e8 100644 --- a/docs/dunstctl.pod +++ b/docs/dunstctl.pod @@ -1,7 +1,6 @@ =head1 NAME -dunstctl - Command line control utility for dunst, a customizable and -lightweight notification-daemon +dunstctl - command line control utility for dunst =head1 SYNOPSIS diff --git a/docs/dunstify.pod b/docs/dunstify.pod new file mode 100644 index 000000000..0575e8824 --- /dev/null +++ b/docs/dunstify.pod @@ -0,0 +1,79 @@ +=head1 NAME + +dunstify - a program to send desktop notifications + +=head1 SYNOPSIS + +dunstify [OPTION...] SUMMARY [BODY] + +=head1 DESCRIPTION + +Dunstify is a notify-send alternative that can be used to +send desktop notifications from the command line. + +=head1 OPTIONS + +=over 4 + +=item B<-?, --help> + +Show help options. + +=item B<-a, --appname=NAME> + +Set the app name of the notification. + +=item B<-u, --urgency=URG> + +Set the urgency level (low, normal, critical) of the notification. + +=item B<-h, --hints=HINT> + +Specifies hints to pass. Valid types are BOOLEAN, INT, DOUBLE, STRING, BYTE and VARIANT. + +=item B<-A, --action=ACTION> + +Specifies the actions to display to the user. + +=item B<-t, --timeout=TIMEOUT> + +The time in milliseconds until the notification expires. + +=item B<-i, --icon=ICON> + +Specifies an icon to display with the notification. + +=item B<-I, --raw_icon=PATH> + +Path to the icon to be sent as raw image data. + +=item B<-c, --capabilities> + +Print the server capabilities and exit. + +=item B<-s, --serverinfo> + +Print server information and exit. + +=item B<-p, --printid> + +Print id, which can be used to update/replace this notification. + +=item B<-r, --replace=ID> + +Set the id of this notification to The ID of the notification to replace. + +=item B<-C, --close=ID> + +Close the notification with the specified ID. + +=item B<-b, --block> + +Block until notification is closed and print close reason. + +=back + +=head1 SEE ALSO + +notify-send(1), dunst(5), dunstctl(1), dunst(1) + diff --git a/dunstify.c b/dunstify.c index fd75dcdfd..016708d79 100644 --- a/dunstify.c +++ b/dunstify.c @@ -30,7 +30,7 @@ static GOptionEntry entries[] = { "hints", 'h', 0, G_OPTION_ARG_STRING_ARRAY, &hint_strs, "User specified hints", "HINT" }, { "action", 'A', 0, G_OPTION_ARG_STRING_ARRAY, &action_strs, "Actions the user can invoke", "ACTION" }, { "timeout", 't', 0, G_OPTION_ARG_INT, &timeout, "The time in milliseconds until the notification expires", "TIMEOUT" }, - { "icon", 'i', 0, G_OPTION_ARG_STRING, &icon, "An Icon that should be displayed with the notification", "ICON" }, + { "icon", 'i', 0, G_OPTION_ARG_STRING, &icon, "An icon that should be displayed with the notification", "ICON" }, { "raw_icon", 'I', 0, G_OPTION_ARG_STRING, &raw_icon_path, "Path to the icon to be sent as raw image data", "RAW_ICON"}, { "capabilities", 'c', 0, G_OPTION_ARG_NONE, &capabilities, "Print the server capabilities and exit", NULL}, { "serverinfo", 's', 0, G_OPTION_ARG_NONE, &serverinfo, "Print server information and exit", NULL}, @@ -108,7 +108,7 @@ void parse_commandline(int argc, char *argv[]) GError *error = NULL; GOptionContext *context; - context = g_option_context_new("SUMMARY BODY"); + context = g_option_context_new("SUMMARY [BODY]"); g_option_context_add_main_entries(context, entries, NULL); if (!g_option_context_parse(context, &argc, &argv, &error)){ g_printerr("Invalid commandline: %s\n", error->message);