mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2026-01-03 06:12:51 +00:00
ags steal
This commit is contained in:
44
desktops/hyprland/ags/modules/rightspace.js
Normal file
44
desktops/hyprland/ags/modules/rightspace.js
Normal file
@@ -0,0 +1,44 @@
|
||||
import { App, Service, Utils, Widget } from '../imports.js';
|
||||
import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';
|
||||
import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';
|
||||
const { exec, execAsync, CONFIG_DIR } = Utils;
|
||||
import Indicator from '../scripts/indicator.js';
|
||||
import { StatusIcons } from "./statusicons.js";
|
||||
import { RoundedCorner } from "./lib/roundedcorner.js";
|
||||
import { Tray } from "./tray.js";
|
||||
|
||||
export const ModuleRightSpace = () => Widget.EventBox({
|
||||
onScrollUp: () => {
|
||||
if (Audio.speaker == null) return;
|
||||
Audio.speaker.volume += 0.03;
|
||||
Indicator.popup(1);
|
||||
},
|
||||
onScrollDown: () => {
|
||||
if (Audio.speaker == null) return;
|
||||
Audio.speaker.volume -= 0.03;
|
||||
Indicator.popup(1);
|
||||
},
|
||||
onPrimaryClick: () => App.toggleWindow('sideright'),
|
||||
onSecondaryClick: () => Mpris.getPlayer('')?.next(),
|
||||
onMiddleClick: () => Mpris.getPlayer('')?.playPause(),
|
||||
child: Widget.Box({
|
||||
homogeneous: false,
|
||||
children: [
|
||||
Widget.Box({
|
||||
hexpand: true,
|
||||
className: 'spacing-h-5 txt',
|
||||
children: [
|
||||
Widget.Box({
|
||||
hexpand: true,
|
||||
className: 'spacing-h-15 txt',
|
||||
setup: box => {
|
||||
box.pack_end(StatusIcons(), false, false, 0);
|
||||
box.pack_end(Tray(), false, false, 0);
|
||||
}
|
||||
}),
|
||||
]
|
||||
}),
|
||||
RoundedCorner('topright', { className: 'corner-black' })
|
||||
]
|
||||
})
|
||||
});
|
||||
Reference in New Issue
Block a user