home/polybar: add support of laptop wifi interface

This commit is contained in:
Dmitriy Pleshevskiy 2022-09-26 03:15:32 +03:00
parent 3c153d4a90
commit a54b9ffdac
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -2,6 +2,22 @@
with lib; 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" = { "bar/main" = {
monitor = "\${env:MONITOR:DisplayPort-1}"; monitor = "\${env:MONITOR:DisplayPort-1}";
@ -14,7 +30,7 @@ with lib;
radius = 0; radius = 0;
modules = { modules = {
left = "xmonad"; left = "xmonad";
center = "date wifi"; center = "date wifi_home wifi_laptop";
right = "exchangerate volume lang time"; right = "exchangerate volume lang time";
}; };
}; };
@ -56,19 +72,8 @@ with lib;
}; };
}; };
"module/wifi" = { "module/wifi_home" = mkWifi "wlp11s0f3u2";
type = "internal/network"; "module/wifi_laptop" = mkWifi "wlp2s0";
interval = 3;
interface = {
text = "wlp11s0f3u2";
type = "wireless";
};
label.connected = "%essid% %signal%";
format.connected = {
prefix = "| ";
suffix = "%";
};
};
"module/xmonad" = mkIf config.ui.xmonad.enable { "module/xmonad" = mkIf config.ui.xmonad.enable {
type = "custom/script"; type = "custom/script";