ags steal

This commit is contained in:
2023-10-29 15:05:17 +01:00
parent e7416f5bdf
commit 912479c43d
101 changed files with 10639 additions and 1 deletions

View 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' })
]
})
});