Skip to content

Commit

Permalink
Add dunstify manpage
Browse files Browse the repository at this point in the history
  • Loading branch information
bynect committed Dec 3, 2024
1 parent ce9140e commit ccdc422
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 8 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 :(
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions docs/dunst.1.pod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=head1 NAME

dunst - A customizable and lightweight notification-daemon
dunst - a customizable and lightweight notification-daemon

=head1 SYNOPSIS

Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion docs/dunst.5.pod
Original file line number Diff line number Diff line change
Expand Up @@ -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)
3 changes: 1 addition & 2 deletions docs/dunstctl.pod
Original file line number Diff line number Diff line change
@@ -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

Expand Down
79 changes: 79 additions & 0 deletions docs/dunstify.pod
Original file line number Diff line number Diff line change
@@ -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)

4 changes: 2 additions & 2 deletions dunstify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit ccdc422

Please sign in to comment.