ags: implement per-monitor brightness control (#453)

This commit is contained in:
end-4
2024-05-03 10:19:36 +07:00
committed by GitHub
9 changed files with 131 additions and 33 deletions
+4 -4
View File
@@ -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 () => {
]
})
});
}
}