diff options
author | Přemysl Janouch <p.janouch@gmail.com> | 2017-06-05 19:57:00 +0200 |
---|---|---|
committer | Přemysl Janouch <p.janouch@gmail.com> | 2017-06-05 19:57:00 +0200 |
commit | 627cb0dee939d8ee739a3720ef2f3d219c0f7567 (patch) | |
tree | 1d67dd6d12544964b457da567ea9a35e87b9d1e9 | |
parent | 77c78d88665231970e5eaade43807a28d6b21736 (diff) | |
download | nncmpp-627cb0dee939d8ee739a3720ef2f3d219c0f7567.tar.gz nncmpp-627cb0dee939d8ee739a3720ef2f3d219c0f7567.tar.xz nncmpp-627cb0dee939d8ee739a3720ef2f3d219c0f7567.zip |
Add and bind backward/forward seeks
-rw-r--r-- | nncmpp.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -1502,6 +1502,8 @@ app_goto_tab (int tab_index) XX( MPD_TOGGLE, "Toggle play/pause" ) \ XX( MPD_STOP, "Stop playback" ) \ XX( MPD_NEXT, "Next song" ) \ + XX( MPD_BACKWARD, "Seek backwards" ) \ + XX( MPD_FORWARD, "Seek forwards" ) \ XX( MPD_VOLUME_UP, "Increase volume" ) \ XX( MPD_VOLUME_DOWN, "Decrease volume" ) \ \ @@ -1661,11 +1663,13 @@ app_process_action (enum action action) } break; - // TODO: relative seeks -#if 0 - FORWARD: MPD_SIMPLE ("seekcur", "+10"); - BACKWARD: MPD_SIMPLE ("seekcur", "-10"); -#endif + // XXX: these should rather be parametrized + case ACTION_MPD_FORWARD: + MPD_SIMPLE ("seekcur", "+10"); + break; + case ACTION_MPD_BACKWARD: + MPD_SIMPLE ("seekcur", "-10"); + break; // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1859,6 +1863,8 @@ g_default_bindings[] = { "r", ACTION_MPD_REPLACE, {}}, { "u", ACTION_MPD_UPDATE_DB, {}}, + { "M-Left", ACTION_MPD_BACKWARD, {}}, + { "M-Right", ACTION_MPD_FORWARD, {}}, { "Left", ACTION_MPD_PREVIOUS, {}}, { "Right", ACTION_MPD_NEXT, {}}, { "h", ACTION_MPD_PREVIOUS, {}}, |