mirror of
https://github.com/talwat/lowfi
synced 2025-09-28 11:20:05 +00:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e702c1de00 | ||
|
8f837302c3 | ||
|
226c674295 |
63
README.md
63
README.md
@ -13,15 +13,12 @@ by default are from [chillhop](https://chillhop.com/). Read
|
||||
|
||||
## Why?
|
||||
|
||||
I really hate modern music platforms, and I wanted a small, "suckless"
|
||||
app that would just play random lofi without video.
|
||||
I really hate modern music platforms, and I wanted a small, simple
|
||||
app that would just play random ambient music without video and other fluff.
|
||||
|
||||
It was also designed to be fairly resilient to inconsistent networks,
|
||||
Beyond that, it was also designed to be fairly resilient to inconsistent networks,
|
||||
and as such it buffers 5 whole songs at a time instead of parts of the same song.
|
||||
|
||||
See [Scraping](#scraping) if you're interested in downloading the tracks.
|
||||
Beware, there's a lot of them.
|
||||
|
||||
## Installing
|
||||
|
||||
> [!NOTE]
|
||||
@ -132,7 +129,7 @@ Yeah, that's it.
|
||||
> Besides its regular controls, lowfi offers compatibility with Media Keys
|
||||
> and [MPRIS](https://wiki.archlinux.org/title/MPRIS) (with tools like `playerctl`).
|
||||
>
|
||||
> MPRIS is currently optional feature in cargo (enabled with `--features mpris`)
|
||||
> MPRIS is currently an optional feature in cargo (enabled with `--features mpris`)
|
||||
> due to it being only for Linux, as well as the fact that the main point of
|
||||
> lowfi is it's unique & minimal interface.
|
||||
|
||||
@ -141,24 +138,44 @@ Yeah, that's it.
|
||||
If you have something you'd like to tweak about lowfi, you use additional flags which
|
||||
slightly tweak the UI or behaviour of the menu. The flags can be viewed with `lowfi help`.
|
||||
|
||||
| Flag | Function |
|
||||
| ----------------------------------- | ---------------------------------------------- |
|
||||
| `-a`, `--alternate` | Use an alternate terminal screen |
|
||||
| `-m`, `--minimalist` | Hide the bottom control bar |
|
||||
| `-b`, `--borderless` | Exclude borders in UI |
|
||||
| `-p`, `--paused` | Start lowfi paused |
|
||||
| `-d`, `--debug` | Include ALSA & other logs |
|
||||
| `-w`, `--width <WIDTH>` | Width of the player, from 0 to 32 [default: 3] |
|
||||
| `-t`, `--track-list <TRACK_LIST>` | Use a [custom track list](#custom-track-lists) |
|
||||
| `-s`, `--buffer-size <BUFFER_SIZE>` | Internal song buffer size [default: 5] |
|
||||
| Flag | Function |
|
||||
| ----------------------------------- | --------------------------------------------------- |
|
||||
| `-a`, `--alternate` | Use an alternate terminal screen |
|
||||
| `-m`, `--minimalist` | Hide the bottom control bar |
|
||||
| `-b`, `--borderless` | Exclude borders in UI |
|
||||
| `-p`, `--paused` | Start lowfi paused |
|
||||
| `-f`, `--fps` | FPS of the UI [default: 12] |
|
||||
| `--timeout` | Timeout in seconds for music downloads [default: 3] |
|
||||
| `-d`, `--debug` | Include ALSA & other logs |
|
||||
| `-w`, `--width <WIDTH>` | Width of the player, from 0 to 32 [default: 3] |
|
||||
| `-t`, `--track-list <TRACK_LIST>` | Use a [custom track list](#custom-track-lists) |
|
||||
| `-s`, `--buffer-size <BUFFER_SIZE>` | Internal song buffer size [default: 5] |
|
||||
|
||||
### Scraping
|
||||
### Extra Features
|
||||
|
||||
lowfi also has an optional `scrape` command enabled by the `scrape` feature.
|
||||
lowfi uses cargo/rust's "feature" system to make certain parts of the program optional,
|
||||
like those which are only expected to be used by a handful of users.
|
||||
|
||||
#### `scrape` - Scraping
|
||||
|
||||
This feature provides the `scrape` command.
|
||||
It's usually not very useful, but is included for transparency's sake.
|
||||
|
||||
More information can be found by running `lowfi help scrape`.
|
||||
|
||||
#### `mpris` - MPRIS
|
||||
|
||||
Enables MPRIS. It's not rocket science.
|
||||
|
||||
#### `extra-audio-formats` - Extra Audio Formats
|
||||
|
||||
This is only relevant to those using a custom track list, in which case
|
||||
it allows for more formats than just MP3. Those are FLAC, Vorbis, and WAV.
|
||||
|
||||
These should be sufficient for some 99% of music files people might want to play.
|
||||
If you dealing with the 1% using another audio format which is in
|
||||
[this list](https://github.com/pdeljanov/Symphonia?tab=readme-ov-file#codecs-decoders), open an issue.
|
||||
|
||||
### Custom Track Lists
|
||||
|
||||
> [!NOTE]
|
||||
@ -168,7 +185,7 @@ More information can be found by running `lowfi help scrape`.
|
||||
>
|
||||
> Feel free to contribute your own list with a PR.
|
||||
|
||||
lowfi also supports custom track lists, although the default one from Lofi Girl
|
||||
lowfi also supports custom track lists, although the default one from chillhop
|
||||
is embedded into the binary.
|
||||
|
||||
To use a custom list, use the `--track-list` flag. This can either be a path to some file,
|
||||
@ -192,7 +209,7 @@ All tracks must be in the MP3 format, unless lowfi has been compiled with the
|
||||
#### The Format
|
||||
|
||||
In lists, the first line is what's known as the header, followed by the rest of the tracks.
|
||||
Each track will be first appended to the header, and then use that to download
|
||||
Each track will be first appended to the header, and then use the combination to download
|
||||
the track.
|
||||
|
||||
> [!NOTE]
|
||||
@ -227,8 +244,8 @@ For example, if you had an entry like this:
|
||||
|
||||
Then lowfi would download from the first section, and display the second as the track name.
|
||||
|
||||
You can also prepend `file://` to the header track name, which will make lowfi treat it as a local file.
|
||||
This is useful if you want to use a local file as the base URL, such as:
|
||||
`file://` can be used in front a track/header to make lowfi treat it as a local file.
|
||||
This is useful if you want to use a local file as the base URL, for example:
|
||||
|
||||
```txt
|
||||
file:///home/user/Music/
|
||||
|
@ -42,7 +42,9 @@ impl Bookmarks {
|
||||
|
||||
/// Loads bookmarks from the `bookmarks.txt` file.
|
||||
pub async fn load() -> eyre::Result<Self, BookmarkError> {
|
||||
let text = fs::read_to_string(Self::path().await?).await.unwrap_or_default();
|
||||
let text = fs::read_to_string(Self::path().await?)
|
||||
.await
|
||||
.unwrap_or_default();
|
||||
|
||||
let lines: Vec<String> = text
|
||||
.trim_start_matches("noheader")
|
||||
|
@ -120,11 +120,10 @@ pub async fn scrape() -> eyre::Result<()> {
|
||||
|
||||
const IGNORED_TRACKS: [u32; 20] = [
|
||||
// 404
|
||||
74707,
|
||||
// Lyrics
|
||||
21655, 21773, 8172, 55397, 75135, 24827, 8141, 8157, 64052, 31612, 41956, 8001, 9217, 55372,
|
||||
// Abnormal
|
||||
8469, 7832, 10448, 9446, 9396
|
||||
74707, // Lyrics
|
||||
21655, 21773, 8172, 55397, 75135, 24827, 8141, 8157, 64052, 31612, 41956, 8001, 9217,
|
||||
55372, // Abnormal
|
||||
8469, 7832, 10448, 9446, 9396,
|
||||
];
|
||||
|
||||
const IGNORED_ARTISTS: [&str; 1] = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user