1wofi(7)                Miscellaneous Information Manual                wofi(7)
2
3
4

NAME

6       wofi - Built in modes and other features
7
8

DESCRIPTION

10       Wofi contains several built in modes as well as a lot of other features
11       including combi which are documented here.
12
13       The config options documented here are stripped  of  mode  names.  Mode
14       specific  config  options  are  placed in the config file in the format
15       mode-example_opt=val. For example dmenu has an option called  parse_ac‐
16       tion which would be placed in the config as dmenu-parse_action=true.
17
18

MODES

20       Currently wofi has 3 built in modes
21
22       1.  run  -  searches $PATH for executables and allows them to be run by
23           selecting them.
24
25       2.  drun - searches $XDG_DATA_HOME/applications and  $XDG_DATA_DIRS/ap‐
26           plications for desktop files and allows them to be run by selecting
27           them.
28
29       3.  dmenu - reads from stdin and displays options which  when  selected
30           will be output to stdout.
31
32
33       In  the  event  $XDG_DATA_HOME  is  not specified it defaults to ~/.lo‐
34       cal/share. If $XDG_DATA_DIRS is not specified it defaults  to  /usr/lo‐
35       cal/share:/usr/share.
36
37       Combi  is not a mode however it does exist as a feature. You can use it
38       by doing --show mode1,mode2,mode3,etc. You can mix and match any number
39       of  modes  however each mode can only be loaded once so doing something
40       like --show run,drun,run is not supported although  I'm  not  sure  why
41       you'd do that in the first place.
42
43

DMENU CONFIG OPTIONS

45       parse_action=BOOL
46              If  true  the result returned by dmenu will be stripped of image
47              escape sequences and pango markup, default is false.
48
49       separator=CHAR
50              The character used to separate dmenu entries, default is \n.
51
52       print_line_num=BOOL
53              When an entry is selected the number of the line the  entry  was
54              on is printed instead of the entry itself. This disables caching
55              as it's fundamentally incompatible with it.
56
57

RUN

59       In run mode holding ctrl while running an entry will cause arguments to
60       be parsed even if always_parse_args=false. Holding shift will cause the
61       entry to be run in a terminal.
62
63

RUN CONFIG OPTIONS

65       always_parse_args=BOOL
66              If true spaces will not be treated as  part  of  the  executable
67              name  but  rather as an argument separator equivalent to holding
68              control while pressing enter, default is false.
69
70       show_all=BOOL
71              If true shows all the entries in path, this  will  show  entries
72              that  have  the  same executable name, for example /bin/bash and
73              /usr/bin/bash will be shown separately as bash instead of having
74              one bash entry for the first one encountered, default is true.
75
76       print_command=BOOL
77              If true the executable that would be run will be printed to std‐
78              out instead of executing it, default is false.
79
80

DRUN CONFIG OPTIONS

82       print_command=BOOL
83              If true the command used to launch  the  desktop  file  will  be
84              printed to stdout instead of invoking it, default is false.
85
86       display_generic=BOOL
87              If  true  then generic names will be displayed in () next to the
88              application name, default is false.
89
90

DRUN

92       When images are enabled drun mode will pull icon themes however being a
93       GTK  app  it's possible you'll need to run gtk-update-icon-cache to get
94       them to apply.
95
96

LOCATIONS

98       There are 9 possible locations which can be specified either by name or
99       by number, the number scheme is the same as in rofi and the correspond‐
100       ing number is listed next to the names below, the default is center.
101
102       1.  center 0
103
104       2.  top_left 1
105
106       3.  top 2
107
108       4.  top_right 3
109
110       5.  right 4
111
112       6.  bottom_right 5
113
114       7.  bottom 6
115
116       8.  bottom_left 7
117
118       9.  left 8
119
120
121       The x and y offsets are applied  based  on  layer-shell  anchors  which
122       means  an  x  offset  can  only be applied if wofi is anchored on the x
123       axis, i.e. you can only use an x offset with the  top_left,  top_right,
124       right,  bottom_right, bottom_left, and left locations. center, top, and
125       bottom can't have x offsets as they're not  anchored  on  the  x  axis.
126       Likewise  y  offsets  can  only be applied to top_left, top, top_right,
127       bottom_right, bottom, and  bottom_left  locations.  center,  left,  and
128       right  can't have y offsets because they're not anchored to the y axis.
129       Since center can't have offsets on either as it's not anchored  to  any
130       axis any x or y offset applied while using center will override the lo‐
131       cation to top_left for backwards compatibility reasons  seeing  as  not
132       doing so would simply ignore the offsets anyway.
133
134

