1wofi(7) Miscellaneous Information Manual wofi(7)
2
3
4
6 wofi - Built in modes and other features
7
8
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
16 parse_action which would be placed in the config as
17 dmenu-parse_action=true.
18
19
21 Currently wofi has 3 built in modes
22
23 1. run - searches $PATH for executables and allows them to be run by
24 selecting them.
25
26 2. drun - searches $XDG_DATA_HOME/applications and
27 $XDG_DATA_DIRS/applications for desktop files and allows them to be
28 run by selecting them.
29
30 3. dmenu - reads from stdin and displays options which when selected
31 will be output to stdout.
32
33
34 In the event $XDG_DATA_HOME is not specified it defaults to
35 ~/.local/share. If $XDG_DATA_DIRS is not specified it defaults to
36 /usr/local/share:/usr/share.
37
38 Combi is not a mode however it does exist as a feature. You can use it
39 by doing --show mode1,mode2,mode3,etc. You can mix and match any number
40 of modes however each mode can only be loaded once so doing something
41 like --show run,drun,run is not supported although I'm not sure why
42 you'd do that in the first place.
43
44
46 parse_action=BOOL
47 If true the result returned by dmenu will be stripped of image
48 escape sequences and pango markup, default is false.
49
50 separator=CHAR
51 The character used to separate dmenu entries, default is \n.
52
53 print_line_num=BOOL
54 When an entry is selected the number of the line the entry was
55 on is printed instead of the entry itself. This disables caching
56 as it's fundamentally incompatible with it.
57
58
60 In run mode holding ctrl while running an entry will cause arguments to
61 be parsed even if always_parse_args=false. Holding shift will cause the
62 entry to be run in a terminal.
63
64
66 always_parse_args=BOOL
67 If true spaces will not be treated as part of the executable
68 name but rather as an argument separator equivalent to holding
69 control while pressing enter, default is false.
70
71 show_all=BOOL
72 If true shows all the entries in path, this will show entries
73 that have the same executable name, for example /bin/bash and
74 /usr/bin/bash will be shown separately as bash instead of having
75 one bash entry for the first one encountered, default is true.
76
77
79 print_command=BOOL
80 If true the command used to launch the desktop file will be
81 printed to stdout instead of invoking it, default is false.
82
83 display_generic=BOOL
84 If true then generic names will be displayed in () next to the
85 application name, default is false.
86
87
89 When images are enabled drun mode will pull icon themes however being a
90 GTK app it's possible you'll need to run gtk-update-icon-cache to get
91 them to apply.
92
93
95 There are 9 possible locations which can be specified either by name or
96 by number, the number scheme is the same as in rofi and the correspond‐
97 ing number is listed next to the names below, the default is center.
98
99 1. center 0
100
101 2. top_left 1
102
103 3. top 2
104
105 4. top_right 3
106
107 5. right 4
108
109 6. bottom_right 5
110
111 7. bottom 6
112
113 8. bottom_left 7
114
115 9. left 8
116
117
118 The x and y offsets are applied based on layer-shell anchors which
119 means an x offset can only be applied if wofi is anchored on the x
120 axis, i.e. you can only use an x offset with the top_left, top_right,
121 right, bottom_right, bottom_left, and left locations. center, top, and
122 bottom can't have x offsets as they're not anchored on the x axis.
123 Likewise y offsets can only be applied to top_left, top, top_right,
124 bottom_right, bottom, and bottom_left locations. center, left, and
125 right can't have y offsets because they're not anchored to the y axis.
126 Since center can't have offsets on either as it's not anchored to any
127 axis any x or y offset applied while using center will override the
128 location to top_left for backwards compatibility reasons seeing as not
129 doing so would simply ignore the offsets anyway.
130
131
133 There are 2 order options currently, default and alphabetical. Default
134 means the entries are displayed in the order they are added by the
135 mode, for all built in modes this is cached items first, followed by
136 other entries in no specific order. Alphabetical means entries are
137 alphabetical sorted period. These orders only affect the order when no
138 search has been entered. Once a search is entered the order is re-
139 arranged based on the current matching preference and this order is
140 ignored.
141
142
144 Caching cannot be disabled however the cache file can be set to
145 /dev/null to effectively disable it.
146
147
149 Wofi does not have the ability to do window switching on its own as
150 there is no way to do this with wayland/wlroots protocols however if
151 you're using sway you can use swaymsg with dmenu mode to accomplish it.
152 The following script can be used to do window switching:
153
154 swaymsg -t get_tree |
155 jq -r '.nodes[].nodes[] | if .nodes then [recurse(.nodes[])] else []
156 end + .floating_nodes | .[] | select(.nodes==[]) | ((.id | tostring) +
157 "" + .name)' |
158 wofi --show dmenu | {
159 read -r id name
160 swaymsg "[con_id=$id]" focus
161 }
162
163
165 This section is for advanced CSS which needs more control than the
166 built in wofi CSS names/classes allow for. This widget layout is sub‐
167 ject to change at any time and without warning so your CSS might very
168 well break if you rely on this. Widgets have their corresponding names
169 next to them if they have one.
170
171 window - #window
172 box - #outer-box
173 entry - #input
174
175 scrolledwindow - #scroll
176 viewport
177 box
178 flowbox - #inner-box
179 flowboxchild - #entry
180
181 .entry - #unselected or #selected
182 This only exists if there's ONLY 1 action.
183 This is a WofiPropertyBox which has no CSS
184 node and should probably not be used, the
185 name is dependent on whether or not the
186 entry is selected. See wofi(5) on #selected
187 and #unselected for info.
188
189 image
190 This is only present if an image is
191 present in the entry and might occur
192 multiple times if multiple images are
193 present.
194
195 label
196 This is only present if text is present
197 in the entry and might occur multiple
198 times if there are multiple text
199 objects in a single entry.
200
201 expander
202 This and its children only exist if there
203 are multiple actions on the entry
204
205 .entry - #unselected or #selected
206 The main action. This is a WofiProper‐
207 tyBox which has no CSS node and should
208 probably not be used, the name is
209 dependent on whether or not the entry
210 is selected. See wofi(5) on #selected
211 and #unselected for info.
212
213 image
214 This is only present if an image is
215 present in the entry and might
216 occur multiple times if multiple
217 images are present.
218
219 label
220 This is only present if text is
221 present in the entry and might
222 occur multiple times if there are
223 multiple text objects in a single
224 entry.
225
226 list
227 This contains all the secondary actions
228 row - #entry
229 .entry - #unselected or
230 #selected
231 This is a WofiPropertyBox which
232 has no CSS node and should
233 probably not be used, the name
234 is dependent on whether or not
235 the entry is selected. See
236 wofi(5) on #selected and #unse‐
237 lected for info.
238
239 image
240 This is only present if an
241 image is present in the
242 entry and might occur mul‐
243 tiple times if multiple
244 images are present.
245
246 label
247 This is only present if
248 text is present in the
249 entry and might occur mul‐
250 tiple times if there are
251 multiple text objects in a
252 single entry.
253 scrollbar
254
255
256
257 wofi(7)