dua-cli icon indicating copy to clipboard operation
dua-cli copied to clipboard

configurable keybindings

Open CouldBeThis opened this issue 11 months ago • 4 comments

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.

CouldBeThis avatar Sep 24 '23 14:09 CouldBeThis

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.

Byron avatar Sep 24 '23 15:09 Byron

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

CouldBeThis avatar Sep 25 '23 05:09 CouldBeThis

+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.

MilesCranmer avatar Apr 07 '24 21:04 MilesCranmer

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.)

CouldBeThis avatar Apr 14 '24 16:04 CouldBeThis