RENAME : goMP -> gomp
Renaming goMP to gomp as it feels kind of awkward to have two upper case letters in a name of cli program.
This commit is contained in:
parent
d1f8751af8
commit
ae1b05c203
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
goMP
|
goMP
|
||||||
|
gomp
|
||||||
*.jpg
|
*.jpg
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# goMP
|
# gomp
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -19,4 +19,4 @@ https://user-images.githubusercontent.com/51816057/144759799-b9eecf9e-93ad-43a7-
|
|||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
|
|
||||||
The Documentation is hosted [here](https://aditya-K2.github.io/goMP/)
|
The Documentation is hosted [here](https://aditya-K2.github.io/gomp/)
|
||||||
|
5
app.go
5
app.go
@ -30,6 +30,11 @@ func newApplication(r *Renderer) *Application {
|
|||||||
return imagePreviewer.GetInnerRect()
|
return imagePreviewer.GetInnerRect()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
expandedView.SetBackgroundColor(tcell.ColorDefault)
|
||||||
|
Navbar.SetBackgroundColor(tcell.ColorDefault)
|
||||||
|
searchBar.SetBackgroundColor(tcell.ColorDefault)
|
||||||
|
imagePreviewer.SetBackgroundColor(tcell.ColorDefault)
|
||||||
|
|
||||||
searchBar.SetTitle("Search").SetTitleAlign(tview.AlignLeft)
|
searchBar.SetTitle("Search").SetTitleAlign(tview.AlignLeft)
|
||||||
searchBar.SetAutocompleteBackgroundColor(tcell.GetColor("#15191a"))
|
searchBar.SetAutocompleteBackgroundColor(tcell.GetColor("#15191a"))
|
||||||
searchBar.SetAutocompleteSelectBackgroundColor(tcell.GetColor("#e5e5e5"))
|
searchBar.SetAutocompleteSelectBackgroundColor(tcell.GetColor("#e5e5e5"))
|
||||||
|
2
cache/cache.go
vendored
2
cache/cache.go
vendored
@ -6,7 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/aditya-K2/goMP/utils"
|
"github.com/aditya-K2/gomp/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/aditya-K2/goMP/utils"
|
"github.com/aditya-K2/gomp/utils"
|
||||||
"github.com/aditya-K2/tview"
|
"github.com/aditya-K2/tview"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/aditya-K2/goMP/utils"
|
"github.com/aditya-K2/gomp/utils"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -14,19 +14,19 @@
|
|||||||
|
|
||||||
- Music Player Daemon must be setup and Running
|
- Music Player Daemon must be setup and Running
|
||||||
- Go Should Be Installed ( For Building )
|
- Go Should Be Installed ( For Building )
|
||||||
- After Reading this it is highly recommended to read the [sample_config](https://github.com/aditya-K2/goMP/blob/master/sample_config.yml)
|
- After Reading this it is highly recommended to read the [sample_config](https://github.com/aditya-K2/gomp/blob/master/sample_config.yml)
|
||||||
|
|
||||||
# Installing / Building
|
# Installing / Building
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/aditya-K2/goMP &&
|
git clone https://github.com/aditya-K2/gomp &&
|
||||||
cd goMP &&
|
cd gomp &&
|
||||||
go build
|
go build
|
||||||
```
|
```
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
|
||||||
Configuration of goMP is done through a `config.yml` file in `$HOME/config/goMP/`
|
Configuration of gomp is done through a `config.yml` file in `$HOME/config/gomp/`
|
||||||
|
|
||||||
It is essential to have some config options defined in order to have a smooth experience.
|
It is essential to have some config options defined in order to have a smooth experience.
|
||||||
|
|
||||||
@ -41,8 +41,8 @@ MPD_PORT : "6600"
|
|||||||
## Music Directory
|
## Music Directory
|
||||||
|
|
||||||
The Most Essential config option is `MUSIC_DIRECTORY` It is the path to your Music Folder that you have provided to mpd
|
The Most Essential config option is `MUSIC_DIRECTORY` It is the path to your Music Folder that you have provided to mpd
|
||||||
in the `mpd.conf` file. If you do not provide the path to the `MUSIC_DIRECTORY` then goMP parses the mpd.conf file for
|
in the `mpd.conf` file. If you do not provide the path to the `MUSIC_DIRECTORY` then gomp parses the mpd.conf file for
|
||||||
the `music_directory` option ( It is to be noted that goMP assumes that your mpd.conf file is at
|
the `music_directory` option ( It is to be noted that gomp assumes that your mpd.conf file is at
|
||||||
`$HOME/.config/mpd/mpd.conf`
|
`$HOME/.config/mpd/mpd.conf`
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
@ -53,7 +53,7 @@ The reason why you need to setup `MUSIC_DIRECTORY` manually because the paths to
|
|||||||
|
|
||||||
## Default Image Path
|
## Default Image Path
|
||||||
|
|
||||||
This is the Fallback Image that will be rendered if goMP doesn't find the embedded cover art or LastFM Cover Art.
|
This is the Fallback Image that will be rendered if gomp doesn't find the embedded cover art or LastFM Cover Art.
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
DEFAULT_IMAGE_PATH : "/path/to/default/image"
|
DEFAULT_IMAGE_PATH : "/path/to/default/image"
|
||||||
@ -67,7 +67,7 @@ The Default Position of the Image without any configuration assumes that you hav
|
|||||||
be rendered at different places in different terminals, Also the TUIs calculates positions with the according to rows and columns
|
be rendered at different places in different terminals, Also the TUIs calculates positions with the according to rows and columns
|
||||||
and the image is rendered at pixel positions so the exact position can't be defined [ the app tries its best by calculating
|
and the image is rendered at pixel positions so the exact position can't be defined [ the app tries its best by calculating
|
||||||
the font width and then predicting the position but it is best that you define some extra padding and your own image width ratio
|
the font width and then predicting the position but it is best that you define some extra padding and your own image width ratio
|
||||||
in config.yml. Please Read more about it in the [sample_config](https://github.com/aditya-K2/goMP/blob/master/sample_config.yml)
|
in config.yml. Please Read more about it in the [sample_config](https://github.com/aditya-K2/gomp/blob/master/sample_config.yml)
|
||||||
|
|
||||||
for e.g
|
for e.g
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ IMAGE_WIDTH_EXTRA_Y : -2.6
|
|||||||
```
|
```
|
||||||

|

|
||||||
|
|
||||||
Let's say upon opening goMP for the first time and your image is rendered this way.
|
Let's say upon opening gomp for the first time and your image is rendered this way.
|
||||||
|
|
||||||
Here the `Y` Position is too low hence we have to decrease the `ADDITIONAL_PADDING_Y` so that image will be rendered
|
Here the `Y` Position is too low hence we have to decrease the `ADDITIONAL_PADDING_Y` so that image will be rendered
|
||||||
in a better position so we decrement the `ADDITIONAL_PADDING_Y` by `9`
|
in a better position so we decrement the `ADDITIONAL_PADDING_Y` by `9`
|
||||||
@ -110,7 +110,7 @@ and the image appears like this:
|
|||||||
|
|
||||||
Which looks perfect. 🎉
|
Which looks perfect. 🎉
|
||||||
|
|
||||||
Read More about Additional Padding and Image Width in the [sample_config](https://github.com/aditya-K2/goMP/blob/master/sample_config.yml)
|
Read More about Additional Padding and Image Width in the [sample_config](https://github.com/aditya-K2/gomp/blob/master/sample_config.yml)
|
||||||
|
|
||||||
Please change the configuration according to your needs.
|
Please change the configuration according to your needs.
|
||||||
|
|
||||||
@ -122,7 +122,7 @@ By Default Images are cached to avoid re-extracting images and making redundant
|
|||||||
CACHE_DIR : "/path/to/the/cache/Directory/"
|
CACHE_DIR : "/path/to/the/cache/Directory/"
|
||||||
```
|
```
|
||||||
|
|
||||||
Read More about Caching in the [sample_config](https://github.com/aditya-K2/goMP/blob/master/sample_config.yml)
|
Read More about Caching in the [sample_config](https://github.com/aditya-K2/gomp/blob/master/sample_config.yml)
|
||||||
|
|
||||||
## Key Mappings
|
## Key Mappings
|
||||||
|
|
||||||
|
2
go.mod
2
go.mod
@ -1,4 +1,4 @@
|
|||||||
module github.com/aditya-K2/goMP
|
module github.com/aditya-K2/gomp
|
||||||
|
|
||||||
go 1.16
|
go 1.16
|
||||||
|
|
||||||
|
6
main.go
6
main.go
@ -4,11 +4,11 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/aditya-K2/goMP/utils"
|
"github.com/aditya-K2/gomp/utils"
|
||||||
|
|
||||||
"github.com/aditya-K2/fuzzy"
|
"github.com/aditya-K2/fuzzy"
|
||||||
"github.com/aditya-K2/goMP/cache"
|
"github.com/aditya-K2/gomp/cache"
|
||||||
"github.com/aditya-K2/goMP/config"
|
"github.com/aditya-K2/gomp/config"
|
||||||
"github.com/fhs/gompd/mpd"
|
"github.com/fhs/gompd/mpd"
|
||||||
"github.com/gdamore/tcell/v2"
|
"github.com/gdamore/tcell/v2"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
|
@ -3,7 +3,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/aditya-K2/goMP/utils"
|
"github.com/aditya-K2/gomp/utils"
|
||||||
|
|
||||||
"github.com/aditya-K2/tview"
|
"github.com/aditya-K2/tview"
|
||||||
"github.com/gdamore/tcell/v2"
|
"github.com/gdamore/tcell/v2"
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
"github.com/aditya-K2/goMP/utils"
|
"github.com/aditya-K2/gomp/utils"
|
||||||
|
|
||||||
"github.com/aditya-K2/tview"
|
"github.com/aditya-K2/tview"
|
||||||
"github.com/gdamore/tcell/v2"
|
"github.com/gdamore/tcell/v2"
|
||||||
@ -34,6 +34,7 @@ func newProgressBar(r *Renderer) *progressBar {
|
|||||||
SetCell(1, 0, tview.NewTableCell("")).
|
SetCell(1, 0, tview.NewTableCell("")).
|
||||||
SetCell(2, 0, tview.NewTableCell(""))
|
SetCell(2, 0, tview.NewTableCell(""))
|
||||||
|
|
||||||
|
a.SetBackgroundColor(tcell.ColorDefault)
|
||||||
a.SetBorder(true)
|
a.SetBorder(true)
|
||||||
|
|
||||||
a.SetDrawFunc(func(s tcell.Screen, x, y, width, height int) (int, int, int, int) {
|
a.SetDrawFunc(func(s tcell.Screen, x, y, width, height int) (int, int, int, int) {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"image"
|
"image"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/aditya-K2/goMP/cache"
|
"github.com/aditya-K2/gomp/cache"
|
||||||
"github.com/aditya-K2/goMP/utils"
|
"github.com/aditya-K2/gomp/utils"
|
||||||
"github.com/nfnt/resize"
|
"github.com/nfnt/resize"
|
||||||
"github.com/spf13/viper"
|
"github.com/spf13/viper"
|
||||||
"gitlab.com/diamondburned/ueberzug-go"
|
"gitlab.com/diamondburned/ueberzug-go"
|
||||||
|
Loading…
Reference in New Issue
Block a user