Waybar : Switch custom modules polling to signals.
This commit is contained in:
parent
4139870956
commit
0a3c52cf2a
|
@ -77,11 +77,6 @@ in {
|
|||
on-click-right = "powerlimit toggle";
|
||||
interval = refreshInterval;
|
||||
};
|
||||
"custom/powerlimit" = {
|
||||
exec = "powerlimit waybar";
|
||||
interval = refreshInterval;
|
||||
on-click-right = "powerlimit toggle";
|
||||
};
|
||||
pulseaudio = {
|
||||
scroll-step = 5;
|
||||
format = "{volume}%{icon}{format_source}";
|
||||
|
@ -132,18 +127,23 @@ in {
|
|||
on-click-right = "powersave toggle";
|
||||
tooltip = false;
|
||||
};
|
||||
"custom/powersave" = {
|
||||
exec = "powersave waybar";
|
||||
interval = refreshInterval;
|
||||
on-click = "foot -e bash -c btop";
|
||||
on-click-right = "powersave toggle";
|
||||
};
|
||||
"custom/display" = {
|
||||
exec = "swayscript monbar";
|
||||
interval = refreshInterval;
|
||||
on-click = "sleep 0.1 && swayscript montoggle"; # FIXME: remove sleep when resolved: https://github.com/Alexays/Waybar/issues/216
|
||||
on-click-right = "sleep 0.1 && swayscript gamingtoggle";
|
||||
return-type = "json";
|
||||
signal = 4;
|
||||
};
|
||||
"custom/powersave" = {
|
||||
exec = "powersave waybar";
|
||||
on-click = "foot -e bash -c btop";
|
||||
on-click-right = "powersave toggle";
|
||||
signal = 5;
|
||||
};
|
||||
"custom/powerlimit" = {
|
||||
exec = "powerlimit waybar";
|
||||
on-click-right = "powerlimit toggle";
|
||||
signal = 6;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
echo ${toString cfg.onMax} > ${controlFileMax}
|
||||
fi
|
||||
|
||||
pkill -RTMIN+6 waybar
|
||||
true
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
echo ${cfg.cpu.boost.enableCmd} > ${cfg.cpu.boost.controlFile}
|
||||
fi
|
||||
|
||||
pkill -RTMIN+5 waybar
|
||||
true
|
||||
}
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
else
|
||||
swaymsg "output \"''${output}\" power on"
|
||||
fi
|
||||
|
||||
pkill -RTMIN+4 waybar
|
||||
}
|
||||
_sway_iterate_sockets toggle
|
||||
}
|
||||
|
@ -26,6 +28,8 @@
|
|||
else
|
||||
swaymsg "output \"''${output}\" adaptive_sync off"
|
||||
fi
|
||||
|
||||
pkill -RTMIN+4 waybar
|
||||
}
|
||||
_sway_iterate_sockets toggle
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue