=head1 NAME

nwg-dock - GTK-based dock for wlroots-based Wayland compositors

=head1 SYNOPSIS

B<nwg-dock> [I<options>]

=head1 DESCRIPTION

B<nwg-dock> is a fully configurable dock, aimed exclusively at the
L<sway|https://github.com/swaywm/sway> Wayland compositor. It features
pinned buttons, task buttons, the workspace switcher and a launcher
button. The launcher button by default starts B<nwg-drawer> or
B<nwggrid> (application grid), if found.

This application is a part of the
L<nwg-shell|https://nwg-piotr.github.io/nwg-shell> project.

Either start the dock permanently from your sway configuration file,

    exec nwg-dock [arguments]

or assign the command to a key binding. Running the command again kills
the existing instance, so the same key can be used to open and close the
dock.

=head2 Running the dock residently

If run with the B<-d> or B<-r> option (preferably from I<autostart>), the
program will keep running residently:

    exec_always nwg-dock -d

or

    exec_always nwg-dock -r

=over 4

=item B<-d> for autohiDe

Move the mouse pointer to the expected dock location for the dock to
show up. It will be hidden a second after you leave the window.
Invisible hotspots are created on all outputs, unless one is specified
with B<-o>.

=item B<-r> for just Resident

No hotspot is created. To show or hide the dock, bind the C<exec
nwg-dock> command to a key or button.

Re-execution of the same command hides the dock. If a resident instance
is found, running C<nwg-dock> without arguments sends C<SIGUSR1> to it;
C<pkill -USR1 nwg-dock> works the same way, and also in autohiDe mode.

Re-execution of the command with B<-d> or B<-r> won't kill the running
instance: another instance just exits with code 0. To terminate the
running instance regardless, use C<pkill -f nwg-dock>.

=back

Note that the running instance needs to be killed before reloading sway,
if the arguments the dock is auto-started with have just been changed.

=head1 OPTIONS

=over 4

=item B<-a> I<string>

Alignment in full width/height: C<start>, C<center> or C<end> (default:
C<center>).

=item B<-c> I<string>

Command assigned to the launcher button.

=item B<-d>

auto-hiDe: show the dock when the hotspot is hovered, close it when left
or a button is clicked.

=item B<-debug>

Turn on debug messages.

=item B<-f>

Take full screen width/height.

=item B<-g> I<string>

Quote-delimited, space-separated C<app_id> list to iGnore in the dock.

=item B<-hd> I<int>

Hotspot Delay in milliseconds; the smaller, the faster the mouse
pointer needs to enter the hotspot for the dock to appear. Set to 0 to
disable (default: 20).

=item B<-i> I<int>

Icon size (default: 48).

=item B<-l> I<string>

Layer: C<overlay>, C<top> or C<bottom> (default: C<overlay>).

=item B<-lp> I<string>

Launcher button position, C<start> or C<end> (default: C<end>).

=item B<-mb> I<int>

Margin Bottom.

=item B<-ml> I<int>

Margin Left.

=item B<-mr> I<int>

Margin Right.

=item B<-mt> I<int>

Margin Top.

=item B<-nolauncher>

Don't show the launcher button.

=item B<-nows>

Don't show the workspace switcher.

=item B<-o> I<string>

Name of the Output to display the dock on.

=item B<-p> I<string>

Position: C<bottom>, C<top> or C<left> (default: C<bottom>).

=item B<-r>

Leave the program resident, but without a hotspot.

=item B<-s> I<string>

Styling: CSS file name (default: F<style.css>).

=item B<-v>

Display version information.

=item B<-w> I<int>

Number of Workspaces in use (default: 8).

=item B<-x>

Set an eXclusive zone: move other windows aside; overrides B<-l>.

=back

=head1 FILES

=over 4

=item F<~/.config/nwg-dock/style.css>

Per-user stylesheet; edit to customize appearance. See B<-s> to use a
different file name.

=back

=head1 TROUBLESHOOTING

The dock identifies an application only by its C<app_id> (see C<swaymsg
-t get_tree>). It looks for an icon named after the C<app_id>; failing
that, for a F<.desktop> file of the same name, which should contain the
icon name or path. If an application has no icon in the dock, find its
F<.desktop> file, copy it to F<~/.local/share/applications/> and rename
it to C<E<lt>app_idE<gt>.desktop>; if that file's C<Icon=> entry is
correct, the icon should now appear.

=head1 AUTHOR

nwg-dock was written by Piotr Miller. This manual page was written for
the Debian project (but may be used by others).
