From a4f7bf23b21d0d838a8a19261d5fd69719003a03 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Fri, 27 Jul 2018 11:19:42 -0400 Subject: Address first round review for swaynag --- swaynag/swaynag.1.scd | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 swaynag/swaynag.1.scd (limited to 'swaynag/swaynag.1.scd') diff --git a/swaynag/swaynag.1.scd b/swaynag/swaynag.1.scd new file mode 100644 index 00000000..879aaf2e --- /dev/null +++ b/swaynag/swaynag.1.scd @@ -0,0 +1,52 @@ +swaynagbar(1) + +# NAME + +swaynag - Show a warning or error message with buttons + +# SYNOPSIS + +_swaynag_ [options...] + +# OPTIONS +*-b, --button* + Create a button with the text _text_ that executes _action_ when pressed. + Multiple buttons can be defined by providing the flag multiple times. + +*-d, --debug* + Enable debugging. + +*-e, --edge top|bottom* + Set the edge to use. + +*-f, --font * + Set the font to use. + +*-h, --help* + Show help message and quit. + +*-l, --detailed-message* + Read a detailed message from stdin. A button to toggle details will be + added. Details are shown in a scrollable multi-line text area. + +*-L, --detailed-button * + Set the text for the button that toggles details. This has no effect if + there is not a detailed message. The default is _Toggle Details_. + +*-m, --message * + Set the message text. + +*-o, --output * + Set the output to use. This should be the name of a _xdg\_output_. If + _xdg\_output\_manager_ is not supported, then the first detected output + will be used + +*-s, --dismiss-button * + Sets the text for the dismiss nagbar button. The default is _X_. + +*-t, --type error|warning* + Set the message type. + +*-v, --version + Show the version number and quit. + -- cgit v1.2.3 From 8463a2896a932cd99f3dc93608b03cb4aba93293 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sat, 28 Jul 2018 09:34:25 -0400 Subject: swaynag: implement config file support --- swaynag/swaynag.1.scd | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) (limited to 'swaynag/swaynag.1.scd') diff --git a/swaynag/swaynag.1.scd b/swaynag/swaynag.1.scd index 879aaf2e..7d250a45 100644 --- a/swaynag/swaynag.1.scd +++ b/swaynag/swaynag.1.scd @@ -1,4 +1,4 @@ -swaynagbar(1) +swaynag(1) # NAME @@ -13,13 +13,21 @@ _swaynag_ [options...] Create a button with the text _text_ that executes _action_ when pressed. Multiple buttons can be defined by providing the flag multiple times. +*-c, --config* + The config file to use. By default, the following paths are checked: + _$HOME/.swaynag/config_, _$XDG\_CONFIG\_HOME/swaynag/config_, and + _SYSCONFDIR/swaynag/config_. All flags aside from this one and _debug_ are + valid options in the configuration file using the format + _long-option=value_. All leading dashes should be omitted and the equals + sign is required. See swaynag(5) for more information. + *-d, --debug* Enable debugging. -*-e, --edge top|bottom* +*-e, --edge* top|bottom Set the edge to use. -*-f, --font * +*-f, --font* Set the font to use. *-h, --help* @@ -29,24 +37,29 @@ _swaynag_ [options...] Read a detailed message from stdin. A button to toggle details will be added. Details are shown in a scrollable multi-line text area. -*-L, --detailed-button * +*-L, --detailed-button* Set the text for the button that toggles details. This has no effect if there is not a detailed message. The default is _Toggle Details_. -*-m, --message * +*-m, --message* Set the message text. -*-o, --output * +*-o, --output* Set the output to use. This should be the name of a _xdg\_output_. If _xdg\_output\_manager_ is not supported, then the first detected output will be used -*-s, --dismiss-button * +*-s, --dismiss-button* Sets the text for the dismiss nagbar button. The default is _X_. -*-t, --type error|warning* - Set the message type. +*-t, --type* + Set the message type. Two types are created by default _error_ and + _warning_. Custom types can be defined in the config file. See + _--config_ and swaynag(5) for details. Both of the default types can be + overridden in the config file as well. -*-v, --version +*-v, --version* Show the version number and quit. +# SEE +swaynag(5) -- cgit v1.2.3 From e01acb6097b583fcf2f6d0e0afe1bd878dd9b683 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Sun, 29 Jul 2018 22:42:03 -0400 Subject: swaynag: allow more config options --- swaynag/swaynag.1.scd | 46 ++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 42 insertions(+), 4 deletions(-) (limited to 'swaynag/swaynag.1.scd') diff --git a/swaynag/swaynag.1.scd b/swaynag/swaynag.1.scd index 7d250a45..12787c3c 100644 --- a/swaynag/swaynag.1.scd +++ b/swaynag/swaynag.1.scd @@ -45,14 +45,12 @@ _swaynag_ [options...] Set the message text. *-o, --output* - Set the output to use. This should be the name of a _xdg\_output_. If - _xdg\_output\_manager_ is not supported, then the first detected output - will be used + Set the output to use. This should be the name of a _xdg\_output_. *-s, --dismiss-button* Sets the text for the dismiss nagbar button. The default is _X_. -*-t, --type* +*-t, --type* Set the message type. Two types are created by default _error_ and _warning_. Custom types can be defined in the config file. See _--config_ and swaynag(5) for details. Both of the default types can be @@ -61,5 +59,45 @@ _swaynag_ [options...] *-v, --version* Show the version number and quit. +# APPEARANCE OPTIONS +*--background* + Set the color of the background. + +*--border* + Set the color of the border. + +*--border-bottom* + Set the color of the bottom border. + +*--button-background* + Set the color for the background for buttons. + +*--text* + Set the text color. + +*--border-bottom-size* + Set the thickness of the bottom border. + +*--message-padding* + Set the padding for the message. + +*--details-border-size* + Set the thickness for the details border. + +*--button-border-size* + Set the thickness for the button border. + +*--button-gap* + Set the size of the gap between buttons. + +*--button-dismiss-gap* + Set the size of the gap between the dismiss button and another button. + +*--button-margin-right* + Set the margin from the right of the dismiss button to edge. + +*--button-padding* + Set the padding for the button text. + # SEE swaynag(5) -- cgit v1.2.3 From 41d858b4397f1c89a13900f078854e28ea0ac45a Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Mon, 30 Jul 2018 15:17:51 -0400 Subject: swaynag: add blank lines after headings in scdocs --- swaynag/swaynag.1.scd | 3 +++ 1 file changed, 3 insertions(+) (limited to 'swaynag/swaynag.1.scd') diff --git a/swaynag/swaynag.1.scd b/swaynag/swaynag.1.scd index 12787c3c..1c395aee 100644 --- a/swaynag/swaynag.1.scd +++ b/swaynag/swaynag.1.scd @@ -9,6 +9,7 @@ swaynag - Show a warning or error message with buttons _swaynag_ [options...] # OPTIONS + *-b, --button* Create a button with the text _text_ that executes _action_ when pressed. Multiple buttons can be defined by providing the flag multiple times. @@ -60,6 +61,7 @@ _swaynag_ [options...] Show the version number and quit. # APPEARANCE OPTIONS + *--background* Set the color of the background. @@ -100,4 +102,5 @@ _swaynag_ [options...] Set the padding for the button text. # SEE + swaynag(5) -- cgit v1.2.3