nic: add click handler
This commit is contained in:
parent
2e18d71284
commit
900a0710c5
1 changed files with 4 additions and 1 deletions
|
@ -25,6 +25,7 @@ import subprocess
|
|||
|
||||
import core.module
|
||||
import core.decorators
|
||||
import core.input
|
||||
import util.cli
|
||||
import util.format
|
||||
|
||||
|
@ -58,6 +59,8 @@ class Module(core.module.Module):
|
|||
|
||||
self.iw = shutil.which("iw")
|
||||
self._update_widgets(widgets)
|
||||
core.input.register(self, button=core.input.LEFT_MOUSE, cmd='/usr/local/bin/wifi-menu')
|
||||
core.input.register(self, button=core.input.RIGHT_MOUSE, cmd='nm-connection-editor')
|
||||
|
||||
def update(self):
|
||||
self._update_widgets(self.widgets())
|
||||
|
@ -88,7 +91,7 @@ class Module(core.module.Module):
|
|||
|
||||
def _iswlan(self, intf):
|
||||
# wifi, wlan, wlp, seems to work for me
|
||||
if intf.startswith("w"):
|
||||
if intf.startswith("w") and not intf.startswith("wwan"):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in a new issue