refactor(ags): rename some imports
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-11-25 12:18:46 -05:00
parent 524a2a6de9
commit b915591b26
5 changed files with 17 additions and 16 deletions

View file

@ -9,13 +9,13 @@ import BgLayer from '../widgets/bg-layer/main';
import Calendar from '../widgets/date/binto';
import Clipboard from '../widgets/clipboard/main';
import { NotifPopups, NotifCenter } from '../widgets/notifs/binto';
import OSD from '../widgets/osd/main';
import OnScreenDisplay from '../widgets/on-screen-display/main';
import PowerMenu from '../widgets/powermenu/main';
import Screenshot from '../widgets/screenshot/main';
import { closeAll, perMonitor } from '../lib';
import Brightness from '../services/brightness';
import GSR from '../services/gpu-screen-recorder';
import GpuScreenRecorder from '../services/gpu-screen-recorder';
import MonitorClicks from '../services/monitor-clicks';
@ -41,7 +41,7 @@ export default () => {
respond('osd popped up');
}
else if (request.startsWith('save-replay')) {
GSR.get_default().saveReplay();
GpuScreenRecorder.get_default().saveReplay();
respond('saving replay');
}
},
@ -57,12 +57,12 @@ export default () => {
Clipboard();
NotifPopups();
NotifCenter();
OSD();
OnScreenDisplay();
PowerMenu();
Screenshot();
Brightness.get_default({ caps: 'input2::capslock' });
GSR.get_default();
GpuScreenRecorder.get_default();
MonitorClicks.get_default();
},
});

View file

@ -11,8 +11,8 @@ import Clipboard from '../widgets/clipboard/main';
import Corners from '../widgets/corners/main';
import IconBrowser from '../widgets/icon-browser/main';
import { NotifPopups, NotifCenter } from '../widgets/notifs/wim';
import OSD from '../widgets/osd/main';
import OSK from '../widgets/on-screen-keyboard/main';
import OnScreenDisplay from '../widgets/on-screen-display/main';
import OnScreenKeyboard from '../widgets/on-screen-keyboard/main';
import PowerMenu from '../widgets/powermenu/main';
import Screenshot from '../widgets/screenshot/main';
@ -65,8 +65,8 @@ export default () => {
IconBrowser();
NotifPopups();
NotifCenter();
OSD();
OSK();
OnScreenDisplay();
OnScreenKeyboard();
PowerMenu();
Screenshot();

View file

@ -72,7 +72,7 @@ const notifySend = ({
});
@register()
export default class GSR extends GObject.Object {
export default class GpuScreenRecorder extends GObject.Object {
private _lastNotifID: number | undefined;
public constructor() {
@ -83,7 +83,7 @@ export default class GSR extends GObject.Object {
['gsr-start'],
(path) => {
if (!this._lastNotifID) {
console.error('[GSR] ID of warning notif not found');
console.error('[GpuScreenRecorder] ID of warning notif not found');
setTimeout(() => {
this._onSaved(path);
@ -101,14 +101,14 @@ export default class GSR extends GObject.Object {
}
}
private static _default: InstanceType<typeof GSR> | undefined;
private static _default: InstanceType<typeof GpuScreenRecorder> | undefined;
public static get_default() {
if (!GSR._default) {
GSR._default = new GSR();
if (!GpuScreenRecorder._default) {
GpuScreenRecorder._default = new GpuScreenRecorder();
}
return GSR._default;
return GpuScreenRecorder._default;
}
public saveReplay() {
@ -122,7 +122,7 @@ export default class GSR extends GObject.Object {
});
})
.catch((err) => {
console.error(`[GSR save-replay] ${err}`);
console.error(`[GpuScreenRecorder save-replay] ${err}`);
});
}

View file

@ -11,6 +11,7 @@ import Brightness from '../../services/brightness';
declare global {
function popup_osd(osd: string): void;
}
@register()
class ProgressBar extends astalify(Gtk.ProgressBar) {
constructor(props: ConstructProps<