From cb760c9b1ea703520420808ab19e59ede95f1801 Mon Sep 17 00:00:00 2001 From: Patrick Gaskin Date: Sun, 29 Sep 2024 15:31:21 -0400 Subject: [PATCH 1/7] Fully remove libcue The LDFLAGS variable substitution was left behind after 85237ec35370f0837c8be3cd1503f9164dbf6703. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 24b4112c0..d6f264e86 100644 --- a/Makefile +++ b/Makefile @@ -158,7 +158,7 @@ ip/ffmpeg.so: $(ffmpeg-objs) $(libcmus-y) $(call cmd,ld_dl,$(FFMPEG_LIBS)) ip/cue.so: $(cue-objs) $(libcmus-y) - $(call cmd,ld_dl,-lm $(CUE_LIBS)) + $(call cmd,ld_dl,-lm) ip/vtx.so: $(vtx-objs) $(libcmus-y) $(call cmd,ld_dl,$(VTX_LIBS)) From 4facff91b8556b774c82b5a365c53745b98389a1 Mon Sep 17 00:00:00 2001 From: Jordan Torbiak Date: Wed, 8 May 2019 19:23:01 -0600 Subject: [PATCH 2/7] Fix :mark on playlist view so filter is used --- pl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pl.c b/pl.c index aa1ef91f7..2d15d196d 100644 --- a/pl.c +++ b/pl.c @@ -849,7 +849,7 @@ void pl_invert_marks(void) void pl_mark(char *arg) { pl_tw_only("mark") - editable_invert_marks(&pl_visible->editable); + editable_mark(&pl_visible->editable, arg); } void pl_unmark(void) From f6d2c831f042fd257a090a7bdff8e34af3fbc58c Mon Sep 17 00:00:00 2001 From: Patrick Gaskin Date: Sun, 29 Sep 2024 15:07:40 -0400 Subject: [PATCH 3/7] Implement option to start searches at the current position --- Doc/cmus.txt | 4 ++++ options.c | 17 +++++++++++++++++ options.h | 1 + search_mode.c | 3 ++- 4 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Doc/cmus.txt b/Doc/cmus.txt index 180f3538f..f498fe897 100644 --- a/Doc/cmus.txt +++ b/Doc/cmus.txt @@ -1209,6 +1209,10 @@ rewind_offset (5) [-1-9999] scroll_offset (2) [0-9999] Minimal number of screen lines to keep above and below the cursor. +search_resets_position (true) + Starts searches at the beginning of the current view rather than the + current item. + show_all_tracks (true) Display all tracks of the artist when the artist is selected in the tree view. This option is tightly coupled to the auto_expand_albums_\* diff --git a/options.c b/options.c index 137529a99..0ac0d953b 100644 --- a/options.c +++ b/options.c @@ -96,6 +96,7 @@ int tree_width_max = 0; int pause_on_output_change = 0; int block_key_paste = 1; int progress_bar = 1; +int search_resets_position = 1; int colors[NR_COLORS] = { -1, @@ -1393,6 +1394,21 @@ static void toggle_progress_bar(void *data) update_statusline(); } +static void get_search_resets_position(void *data, char *buf, size_t size) +{ + strscpy(buf, bool_names[search_resets_position], size); +} + +static void set_search_resets_position(void *data, const char *buf) +{ + parse_bool(buf, &search_resets_position); +} + +static void toggle_search_resets_position(void *data) +{ + search_resets_position ^= 1; +} + /* }}} */ /* special callbacks (id set) {{{ */ @@ -1665,6 +1681,7 @@ static const struct { DN(pl_env_vars) DT(block_key_paste) DT(progress_bar) + DT(search_resets_position) { NULL, NULL, NULL, NULL, 0 } }; diff --git a/options.h b/options.h index 3e90670dc..c45e9742b 100644 --- a/options.h +++ b/options.h @@ -179,6 +179,7 @@ extern int tree_width_max; extern int pause_on_output_change; extern int block_key_paste; extern int progress_bar; +extern int search_resets_position; extern const char * const aaa_mode_names[]; extern const char * const view_names[NR_VIEWS + 1]; diff --git a/search_mode.c b/search_mode.c index 0d43523c0..f8d8fd504 100644 --- a/search_mode.c +++ b/search_mode.c @@ -25,6 +25,7 @@ #include "xstrjoin.h" #include "misc.h" #include "lib.h" +#include "options.h" #include "command_mode.h" #include "keys.h" @@ -199,7 +200,7 @@ void search_mode_ch(uchar ch) return; } else { /* start from beginning if this is first char */ - int beginning = search_line_empty(); + int beginning = search_resets_position && search_line_empty(); /* save old value * From 62a667dfae4aa8ffb4645893106231ea9ba4ff8b Mon Sep 17 00:00:00 2001 From: Patrick Gaskin Date: Sun, 29 Sep 2024 15:37:31 -0400 Subject: [PATCH 4/7] Remove mailing list from README --- README.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/README.md b/README.md index f7be3cea6..019ab7cb8 100644 --- a/README.md +++ b/README.md @@ -77,17 +77,6 @@ And $ man cmus -Mailing List ------------- - -To subscribe to cmus-devel@lists.sourceforge.net or view the archive visit -http://lists.sourceforge.net/lists/listinfo/cmus-devel. - -The mailing list now serves as an archive for old releases and issues. -Please use the GitHub [issues](https://github.com/cmus/cmus/issues) -page for any problems, suggestions, or bug reports. - - IRC Channel ------------ From 47665e2f7021d4b36e1f0d2dc454f18221412a08 Mon Sep 17 00:00:00 2001 From: Patrick Gaskin Date: Sun, 29 Sep 2024 15:37:31 -0400 Subject: [PATCH 5/7] Tweak README formatting --- README.md | 51 +++++++++++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/README.md b/README.md index 019ab7cb8..2d2925a91 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -cmus — C\* Music Player -======================= +# cmus — C\* Music Player https://cmus.github.io/ @@ -10,8 +9,7 @@ Copyright © 2004-2008 Timo Hirvonen Copyright © 2008-2017 Various Authors -Configuration -------------- +## Configuration List available optional features @@ -43,8 +41,7 @@ script: The Tremor library is supposed to be used on hardware that has no FPU. -Building --------- +## Building $ make @@ -53,8 +50,7 @@ Or on some BSD systems you need to explicitly use GNU make: $ gmake -Installation ------------- +## Installation $ make install @@ -67,8 +63,7 @@ This is useful when creating binary packages. Remember to replace `make` with `gmake` if needed. -Manuals -------- +## Manuals $ man cmus-tutorial @@ -77,38 +72,38 @@ And $ man cmus -IRC Channel ------------- +## IRC Channel -Feel free to join IRC channel #cmus on Libera.chat and share you experience, problems and issues. -Note: This is an unofficial channel and all people hanging around there are for the love of cmus. +Feel free to join IRC channel #cmus on Libera.chat and share you experience, +problems and issues. Note: This is an unofficial channel and all people hanging +around there are for the love of cmus. -Reporting Bugs --------------- +## Reporting Bugs -Bugs should be reported using the GitHub [issue tracker](https://github.com/cmus/cmus/issues). -When creating a new issue, a template will be shown containing instructions on how to collect -the necessary information. +Bugs should be reported using the GitHub [issue +tracker](https://github.com/cmus/cmus/issues). When creating a new issue, a +template will be shown containing instructions on how to collect the necessary +information. -Additional debug information can be found in `~/cmus-debug.txt` if you configured cmus with -maximum debug level (`./configure DEBUG=2`). In case of a crash the last lines may be helpful. +Additional debug information can be found in `~/cmus-debug.txt` if you +configured cmus with maximum debug level (`./configure DEBUG=2`). In case of a +crash the last lines may be helpful. -Git Repository --------------- +## Git Repository https://github.com/cmus/cmus $ git clone https://github.com/cmus/cmus.git -Hacking -------- +## Hacking -cmus uses the [Linux kernel coding style](https://www.kernel.org/doc/html/latest/process/coding-style.html). -Use hard tabs. Tabs are _always_ 8 characters wide. Keep the style consistent with rest of the -code. +cmus uses the [Linux kernel coding +style](https://www.kernel.org/doc/html/latest/process/coding-style.html). Use +hard tabs. Tabs are _always_ 8 characters wide. Keep the style consistent with +rest of the code. Bug fixes and implementations of new features should be suggested as a [pull request](https://github.com/cmus/cmus/pulls) directly on GitHub. From b9a7cd053f60a1c6e5331641842fc9d774e8af3d Mon Sep 17 00:00:00 2001 From: Patrick Gaskin Date: Sun, 29 Sep 2024 15:37:31 -0400 Subject: [PATCH 6/7] Simplify README configure docs --- README.md | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 2d2925a91..3fd1fcf8c 100644 --- a/README.md +++ b/README.md @@ -11,17 +11,11 @@ Copyright © 2008-2017 Various Authors ## Configuration -List available optional features - - $ ./configure --help - -Auto-detect everything - $ ./configure -To disable some feature, arts for example, and install to `$HOME` run - - $ ./configure prefix=$HOME CONFIG_ARTS=n +By default, features are auto-detected. To list all configuration options, run +`./configure --help`. Some common autoconf-style options like `--prefix` are +also available. After running configure you can see from the generated `config.mk` file what features have been configured in (see the `CONFIG_*` options). @@ -32,14 +26,6 @@ of the dependencies. For example if you want to use 'mad' input plugin package. After installing dependencies you need to run `./configure` again, of course. -If you want to use the Tremor library as alternative for decoding -Ogg/Vorbis files you have to pass `CONFIG_TREMOR=y` to the configure -script: - - $ ./configure CONFIG_VORBIS=y CONFIG_TREMOR=y - -The Tremor library is supposed to be used on hardware that has no FPU. - ## Building From 52d8cee5a820afb326284edd91780b7f45ffa08e Mon Sep 17 00:00:00 2001 From: Patrick Gaskin Date: Sun, 29 Sep 2024 15:41:47 -0400 Subject: [PATCH 7/7] Document build dependency packages --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3fd1fcf8c..d5bb05e71 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,17 @@ also available. After running configure you can see from the generated `config.mk` file what features have been configured in (see the `CONFIG_*` options). -*Note*: For some distributions you need to install development versions -of the dependencies. For example if you want to use 'mad' input plugin -(mp3) you need to install `libmad0-dev` (Debian) or `libmad-devel` (RPM) -package. After installing dependencies you need to run `./configure` -again, of course. +The packages containing dependencies on common distributions are listed below. All dependencies other than pkg-config and ncurses, iconv, and elogind/systemd are for optional input/output plugins. It is assumed that libc headers, a C compiler, git, and GNU Make are available. + +| Distro | Dependencies | +| :-- | :-- | +| **Debian/Ubuntu** | apt install pkg-config libncursesw5-dev libfaad-dev libao-dev libasound2-dev libcddb2-dev libcdio-cdda-dev libdiscid-dev libavformat-dev libavcodec-dev libswresample-dev libflac-dev libjack-dev libmad0-dev libmodplug-dev libmpcdec-dev libsystemd-dev libopusfile-dev libpulse-dev libsamplerate0-dev libsndio-dev libvorbis-dev libwavpack-dev | +| **Fedora/RHEL** | dnf install 'pkgconfig(ncursesw)' 'pkgconfig(alsa)' 'pkgconfig(ao)' 'pkgconfig(libcddb)' 'pkgconfig(libcdio_cdda)' 'pkgconfig(libdiscid)' 'pkgconfig(libavformat)' 'pkgconfig(libavcodec)' 'pkgconfig(libswresample)' 'pkgconfig(flac)' 'pkgconfig(jack)' 'pkgconfig(mad)' 'pkgconfig(libmodplug)' libmpcdec-devel 'pkgconfig(libsystemd)' 'pkgconfig(opusfile)' 'pkgconfig(libpulse)' 'pkgconfig(samplerate)' 'pkgconfig(vorbisfile)' 'pkgconfig(wavpack)' | +| **+ RPMFusion** | dnf install faad2-devel libmp4v2-devel | +| **Arch Linux** | pacman -S pkg-config ncurses libiconv faad2 alsa-lib libao libcddb libcdio-paranoia libdiscid ffmpeg flac jack libmad libmodplug libmp4v2 libmpcdec systemd opusfile libpulse libsamplerate libvorbis wavpack | +| **Alpine** | apk add pkgconf ncurses-dev gnu-libiconv-dev alsa-lib-dev libao-dev libcddb-dev ffmpeg-dev flac-dev jack-dev libmad-dev libmodplug-dev elogind-dev opus-dev opusfile-dev pulseaudio-dev libsamplerate-dev libvorbis-dev wavpack-dev | +| **Termux** | apt install libandroid-support ncurses libiconv ffmpeg libmad libmodplug opusfile pulseaudio libflac libvorbis libwavpack | +| **Homebrew** | brew install pkg-config ncurses faad2 libao libcddb libcdio libdiscid ffmpeg flac jack mad libmodplug mp4v2 musepack opusfile libsamplerate libvorbis wavpack | ## Building