97b2e4c4bc
the position is now calculated with the help of font_pixel_width and font_pixel_height font_pixel_width = Total X Pixels / Total Columns font_pixel_height = Total Y Pixels / Total Rows which is then multiplied to row and column co-ordinates of preview box to get it's pixel position. |
||
---|---|---|
.gitignore | ||
App.go | ||
client.go | ||
fileBrowser.go | ||
go.mod | ||
go.sum | ||
imageUtils.go | ||
LICENSE | ||
main.go | ||
progressBar.go | ||
README.md | ||
render.go | ||
utils.go |
goMP
MPD client inspired by ncmpcpp written in GO
Roadmap
- Add Functionality to Sort out most played songs
- Add a config parser ( preferably YAML )
- Image Previews
- The Image Previews are working but the placement is very hacky and needs some work
- Fuzzy Searching
- Visual Mode (like vim) for updating playlists
- Music Visualizer
Prerequisites
- Music Player Daemon must be setup
- Go Should Be Installed ( for building )
- Set the Path to your mpd DATABASE in progressbar.go
var DBDIR string = "PATH TO YOUR MPD DATABASE HERE"
- In imageUtils.go set the path for your default Image
var path string = "YOUR DEFAULT IMAGE PATH HERE"
Installing / Building
git clone https://github.com/aditya-K2/goMP &&
cd goMP &&
go build
Image Placement
The image is rendered by calculating pixels by multiplying the rows and columns with the font-width which is calculated by dividing the terminal width and height ( Please let me know if there is a better way to do this ) this let's to uneven placement so it is better that you disable the borders for the imagePreview holder.
in App.go
imagePreviewer.SetBorder(false)
With Borders ( Sometimes [Mostly Maximized Terminals] )
Without Borders
Note: Your terminal window padding also affects the tui.