dotfiles

beau's configuration files
git clone https://git.beauhilton.com/dotfiles.git
Log | Files | Refs | README

bindings (11893B)


      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 #def_key "mouse"
    153 #  mouse_event
    154 #
    155 #def_key "up"
    156 #  scroll_up
    157 #
    158 #def_key "shift-up"
    159 #  select_item
    160 #  scroll_up
    161 #
    162 #def_key "down"
    163 #  scroll_down
    164 #
    165 #def_key "shift-down"
    166 #  select_item
    167 #  scroll_down
    168 #
    169 #def_key "["
    170 #  scroll_up_album
    171 #
    172 #def_key "]"
    173 #  scroll_down_album
    174 #
    175 #def_key "{"
    176 #  scroll_up_artist
    177 #
    178 #def_key "}"
    179 #  scroll_down_artist
    180 #
    181 #def_key "page_up"
    182 #  page_up
    183 #
    184 #def_key "page_down"
    185 #  page_down
    186 #
    187 #def_key "home"
    188 #  move_home
    189 #
    190 #def_key "end"
    191 #  move_end
    192 #
    193 #def_key "insert"
    194 #  select_item
    195 #
    196 #def_key "enter"
    197 #  enter_directory
    198 #
    199 #def_key "enter"
    200 #  toggle_output
    201 #
    202 #def_key "enter"
    203 #  run_action
    204 #
    205 #def_key "enter"
    206 #  play_item
    207 #
    208 #def_key "space"
    209 #  add_item_to_playlist
    210 #
    211 #def_key "space"
    212 #  toggle_lyrics_update_on_song_change
    213 #
    214 #def_key "space"
    215 #  toggle_visualization_type
    216 #
    217 #def_key "delete"
    218 #  delete_playlist_items
    219 #
    220 #def_key "delete"
    221 #  delete_browser_items
    222 #
    223 #def_key "delete"
    224 #  delete_stored_playlist
    225 #
    226 #def_key "right"
    227 #  next_column
    228 #
    229 #def_key "right"
    230 #  slave_screen
    231 #
    232 #def_key "right"
    233 #  volume_up
    234 #
    235 #def_key "+"
    236 #  volume_up
    237 #
    238 #def_key "left"
    239 #  previous_column
    240 #
    241 #def_key "left"
    242 #  master_screen
    243 #
    244 #def_key "left"
    245 #  volume_down
    246 #
    247 #def_key "-"
    248 #  volume_down
    249 #
    250 #def_key ":"
    251 #  execute_command
    252 #
    253 #def_key "tab"
    254 #  next_screen
    255 #
    256 #def_key "shift-tab"
    257 #  previous_screen
    258 #
    259 #def_key "f1"
    260 #  show_help
    261 #
    262 #def_key "1"
    263 #  show_playlist
    264 #
    265 #def_key "2"
    266 #  show_browser
    267 #
    268 #def_key "2"
    269 #  change_browse_mode
    270 #
    271 #def_key "3"
    272 #  show_search_engine
    273 #
    274 #def_key "3"
    275 #  reset_search_engine
    276 #
    277 #def_key "4"
    278 #  show_media_library
    279 #
    280 #def_key "4"
    281 #  toggle_media_library_columns_mode
    282 #
    283 #def_key "5"
    284 #  show_playlist_editor
    285 #
    286 #def_key "6"
    287 #  show_tag_editor
    288 #
    289 #def_key "7"
    290 #  show_outputs
    291 #
    292 #def_key "8"
    293 #  show_visualizer
    294 #
    295 #def_key "="
    296 #  show_clock
    297 #
    298 #def_key "@"
    299 #  show_server_info
    300 #
    301 #def_key "s"
    302 #  stop
    303 #
    304 #def_key "p"
    305 #  pause
    306 #
    307 #def_key ">"
    308 #  next
    309 #
    310 #def_key "<"
    311 #  previous
    312 #
    313 #def_key "ctrl-h"
    314 #  jump_to_parent_directory
    315 #
    316 #def_key "ctrl-h"
    317 #  replay_song
    318 #
    319 #def_key "backspace"
    320 #  jump_to_parent_directory
    321 #
    322 #def_key "backspace"
    323 #  replay_song
    324 #
    325 #def_key "f"
    326 #  seek_forward
    327 #
    328 #def_key "b"
    329 #  seek_backward
    330 #
    331 #def_key "r"
    332 #  toggle_repeat
    333 #
    334 #def_key "z"
    335 #  toggle_random
    336 #
    337 #def_key "y"
    338 #  save_tag_changes
    339 #
    340 #def_key "y"
    341 #  start_searching
    342 #
    343 #def_key "y"
    344 #  toggle_single
    345 #
    346 #def_key "R"
    347 #  toggle_consume
    348 #
    349 #def_key "Y"
    350 #  toggle_replay_gain_mode
    351 #
    352 #def_key "T"
    353 #  toggle_add_mode
    354 #
    355 #def_key "|"
    356 #  toggle_mouse
    357 #
    358 #def_key "#"
    359 #  toggle_bitrate_visibility
    360 #
    361 #def_key "Z"
    362 #  shuffle
    363 #
    364 #def_key "x"
    365 #  toggle_crossfade
    366 #
    367 #def_key "X"
    368 #  set_crossfade
    369 #
    370 #def_key "u"
    371 #  update_database
    372 #
    373 #def_key "ctrl-s"
    374 #  sort_playlist
    375 #
    376 #def_key "ctrl-s"
    377 #  toggle_browser_sort_mode
    378 #
    379 #def_key "ctrl-s"
    380 #  toggle_media_library_sort_mode
    381 #
    382 #def_key "ctrl-r"
    383 #  reverse_playlist
    384 #
    385 #def_key "ctrl-f"
    386 #  apply_filter
    387 #
    388 #def_key "ctrl-_"
    389 #  select_found_items
    390 #
    391 #def_key "/"
    392 #  find
    393 #
    394 #def_key "/"
    395 #  find_item_forward
    396 #
    397 #def_key "?"
    398 #  find
    399 #
    400 #def_key "?"
    401 #  find_item_backward
    402 #
    403 #def_key "."
    404 #  next_found_item
    405 #
    406 #def_key ","
    407 #  previous_found_item
    408 #
    409 #def_key "w"
    410 #  toggle_find_mode
    411 #
    412 #def_key "e"
    413 #  edit_song
    414 #
    415 #def_key "e"
    416 #  edit_library_tag
    417 #
    418 #def_key "e"
    419 #  edit_library_album
    420 #
    421 #def_key "e"
    422 #  edit_directory_name
    423 #
    424 #def_key "e"
    425 #  edit_playlist_name
    426 #
    427 #def_key "e"
    428 #  edit_lyrics
    429 #
    430 #def_key "i"
    431 #  show_song_info
    432 #
    433 #def_key "I"
    434 #  show_artist_info
    435 #
    436 #def_key "g"
    437 #  jump_to_position_in_song
    438 #
    439 #def_key "l"
    440 #  show_lyrics
    441 #
    442 #def_key "ctrl-v"
    443 #  select_range
    444 #
    445 #def_key "v"
    446 #  reverse_selection
    447 #
    448 #def_key "V"
    449 #  remove_selection
    450 #
    451 #def_key "B"
    452 #  select_album
    453 #
    454 #def_key "a"
    455 #  add_selected_items
    456 #
    457 #def_key "c"
    458 #  clear_playlist
    459 #
    460 #def_key "c"
    461 #  clear_main_playlist
    462 #
    463 #def_key "C"
    464 #  crop_playlist
    465 #
    466 #def_key "C"
    467 #  crop_main_playlist
    468 #
    469 #def_key "m"
    470 #  move_sort_order_up
    471 #
    472 #def_key "m"
    473 #  move_selected_items_up
    474 #
    475 #def_key "n"
    476 #  move_sort_order_down
    477 #
    478 #def_key "n"
    479 #  move_selected_items_down
    480 #
    481 #def_key "M"
    482 #  move_selected_items_to
    483 #
    484 #def_key "A"
    485 #  add
    486 #
    487 #def_key "S"
    488 #  save_playlist
    489 #
    490 #def_key "o"
    491 #  jump_to_playing_song
    492 #
    493 #def_key "G"
    494 #  jump_to_browser
    495 #
    496 #def_key "G"
    497 #  jump_to_playlist_editor
    498 #
    499 #def_key "~"
    500 #  jump_to_media_library
    501 #
    502 #def_key "E"
    503 #  jump_to_tag_editor
    504 #
    505 #def_key "U"
    506 #  toggle_playing_song_centering
    507 #
    508 #def_key "P"
    509 #  toggle_display_mode
    510 #
    511 #def_key "\\"
    512 #  toggle_interface
    513 #
    514 #def_key "!"
    515 #  toggle_separators_between_albums
    516 #
    517 #def_key "L"
    518 #  toggle_lyrics_fetcher
    519 #
    520 #def_key "F"
    521 #  fetch_lyrics_in_background
    522 #
    523 #def_key "alt-l"
    524 #  toggle_fetching_lyrics_in_background
    525 #
    526 #def_key "ctrl-l"
    527 #  toggle_screen_lock
    528 #
    529 #def_key "`"
    530 #  toggle_library_tag_type
    531 #
    532 #def_key "`"
    533 #  refetch_lyrics
    534 #
    535 #def_key "`"
    536 #  add_random_items
    537 #
    538 #def_key "ctrl-p"
    539 #  set_selected_items_priority
    540 #
    541 #def_key "q"
    542 #  quit
    543 #
    544 #
    545 #def_key "f"
    546 #	find
    547 #def_key "f"
    548 #	find_item_forward
    549 
    550 def_key "+"
    551     show_clock
    552 def_key "="
    553     volume_up
    554 
    555 def_key "j"
    556     scroll_down
    557 def_key "k"
    558     scroll_up
    559 
    560 def_key "ctrl-u"
    561     page_up
    562 #push_characters "kkkkkkkkkkkkkkk"
    563 def_key "ctrl-d"
    564     page_down
    565 #push_characters "jjjjjjjjjjjjjjj"
    566 def_key "u"
    567     page_up
    568 #push_characters "kkkkkkkkkkkkkkk"
    569 def_key "d"
    570     page_down
    571 #push_characters "jjjjjjjjjjjjjjj"
    572 def_key "h"
    573     previous_column
    574 def_key "l"
    575     next_column
    576 
    577 def_key "."
    578     show_lyrics
    579 
    580 def_key "n"
    581     next_found_item
    582 def_key "N"
    583     previous_found_item
    584 
    585 # not used but bound
    586 def_key "J"
    587     move_sort_order_down
    588 def_key "K"
    589     move_sort_order_up
    590 def_key "h"
    591   jump_to_parent_directory
    592 def_key "l"
    593   enter_directory
    594 def_key "l"
    595   run_action
    596 def_key "l"
    597   play_item
    598 def_key "m"
    599   show_media_library
    600 def_key "m"
    601   toggle_media_library_columns_mode
    602 def_key "t"
    603   show_tag_editor
    604 def_key "v"
    605   show_visualizer
    606 def_key "G"
    607   move_end
    608 def_key "g"
    609   move_home
    610 #jump_to_position_in_song
    611 def_key "U"
    612   update_database
    613 def_key "s"
    614   reset_search_engine
    615 def_key "s"
    616   show_search_engine
    617 def_key "f"
    618   show_browser
    619 def_key "f"
    620   change_browse_mode
    621 def_key "x"
    622   delete_playlist_items
    623 def_key "P"
    624   show_playlist