added support for --pre-display-cmd / -r. also removed some compile-time warnings of unused variables by fact-checking runtime errors

This commit is contained in:
mazunki
2021-10-29 21:34:49 +02:00
parent dab17466a0
commit c597c088d6
4 changed files with 104 additions and 39 deletions

View File

@@ -112,6 +112,10 @@ Specifies something to search for immediately on opening
.TP
.B \-o, \-\-monitor
Sets the monitor to open on
.TP
.B \-r, \-\-pre\-display\-cmd
If set, the selectable entry won't be displayed as-is, but will instead be displayed based on the output of this command, which can be anything. Suggested to use with \fB"echo %s | some_cmd"\fR or \fB"some_cmd %s"\fR, as the string gets replaced in a printf-like fashion. This will not affect the output of wofi once a selection has been done, allowing you to display something else than the original output.
.SH CONFIGURATION
Wofi has 3 main files used for configuration. All files are completely optional.

View File

@@ -183,6 +183,8 @@ Specifies the layer to open on. The options are background, bottom, top, and ove
.TP
.B copy_exec=\fIPATH\fR
Specifies the executable to pipe copy data into. $PATH will be scanned, this is not passed to a shell and must be an executable. Default is wl-copy.
.B pre_display_cmd=\fSTR\fR
Specifies a printf-like string which is used on the entries prior to displaying them. This command is only used to represent the label widget's string, and won't affect the the output of the selected label.
.SH CSS SELECTORS
Any GTK widget can be selected by using the name of its CSS node, these however might change with updates and are not guaranteed to stay constant. Wofi also provides certain widgets with names and classes which can be referenced from CSS to give access to the most important widgets easily. \fBwofi\fR(7) contains the current widget layout used by wofi so if you want to get into CSS directly using GTK widget names look there for info.