init
[dotfiles.git] / .config / ncmpcpp / bindings
1 ##############################################################
2 ## This is the example bindings file. Copy it to            ##
3 ## ~/.ncmpcpp/bindings or $XDG_CONFIG_HOME/ncmpcpp/bindings ##
4 ## and set up your preferences                              ##
5 ##############################################################
6 ##
7 ##### General rules #####
8 ##
9 ## 1) Because each action has runtime checks whether it's
10 ##    ok to run it, a few actions can be bound to one key.
11 ##    Actions will be bound in order given in configuration
12 ##    file. When a key is pressed, first action in order
13 ##    will test itself whether it's possible to run it. If
14 ##    test succeeds, action is executed and other actions
15 ##    bound to this key are ignored. If it doesn't, next
16 ##    action in order tests itself etc.
17 ##
18 ## 2) It's possible to bind more that one action at once
19 ##    to a key. It can be done using the following syntax:
20 ##
21 ##    def_key "key"
22 ##      action1
23 ##      action2
24 ##      ...
25 ##
26 ##    This creates a chain of actions. When such chain is
27 ##    executed, each action in chain is run until the end of
28 ##    chain is reached or one of its actions fails to execute
29 ##    due to its requirements not being met. If multiple actions
30 ##    and/or chains are bound to the same key, they will be
31 ##    consecutively run until one of them gets fully executed.
32 ##
33 ## 3) When ncmpcpp starts, bindings configuration file is
34 ##    parsed and then ncmpcpp provides "missing pieces"
35 ##    of default keybindings. If you want to disable some
36 ##    bindings, there is a special action called 'dummy'
37 ##    for that purpose. Eg. if you want to disable ability
38 ##    to crop playlists, you need to put the following
39 ##    into configuration file:
40 ##
41 ##    def_key "C"
42 ##      dummy
43 ##
44 ##    After that ncmpcpp will not bind any default action
45 ##    to this key.
46 ##
47 ## 4) To let you write simple macros, the following special
48 ##    actions are provided:
49 ##
50 ##    - push_character "character" - pushes given special
51 ##      character into input queue, so it will be immediately
52 ##      picked by ncmpcpp upon next call to readKey function.
53 ##      Accepted values: mouse, up, down, page_up, page_down,
54 ##      home, end, space, enter, insert, delete, left, right,
55 ##      tab, ctrl-a, ctrl-b, ..., ctrl-z, ctrl-[, ctrl-\\,
56 ##      ctrl-], ctrl-^, ctrl-_, f1, f2, ..., f12, backspace.
57 ##      In addition, most of these names can be prefixed with
58 ##      alt-/ctrl-/shift- to be recognized with the appropriate
59 ##      modifier key(s).
60 ##
61 ##    - push_characters "string" - pushes given string into
62 ##      input queue.
63 ##
64 ##    - require_runnable "action" - checks whether given action
65 ##      is runnable and fails if it isn't. This is especially
66 ##      useful when mixed with previous two functions. Consider
67 ##      the following macro definition:
68 ##
69 ##      def_key "key"
70 ##        push_characters "custom_filter"
71 ##        apply_filter
72 ##
73 ##      If apply_filter can't be currently run, we end up with
74 ##      sequence of characters in input queue which will be
75 ##      treated just as we typed them. This may lead to unexpected
76 ##      results (in this case 'c' will most likely clear current
77 ##      playlist, 'u' will trigger database update, 's' will stop
78 ##      playback etc.). To prevent such thing from happening, we
79 ##      need to change above definition to this one:
80 ##
81 ##      def_key "key"
82 ##        require_runnable "apply_filter"
83 ##        push_characters "custom_filter"
84 ##        apply_filter
85 ##
86 ##      Here, first we test whether apply_filter can be actually run
87 ##      before we stuff characters into input queue, so if condition
88 ##      is not met, whole chain is aborted and we're fine.
89 ##
90 ##    - require_screen "screen" - checks whether given screen is
91 ##      currently active. accepted values: browser, clock, help,
92 ##      media_library, outputs, playlist, playlist_editor,
93 ##      search_engine, tag_editor, visualizer, last_fm, lyrics,
94 ##      selected_items_adder, server_info, song_info,
95 ##      sort_playlist_dialog, tiny_tag_editor.
96 ##
97 ##    - run_external_command "command" - runs given command using
98 ##      system() function.
99 ##
100 ## 5) In addition to binding to a key, you can also bind actions
101 ##    or chains of actions to a command. If it comes to commands,
102 ##    syntax is very similar to defining keys. Here goes example
103 ##    definition of a command:
104 ##
105 ##      def_command "quit" [deferred]
106 ##        stop
107 ##        quit
108 ##
109 ##    If you execute the above command (which can be done by
110 ##    invoking action execute_command, typing 'quit' and pressing
111 ##    enter), ncmpcpp will stop the player and then quit. Note the
112 ##    presence of word 'deferred' enclosed in square brackets. It
113 ##    tells ncmpcpp to wait for confirmation (ie. pressing enter)
114 ##    after you typed quit. Instead of 'deferred', 'immediate'
115 ##    could be used. Then ncmpcpp will not wait for confirmation
116 ##    (enter) and will execute the command the moment it sees it.
117 ##
118 ##    Note: while command chains are executed, internal environment
119 ##    update (which includes current window refresh and mpd status
120 ##    update) is not performed for performance reasons. However, it
121 ##    may be desirable to do so in some situration. Therefore it's
122 ##    possible to invoke by hand by performing 'update enviroment'
123 ##    action.
124 ##
125 ## Note: There is a difference between:
126 ##
127 ##         def_key "key"
128 ##           action1
129 ##
130 ##         def_key "key"
131 ##           action2
132 ##
133 ##       and
134 ##
135 ##         def_key "key"
136 ##           action1
137 ##           action2
138 ##
139 ##      First one binds two single actions to the same key whilst
140 ##      second one defines a chain of actions. The behavior of
141 ##      these two is different and is described in (1) and (2).
142 ##
143 ## Note: Function def_key accepts non-ascii characters.
144 ##
145 ##### List of unbound actions #####
146 ##
147 ## The following actions are not bound to any key/command:
148 ##
149 ##  - set_volume
150 ##
151
152
153 #def_key "mouse"
154 #  mouse_event
155 #
156 def_key "k"
157   scroll_up
158 #
159 #def_key "shift-up"
160 #  select_item
161 #  scroll_up
162 #
163 def_key "j"
164   scroll_down
165 #
166 #def_key "shift-down"
167 #  select_item
168 #  scroll_down
169 #
170 #def_key "["
171 #  scroll_up_album
172 #
173 #def_key "]"
174 #  scroll_down_album
175 #
176 #def_key "{"
177 #  scroll_up_artist
178 #
179 #def_key "}"
180 #  scroll_down_artist
181 #
182 def_key "ctrl-u"
183   page_up
184 #
185 def_key "ctrl-d"
186   page_down
187 #
188 #def_key "home"
189 #  move_home
190 #
191 #def_key "end"
192 #  move_end
193 #
194 #def_key "insert"
195 #  select_item
196 #
197 #def_key "enter"
198 #  enter_directory
199 #
200 #def_key "enter"
201 #  toggle_output
202 #
203 #def_key "enter"
204 #  run_action
205 #
206 #def_key "enter"
207 #  play_item
208 #
209 #def_key "space"
210 #  add_item_to_playlist
211 #
212 #def_key "space"
213 #  toggle_lyrics_update_on_song_change
214 #
215 #def_key "space"
216 #  toggle_visualization_type
217 #
218 def_key "d"
219   delete_playlist_items
220
221 def_key "d"
222   delete_browser_items
223
224 def_key "d"
225   delete_stored_playlist
226
227 def_key "l"
228   next_column
229 #
230 #def_key "right"
231 #  slave_screen
232 #
233 #def_key "right"
234 #  volume_up
235 #
236 #def_key "+"
237 #  volume_up
238 #
239 def_key "h"
240   previous_column
241 #
242 #def_key "left"
243 #  master_screen
244 #
245 #def_key "left"
246 #  volume_down
247 #
248 #def_key "-"
249 #  volume_down
250 #
251 #def_key ":"
252 #  execute_command
253 #
254 #def_key "tab"
255 #  next_screen
256 #
257 #def_key "shift-tab"
258 #  previous_screen
259 #
260 #def_key "f1"
261 #  show_help
262 #
263 #def_key "1"
264 #  show_playlist
265 #
266 #def_key "2"
267 #  show_browser
268 #
269 #def_key "2"
270 #  change_browse_mode
271 #
272 #def_key "3"
273 #  show_search_engine
274 #
275 #def_key "3"
276 #  reset_search_engine
277 #
278 #def_key "4"
279 #  show_media_library
280 #
281 #def_key "4"
282 #  toggle_media_library_columns_mode
283 #
284 #def_key "5"
285 #  show_playlist_editor
286 #
287 #def_key "6"
288 #  show_tag_editor
289 #
290 #def_key "7"
291 #  show_outputs
292 #
293 #def_key "8"
294 #  show_visualizer
295 #
296 #def_key "="
297 #  show_clock
298 #
299 #def_key "@"
300 #  show_server_info
301 #
302 #def_key "s"
303 #  stop
304 #
305 #def_key "p"
306 #  pause
307 #
308 #def_key ">"
309 #  next
310 #
311 #def_key "<"
312 #  previous
313 #
314 #def_key "ctrl-h"
315 #  jump_to_parent_directory
316 #
317 #def_key "ctrl-h"
318 #  replay_song
319 #
320 #def_key "backspace"
321 #  jump_to_parent_directory
322 #
323 #def_key "backspace"
324 #  replay_song
325 #
326 #def_key "f"
327 #  seek_forward
328 #
329 #def_key "b"
330 #  seek_backward
331 #
332 #def_key "r"
333 #  toggle_repeat
334 #
335 #def_key "z"
336 #  toggle_random
337 #
338 #def_key "y"
339 #  save_tag_changes
340 #
341 #def_key "y"
342 #  start_searching
343 #
344 #def_key "y"
345 #  toggle_single
346 #
347 #def_key "R"
348 #  toggle_consume
349 #
350 #def_key "Y"
351 #  toggle_replay_gain_mode
352 #
353 #def_key "T"
354 #  toggle_add_mode
355 #
356 #def_key "|"
357 #  toggle_mouse
358 #
359 #def_key "#"
360 #  toggle_bitrate_visibility
361 #
362 #def_key "Z"
363 #  shuffle
364 #
365 #def_key "x"
366 #  toggle_crossfade
367 #
368 #def_key "X"
369 #  set_crossfade
370 #
371 #def_key "u"
372 #  update_database
373 #
374 #def_key "ctrl-s"
375 #  sort_playlist
376 #
377 #def_key "ctrl-s"
378 #  toggle_browser_sort_mode
379 #
380 #def_key "ctrl-s"
381 #  toggle_media_library_sort_mode
382 #
383 #def_key "ctrl-r"
384 #  reverse_playlist
385 #
386 #def_key "ctrl-f"
387 #  apply_filter
388 #
389 #def_key "ctrl-_"
390 #  select_found_items
391 #
392 #def_key "/"
393 #  find
394 #
395 #def_key "/"
396 #  find_item_forward
397 #
398 #def_key "?"
399 #  find
400 #
401 #def_key "?"
402 #  find_item_backward
403 #
404 #def_key "."
405 #  next_found_item
406 #
407 #def_key ","
408 #  previous_found_item
409 #
410 #def_key "w"
411 #  toggle_find_mode
412 #
413 #def_key "e"
414 #  edit_song
415 #
416 #def_key "e"
417 #  edit_library_tag
418 #
419 #def_key "e"
420 #  edit_library_album
421 #
422 #def_key "e"
423 #  edit_directory_name
424 #
425 #def_key "e"
426 #  edit_playlist_name
427 #
428 #def_key "e"
429 #  edit_lyrics
430 #
431 #def_key "i"
432 #  show_song_info
433 #
434 #def_key "I"
435 #  show_artist_info
436 #
437 #def_key "g"
438 #  jump_to_position_in_song
439 #
440 #def_key "l"
441 #  show_lyrics
442 #
443 #def_key "ctrl-v"
444 #  select_range
445 #
446 #def_key "v"
447 #  reverse_selection
448 #
449 #def_key "V"
450 #  remove_selection
451 #
452 #def_key "B"
453 #  select_album
454 #
455 #def_key "a"
456 #  add_selected_items
457 #
458 #def_key "c"
459 #  clear_playlist
460 #
461 #def_key "c"
462 #  clear_main_playlist
463 #
464 #def_key "C"
465 #  crop_playlist
466 #
467 #def_key "C"
468 #  crop_main_playlist
469 #
470 #def_key "m"
471 #  move_sort_order_up
472 #
473 #def_key "m"
474 #  move_selected_items_up
475 #
476 #def_key "n"
477 #  move_sort_order_down
478 #
479 #def_key "n"
480 #  move_selected_items_down
481 #
482 #def_key "M"
483 #  move_selected_items_to
484 #
485 #def_key "A"
486 #  add
487 #
488 #def_key "S"
489 #  save_playlist
490 #
491 #def_key "o"
492 #  jump_to_playing_song
493 #
494 #def_key "G"
495 #  jump_to_browser
496 #
497 #def_key "G"
498 #  jump_to_playlist_editor
499 #
500 #def_key "~"
501 #  jump_to_media_library
502 #
503 #def_key "E"
504 #  jump_to_tag_editor
505 #
506 #def_key "U"
507 #  toggle_playing_song_centering
508 #
509 #def_key "P"
510 #  toggle_display_mode
511 #
512 #def_key "\\"
513 #  toggle_interface
514 #
515 #def_key "!"
516 #  toggle_separators_between_albums
517 #
518 #def_key "L"
519 #  toggle_lyrics_fetcher
520 #
521 #def_key "F"
522 #  fetch_lyrics_in_background
523 #
524 #def_key "alt-l"
525 #  toggle_fetching_lyrics_in_background
526 #
527 #def_key "ctrl-l"
528 #  toggle_screen_lock
529 #
530 #def_key "`"
531 #  toggle_library_tag_type
532 #
533 #def_key "`"
534 #  refetch_lyrics
535 #
536 #def_key "`"
537 #  add_random_items
538 #
539 #def_key "ctrl-p"
540 #  set_selected_items_priority
541 #
542 #def_key "q"
543 #  quit
544 #