Fix: OSDs now follow the active monitor appropriately. (#584)
This commit is contained in:
@@ -40,9 +40,10 @@ updatesPoller.initialize('updates');
|
|||||||
const updatesIcon = Variable.derive(
|
const updatesIcon = Variable.derive(
|
||||||
[bind(icon.pending), bind(icon.updated), bind(pendingUpdates)],
|
[bind(icon.pending), bind(icon.updated), bind(pendingUpdates)],
|
||||||
(pendingIcon, updatedIcon, pUpdates) => {
|
(pendingIcon, updatedIcon, pUpdates) => {
|
||||||
return pUpdates === '0' ? updatedIcon : pendingIcon;
|
return parseFloat(pUpdates) === 0 ? updatedIcon : pendingIcon;
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
export const Updates = (): BarBoxChild => {
|
export const Updates = (): BarBoxChild => {
|
||||||
const updatesModule = Module({
|
const updatesModule = Module({
|
||||||
textIcon: updatesIcon(),
|
textIcon: updatesIcon(),
|
||||||
|
|||||||
@@ -85,10 +85,10 @@ export const handleReveal = (self: Widget.Revealer | Widget.Window, property: 'r
|
|||||||
*/
|
*/
|
||||||
export const getOsdMonitor = (): Binding<number> => {
|
export const getOsdMonitor = (): Binding<number> => {
|
||||||
return Variable.derive(
|
return Variable.derive(
|
||||||
[bind(hyprlandService.focusedMonitor, 'id'), bind(monitor), bind(active_monitor)],
|
[bind(hyprlandService, 'focusedMonitor'), bind(monitor), bind(active_monitor)],
|
||||||
(currentMonitor, defaultMonitor, followMonitor) => {
|
(currentMonitor, defaultMonitor, followMonitor) => {
|
||||||
if (followMonitor === true) {
|
if (followMonitor === true) {
|
||||||
return currentMonitor;
|
return currentMonitor.id;
|
||||||
}
|
}
|
||||||
|
|
||||||
return defaultMonitor;
|
return defaultMonitor;
|
||||||
|
|||||||
Reference in New Issue
Block a user