bougyman / wifish

Simple wifi tool for linux
Other
47 stars 12 forks source link

Can't change default interface #6

Closed 5nefarious closed 7 years ago

5nefarious commented 7 years ago

On my laptop, I have two wifi interfaces: wlp4s0 and p2p-dev-wlp4s0. wpa_cli always selects the wrong one by default, so I can't use wifish at all.

Could you add a way to specify a default interface, or a command line switch to set the interface when running the wifish script?

bougyman commented 7 years ago

Yes this just happened to me, too. Locally I made a code change to use an environment variable for this, but I can't help from thinking there must be a better way. What do you think? Is it time for a ~/.wifish ?

bougyman commented 7 years ago

The other options I was considering is just ignoring any p2p-dev-* interfaces.

bougyman commented 7 years ago

I went ahead and used -i with the ability to set WPA_CLI_INTERFACE at the environment level. Please let me know if this works for you (works4me).

5nefarious commented 7 years ago

The -i option does work for me. It does seem a bit clunky though. On the other hand, introducing a configuration file for just one option seems like too much.

Maybe you could read from an environment variable? Then you could just define your default interface in .bashrc or something and forget about it.