ENH turn off nm dmenu feature if not required

This commit is contained in:
Nathan Dwarshuis 2022-08-01 10:47:05 -04:00
parent 9530b7369f
commit eda32c6e25
1 changed files with 4 additions and 2 deletions

View File

@ -139,9 +139,11 @@ runWinMenu :: SometimesX
runWinMenu = spawnDmenuCmd "window switcher" ["-show", "window"]
runNetMenu :: Maybe SysClient -> SometimesX
runNetMenu cl =
sometimesDBus cl "network control menu" "rofi NetworkManager" tree cmd
runNetMenu cl = Sometimes "network control menu" enabled
[Subfeature root "network control menu"]
where
enabled f = xpfEthernet f || xpfWireless f || xpfVPN f
root = DBusRoot_ cmd tree cl
cmd _ = spawnCmd myDmenuNetworks $ themeArgs "#ff3333"
tree = And_ (Only_ $ Bus networkManagerPkgs networkManagerBus)
$ toAnd_ (DBusIO dmenuDep) $ DBusIO