rice

personal dot files and scripts for linux and macOS
Log | Files | Refs | README | LICENSE

bindings (9596B)


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