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";
|
on-click-right = "powerlimit toggle";
|
||||||
interval = refreshInterval;
|
interval = refreshInterval;
|
||||||
};
|
};
|
||||||
"custom/powerlimit" = {
|
|
||||||
exec = "powerlimit waybar";
|
|
||||||
interval = refreshInterval;
|
|
||||||
on-click-right = "powerlimit toggle";
|
|
||||||
};
|
|
||||||
pulseaudio = {
|
pulseaudio = {
|
||||||
scroll-step = 5;
|
scroll-step = 5;
|
||||||
format = "{volume}%{icon}{format_source}";
|
format = "{volume}%{icon}{format_source}";
|
||||||
|
@ -132,18 +127,23 @@ in {
|
||||||
on-click-right = "powersave toggle";
|
on-click-right = "powersave toggle";
|
||||||
tooltip = false;
|
tooltip = false;
|
||||||
};
|
};
|
||||||
"custom/powersave" = {
|
|
||||||
exec = "powersave waybar";
|
|
||||||
interval = refreshInterval;
|
|
||||||
on-click = "foot -e bash -c btop";
|
|
||||||
on-click-right = "powersave toggle";
|
|
||||||
};
|
|
||||||
"custom/display" = {
|
"custom/display" = {
|
||||||
exec = "swayscript monbar";
|
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 = "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";
|
on-click-right = "sleep 0.1 && swayscript gamingtoggle";
|
||||||
return-type = "json";
|
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}
|
echo ${toString cfg.onMax} > ${controlFileMax}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pkill -RTMIN+6 waybar
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
echo ${cfg.cpu.boost.enableCmd} > ${cfg.cpu.boost.controlFile}
|
echo ${cfg.cpu.boost.enableCmd} > ${cfg.cpu.boost.controlFile}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pkill -RTMIN+5 waybar
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
else
|
else
|
||||||
swaymsg "output \"''${output}\" power on"
|
swaymsg "output \"''${output}\" power on"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pkill -RTMIN+4 waybar
|
||||||
}
|
}
|
||||||
_sway_iterate_sockets toggle
|
_sway_iterate_sockets toggle
|
||||||
}
|
}
|
||||||
|
@ -26,6 +28,8 @@
|
||||||
else
|
else
|
||||||
swaymsg "output \"''${output}\" adaptive_sync off"
|
swaymsg "output \"''${output}\" adaptive_sync off"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
pkill -RTMIN+4 waybar
|
||||||
}
|
}
|
||||||
_sway_iterate_sockets toggle
|
_sway_iterate_sockets toggle
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue