Skip to content

Commit

Permalink
Add manpage
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrd committed Jun 5, 2019
1 parent a9b8738 commit e9b2e6e
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
test/tools/createwindow
test/tools/maprequestwait
wm-launch
wm-launch.1
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ CFLAGS += -std=c99 -Wall -Wextra -fPIC
LDFLAGS = -shared
LDLIBS = $(shell pkgconf --libs x11-xcb)

all: wm-launch-preload.so wm-launch
MANPAGE = wm-launch.1

all: wm-launch-preload.so wm-launch $(MANPAGE)

wm-launch-preload.so: wm-launch-preload.o
$(LINK.c) $(LDLIBS) -o $@ $^
Expand All @@ -24,15 +26,21 @@ wm-launch: wm-launch.in
sed -e "s/VERSION=/VERSION=$(VERSION)/" wm-launch.in > wm-launch
chmod +x wm-launch

$(MANPAGE): man/$(MANPAGE).pod
pod2man -n=wm-launch -c=wm-launch -r=$(VERSION) $< $(MANPAGE)

install:
mkdir -p $(DESTDIR)$(BINPREFIX)
cp -p wm-launch $(DESTDIR)$(BINPREFIX)
mkdir -p $(DESTDIR)$(LIBPREFIX)/wm-launch
cp -p wm-launch-preload.so $(DESTDIR)$(LIBPREFIX)/wm-launch
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
cp -p $(MANPAGE) $(DESTDIR)$(MANPREFIX)/man1

uninstall:
rm -f $(DESTDIR)$(BINPREFIX)/wm-launch
rm -rf $(DESTDIR)$(LIBPREFIX)/wm-launch
rm -f $(DESTDIR)$(MANPREFIX)/man1/$(MANPAGE)

test: all
$(MAKE) -C test run
Expand All @@ -41,7 +49,7 @@ test-clean:
$(MAKE) -C test clean

clean: test-clean
rm -f wm-launch-preload.so wm-launch-preload.o wm-launch
rm -f wm-launch-preload.so wm-launch-preload.o wm-launch $(MANPAGE)

test-docker: clean
docker run --rm -v $(shell pwd):/root/wm-launch -w /root/wm-launch \
Expand Down
51 changes: 51 additions & 0 deletions man/wm-launch.1.pod
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
=head1 NAME

wm-launch - launch X11 clients with unique IDs

=head1 SYNOPSIS

B<wm-launch> [options] WM_LAUNCH_ID COMMAND...

=head1 DESCRIPTION

wm-launch provides a shared library for use with I<LD_PRELOAD> and a
command-line tool to set IDs on newly created X11 windows.

=head1 OPTIONS

=over

=item B<-h>

Show help message.

=item B<-j>

Launch I<COMMAND> with firejail.

=item B<-f> I<FACTORY>

Launch via a window factory.
A window factory is an X11 client responsible for creating the windows of new
clients. It can be either implicit or explicit, the key difference being that
implicit factories create their own window.

=item B<-v>

Show version.

=back

=head1 AUTHOR

James Reed E<lt>[email protected]<gt>

=head1 REPORTING BUGS

Bugs and issues can be reported here:
L<https://github.com/jcrd/wm-launch/issues>

=head1 COPYRIGHT

Copyright 2019 James Reed. wm-launch is licensed under the
GNU Lesser General Public License v2.1 or later.

0 comments on commit e9b2e6e

Please sign in to comment.