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(
|
||||
[bind(icon.pending), bind(icon.updated), bind(pendingUpdates)],
|
||||
(pendingIcon, updatedIcon, pUpdates) => {
|
||||
return pUpdates === '0' ? updatedIcon : pendingIcon;
|
||||
return parseFloat(pUpdates) === 0 ? updatedIcon : pendingIcon;
|
||||
},
|
||||
);
|
||||
|
||||
export const Updates = (): BarBoxChild => {
|
||||
const updatesModule = Module({
|
||||
textIcon: updatesIcon(),
|
||||
|
||||
@@ -85,10 +85,10 @@ export const handleReveal = (self: Widget.Revealer | Widget.Window, property: 'r
|
||||
*/
|
||||
export const getOsdMonitor = (): Binding<number> => {
|
||||
return Variable.derive(
|
||||
[bind(hyprlandService.focusedMonitor, 'id'), bind(monitor), bind(active_monitor)],
|
||||
[bind(hyprlandService, 'focusedMonitor'), bind(monitor), bind(active_monitor)],
|
||||
(currentMonitor, defaultMonitor, followMonitor) => {
|
||||
if (followMonitor === true) {
|
||||
return currentMonitor;
|
||||
return currentMonitor.id;
|
||||
}
|
||||
|
||||
return defaultMonitor;
|
||||
|
||||
Reference in New Issue
Block a user