Skip to content

Instantly share code, notes, and snippets.

@orschiro
Created February 19, 2018 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orschiro/6910cf3a86e9a114255464b552d9f4cd to your computer and use it in GitHub Desktop.
Save orschiro/6910cf3a86e9a114255464b552d9f4cd to your computer and use it in GitHub Desktop.
function enable() {
aggregateMenu = Main.panel.statusArea.aggregateMenu;
if (aggregateMenu.hasOwnProperty('_volume') && aggregateMenu._volume instanceof PanelMenu.SystemIndicator) {
volumeIndicator = aggregateMenu._volume;
_onVolumeIndicatorScrollEventId = volumeIndicator.indicators.connect('scroll-event', _onVolumeIndicatorScroll);
_onVolumeIndicatorClickEventId = volumeIndicator.indicators.connect('button-press-event', _onVolumeIndicatorClick);
_onAggregateMenuEnterEventId = aggregateMenu.menu.actor.connect('enter-event', _onAggregateMenuEnter);
_onAggregateMenuLeaveEventId = aggregateMenu.menu.actor.connect('leave-event', _onAggregateMenuLeave);
_onAggregateMenuClickEventId = aggregateMenu.actor.connect('button-press-event', _onAggregateMenuClick);
}
}
@konkor
Copy link

konkor commented Feb 19, 2018

Yeah the same thing. You need just _power indicator and connect scroll event to another _brightness._proxy.Brightness = percent;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment