Commit Graph

1037 Commits

Author SHA1 Message Date
dependabot[bot]
b742bec22e Bump clap from 4.2.1 to 4.2.7
Bumps [clap](https://github.com/clap-rs/clap) from 4.2.1 to 4.2.7.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.2.1...v4.2.7)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 23:43:06 +02:00
dependabot[bot]
9186ebc565 Bump tokio-stream from 0.1.12 to 0.1.14
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.12 to 0.1.14.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Changelog](https://github.com/tokio-rs/tokio/blob/tokio-0.1.14/CHANGELOG.md)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.12...tokio-0.1.14)

---
updated-dependencies:
- dependency-name: tokio-stream
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 23:40:45 +02:00
dependabot[bot]
fe2b108c69 Bump clap_complete from 4.2.0 to 4.2.1
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.2.0...clap_complete-v4.2.1)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 23:40:38 +02:00
dependabot[bot]
a62c9b5c05 Bump libc from 0.2.141 to 0.2.142
Bumps [libc](https://github.com/rust-lang/libc) from 0.2.141 to 0.2.142.
- [Release notes](https://github.com/rust-lang/libc/releases)
- [Commits](https://github.com/rust-lang/libc/compare/0.2.141...0.2.142)

---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-04 23:40:30 +02:00
dependabot[bot]
3b51dc35ba Bump tokio-util from 0.7.7 to 0.7.8
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.7 to 0.7.8.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.7...tokio-util-0.7.8)

---
updated-dependencies:
- dependency-name: tokio-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-03 10:30:15 +02:00
dependabot[bot]
2d91d13001 Bump tokio from 1.27.0 to 1.28.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.27.0 to 1.28.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.27.0...tokio-1.28.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-03 10:30:07 +02:00
dependabot[bot]
bd169955eb Bump regex from 1.7.3 to 1.8.1
Bumps [regex](https://github.com/rust-lang/regex) from 1.7.3 to 1.8.1.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.7.3...1.8.1)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-03 10:29:59 +02:00
dependabot[bot]
d3cf765f00 Bump reqwest from 0.11.16 to 0.11.17
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.16 to 0.11.17.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.16...v0.11.17)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-03 10:29:53 +02:00
Henrik Friedrichsen
2771c319d6 Fix: gracefully handle invalid DBus setups
Some systems may have an ncspot binary with enabled MPRIS/DBus support, even
though DBus is not actually running on the system or the session is broken.

ncspot should not panic in such a situation, but handle gracefully instead.

Should help with #1139
2023-05-02 22:54:47 +02:00
Jakub Jirutka
cb9d9e7a93 Add ncurses_backend feature flag to enable cursive/ncurses-backend
Similar to existing crossterm_backend and pancurses_backend.
2023-04-23 22:49:42 +02:00
Jakub Jirutka
30903ef78e Use notify-rust with zbus instead of dbus
zbus is already used for MPRIS since
b0db0da3ef.

This saves ~0.5 MiB in release build with LTO.
2023-04-23 22:49:42 +02:00
Henrik Friedrichsen
97b31df575 Bump version to 0.13.1 2023-04-05 13:36:57 +02:00
Henrik Friedrichsen
e9f630e6e5 Update dependencies 2023-04-05 13:35:54 +02:00
Henrik Friedrichsen
d19d897e75 Fix: Restore previous Previous behavior (#1111)
* Fix: Restore previous `Previous` behavior

Fixes #1110
2023-04-04 14:54:32 +02:00
Henrik Friedrichsen
b0db0da3ef Rewrite MPRIS implementation using zbus (#1107)
* Rewrite MPRIS implementation using zbus

The initial DBus implementation was getting harder to maintain and `zbus` offers
some nice convenience features that should make our MPRIS implementation
cleaner.

For now this only implements the `org.mpris.MediaPlayer2` interface which does
not do much.

Should help with #1103

* Implement MPRIS properties

- `PlaybackStatus`
- `PlaybackRate`
- `Volume` (get/set)

* Implement remaining player properties/functions

* Emit signal for changed properties on track change
2023-04-01 21:53:37 +02:00
Henrik Friedrichsen
bcc2791116 Update dependencies 2023-04-01 21:51:24 +02:00
Thomas Frans
8fe30e34d0 Emulate double click to play items
Change the behavior of `ListView` to treat a click on an item that is
already selected as a double click. It allows the user to play songs
(not episodes since currently it's not possible to determine if a
`ListItem` is an episode) by "double clicking" them. It is a bit of a
hack, but it works pretty well. A possible downside is that when people
that don't like mouse integration in a TUI click to focus the terminal
window, it could jump to the song they clicked if that happened to be
the selected one.
2023-03-25 23:53:19 +01:00
Henrik Friedrichsen
ecaec1a494 Dependency updates 2023-03-25 23:49:15 +01:00
David Pedersen
ff01074666 Add 'browse' to 'library_tabs' docs (#1096) 2023-03-24 09:14:34 +01:00
Thomas Frans
5179859538 Update README (#1089)
* Update README.

* Update README version 2.
2023-03-20 23:00:19 +01:00
Collin Lefeber
dcfb820c13 statusbar: update nerdfont glyphs
As of https://github.com/ryanoasis/nerd-fonts/issues/1096
nf-mdi* glyphs are marked obsolete in nerd-fonts upstream

Update the glyphs to non-deprecated nf-fa* counterparts
2023-03-19 00:21:29 +01:00
Henrik Friedrichsen
7dce6b988d Fix: disable ncspot default features for xtask
Pulling in ncspot without disabling default features includes a lot of
unnecessary dependencies, i.e. audio backends including dynamic linkage to
`libpulse`. As it's not required for `xtask` we should disable default features,
resulting in a much smaller binary.
2023-03-12 16:35:18 +01:00
BlakeJC94
1a0258f197 Add vim-like page scrolling
* feat: added match fallback for handle_command SelectViewExt

* feat: HalfPage and FullPage MoveAmount variants

* feat: Display for MoveAmount variants

* feat: fallback for MoveAmount variants in TabView

* feat: ListView FullPage/HalfPage MoveAmount

* feat: default keybinds for page scrolling

* feat: HalfPage/FullPage MoveAmount for HelpView

* feat: removed new defaul keybinds for pagescroll

* style: "upwards" -> "halfpageup" etc.

* feat: toml parse "move pageup" / "move halfpageup"

* chore: cargo fmt

* feat: simplified page scroll command interface

* docs: added `move` to readme

* feat: replace FullPage and HalfPage with Float variant

* fix: remove stray variant

* dosc: update move command

* chore: fmt

* feat: implement MoveAmount::Float for selectview

* chore: fmt
2023-03-12 13:26:00 +01:00
Henrik Friedrichsen
dc2f42fd07 Revert "Update CD workflow"
This reverts commit e369994b06705c9c520266feebd89422b5be90c3.

`cross-rs/cross` has already updated to a newer Ubuntu version but not released
their images yet, thus cross-compilation builds fail. Revert for now to get out
the release. Hopefully we can reapply this change for the next release.
2023-03-09 19:49:41 +01:00
Henrik Friedrichsen
758e8d74ce Bump version to 0.13.0 2023-03-09 19:35:41 +01:00
Henrik Friedrichsen
95b256b400 Update dependencies 2023-03-09 19:34:16 +01:00
Henrik Friedrichsen
3a460ea4ad Revert "Display shuffle order"
This reverts commit e68f50ddff.

Will be reintroduced with #1075
2023-03-09 19:34:13 +01:00
dependabot[bot]
45cca123bc Bump serde from 1.0.152 to 1.0.154
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.152 to 1.0.154.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.152...v1.0.154)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-09 19:04:37 +01:00
Thomas Frans
e8adff444c Automatic shell completion generation
* Add automatic shell completion generation.
Add automatic generation of shell completion scripts for various shells
(the ones supported by `clap_complete`). The scripts can be generated
using the `generate-shell-completion` xtask, which outputs the shell
script to stdout.

* Improve shell completion generation xtask.
General improvements to both the shell completion generation as well as
the xtask package itself. Update the README to match the new additions.
2023-03-09 19:02:11 +01:00
Henrik Friedrichsen
c457efc6fc Dependency updates 2023-03-06 22:02:57 +01:00
Thomas Frans
b27e84a386 Add manpage generation using xtask
* Add manpage generation.

* Hide xtask compilation info.
This changes the default behavior of the `cargo run` command for xtasks
to hide the compilation info. This makes sense as xtask's are run as a
program, and showing the compilation info every time clutters stdout
with unrelated info.

* Move ncspot's `clap::Command` to `lib.rs`.
Moving the `clap::Command` used internally by ncspot to a library allows
it to be easily shared between different packages (xtask and ncspot
itself).

This commit also reworks the xtasks to use clap for parsing the xtask
arguments, which simplifies writing new xtasks.

* Make `generate-manpage` `--output` optional.
When more xtasks get added, it would make sense to have a `generate-all`
subcommand that executes all xtasks, which wouldn't be able to have
options for every separate subcommand. Therefore the `output` argument
should be optional, and by default output to the `misc` directory which
contains extra metadata files already.

* Add packaging info to `README.md`.
Update the README to include information for packagers. The information
includes provided files as well as info on how to generate some of them.
2023-03-06 21:55:19 +01:00
Klaus Umbach
7d1a9d2e80 Fix debian dependencies for Bookworm
Bookworm favours pipewire over pulseaudio, so the dependency to the
package "pulseaudio" from my previous PR #405 has to be removed. It
seemes, it was never really necessary anyway, because "$auto" already
adds the correct dependency to "libpulse0".
2023-03-06 21:52:12 +01:00
Thomas Frans
0c5693c426 Disable autojump for add to playlist dialog.
Autojump seems to take precedence over regular keys, which isn't the
wanted behavior, especially when there are playlists in the list that
contain some of the most common Vim keybindings. For example when there
is a playlist called 'jazz', pressing `j` will jump to that playlist
instead of going down.

This commit disables autojump for now. If search inside the add to
playlist dialog would be a wanted feature, it could be implemented using
the default Vim search button `/` which would work the same way as
searching in other lists works right now.
2023-03-05 00:04:09 +01:00
Thomas Frans
98a0596c70 Change unnecessary usage of Arc to borrow instead
Some basic cleanup of function signatures that took ownership of their
parameters, even though they didn't need ownership. Switching over the
usage of `Arc` to a normal borrow has the added benefit of cleaning up
the code a bit since now a reference can be given instead of having to
clone the values. The other benefit is that a lot of clones aren't
necessary anymore. It's not going to have noticable performance
benefits, but it is still a good thing to have less clones all over the
code.
2023-03-05 00:02:25 +01:00
Thomas Frans
e68f50ddff Display shuffle order 2023-03-01 12:02:10 +01:00
inemajo
c2e030c2f0 Allow executing program to retrieve credentials
* config / authentication: permit to call external program for getting credentials

You can add into your ncspot/config.toml like this:

```
creds_username = "mylogin"
creds_passeval = "pass my_pass_path_to_spot_password"
```

Or using any password manager who send your password.to stdout.
If a newline is detected it will be automatically removed

* Move credential commands into separate structure

Also add an option for a username command

* Document credential commands

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2023-03-01 11:28:11 +01:00
dependabot[bot]
3a3d8ae8b4 Bump clap from 4.1.6 to 4.1.7
Bumps [clap](https://github.com/clap-rs/clap) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.1.6...v4.1.7)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-28 23:16:46 +01:00
Thomas Frans
9ca72e391d CI/CD: Add clippy and update actions
* Add clippy to CI.

* Update .github/workflows/ci.yml

* Update .github/workflows/ci.yml

* Use `cargo check` instead of `cargo build`

* Update CD workflow

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2023-02-28 22:49:32 +01:00
Henrik Friedrichsen
879d8e8e04 Dependency updates 2023-02-26 20:50:43 +01:00
inemajo
801e847c88 commands: Adding "disconnect" command to force socket shutdown (#1057)
* commands: Adding "disconnect" command to force socket shutdown

* Rename to `reconnect`

* Add documentation to README

Related to: #628 #1033

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2023-02-26 20:46:41 +01:00
Jonas Wunderlich
e8d652cc78 Always pass cover URL to notification
Regardless of the `cover` feature
2023-02-24 18:30:10 +01:00
dependabot[bot]
f7e415666a Bump toml from 0.5.11 to 0.7.2
Bumps [toml](https://github.com/toml-rs/toml) from 0.5.11 to 0.7.2.
- [Release notes](https://github.com/toml-rs/toml/releases)
- [Commits](https://github.com/toml-rs/toml/compare/toml-v0.5.11...toml-v0.7.2)

---
updated-dependencies:
- dependency-name: toml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-19 14:02:04 +01:00
Henrik Friedrichsen
6fc99541e1 cargo update 2023-02-19 00:11:10 +01:00
Thomas Frans
a3c4989571 Switch from MM:SS to HH:MM:SS duration representation if needed
* Contidionally switch from MM:SS to HH:MM:SS duration representation if needed.

* Correct tiny style issue.

* --amend
2023-02-17 09:22:12 +01:00
Thomas Frans
829b799cc5 Fix clippy warnings. 2023-02-16 13:33:56 +01:00
Henrik Friedrichsen
8222f1b2e4 Use variables directly inside format strings
Most systems should have an up to date Rust compiler by now, so we should be
fine.
2023-02-06 20:15:43 +01:00
Henrik Friedrichsen
2fe3b056bf Raise SIGTSTP on UNIX and ncurses backend
See also: gyscos/cursive#521

Fixes #1040
2023-02-06 20:01:48 +01:00
Henrik Friedrichsen
5e950b6c2c cargo update 2023-02-03 20:44:53 +01:00
Harold Nieuwboer
8c0fbe5f43 Theme config support for HighlightInactive 2023-02-03 17:47:27 +01:00
Simon Vandevelde
25680bc9b4 Add info on extracting currently playing to README (#1038)
* Add info on extracting currently playing

* Add word

---------

Co-authored-by: Henrik Friedrichsen <henrik@affekt.org>
2023-01-31 23:53:32 +01:00