forked from Shinonome/dots-hyprland
ags: implement per-monitor brightness control (#453)
This commit is contained in:
@@ -46,7 +46,7 @@ export const Bar = async (monitor = 0) => {
|
||||
const minHeight = styleContext.get_property('min-height', Gtk.StateFlags.NORMAL);
|
||||
// execAsync(['bash', '-c', `hyprctl keyword monitor ,addreserved,${minHeight},0,0,0`]).catch(print);
|
||||
},
|
||||
startWidget: (await WindowTitle()),
|
||||
startWidget: (await WindowTitle(monitor)),
|
||||
centerWidget: Widget.Box({
|
||||
className: 'spacing-h-4',
|
||||
children: [
|
||||
|
||||
@@ -39,16 +39,16 @@ const WindowTitle = async () => {
|
||||
}
|
||||
|
||||
|
||||
export default async () => {
|
||||
export default async (monitor = 0) => {
|
||||
const optionalWindowTitleInstance = await WindowTitle();
|
||||
return Widget.EventBox({
|
||||
onScrollUp: () => {
|
||||
Indicator.popup(1); // Since the brightness and speaker are both on the same window
|
||||
Brightness.screen_value += 0.05;
|
||||
Brightness[monitor].screen_value += 0.05;
|
||||
},
|
||||
onScrollDown: () => {
|
||||
Indicator.popup(1); // Since the brightness and speaker are both on the same window
|
||||
Brightness.screen_value -= 0.05;
|
||||
Brightness[monitor].screen_value -= 0.05;
|
||||
},
|
||||
onPrimaryClick: () => {
|
||||
App.toggleWindow('sideleft');
|
||||
@@ -75,4 +75,4 @@ export default async () => {
|
||||
]
|
||||
})
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user