Commit Graph

43 Commits

Author SHA1 Message Date
Henrik Friedrichsen
f5bf1d527f cargo clippy --fix 2022-08-17 19:41:23 +02:00
Henrik Friedrichsen
8aab5cabf2 Fix: don't crash on empty command input 2022-08-16 21:52:01 +02:00
cyqsimon
fefbd4191d Fix some errors and warnings when enabling/disabling features (#821)
* Fix E&Ws when enabling features

* `share_clipboard` feature can be disabled more cleanly

* `notify` feature can be disabled more cleanly
2022-06-10 21:32:59 +02:00
Henrik Friedrichsen
68b3b9b510 Fix warnings 2022-01-09 21:39:14 +01:00
cyqsimon
ba36f98367 seek spits out correct error when used with no args 2022-01-04 09:21:43 +01:00
cyqsimon
9771c36c7b More detailed error message in case of command parse error (#684)
* Refactored `command::parse`

* Removed unnecessary duplication in error msg

* Renamed `NotEnoughArgs` -> `InsufficientArgs`

* Inaccurate var name

* Ditch wordy error prefix

* Use `split_whitespace` instead of regex

* Cleanup unused regex import

* `insert` cmd fails fast

* Refactor: use `and_then` instead of `unwrap`

* Updated `Command::to_string`

* Added `Command::basename`

* Better err msg when running cmd in unsupported view, fully closes #597

* Sort `match` branches by their order in the enum
2022-01-01 20:48:34 +01:00
cyqsimon
17867685ab Improved README (#683)
* auto generate table of contents

* cspell check

* Added `single` alias to repeat mode `track`

* Updated command documentation

* Reformat command table
Removed the "alias" column since it takes up too much space.
2021-12-27 16:34:56 +01:00
cyqsimon
e0ec759730 Improved seek command to allow more units (#682)
* `seek` command accepts fancy duration

* Use default formatting

* Better var naming

* Documented `seek` command
2021-12-27 09:28:49 +01:00
Henrik Friedrichsen
299c470cf9 Add exec command
Fixes #673
2021-12-17 20:57:52 +01:00
Henrik Friedrichsen
dc977d758e Fix serialization of jump commands 2021-12-07 21:36:36 +01:00
Felix
3d43081df3 Added jumpnext and jumpprevious as commands 2021-12-07 16:35:52 +01:00
Henrik Friedrichsen
a78bbe6684 Add redraw command and bind to CTRL+L
solves #609
2021-10-01 18:44:25 +02:00
HMH
102acd803e Enable binding multiple commands to a key.
This enables useful combinations of commands like `Space -> queue; move
down 1` using ';' as command separator. ';' can be escaped using ';;'.
2021-09-11 21:40:00 +02:00
HMH
d17c66f8ad Add command to show recommendations. (#593)
* Add command to show recommendations.

This adds a command `similar selected|current` which enables searching for
track recommendations for playlists, albums as well as single tracks.

* Make sure to only send 5 seed items in total.

* Add docs for recommendation bindings to the README
2021-09-07 15:01:06 +02:00
Henrik Friedrichsen
6b8e1d33dc Code cleanups 2021-08-15 15:05:49 +02:00
Henrik Friedrichsen
9eb99cc8be cargo clippy 2021-07-11 01:38:57 +02:00
Henrik Friedrichsen
a0231362f1 implement logout command
fixes #470
2021-03-22 21:56:50 +01:00
Henrik Friedrichsen
b436e40851 Fix display of PlayNext command
fixes #445
2021-02-27 13:23:30 +01:00
Henrik Friedrichsen
3c66379cc6 fix search command and update docs
fixes #353
2021-01-02 22:18:41 +01:00
Henrik Friedrichsen
54e48a7dc6 cargo clippy 2020-12-13 21:58:58 +01:00
André Andersson
68d2bbd64f Add support for sorting playlist tracks (#328)
* Add support for sorting playlists

* Update string

* formatting
2020-11-22 17:02:33 +01:00
Bolli
d88ea93a94 feat: create new empty playlist via command (#272)
* feat: create new empty playlist via command

- type :newplaylist <name> to create a new playlist

fixes #242

* use full argument string for playlist name

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2020-10-25 17:57:49 +01:00
Saul Chavez Sanchez
c9d02507ac Increase/Decrease volume by 5 (#298)
* Increase/Decrease volume by 5

* Fixed static value

* use fallback value in case parsing fails

fixes #282

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2020-10-22 20:21:49 +02:00
Bolli
79093eca1e feat: add insert command to paste spotify links (#277)
* feat: add insert command to paste spotify links

- use Ctrl-v to paste from clipboard or use :insert without an argument

* fix: handle paste on disabled clipboard feature

* fix: handle wrong URIs

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2020-10-09 19:26:52 +02:00
Moshe Sherman
f2b4f01242 Vim like search (#279)
* add quick search within a list

* vim like search navigation

* close cmd line with esc

* format

* document changes in README
2020-10-05 13:50:12 +02:00
Moshe Sherman
fc79889665 play next (#278)
* add play next feature

* fix play_next insertion order

* fix play_next call for playable

* document play_next shortcut + reformat

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2020-10-04 16:58:55 +02:00
Henrik Friedrichsen
4f71b2489b implement command to reload config (#243)
* implement command to reload themes

* refresh keybindings after config reload
2020-08-12 01:12:08 +02:00
Henrik Friedrichsen
0f0c0e1383 fix save command parsing for parameterless values
fixes #231
2020-07-31 22:16:07 +02:00
Henry Snopek
0f08a56f90 [feat] add Command::Noop 2020-06-25 15:45:53 +02:00
Henry Snopek
d2eede2777 [feat] add Command::Help to command.parse 2020-06-25 11:09:48 +02:00
Henrik Friedrichsen
4e7af1c920 add command/binding to jump to currently playing track
fixes #181
2020-04-18 21:57:41 +02:00
Henrik Friedrichsen
705a54c08c reformat + remove redundant closure 2020-04-02 21:21:51 +02:00
Marcin Sobczyk
07be9dc48d Command::Move: Add support for extreme moves
This patch adds a 'MoveAmount' enum that permits movements by integer
values or to abstract extremes which loosely translate to "top" for up
direction, "bottom" for down direction, etc. The goal behind the effort
is to add support for buttons like "Home" and "End".

The new enum has a 'Default' impl that yields a value of integer
movement by 1 field. This replaces the previous 'Option' wrap, that
in fact served the same purpose, with the value of '1' scattered
around different places in code.

Along with the enum, new commands have been defined to make use of it:

 - "move top"
 - "move bottom"
 - "move leftmost"
 - "move rightmost"
2020-03-31 10:49:08 +02:00
Henrik Friedrichsen
082675a5d7 push help view to stack instead of making it a separate screen
fixes #157
2020-03-21 15:51:35 +01:00
Henrik Friedrichsen
dccb36d8e7 update to rust edition 2018 + bump version 2020-03-15 11:06:24 +01:00
Henrik Friedrichsen
d2915316da various non-functional code cleanups 2020-02-21 23:33:08 +01:00
Henrik Friedrichsen
54230bd85b show commands in help screen in the same syntax they are parsed 2020-02-05 22:48:35 +01:00
Henrik Friedrichsen
a5da4897de implement software volume mixing
closes #115
2020-01-11 18:11:41 +01:00
Henrik Friedrichsen
85e9e99d87 rebind + change playlist update command to update entire library 2019-11-30 17:13:41 +01:00
Henrik Friedrichsen
d213e8a54c introduce new context menu for simplified controls
as outlined in #75
2019-06-10 00:07:18 +02:00
Rasmus Larsen
db7a09c87b Command parser 2019-05-21 18:11:54 +02:00
Rasmus Larsen
1e0d9ea952 Handle default command behavior 2019-05-21 16:01:56 +02:00
Rasmus Larsen
1671db14c1 Move to enum-based commands 2019-05-20 22:15:12 +02:00