Commit Graph

66 Commits

Author SHA1 Message Date
aditya-K2 4623f0d63c RENAME kMap -> FUNC_MAP
this naming makes more sense
2021-11-12 14:06:51 +05:30
aditya-K2 3492ec9349 Using the KEY_MAP map for handling events
Following Changes have been made:
    1. Using GenerateMappings() function
    2. Using the KEY_MAP map to handle events which shortens the code
       and adds modularity.
2021-11-11 23:30:40 +05:30
aditya-K2 602fc193fc minor changes 2021-11-11 22:30:14 +05:30
aditya-K2 1572a460b0 Making a config package for Generating keymappings
Following changes have been made:
    1. Moving the getMusicDirectory() to config package
    2. Moving the config.go to config package
    3. Generating a Function Map that will be used for Generating keymappings in main.go
    4. Using the config packge in main.go
    5. First we are reading the user configuration values with
       config.ReadConfig() and then we are reading the mappings with
       config.ReadMappings() with the help of Function Map that is
       generated.
2021-11-11 21:57:01 +05:30
aditya-K2 af9b9a1c0a Delete selected song from Playlist.
Now, Pressing d deletes the selected song.
2021-11-06 19:25:23 +05:30
aditya-K2 a365ca8c08 minor changes 2021-11-05 14:47:27 +05:30
aditya-K2 5ad7b90844 Added a config parser
Add a config.yml/config.toml file to $HOME/.config/goMP/ so that user
configurations are read.
2021-11-05 12:40:46 +05:30
aditya-K2 3ad3e58019 Image Previews Implementation 2021-10-24 13:26:10 +05:30
aditya-K2 46d721ffb4 pressing q now quits out of the application 2021-10-24 01:33:20 +05:30
aditya-K2 e137dc6c1e added Draw Function for expanded View
The Draw function is decided with the help of the InsidePlaylist boolean
value.
2021-10-18 12:18:51 +05:30
aditya-K2 e84e317079 Refactored the Startup Setup into A new Struct
- Added A new Struct Application which has all the other components as
  its fields
  -- the `newApplication()` Function returns a pointer to the newly
  created Application from which other fields can be accessed. The
  fields are as follows

	|   App          *tview.Application
	|   expandedView *tview.Table
	|   Navbar       *tview.Table
	|   searchBar    *tview.Table
	|   pBar         *progressBar

- Minor changes to main.go
2021-10-18 08:13:21 +05:30
aditya-K2 c6d2e8d8af Added Playlist Functionality
Using Switch case for mappings and removed Cycling

The Feature of Cycling through all the windows now seems useless instead
I am assigning each of the windows a number and one can cycle through
them using the number keys.

Also now the default window is the playlist window instead of the files
tab. The mappings are separated with the help of the global boolean value
InPlaylist
2021-10-18 07:51:57 +05:30
aditya-K2 11eb7c35b6 Working Prototype for the Files Navigation
Heavy Refactoring is needed for this. The Required Mappings have been
added and the Delay in keyboard input has been fixed. The Delay in
keyboard input was due to Queueing the events ( although it was a go
routine ). The Solution was to use just Draw() Method from tview.Application.
2021-10-17 22:30:57 +05:30
aditya-K2 0b08b284ab Refactoring of the Components
To Achieve focus functionality we need to separate each of this
Components so I have extracted the Components out.
2021-10-14 22:04:16 +05:30
aditya-K2 a41e060866 minor changes in formatting 2021-10-13 00:07:39 +05:30
aditya-K2 5f9c5fde52 Added Basic Layout and Using tview package for TUI
Decided to Go with tview package for building TUIs and
just added the basic layout of the app.
The Idea is to have a side menu to navigate between the other options.
Just like spotify-tui ( Which has taken inspiration from the orignal
spotify Client) and Having a progress bar at bottom ( Still figuring out
how to implement this )
2021-10-13 00:00:16 +05:30