forked from Shinonome/dots-hyprland
fix tray (#329)
This commit is contained in:
@@ -48,14 +48,7 @@ export default () => {
|
|||||||
children: [
|
children: [
|
||||||
Widget.Box({ hexpand: true, }),
|
Widget.Box({ hexpand: true, }),
|
||||||
barTray,
|
barTray,
|
||||||
separatorDot,
|
Widget.EventBox({
|
||||||
barStatusIcons,
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
]
|
|
||||||
});
|
|
||||||
|
|
||||||
return Widget.EventBox({
|
|
||||||
onScrollUp: () => {
|
onScrollUp: () => {
|
||||||
if (!Audio.speaker) return;
|
if (!Audio.speaker) return;
|
||||||
if (Audio.speaker.volume <= 0.09) Audio.speaker.volume += 0.01;
|
if (Audio.speaker.volume <= 0.09) Audio.speaker.volume += 0.01;
|
||||||
@@ -78,11 +71,21 @@ export default () => {
|
|||||||
execAsync('playerctl previous').catch(print)
|
execAsync('playerctl previous').catch(print)
|
||||||
}),
|
}),
|
||||||
child: Widget.Box({
|
child: Widget.Box({
|
||||||
homogeneous: false,
|
children: [
|
||||||
|
separatorDot,
|
||||||
|
barStatusIcons,
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
return Widget.Box({
|
||||||
children: [
|
children: [
|
||||||
actualContent,
|
actualContent,
|
||||||
Widget.Box({ className: 'bar-corner-spacing' }),
|
Widget.Box({ className: 'bar-corner-spacing' }),
|
||||||
]
|
]
|
||||||
})
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -13,8 +13,8 @@ const SysTrayItem = (item) => Button({
|
|||||||
setup: (self) => self
|
setup: (self) => self
|
||||||
.hook(item, (self) => self.tooltipMarkup = item['tooltip-markup'])
|
.hook(item, (self) => self.tooltipMarkup = item['tooltip-markup'])
|
||||||
,
|
,
|
||||||
onClicked: btn => item.menu.popup_at_widget(btn, Gravity.SOUTH, Gravity.NORTH, null),
|
onPrimaryClick: (_, event) => item.activate(event),
|
||||||
onSecondaryClick: btn => item.menu.popup_at_widget(btn, Gravity.SOUTH, Gravity.NORTH, null),
|
onSecondaryClick: (btn, event) => item.menu.popup_at_widget(btn, Gravity.SOUTH, Gravity.NORTH, null),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const Tray = (props = {}) => {
|
export const Tray = (props = {}) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user