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.8KB

  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. #
  148. #def_key "mouse"
  149. # mouse_event
  150. #
  151. def_key "d"
  152. scroll_up
  153. #
  154. def_key "s"
  155. scroll_down
  156. #
  157. #def_key "["
  158. # scroll_up_album
  159. #
  160. #def_key "]"
  161. # scroll_down_album
  162. #
  163. #def_key "{"
  164. # scroll_up_artist
  165. #
  166. #def_key "}"
  167. # scroll_down_artist
  168. #
  169. def_key "D"
  170. page_up
  171. #
  172. def_key "S"
  173. page_down
  174. #
  175. #def_key "home"
  176. # move_home
  177. #
  178. #def_key "end"
  179. # move_end
  180. #
  181. #def_key "space"
  182. # press_space
  183. #
  184. #def_key "enter"
  185. # press_enter
  186. #
  187. #def_key "delete"
  188. # delete_playlist_items
  189. #
  190. #def_key "delete"
  191. # delete_browser_items
  192. #
  193. #def_key "delete"
  194. # delete_stored_playlist
  195. #
  196. def_key "r"
  197. next_column
  198. #
  199. #def_key "right"
  200. # slave_screen
  201. #
  202. #def_key "right"
  203. # volume_up
  204. #
  205. #def_key "+"
  206. # volume_up
  207. #
  208. def_key "t"
  209. previous_column
  210. #
  211. #def_key "left"
  212. # master_screen
  213. #
  214. #def_key "left"
  215. # volume_down
  216. #
  217. #def_key "-"
  218. # volume_down
  219. #
  220. #def_key ":"
  221. # execute_command
  222. #
  223. #def_key "tab"
  224. # next_screen
  225. #
  226. #def_key "shift_tab"
  227. # previous_screen
  228. #
  229. #def_key "f1"
  230. # show_help
  231. #
  232. #def_key "1"
  233. # show_playlist
  234. #
  235. #def_key "2"
  236. # show_browser
  237. #
  238. #def_key "2"
  239. # change_browse_mode
  240. #
  241. #def_key "3"
  242. # show_search_engine
  243. #
  244. #def_key "3"
  245. # reset_search_engine
  246. #
  247. #def_key "4"
  248. # show_media_library
  249. #
  250. #def_key "4"
  251. # toggle_media_library_columns_mode
  252. #
  253. #def_key "5"
  254. # show_playlist_editor
  255. #
  256. #def_key "6"
  257. # show_tag_editor
  258. #
  259. #def_key "7"
  260. # show_outputs
  261. #
  262. #def_key "8"
  263. # show_visualizer
  264. #
  265. #def_key "="
  266. # show_clock
  267. #
  268. #def_key "@"
  269. # show_server_info
  270. #
  271. #def_key "s"
  272. # stop
  273. #
  274. #def_key "p"
  275. # pause
  276. #
  277. #def_key ">"
  278. # next
  279. #
  280. #def_key "<"
  281. # previous
  282. #
  283. #def_key "ctrl_h"
  284. # jump_to_parent_directory
  285. #
  286. #def_key "ctrl_h"
  287. # replay_song
  288. #
  289. #def_key "backspace"
  290. # jump_to_parent_directory
  291. #
  292. #def_key "backspace"
  293. # replay_song
  294. #
  295. #def_key "backspace_2"
  296. # jump_to_parent_directory
  297. #
  298. #def_key "backspace_2"
  299. # replay_song
  300. #
  301. def_key "l"
  302. seek_forward
  303. #
  304. def_key "v"
  305. seek_backward
  306. #
  307. #def_key "r"
  308. # toggle_repeat
  309. #
  310. #def_key "z"
  311. # toggle_random
  312. #
  313. #def_key "y"
  314. # save_tag_changes
  315. #
  316. #def_key "y"
  317. # start_searching
  318. #
  319. #def_key "y"
  320. # toggle_single
  321. #
  322. #def_key "R"
  323. # toggle_consume
  324. #
  325. #def_key "Y"
  326. # toggle_replay_gain_mode
  327. #
  328. #def_key "t"
  329. # toggle_space_mode
  330. #
  331. #def_key "T"
  332. # toggle_add_mode
  333. #
  334. #def_key "|"
  335. # toggle_mouse
  336. #
  337. #def_key "#"
  338. # toggle_bitrate_visibility
  339. #
  340. #def_key "Z"
  341. # shuffle
  342. #
  343. #def_key "x"
  344. # toggle_crossfade
  345. #
  346. #def_key "X"
  347. # set_crossfade
  348. #
  349. #def_key "u"
  350. # update_database
  351. #
  352. #def_key "ctrl_v"
  353. # sort_playlist
  354. #
  355. #def_key "ctrl_r"
  356. # reverse_playlist
  357. #
  358. #def_key "ctrl_f"
  359. # apply_filter
  360. #
  361. #def_key "/"
  362. # find
  363. #
  364. #def_key "/"
  365. # find_item_forward
  366. #
  367. #def_key "?"
  368. # find
  369. #
  370. #def_key "?"
  371. # find_item_backward
  372. #
  373. #def_key "."
  374. # next_found_item
  375. #
  376. #def_key ","
  377. # previous_found_item
  378. #
  379. #def_key "w"
  380. # toggle_find_mode
  381. #
  382. #def_key "e"
  383. # edit_song
  384. #
  385. #def_key "e"
  386. # edit_library_tag
  387. #
  388. #def_key "e"
  389. # edit_library_album
  390. #
  391. #def_key "e"
  392. # edit_directory_name
  393. #
  394. #def_key "e"
  395. # edit_playlist_name
  396. #
  397. #def_key "e"
  398. # edit_lyrics
  399. #
  400. #def_key "i"
  401. # show_song_info
  402. #
  403. #def_key "I"
  404. # show_artist_info
  405. #
  406. #def_key "g"
  407. # jump_to_position_in_song
  408. #
  409. def_key "L"
  410. show_lyrics
  411. #
  412. #def_key "v"
  413. # reverse_selection
  414. #
  415. #def_key "V"
  416. # remove_selection
  417. #
  418. #def_key "B"
  419. # select_album
  420. #
  421. #def_key "a"
  422. # add_selected_items
  423. #
  424. #def_key "c"
  425. # clear_playlist
  426. #
  427. #def_key "c"
  428. # clear_main_playlist
  429. #
  430. #def_key "C"
  431. # crop_playlist
  432. #
  433. #def_key "C"
  434. # crop_main_playlist
  435. #
  436. #def_key "m"
  437. # move_sort_order_up
  438. #
  439. #def_key "m"
  440. # move_selected_items_up
  441. #
  442. #def_key "m"
  443. # toggle_media_library_sort_mode
  444. #
  445. #def_key "m"
  446. # set_visualizer_sample_multiplier
  447. #
  448. #def_key "n"
  449. # move_sort_order_down
  450. #
  451. #def_key "n"
  452. # move_selected_items_down
  453. #
  454. #def_key "M"
  455. # move_selected_items_to
  456. #
  457. #def_key "A"
  458. # add
  459. #
  460. #def_key "S"
  461. # save_playlist
  462. #
  463. #def_key "o"
  464. # jump_to_playing_song
  465. #
  466. #def_key "G"
  467. # jump_to_browser
  468. #
  469. #def_key "G"
  470. # jump_to_playlist_editor
  471. #
  472. #def_key "~"
  473. # jump_to_media_library
  474. #
  475. #def_key "E"
  476. # jump_to_tag_editor
  477. #
  478. #def_key "U"
  479. # toggle_playing_song_centering
  480. #
  481. #def_key "P"
  482. # toggle_display_mode
  483. #
  484. #def_key "\\"
  485. # toggle_interface
  486. #
  487. #def_key "!"
  488. # toggle_separators_between_albums
  489. #
  490. #def_key "L"
  491. # toggle_lyrics_fetcher
  492. #
  493. #def_key "F"
  494. # toggle_fetching_lyrics_in_background
  495. #
  496. #def_key "ctrl_l"
  497. # toggle_screen_lock
  498. #
  499. #def_key "`"
  500. # toggle_browser_sort_mode
  501. #
  502. #def_key "`"
  503. # toggle_library_tag_type
  504. #
  505. #def_key "`"
  506. # refetch_lyrics
  507. #
  508. #def_key "`"
  509. # add_random_items
  510. #
  511. #def_key "ctrl_p"
  512. # set_selected_items_priority
  513. #
  514. #def_key "q"
  515. # quit
  516. #