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;
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";