2020-06-23 19:27:59 +08:00
2021-02-19 09:07:24 +08:00
## Gomu (Go Music Player)
[](https://goreportcard.com/report/github.com/issadarkthing/gomu) [](https://travis-ci.com/issadarkthing/gomu)
2021-02-25 16:15:42 +08:00
Gomu is intuitive, powerful CLI music player. It has embedded scripting language
and event hook to enable user to customize their config extensively.
2020-06-23 19:27:59 +08:00
2021-02-06 11:28:12 +08:00

2020-06-23 19:27:59 +08:00
2021-02-16 11:28:27 +08:00
### Features
2020-06-23 19:27:59 +08:00
- lightweight
2020-06-28 13:50:59 +08:00
- simple
- fast
2020-06-23 19:27:59 +08:00
- show audio files as tree
2020-08-11 23:10:29 +08:00
- queue cache
2020-08-22 23:32:56 +08:00
- [vim ](https://github.com/vim/vim ) keybindings
- [youtube-dl ](https://github.com/ytdl-org/youtube-dl ) integration
2020-06-28 13:50:59 +08:00
- audio file management
2021-02-04 21:56:46 +08:00
- customizable
2021-02-06 11:14:26 +08:00
- find music from youtube
2021-02-16 11:28:27 +08:00
- scriptable config
2021-02-25 16:15:42 +08:00
- download lyric
- id3v2 tag editor
2020-08-11 23:10:29 +08:00
2021-02-16 11:28:27 +08:00
### Dependencies
2020-08-11 23:50:24 -05:00
If you are using ubuntu, you need to install alsa and required dependencies
2020-08-11 23:10:29 +08:00
```sh
$ sudo apt install libasound2-dev go
```
Optional dependencies can be installed by this command
```sh
2021-02-16 11:28:27 +08:00
$ sudo apt install youtube-dl
2020-08-11 23:10:29 +08:00
```
2020-06-23 19:27:59 +08:00
2021-02-16 11:28:27 +08:00
### Installation
2020-08-22 23:32:56 +08:00
```sh
$ go get -u github.com/issadarkthing/gomu
```
For arch users, you can install from the AUR
using [yay ](https://github.com/Jguer/yay ):
```sh
$ yay -S gomu
```
using [aura ](https://github.com/fosskers/aura ):
2020-06-24 13:00:31 +08:00
```sh
2020-08-22 23:32:56 +08:00
$ sudo aura -A gomu
2020-06-24 13:00:31 +08:00
```
2020-08-22 23:32:56 +08:00
2021-02-16 11:28:27 +08:00
### Configuration
2020-06-28 13:50:59 +08:00
By default, gomu will look for audio files in `~/music` directory. If you wish to change to your desired location, edit `~/.config/gomu/config` file
2021-02-19 09:07:24 +08:00
and change `music_dir = path/to/your/musicDir` .
2020-08-11 23:44:54 -05:00
2020-06-28 13:50:59 +08:00
2021-02-16 11:28:27 +08:00
### Keybindings
2020-08-22 23:32:56 +08:00
Each panel has it's own additional keybinding. To view the available keybinding for the specific panel use `?`
2020-07-03 12:31:38 +08:00
2021-02-06 11:14:26 +08:00
| Key (General) | Description |
2021-02-06 00:18:31 +08:00
|:----------------|--------------------------------:|
| tab | change panel |
| space | toggle play/pause |
| esc | close popup |
| n | skip |
| q | quit |
| + | volume up |
| - | volume down |
2021-02-06 15:43:41 +08:00
| f/F | forward 10/60 seconds |
| b/B | rewind 10/60 seconds |
2021-02-06 00:18:31 +08:00
| ? | toggle help |
2021-02-23 15:46:51 +08:00
| m | open repl |
| T | switch lyrics |
2021-02-06 11:14:26 +08:00
| Key (Playlist) | Description |
2021-02-06 00:18:31 +08:00
|:----------------|--------------------------------:|
| j | down |
| k | up |
| h | close node in playlist |
| a | create playlist |
| l (lowercase L) | add song to queue |
| L | add playlist to queue |
| d | delete file from filesystemd |
| D | delete playlist from filesystem |
| Y | download audio |
| r | refresh |
| R | rename |
2021-02-23 15:46:51 +08:00
| y/p | yank/paste file |
2021-02-06 00:18:31 +08:00
| / | find in playlist |
2021-02-06 11:14:26 +08:00
| s | search audio from youtube |
2021-02-23 15:46:51 +08:00
| t | edit mp3 tags |
2021-03-09 01:48:01 +08:00
| 1/2 | find lyric if available |
2021-02-06 11:14:26 +08:00
| Key (Queue) | Description |
2021-02-06 00:18:31 +08:00
|:----------------|--------------------------------:|
| j | down |
| k | up |
| l (lowercase L) | play selected song |
| d | remove from queue |
| D | delete playlist |
| z | toggle loop |
| s | shuffle |
2021-02-07 03:25:04 +08:00
| / | find in queue |
2021-02-28 13:26:42 +08:00
| t | lyric delay increase 0.5 second |
| r | lyric delay decrease 0.5 second |
2020-06-23 19:27:59 +08:00
2021-02-16 11:28:27 +08:00
### Scripting
2021-02-19 09:07:24 +08:00
2021-02-21 09:58:55 +08:00
Gomu uses [anko ](https://github.com/mattn/anko ) as its scripting language. You can read
more about scripting at our [wiki ](https://github.com/issadarkthing/gomu/wiki )
2021-02-19 09:07:24 +08:00
``` go
Keybinds.def_g("ctrl_x", func() {
out, err = shell(`echo "hello world"` )
if err != nil {
debug_popup("an error occured")
}
info_popup(out)
})
2021-02-16 11:28:27 +08:00
```
2020-06-23 19:27:59 +08:00
2021-02-16 11:28:27 +08:00
### Project Background
2020-08-11 23:50:24 -05:00
I just wanted to implement my own music player with a programming language i'm currently learning ([Go ](https://golang.org/ )). Gomu might not be stable as it in constant development. For now, it can fulfill basic music player functions such as:
- add and delete songs from queue
- create playlists
- skip
- play
- pause
2021-02-06 00:18:31 +08:00
- forward and rewind
2020-08-11 23:50:24 -05:00
Seeking and more advanced stuff has not yet been implemented; feel free to contribute :)