You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

517 lines
9.6KB

  1. ##########################################################
  2. ## this is example bindings configuration file, copy it ##
  3. ## to ~/.ncmpcpp/bindings and set up your preferences ##
  4. ##########################################################
  5. ##
  6. ##### General rules #####
  7. ##
  8. ## 1) Because each action has runtime checks whether it's
  9. ## ok to run it, a few actions can be bound to one key.
  10. ## Actions will be bound in order given in configuration
  11. ## file. When a key is pressed, first action in order
  12. ## will test itself whether it's possible to run it. If
  13. ## test succeeds, action is executed and other actions
  14. ## bound to this key are ignored. If it doesn't, next
  15. ## action in order tests itself etc.
  16. ##
  17. ## 2) It's possible to bind more that one action at once
  18. ## to a key. It can be done using the following syntax:
  19. ##
  20. ## def_key "key"
  21. ## action1
  22. ## action2
  23. ## ...
  24. ##
  25. ## This creates a chain of actions. When such chain is
  26. ## executed, each action in chain is run until the end of
  27. ## chain is reached or one of its actions fails to execute
  28. ## due to its requirements not being met. If multiple actions
  29. ## and/or chains are bound to the same key, they will be
  30. ## consecutively run until one of them gets fully executed.
  31. ##
  32. ## 3) When ncmpcpp starts, bindings configuration file is
  33. ## parsed and then ncmpcpp provides "missing pieces"
  34. ## of default keybindings. If you want to disable some
  35. ## bindings, there is a special action called 'dummy'
  36. ## for that purpose. Eg. if you want to disable ability
  37. ## to crop playlists, you need to put the following
  38. ## into configuration file:
  39. ##
  40. ## def_key "C"
  41. ## dummy
  42. ##
  43. ## After that ncmpcpp will not bind any default action
  44. ## to this key.
  45. ##
  46. ## 4) To let you write simple macros, the following special
  47. ## actions are provided:
  48. ##
  49. ## - push_character "character" - pushes given special
  50. ## character into input queue, so it will be immediately
  51. ## picked by ncmpcpp upon next call to readKey function.
  52. ## Accepted values: mouse, up, down, page_up, page_down,
  53. ## home, end, space, enter, insert, delete, left, right,
  54. ## tab, shift_tab, ctrl_a, ctrl_b, ..., ctrl_z, f1, f2,
  55. ## ..., f12, backspace, backspace_2.
  56. ##
  57. ## - push_characters "string" - pushes given string into
  58. ## input queue.
  59. ##
  60. ## - require_runnable "action" - checks whether given action
  61. ## is runnable and fails if it isn't. This is especially
  62. ## useful when mixed with previous two functions. Consider
  63. ## the following macro definition:
  64. ##
  65. ## def_key "key"
  66. ## push_characters "custom_filter"
  67. ## apply_filter
  68. ##
  69. ## If apply_filter can't be currently run, we end up with
  70. ## sequence of characters in input queue which will be
  71. ## treated just as we typed them. This may lead to unexpected
  72. ## results (in this case 'c' will most likely clear current
  73. ## playlist, 'u' will trigger database update, 's' will stop
  74. ## playback etc.). To prevent such thing from happening, we
  75. ## need to change above definition to this one:
  76. ##
  77. ## def_key "key"
  78. ## require_runnable "apply_filter"
  79. ## push_characters "custom_filter"
  80. ## apply_filter
  81. ##
  82. ## Here, first we test whether apply_filter can be actually run
  83. ## before we stuff characters into input queue, so if condition
  84. ## is not met, whole chain is aborted and we're fine.
  85. ##
  86. ## - require_screen "screen" - checks whether given screen is
  87. ## currently active. accepted values: browser, clock, help,
  88. ## media_library, outputs, playlist, playlist_editor,
  89. ## search_engine, tag_editor, visualizer, last_fm, lyrics,
  90. ## selected_items_adder, server_info, song_info,
  91. ## sort_playlist_dialog, tiny_tag_editor.
  92. ##
  93. ## - run_external_command "command" - runs given command using
  94. ## system() function.
  95. ##
  96. ## 5) In addition to binding to a key, you can also bind actions
  97. ## or chains of actions to a command. If it comes to commands,
  98. ## syntax is very similar to defining keys. Here goes example
  99. ## definition of a command:
  100. ##
  101. ## def_command "quit" [deferred]
  102. ## stop
  103. ## quit
  104. ##
  105. ## If you execute the above command (which can be done by
  106. ## invoking action execute_command, typing 'quit' and pressing
  107. ## enter), ncmpcpp will stop the player and then quit. Note the
  108. ## presence of word 'deferred' enclosed in square brackets. It
  109. ## tells ncmpcpp to wait for confirmation (ie. pressing enter)
  110. ## after you typed quit. Instead of 'deferred', 'immediate'
  111. ## could be used. Then ncmpcpp will not wait for confirmation
  112. ## (enter) and will execute the command the moment it sees it.
  113. ##
  114. ## Note: Both 'backspace' and 'backspace_2' are used because some
  115. ## terminals interpret backspace using keycode of 'backspace'
  116. ## and some the one of 'backspace_2'. You can get away with
  117. ## binding once if all your terminal emulators use the same
  118. ## value.
  119. ##
  120. ## Note: There is a difference between:
  121. ##
  122. ## def_key "key"
  123. ## action1
  124. ##
  125. ## def_key "key"
  126. ## action2
  127. ##
  128. ## and
  129. ##
  130. ## def_key "key"
  131. ## action1
  132. ## action2
  133. ##
  134. ## First one binds two single actions to the same key whilst
  135. ## second one defines a chain of actions. The behavior of
  136. ## these two is different and is described in (1) and (2).
  137. ##
  138. ## Note: Function def_key accepts non-ascii characters.
  139. ##
  140. ##### List of unbound actions #####
  141. ##
  142. ## The following actions are not bound to any key/command:
  143. ##
  144. ## - set_volume
  145. ## - filter_playlist_on_priorities
  146. ##
  147. #def_key "mouse"
  148. # mouse_event
  149. def_key "d"
  150. scroll_up
  151. def_key "s"
  152. scroll_down
  153. #def_key "["
  154. # scroll_up_album
  155. #def_key "]"
  156. # scroll_down_album
  157. #def_key "{"
  158. # scroll_up_artist
  159. #def_key "}"
  160. # scroll_down_artist
  161. def_key "D"
  162. page_up
  163. def_key "S"
  164. page_down
  165. def_key "g"
  166. move_home
  167. def_key "G"
  168. move_end
  169. #def_key "space"
  170. # press_space
  171. #def_key "enter"
  172. # press_enter
  173. #def_key "delete"
  174. # delete_playlist_items
  175. def_key "x"
  176. delete_browser_items
  177. #def_key "delete"
  178. # delete_stored_playlist
  179. def_key "r"
  180. next_column
  181. #def_key "right"
  182. # slave_screen
  183. #def_key "right"
  184. # volume_up
  185. #def_key "+"
  186. # volume_up
  187. def_key "t"
  188. previous_column
  189. #def_key "left"
  190. # master_screen
  191. #def_key "left"
  192. # volume_down
  193. #def_key "-"
  194. # volume_down
  195. #def_key ":"
  196. # execute_command
  197. #def_key "tab"
  198. # next_screen
  199. #def_key "shift_tab"
  200. # previous_screen
  201. #def_key "f1"
  202. # show_help
  203. #def_key "1"
  204. # show_playlist
  205. #def_key "2"
  206. # show_browser
  207. #def_key "2"
  208. # change_browse_mode
  209. #def_key "3"
  210. # show_search_engine
  211. #def_key "3"
  212. # reset_search_engine
  213. #def_key "4"
  214. # show_media_library
  215. #def_key "4"
  216. # toggle_media_library_columns_mode
  217. #def_key "5"
  218. # show_playlist_editor
  219. #def_key "6"
  220. # show_tag_editor
  221. #def_key "7"
  222. # show_outputs
  223. #def_key "8"
  224. # show_visualizer
  225. #def_key "="
  226. # show_clock
  227. #def_key "@"
  228. # show_server_info
  229. #def_key "s"
  230. # stop
  231. #def_key "p"
  232. # pause
  233. #def_key ">"
  234. # next
  235. #def_key "<"
  236. # previous
  237. #def_key "ctrl_h"
  238. # jump_to_parent_directory
  239. #def_key "ctrl_h"
  240. # replay_song
  241. #def_key "backspace"
  242. # jump_to_parent_directory
  243. #def_key "backspace"
  244. # replay_song
  245. #def_key "backspace_2"
  246. # jump_to_parent_directory
  247. #def_key "backspace_2"
  248. # replay_song
  249. def_key "l"
  250. seek_forward
  251. def_key "v"
  252. seek_backward
  253. #def_key "r"
  254. # toggle_repeat
  255. #def_key "z"
  256. # toggle_random
  257. #def_key "y"
  258. # save_tag_changes
  259. #def_key "y"
  260. # start_searching
  261. #def_key "y"
  262. # toggle_single
  263. def_key "C"
  264. toggle_consume
  265. #def_key "Y"
  266. # toggle_replay_gain_mode
  267. #def_key "t"
  268. # toggle_space_mode
  269. #def_key "T"
  270. # toggle_add_mode
  271. #def_key "|"
  272. # toggle_mouse
  273. #def_key "#"
  274. # toggle_bitrate_visibility
  275. #def_key "Z"
  276. # shuffle
  277. def_key "X"
  278. toggle_crossfade
  279. #def_key "X"
  280. # set_crossfade
  281. #def_key "u"
  282. # update_database
  283. #def_key "ctrl_v"
  284. # sort_playlist
  285. #def_key "ctrl_r"
  286. # reverse_playlist
  287. #def_key "ctrl_f"
  288. # apply_filter
  289. #def_key "/"
  290. # find
  291. #def_key "/"
  292. # find_item_forward
  293. #def_key "?"
  294. # find
  295. #def_key "?"
  296. # find_item_backward
  297. def_key "n"
  298. next_found_item
  299. def_key "N"
  300. previous_found_item
  301. #def_key "w"
  302. # toggle_find_mode
  303. #def_key "e"
  304. # edit_song
  305. #def_key "e"
  306. # edit_library_tag
  307. #def_key "e"
  308. # edit_library_album
  309. #def_key "e"
  310. # edit_directory_name
  311. #def_key "e"
  312. # edit_playlist_name
  313. #def_key "e"
  314. # edit_lyrics
  315. #def_key "i"
  316. # show_song_info
  317. #def_key "I"
  318. # show_artist_info
  319. #def_key "g"
  320. # jump_to_position_in_song
  321. def_key "L"
  322. show_lyrics
  323. #def_key "v"
  324. # reverse_selection
  325. #def_key "V"
  326. # remove_selection
  327. #def_key "B"
  328. # select_album
  329. #def_key "a"
  330. # add_selected_items
  331. #def_key "c"
  332. # clear_playlist
  333. #def_key "c"
  334. # clear_main_playlist
  335. #def_key "C"
  336. # crop_playlist
  337. #def_key "C"
  338. # crop_main_playlist
  339. #def_key "m"
  340. # move_sort_order_up
  341. def_key "M"
  342. move_selected_items_up
  343. #def_key "m"
  344. # toggle_media_library_sort_mode
  345. #def_key "m"
  346. # set_visualizer_sample_multiplier
  347. #def_key "n"
  348. # move_sort_order_down
  349. def_key "m"
  350. move_selected_items_down
  351. #def_key "M"
  352. # move_selected_items_to
  353. #def_key "A"
  354. # add
  355. #def_key "S"
  356. # save_playlist
  357. #def_key "o"
  358. # jump_to_playing_song
  359. #def_key "G"
  360. # jump_to_browser
  361. #def_key "G"
  362. # jump_to_playlist_editor
  363. #def_key "~"
  364. # jump_to_media_library
  365. #def_key "E"
  366. # jump_to_tag_editor
  367. #def_key "U"
  368. # toggle_playing_song_centering
  369. #def_key "P"
  370. # toggle_display_mode
  371. #def_key "\\"
  372. # toggle_interface
  373. #def_key "!"
  374. # toggle_separators_between_albums
  375. #def_key "L"
  376. # toggle_lyrics_fetcher
  377. #def_key "F"
  378. # toggle_fetching_lyrics_in_background
  379. #def_key "ctrl_l"
  380. # toggle_screen_lock
  381. #def_key "`"
  382. # toggle_browser_sort_mode
  383. #def_key "`"
  384. # toggle_library_tag_type
  385. #def_key "`"
  386. # refetch_lyrics
  387. #def_key "`"
  388. # add_random_items
  389. #def_key "ctrl_p"
  390. # set_selected_items_priority
  391. #def_key "q"
  392. # quit