home/polybar: add support of laptop wifi interface
This commit is contained in:
parent
3c153d4a90
commit
a54b9ffdac
1 changed files with 19 additions and 14 deletions
|
@ -2,6 +2,22 @@
|
|||
|
||||
with lib;
|
||||
|
||||
let
|
||||
mkWifi = interface: {
|
||||
type = "internal/network";
|
||||
interval = 3;
|
||||
interface = {
|
||||
text = interface;
|
||||
type = "wireless";
|
||||
};
|
||||
label.connected = "%essid% %signal%";
|
||||
format.connected = {
|
||||
prefix = "| ";
|
||||
suffix = "%";
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
"bar/main" = {
|
||||
monitor = "\${env:MONITOR:DisplayPort-1}";
|
||||
|
@ -14,7 +30,7 @@ with lib;
|
|||
radius = 0;
|
||||
modules = {
|
||||
left = "xmonad";
|
||||
center = "date wifi";
|
||||
center = "date wifi_home wifi_laptop";
|
||||
right = "exchangerate volume lang time";
|
||||
};
|
||||
};
|
||||
|
@ -56,19 +72,8 @@ with lib;
|
|||
};
|
||||
};
|
||||
|
||||
"module/wifi" = {
|
||||
type = "internal/network";
|
||||
interval = 3;
|
||||
interface = {
|
||||
text = "wlp11s0f3u2";
|
||||
type = "wireless";
|
||||
};
|
||||
label.connected = "%essid% %signal%";
|
||||
format.connected = {
|
||||
prefix = "| ";
|
||||
suffix = "%";
|
||||
};
|
||||
};
|
||||
"module/wifi_home" = mkWifi "wlp11s0f3u2";
|
||||
"module/wifi_laptop" = mkWifi "wlp2s0";
|
||||
|
||||
"module/xmonad" = mkIf config.ui.xmonad.enable {
|
||||
type = "custom/script";
|
||||
|
|
Loading…
Reference in a new issue