1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-07 16:24:12 +01:00

Document <C-[0-5]> mappings which change the track rating.

This commit is contained in:
Doug Kearns
2009-03-28 16:49:26 +11:00
parent 0f311e09e3
commit 0863ef897e
3 changed files with 49 additions and 33 deletions

View File

@@ -193,41 +193,25 @@ function Player() // {{{
function () { player.decreaseVolume(); }); function () { player.decreaseVolume(); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["/"], "Search View", ["/"], "Search forward for a track",
function (args) { commandline.open("/", "", modes.SEARCH_VIEW_FORWARD); }); function (args) { commandline.open("/", "", modes.SEARCH_VIEW_FORWARD); });
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["n"], "Find Next", ["n"], "Find the next track",
function () { player.searchViewAgain(false);}); function () { player.searchViewAgain(false);});
mappings.add([modes.PLAYER], mappings.add([modes.PLAYER],
["N"], "Find Previous", ["N"], "Find the previous track",
function () { player.searchViewAgain(true);}); function () { player.searchViewAgain(true);});
//FIXME: Better way to do this ? --ken for (let i in util.range(0, 6))
mappings.add([modes.PLAYER], {
["<C-0>"], "Rate the current media item 0", let (rating = i) {
function () { player.rateMediaItem(0); }); mappings.add([modes.PLAYER],
["<C-" + rating + ">"], "Rate the current media item " + rating,
mappings.add([modes.PLAYER], function () { player.rateMediaItem(rating); });
["<C-1>"], "Rate the current media item 1", }
function () { player.rateMediaItem(1); }); }
mappings.add([modes.PLAYER],
["<C-2>"], "Rate the current media item 2",
function () { player.rateMediaItem(2); });
mappings.add([modes.PLAYER],
["<C-3>"], "Rate the current media item 3",
function () { player.rateMediaItem(3); });
mappings.add([modes.PLAYER],
["<C-4>"], "Rate the current media item 4",
function () { player.rateMediaItem(4); });
mappings.add([modes.PLAYER],
["<C-5>"], "Rate the current media item 5",
function () { player.rateMediaItem(5); });
////////////////// ///////////////////////////////////////////////////////////}}} ////////////////// ///////////////////////////////////////////////////////////}}}
////////////////////// COMMANDS //////////////////////////////////////////////// ////////////////////// COMMANDS ////////////////////////////////////////////////
@@ -627,7 +611,7 @@ function Player() // {{{
} }
else else
{ {
if (lastSearchIndex == (lastSearchView.length -1)) if (lastSearchIndex == (lastSearchView.length - 1))
{ {
//commandline.echo("Search hit BOTTOM, continuing at TOP", //commandline.echo("Search hit BOTTOM, continuing at TOP",
// commandline.HL_WARNINGMSG, commandline.APPEND_TO_MESSAGES | commandline.FORCE_SINGLELINE); // commandline.HL_WARNINGMSG, commandline.APPEND_TO_MESSAGES | commandline.FORCE_SINGLELINE);

View File

@@ -23,6 +23,19 @@ section:Player{nbsp}mode[player-index]
||[m]+[m]|| Increase volume by 10% + ||[m]+[m]|| Increase volume by 10% +
||[m]-[m]|| Decrease volume by 10% + ||[m]-[m]|| Decrease volume by 10% +
||[m]/[m]|| Search forward for a track +
//||[m]?[m]|| Search backward for a track +
||[m]n[m]|| Find the next track +
||[m]N[m]|| Find the previous track +
// TODO: better formatting
||<C-0>|| Rate the current track with 0 stars +
||<C-1>|| Rate the current track with 1 stars +
||<C-2>|| Rate the current track with 2 stars +
||<C-3>|| Rate the current track with 3 stars +
||<C-4>|| Rate the current track with 4 stars +
||<C-5>|| Rate the current track with 5 stars +
section:Insert{nbsp}mode[insert-index] section:Insert{nbsp}mode[insert-index]
||[m]<C-i>[m]|| Launch the external editor + ||[m]<C-i>[m]|| Launch the external editor +

View File

@@ -178,21 +178,40 @@ section:Search{nbsp}commands[search]
|/| |/|
||/{pattern}<CR>|| + ||/{pattern}<CR>|| +
________________________________________________________________________________ ________________________________________________________________________________
Search for the first occurrence of {pattern} in the visible media view. Search forward for a track matching {pattern} in the visible media view.
________________________________________________________________________________ ________________________________________________________________________________
//|?|
//||?{pattern}<CR>|| +
//________________________________________________________________________________
//Search backwards for a track matching {pattern} in the visible media view.
//________________________________________________________________________________
|n| |n|
||n|| + ||n|| +
________________________________________________________________________________ ________________________________________________________________________________
Find next. Repeats the last search. If the search hits BOTTOM of the view, it Find the next track. Repeats the last search. If the search hits BOTTOM of the
continues from TOP. view, it continues from TOP.
________________________________________________________________________________ ________________________________________________________________________________
|N| |N|
||N|| + ||N|| +
________________________________________________________________________________ ________________________________________________________________________________
Find previous. Repeats the last search in the opposite direction. If the search Find the previous track. Repeats the last search in the opposite direction. If
hits TOP of the view, it continues from BOTTTOM. the search hits TOP of the view, it continues from BOTTTOM.
________________________________________________________________________________
section:Rating{nbsp}track[rating]
|<C-5>| |<C-4>| |<C-3>| |<C-2>| |<C-1>| |<C-0>|
||<C-0>|| +
||<C-1>|| +
||<C-2>|| +
||<C-3>|| +
||<C-4>|| +
||<C-5>|| +
________________________________________________________________________________
Rate the current track with N stars.
________________________________________________________________________________ ________________________________________________________________________________
// vim: set filetype=asciidoc: // vim: set filetype=asciidoc: