baogorek / datascroller

A python package offering data frame scrolling in the terminal
MIT License
35 stars 3 forks source link

Needs config file for assigning custom key combos #1

Open baogorek opened 5 years ago

baogorek commented 5 years ago

Called .scrollrc, perhaps?

Just had the idea that there could be a calibration function where the user presses each key named in the file to ensure the right key code is being used.

Also, this idea could be extended so that there's actually an interactive session that lets the user set the custom keys. It could even be part of package onboarding.

prerit912 commented 4 years ago

Ben, saw your video. If you guys need some extra hand I can assist.

Fill me up with the details on this one. I can see these are currently hard coded. Are you looking for something like this ---



baogorek commented 4 years ago

Hi @prerit912 , that's correct. We'd like to offer a way to override the default keybindings, perhaps with a config file named .datascroller. I don't know much about handling user configuration, so help would definitely be appreciated in that space.

There's a binary that comes with datascroller which is getkey. Run that, tap 2 keys in sequence and you'll get the two keycodes. So far the basic keys have been the same on PC and Mac, but John and I ran into a little trouble when we started trying Command combinations on the Mac. Just something to be aware of.

prerit912 commented 4 years ago

Perfect, I'll start researching into this.

baogorek commented 4 years ago

FYI, @prerit912, @kjmerf is joining the project and is interested in adding a database connection to the initialization file. Just wanted to sync with you to see if you've had any thoughts on that file format.

Update: Just tried the environment variable startup options described here and was able to get a python file to run prior to starting either a python or ipython session.

prerit912 commented 4 years ago

@kjmerf Hello!! @baogorek Yes, this looks a tad similar to .Rprofile file in R that can be set by user. We just need to be careful not to include computationally "heavy" code at the startup.

@baogorek FYI, I am in India for few months, will be coming back somewhere around February. And I have some great news, I got engaged last week. :D

baogorek commented 4 years ago

Congrats, @prerit912!!!