2020-03-01 19:59:28 +00:00
# di-tui
2020-11-15 17:05:46 +00:00
A simple terminal UI player for [di.fm Premium ](http://di.fm )
2020-03-02 01:57:23 +00:00
2020-05-09 18:10:41 +00:00

2020-02-24 02:47:42 +00:00
2023-07-08 14:39:12 +00:00
## Dependencies
2020-02-24 02:47:42 +00:00
2023-07-08 14:39:12 +00:00
### PulseAudio
2020-11-15 17:05:46 +00:00
Both linux and MacOS depend on pulseaudio to be running.
2023-07-08 14:39:12 +00:00
#### MacOS
2020-11-15 17:05:46 +00:00
By default, pulseaudio on MacOS runs as "root", which is not ideal. PulseAudio is best run by non-root users. By symbolically linking the pulseaudio plist file into your user's `~/Library/LaunchAgents/` , it runs as your user.
2020-02-24 02:47:42 +00:00
2020-11-15 17:05:46 +00:00
```
brew install pulseaudio
ln -s $(brew info pulseaudio | grep "/usr/local/Cellar" | awk '{print $1}')//homebrew.mxcl.pulseaudio.plist ~/Library/LaunchAgents
brew services start pulseaudio
```
2023-07-08 14:39:12 +00:00
#### Debian / Ubuntu
2020-11-08 18:22:32 +00:00
2020-11-18 18:18:16 +00:00
`apt install pulseaudio`
2020-11-08 18:22:32 +00:00
2023-07-08 14:39:12 +00:00
## Install
2020-12-03 19:33:07 +00:00
2023-07-08 14:39:12 +00:00
### Binary Releases
2020-04-11 15:23:36 +00:00
2020-11-15 17:05:46 +00:00
There are binary builds available in [releases ](https://github.com/acaloiaro/di-tui/releases ).
2020-04-11 15:23:36 +00:00
2023-07-08 14:39:12 +00:00
### With `go install`
2022-01-17 19:14:25 +00:00
`go install github.com/acaloiaro/di-tui@latest`
2020-02-24 02:47:42 +00:00
2020-03-01 22:56:36 +00:00
If `$GOPATH/bin` is not on your `$PATH` (modify accordingly for ZSH users `~/.zshrc` )
2020-03-01 22:54:39 +00:00
```
echo "export PATH=$PATH:$GOPATH/bin" >> ~/.bashrc
source ~/.bashrc
```
2023-08-24 07:26:45 +00:00
### Run with `nix run`
2020-03-01 22:54:39 +00:00
2023-08-24 07:26:45 +00:00
```
nix run github:acaloiaro/di-tui
```
2020-03-01 22:54:39 +00:00
2023-07-08 14:39:12 +00:00
## Authenticate
2020-02-24 02:47:42 +00:00
2020-12-15 01:16:36 +00:00
There are two authentication options
2020-09-25 15:05:36 +00:00
- Enter your username and password directly into `di-tui`
- If you're justifiably uncomfortable with entering your username/password into this application, copy your "Listen Key" from (https://www.di.fm/settings) and create the following file:
2023-07-08 14:39:12 +00:00
### ~/.config/di-tui/config.yml
2020-09-25 15:05:36 +00:00
```yml
token: < YOUR LISTEN KEY >
2020-12-15 01:16:36 +00:00
album_art: < BOOLEAN >
2020-09-25 15:05:36 +00:00
```
2020-12-15 01:16:36 +00:00
| key | description |
| --- | ----------- |
| token | Your di.fm authentication "Listen Key" found at https://www.di.fm/settings |
| album_art | Turn album art on or off |
2023-07-08 14:39:12 +00:00
## Configuration
### Themes
By default, `di-tui` respects your terminal's color scheme. However, there are four color settings that one can change by adding a `theme` to `config.yml` .
**Tomorrow-Night** inspired theme
```yml
theme:
primary_color: "#81a2be"
background_color: "#2a1f1a"
primary_text_color: "#969896"
secondary_text_color: "#81a2be"
```
## Run
2020-02-24 02:47:42 +00:00
2020-03-01 19:59:28 +00:00
`di-tui`
2023-07-08 14:39:12 +00:00