forked from Shinonome/dots-hyprland
make indicators (more likely to work with) multimonitor
This commit is contained in:
@@ -16,7 +16,7 @@ const ColorBox = ({
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
const colorschemeContent = Box({
|
const ColorschemeContent = () => Box({
|
||||||
className: 'osd-colorscheme spacing-v-5',
|
className: 'osd-colorscheme spacing-v-5',
|
||||||
vertical: true,
|
vertical: true,
|
||||||
hpack: 'center',
|
hpack: 'center',
|
||||||
@@ -44,7 +44,7 @@ const colorschemeContent = Box({
|
|||||||
export default () => Widget.Revealer({
|
export default () => Widget.Revealer({
|
||||||
transition: 'slide_down',
|
transition: 'slide_down',
|
||||||
transitionDuration: 200,
|
transitionDuration: 200,
|
||||||
child: colorschemeContent,
|
child: ColorschemeContent(),
|
||||||
setup: (self) => self.hook(showColorScheme, (revealer) => {
|
setup: (self) => self.hook(showColorScheme, (revealer) => {
|
||||||
revealer.revealChild = showColorScheme.value;
|
revealer.revealChild = showColorScheme.value;
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||||
import Indicator from '../../services/indicator.js';
|
import Indicator from '../../services/indicator.js';
|
||||||
import IndicatorValues from './indicatorvalues.js';
|
import IndicatorValues from './indicatorvalues.js';
|
||||||
// import MusicControls from './musiccontrols.js';
|
import MusicControls from './musiccontrols.js';
|
||||||
import ColorScheme from './colorscheme.js';
|
import ColorScheme from './colorscheme.js';
|
||||||
import NotificationPopups from './notificationpopups.js';
|
import NotificationPopups from './notificationpopups.js';
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ export default (monitor = 0) => Widget.Window({
|
|||||||
css: 'min-height: 2px;',
|
css: 'min-height: 2px;',
|
||||||
children: [
|
children: [
|
||||||
IndicatorValues(),
|
IndicatorValues(),
|
||||||
// MusicControls(),
|
MusicControls(),
|
||||||
NotificationPopups(),
|
NotificationPopups(),
|
||||||
ColorScheme(),
|
ColorScheme(),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -4,37 +4,7 @@ import Notifications from 'resource:///com/github/Aylur/ags/service/notification
|
|||||||
const { Box } = Widget;
|
const { Box } = Widget;
|
||||||
import Notification from '../../lib/notification.js';
|
import Notification from '../../lib/notification.js';
|
||||||
|
|
||||||
const PopupNotification = (notifObject) => Widget.Box({
|
export default () => Box({
|
||||||
homogeneous: true,
|
|
||||||
children: [
|
|
||||||
Widget.EventBox({
|
|
||||||
onHoverLost: () => {
|
|
||||||
notifObject.dismiss();
|
|
||||||
},
|
|
||||||
child: Widget.Revealer({
|
|
||||||
revealChild: true,
|
|
||||||
child: Widget.Box({
|
|
||||||
children: [Notification({
|
|
||||||
notifObject: notifObject,
|
|
||||||
isPopup: true,
|
|
||||||
props: { hpack: 'fill' },
|
|
||||||
})],
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
})
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
const naiveNotifPopupList = Widget.Box({
|
|
||||||
vertical: true,
|
|
||||||
className: 'spacing-v-5',
|
|
||||||
setup: (self) => self.hook(Notifications, (box) => {
|
|
||||||
box.children = Notifications.popups.reverse()
|
|
||||||
.map(notifItem => PopupNotification(notifItem));
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
|
|
||||||
const notifPopupList = Box({
|
|
||||||
vertical: true,
|
vertical: true,
|
||||||
className: 'osd-notifs spacing-v-5-revealer',
|
className: 'osd-notifs spacing-v-5-revealer',
|
||||||
attribute: {
|
attribute: {
|
||||||
@@ -72,5 +42,3 @@ const notifPopupList = Box({
|
|||||||
.hook(Notifications, (box, id) => box.attribute.dismiss(box, id, true), 'closed')
|
.hook(Notifications, (box, id) => box.attribute.dismiss(box, id, true), 'closed')
|
||||||
,
|
,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default () => notifPopupList;
|
|
||||||
Reference in New Issue
Block a user