ORDER

136       There  are 2 order options currently, default and alphabetical. Default
137       means the entries are displayed in the order  they  are  added  by  the
138       mode,  for  all  built in modes this is cached items first, followed by
139       other entries in no specific order. Alphabetical means entries are  al‐
140       phabetical  sorted  period.  These orders only affect the order when no
141       search has been entered. Once a search is entered the order  is  re-ar‐
142       ranged  based  on the current matching preference and this order is ig‐
143       nored.
144
145

CACHING

147       Caching cannot be disabled  however  the  cache  file  can  be  set  to
148       /dev/null to effectively disable it.
149
150

WINDOW SWITCHER

152       Wofi  does  not  have  the ability to do window switching on its own as
153       there is no way to do this with wayland/wlroots  protocols  however  if
154       you're using sway you can use swaymsg with dmenu mode to accomplish it.
155       The following script can be used to do window switching:
156
157       swaymsg -t get_tree |
158         jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else  []
159       end  + .floating_nodes | .[] | select(.nodes==[]) | ((.id | tostring) +
160       " " + .name)' |
161         wofi --show dmenu | {
162           read -r id name
163           swaymsg "[con_id=$id]" focus
164       }
165
166

WIDGET LAYOUT

168       This section is for advanced CSS which  needs  more  control  than  the
169       built  in  wofi CSS names/classes allow for. This widget layout is sub‐
170       ject to change at any time and without warning so your CSS  might  very
171       well  break if you rely on this. Widgets have their corresponding names
172       next to them if they have one.
173
174       window - #window
175           box - #outer-box
176               entry - #input
177
178               scrolledwindow - #scroll
179                   viewport
180                       box
181                           flowbox - #inner-box
182                               flowboxchild - #entry
183
184                                   .entry - #unselected or #selected
185                                   This only exists if there's ONLY 1  action.
186                                   This  is a WofiPropertyBox which has no CSS
187                                   node and should probably not be  used,  the
188                                   name is dependent on whether or not the en‐
189                                   try is selected. See wofi(5)  on  #selected
190                                   and #unselected for info.
191
192                                       image
193                                       This  is  only  present  if an image is
194                                       present in the entry  and  might  occur
195                                       multiple  times  if multiple images are
196                                       present.
197
198                                       label
199                                       This is only present if text is present
200                                       in  the  entry and might occur multiple
201                                       times if there are  multiple  text  ob‐
202                                       jects in a single entry.
203
204                                   expander
205                                   This  and  its children only exist if there
206                                   are multiple actions on the entry
207
208                                       .entry - #unselected or #selected
209                                       The main action. This is a  WofiProper‐
210                                       tyBox  which has no CSS node and should
211                                       probably not be used, the name  is  de‐
212                                       pendent  on whether or not the entry is
213                                       selected. See wofi(5) on #selected  and
214                                       #unselected for info.
215
216                                           image
217                                           This is only present if an image is
218                                           present in the entry and might  oc‐
219                                           cur  multiple times if multiple im‐
220                                           ages are present.
221
222                                           label
223                                           This is only  present  if  text  is
224                                           present  in the entry and might oc‐
225                                           cur multiple  times  if  there  are
226                                           multiple  text  objects in a single
227                                           entry.
228
229                                       list
230                                       This contains all the secondary actions
231                                           row - #entry
232                                               .entry -  #unselected  or  #se‐
233                                               lected
234                                               This is a WofiPropertyBox which
235                                               has  no  CSS  node  and  should
236                                               probably  not be used, the name
237                                               is dependent on whether or  not
238                                               the   entry  is  selected.  See
239                                               wofi(5) on #selected and #unse‐
240                                               lected for info.
241
242                                                   image
243                                                   This  is only present if an
244                                                   image is present in the en‐
245                                                   try  and might occur multi‐
246                                                   ple times if  multiple  im‐
247                                                   ages are present.
248
249                                                   label
250                                                   This  is  only  present  if
251                                                   text is present in the  en‐
252                                                   try  and might occur multi‐
253                                                   ple times if there are mul‐
254                                                   tiple  text  objects  in  a
255                                                   single entry.
256                   scrollbar
257
258
259
260                                                                       wofi(7)
Impressum