Byron / dua-cli

View disk space usage and delete unwanted data, fast.
https://lib.rs/crates/dua-cli
MIT License
4.17k stars 113 forks source link

configurable keybindings #171

Open CouldBeThis opened 1 year ago

CouldBeThis commented 1 year ago

Love this application. :)

Could there be a way to remap the keybindings for dua interactive? The existing ones conflict with my terminal settings such as to make the dua actions unavailable. And conflict with my force of habit so I am doing things I don't mean to do.

due diligence: looked for something like ~/.dua, ~/.config/dua, nothing documented and no relevant issues found.

Workaround, of course, is to launch in a terminal that doesn't have the keybindings.

Byron commented 1 year ago

Love this application. :)

Thanks :)!

As of now, there is no way to configure the keybindings of dua i/interactive. However, while that is the case, you could probably most easily patch the event loop and give it any key-bindings you like.

CouldBeThis commented 1 year ago

Thanks! I might try that. TBH aliasing dua to launch in a separate terminal emulator is probably more straight forward for me.

MilesCranmer commented 7 months ago

+1 for this. Personally, I can't use the Ctrl+t binding because it is hard-wired to do other operations in my operating system. So a config file would be great! You probably only need a single ~/.dua.toml file that has overrides any key-bindings. You could have a struct that declares the keys, and, at initialization, is defined with the defaults – unless there is a ~/.dua.toml file.

CouldBeThis commented 7 months ago

I never remember to launch dua in the custom terminal profile I made for it... because of the keybinding conflict basically dua is read only; I can't access any of the operations. At least I managed to train myself not to quit it all the time by mistake.

It's still 10x better than any alternative though.

(I don't know how to program so sadly I can't contribute anything more than enthusiasm.)