refactor(ags): switch back to global imports
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
65b3b14489
commit
3a8cc994f2
67 changed files with 143 additions and 179 deletions
|
@ -140,6 +140,11 @@
|
|||
"console": "readonly",
|
||||
"logError": "readonly",
|
||||
"setTimeout": "readonly",
|
||||
"setInterval": "readonly"
|
||||
"setInterval": "readonly",
|
||||
"Widget": "readonly",
|
||||
"Service": "readonly",
|
||||
"Variable": "readonly",
|
||||
"Utils": "readonly",
|
||||
"App": "readonly"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import { execAsync, monitorFile } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { execAsync, monitorFile } = Utils;
|
||||
|
||||
|
||||
/** @param {string} host */
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import Service from 'resource:///com/github/Aylur/ags/service.js';
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
import { exec, execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { exec, execAsync } = Utils;
|
||||
|
||||
const KBD = 'tpacpi::kbd_backlight';
|
||||
const CAPS = 'input0::capslock';
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
import Service from 'resource:///com/github/Aylur/ags/service.js';
|
||||
|
||||
import { subprocess } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
const { subprocess } = Utils;
|
||||
|
||||
const ON_RELEASE_TRIGGERS = [
|
||||
'released',
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
import Service from 'resource:///com/github/Aylur/ags/service.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
const { execAsync, subprocess } = Utils;
|
||||
|
||||
import TouchGestures from './touch-gestures.ts';
|
||||
import { execAsync, subprocess } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
|
||||
const ROTATION_MAP = {
|
||||
'normal': 0,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import Service from 'resource:///com/github/Aylur/ags/service.js';
|
||||
import { subprocess } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { subprocess } = Utils;
|
||||
|
||||
const SCREEN = '/dev/input/by-path/platform-AMDI0010\:00-event';
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
|
||||
import { Box, Icon, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { lookUpIcon } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Box, Icon, Label } = Widget;
|
||||
const { lookUpIcon } = Utils;
|
||||
|
||||
import CursorBox from '../misc/cursorbox.ts';
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Applications from 'resource:///com/github/Aylur/ags/service/applications.js';
|
||||
const Applications = await Service.import('applications');
|
||||
const { Box, Entry, Icon, Label, ListBox, Revealer, Scrollable } = Widget;
|
||||
|
||||
// @ts-expect-error find cleaner way to import this
|
||||
import { Fzf, FzfResultItem } from 'file:///home/matt/.nix/modules/ags/config/node_modules/fzf/dist/fzf.es.js';
|
||||
|
||||
import { Box, Entry, Icon, Label, ListBox, Revealer, Scrollable } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
|
||||
import PopupWindow from '../misc/popup.ts';
|
||||
import AppItem from './app-item.ts';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Box, CenterBox, Window } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, CenterBox, Window } = Widget;
|
||||
|
||||
import SysTray from './items/systray.ts';
|
||||
import Separator from '../misc/separator.ts';
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
|
||||
import { Box, EventBox, Revealer, Window } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, EventBox, Revealer, Window } = Widget;
|
||||
|
||||
// Types
|
||||
import { Variable as Var } from 'types/variable';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';
|
||||
|
||||
import { Label, Icon } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const Audio = await Service.import('audio');
|
||||
const { Label, Icon } = Widget;
|
||||
|
||||
import { SpeakerIcon } from '../../misc/audio-icons.ts';
|
||||
import HoverRevealer from './hover-revealer.ts';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import Bluetooth from 'resource:///com/github/Aylur/ags/service/bluetooth.js';
|
||||
|
||||
import { Label, Icon } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const Bluetooth = await Service.import('bluetooth');
|
||||
const { Label, Icon } = Widget;
|
||||
|
||||
import HoverRevealer from './hover-revealer.ts';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Icon, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Icon, Label } = Widget;
|
||||
|
||||
import Brightness from '../../../services/brightness.ts';
|
||||
import HoverRevealer from './hover-revealer.ts';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Box, Revealer } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, Revealer } = Widget;
|
||||
|
||||
import Separator from '../../misc/separator.ts';
|
||||
import CursorBox from '../../misc/cursorbox.ts';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
|
||||
import { Icon, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
const { Icon, Label } = Widget;
|
||||
|
||||
import HoverRevealer from './hover-revealer.ts';
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import Network from 'resource:///com/github/Aylur/ags/service/network.js';
|
||||
|
||||
import { Label, Icon } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const Network = await Service.import('network');
|
||||
const { Label, Icon } = Widget;
|
||||
|
||||
import HoverRevealer from './hover-revealer.ts';
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import Battery from 'resource:///com/github/Aylur/ags/service/battery.js';
|
||||
|
||||
import { Label, Icon, Box } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const Battery = await Service.import('battery');
|
||||
const { Label, Icon, Box } = Widget;
|
||||
|
||||
import Separator from '../../misc/separator.ts';
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
|
||||
import CursorBox from '../../misc/cursorbox.ts';
|
||||
import Clock from './clock';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Label } = Widget;
|
||||
const { new_now_local } = imports.gi.GLib.DateTime;
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Applications from 'resource:///com/github/Aylur/ags/service/applications.js';
|
||||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
const Applications = await Service.import('applications');
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
const { Box, Icon, Label } = Widget;
|
||||
|
||||
import { Box, Icon, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import Separator from '../../misc/separator.ts';
|
||||
|
||||
const SPACING = 8;
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import { Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
const { Label } = Widget;
|
||||
|
||||
import CursorBox from '../../misc/cursorbox.ts';
|
||||
import Persist from '../../misc/persist.ts';
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';
|
||||
|
||||
import { Box, CenterBox, Icon, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const Notifications = await Service.import('notifications');
|
||||
const { Box, CenterBox, Icon, Label } = Widget;
|
||||
|
||||
import CursorBox from '../../misc/cursorbox.ts';
|
||||
import Separator from '../../misc/separator.ts';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Label } = Widget;
|
||||
|
||||
import Tablet from '../../../services/tablet.ts';
|
||||
import CursorBox from '../../misc/cursorbox.ts';
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
|
||||
import { Box, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, Label } = Widget;
|
||||
|
||||
import Audio from '../hovers/audio.ts';
|
||||
import Bluetooth from '../hovers/bluetooth.ts';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import SystemTray from 'resource:///com/github/Aylur/ags/service/systemtray.js';
|
||||
const SystemTray = await Service.import('systemtray');
|
||||
|
||||
import { timeout } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
import { Box, Icon, MenuItem, MenuBar, Revealer } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { timeout } = Utils;
|
||||
const { Box, Icon, MenuItem, MenuBar, Revealer } = Widget;
|
||||
|
||||
import Separator from '../../misc/separator.ts';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Box, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, Label } = Widget;
|
||||
|
||||
import Tablet from '../../../services/tablet.ts';
|
||||
import CursorBox from '../../misc/cursorbox.ts';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
|
||||
import { timeout } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
import { Box, Overlay, Revealer } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { timeout } = Utils;
|
||||
const { Box, Overlay, Revealer } = Widget;
|
||||
|
||||
import CursorBox from '../../misc/cursorbox.ts';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Window, CenterBox, Box } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Window, CenterBox, Box } = Widget;
|
||||
|
||||
import Separator from '../misc/separator.ts';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Window } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Window } = Widget;
|
||||
|
||||
import RoundedCorner from './screen-corners.ts';
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Box, DrawingArea } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, DrawingArea } = Widget;
|
||||
|
||||
const { Gtk } = imports.gi;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Box, Calendar, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, Calendar, Label } = Widget;
|
||||
|
||||
const { new_now_local } = imports.gi.GLib.DateTime;
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { timeout } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
import { Box, EventBox, Overlay } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { timeout } = Utils;
|
||||
const { Box, EventBox, Overlay } = Widget;
|
||||
|
||||
const { Gtk } = imports.gi;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';
|
||||
const Mpris = await Service.import('mpris');
|
||||
|
||||
import { Button, Icon, Label, Stack, Slider, CenterBox, Box } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { execAsync, lookUpIcon, readFileAsync } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Button, Icon, Label, Stack, Slider, CenterBox, Box } = Widget;
|
||||
const { execAsync, lookUpIcon, readFileAsync } = Utils;
|
||||
|
||||
import Separator from '../misc/separator.ts';
|
||||
import CursorBox from '../misc/cursorbox.ts';
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
const Mpris = await Service.import('mpris');
|
||||
|
||||
import { Box, CenterBox } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, CenterBox } = Widget;
|
||||
|
||||
import * as mpris from './mpris.ts';
|
||||
import PlayerGesture from './gesture.ts';
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
const Audio = await Service.import('audio');
|
||||
|
||||
const speakerIcons = {
|
||||
101: 'audio-volume-overamplified-symbolic',
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Window } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Window } = Widget;
|
||||
|
||||
|
||||
export default () => Window({
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
|
||||
// Types
|
||||
import { PopupWindow } from 'global-types';
|
||||
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
import { register } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import Gtk from 'gi://Gtk?version=3.0';
|
||||
import Gdk from 'gi://Gdk?version=3.0';
|
||||
|
||||
// Types
|
||||
import { BaseProps, Widget } from 'types/widgets/widget';
|
||||
import { BaseProps, Widget as AgsWidget } from 'types/widgets/widget';
|
||||
type EventHandler<Self> = (self: Self, event: Gdk.Event) => boolean | unknown;
|
||||
|
||||
export type CursorBoxProps<
|
||||
|
@ -28,12 +27,12 @@ export type CursorBoxProps<
|
|||
}, Attr>;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
export interface CursorBox<Child, Attr> extends Widget<Attr> { }
|
||||
export interface CursorBox<Child, Attr> extends AgsWidget<Attr> { }
|
||||
|
||||
|
||||
export class CursorBox<Child extends Gtk.Widget, Attr> extends Gtk.EventBox {
|
||||
static {
|
||||
register(this, {
|
||||
Widget.register(this, {
|
||||
properties: {
|
||||
'on-clicked': ['jsobject', 'rw'],
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { execAsync, readFileAsync, timeout } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { execAsync, readFileAsync, timeout } = Utils;
|
||||
const { get_home_dir } = imports.gi.GLib;
|
||||
|
||||
import GObject from 'types/@girs/gobject-2.0/gobject-2.0';
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
import Gtk from 'gi://Gtk?version=3.0';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
|
||||
import { Box, Overlay, register } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { timeout } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Box, Overlay, register } = Widget;
|
||||
|
||||
const { timeout } = Utils;
|
||||
|
||||
// Types
|
||||
import { Window } from 'resource:///com/github/Aylur/ags/widgets/window.js';
|
||||
import { Allocation, Widget } from 'types/@girs/gtk-3.0/gtk-3.0.cjs';
|
||||
import { Variable as Var } from 'types/variable';
|
||||
|
||||
import {
|
||||
|
@ -23,7 +22,7 @@ import {
|
|||
|
||||
|
||||
export class PopupWindow<
|
||||
Child extends Widget,
|
||||
Child extends Gtk.Widget,
|
||||
Attr,
|
||||
> extends Window<Child, Attr> {
|
||||
static {
|
||||
|
@ -34,7 +33,7 @@ export class PopupWindow<
|
|||
});
|
||||
}
|
||||
|
||||
#content: Var<Widget>;
|
||||
#content: Var<Gtk.Widget>;
|
||||
#antiClip: Var<boolean>;
|
||||
#needsAnticlipping: boolean;
|
||||
#close_on_unfocus: CloseType;
|
||||
|
@ -43,7 +42,7 @@ export class PopupWindow<
|
|||
return this.#content.value;
|
||||
}
|
||||
|
||||
set content(value: Widget) {
|
||||
set content(value: Gtk.Widget) {
|
||||
this.#content.value = value;
|
||||
this.child.show_all();
|
||||
}
|
||||
|
@ -76,7 +75,7 @@ export class PopupWindow<
|
|||
}: PopupWindowProps<Child, Attr>) {
|
||||
const needsAnticlipping = bezier.match(/-[0-9]/) !== null &&
|
||||
transition !== 'crossfade';
|
||||
const contentVar = Variable(Box() as Widget);
|
||||
const contentVar = Variable(Box() as Gtk.Widget);
|
||||
const antiClip = Variable(false);
|
||||
|
||||
if (content) {
|
||||
|
@ -364,7 +363,7 @@ export class PopupWindow<
|
|||
}
|
||||
|
||||
set_x_pos(
|
||||
alloc: Allocation,
|
||||
alloc: Gtk.Allocation,
|
||||
side = 'right' as 'left' | 'right',
|
||||
) {
|
||||
const width = this.get_display()
|
||||
|
@ -387,6 +386,6 @@ export class PopupWindow<
|
|||
}
|
||||
}
|
||||
|
||||
export default <Child extends Widget, Attr>(
|
||||
export default <Child extends Gtk.Widget, Attr>(
|
||||
props: PopupWindowProps<Child, Attr>,
|
||||
) => new PopupWindow(props);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Box } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box } = Widget;
|
||||
|
||||
|
||||
export default (size: number, {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import Applications from 'resource:///com/github/Aylur/ags/service/applications.js';
|
||||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
const Applications = await Service.import('applications');
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
const Notifications = await Service.import('notifications');
|
||||
|
||||
import { Box, Icon, Label, Button } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { lookUpIcon } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Box, Icon, Label, Button } = Widget;
|
||||
const { lookUpIcon } = Utils;
|
||||
|
||||
const { GLib } = imports.gi;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Window } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Window } = Widget;
|
||||
|
||||
import NotifCenterWidget from './center.ts';
|
||||
import PopUpsWidget from './popup.ts';
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';
|
||||
const Notifications = await Service.import('notifications');
|
||||
|
||||
import { Label, Box, Icon, Scrollable, Revealer } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { timeout } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Label, Box, Icon, Scrollable, Revealer } = Widget;
|
||||
const { timeout } = Utils;
|
||||
|
||||
import { Notification, HasNotifs } from './base.ts';
|
||||
import CursorBox from '../misc/cursorbox.ts';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';
|
||||
const Notifications = await Service.import('notifications');
|
||||
|
||||
import { Box, EventBox } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { timeout } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Box, EventBox } = Widget;
|
||||
const { timeout } = Utils;
|
||||
|
||||
import { HasNotifs } from './base.ts';
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import Notifications from 'resource:///com/github/Aylur/ags/service/notifications.js';
|
||||
const Notifications = await Service.import('notifications');
|
||||
|
||||
import { Box } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { interval } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Box } = Widget;
|
||||
const { interval } = Utils;
|
||||
|
||||
import GLib from 'gi://GLib';
|
||||
const { GLib } = imports.gi;
|
||||
|
||||
import { Notification } from './base.ts';
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
import { Window } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Window } = Widget;
|
||||
|
||||
import NotifCenterWidget from './center.ts';
|
||||
import PopUpsWidget from './popup.ts';
|
||||
|
||||
import PopupWindow from '../misc/popup.ts';
|
||||
|
||||
|
||||
export const NotifPopups = () => Window({
|
||||
name: 'notifications',
|
||||
anchor: ['top', 'left'],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
|
||||
import { execAsync, timeout } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { execAsync, timeout } = Utils;
|
||||
|
||||
const { Gtk } = imports.gi;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Box, CenterBox, Label, ToggleButton } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, CenterBox, Label, ToggleButton } = Widget;
|
||||
|
||||
const { Gdk } = imports.gi;
|
||||
const display = Gdk.Display.get_default();
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
import Brightness from '../../services/brightness.ts';
|
||||
|
||||
import { Box, EventBox, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Box, EventBox, Label } = Widget;
|
||||
const { execAsync } = Utils;
|
||||
|
||||
const { Gdk, Gtk } = imports.gi;
|
||||
const display = Gdk.Display.get_default();
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { Window } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Window } = Widget;
|
||||
const { execAsync } = Utils;
|
||||
|
||||
import Tablet from '../../services/tablet.ts';
|
||||
import Gesture from './gesture.ts';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Box, Icon, ProgressBar } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, Icon, ProgressBar } = Widget;
|
||||
|
||||
const Y_POS = 80;
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
|
||||
import { timeout } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
import { Stack } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { timeout } = Utils;
|
||||
const { Stack } = Widget;
|
||||
|
||||
import PopupWindow from '../misc/popup.ts';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
const Audio = await Service.import('audio');
|
||||
|
||||
const { Label } = Widget;
|
||||
|
||||
import { Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import OSD from './ctor.ts';
|
||||
|
||||
import Brightness from '../../services/brightness.ts';
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
|
||||
import { Icon, Revealer } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { timeout } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Icon, Revealer } = Widget;
|
||||
const { timeout } = Utils;
|
||||
|
||||
import { WindowButton } from './dragndrop.ts';
|
||||
import * as VARS from './variables.ts';
|
||||
|
@ -34,7 +33,7 @@ const IconStyle = (client: HyprClient) => `
|
|||
|
||||
const Client = (
|
||||
client: HyprClient,
|
||||
active: Boolean,
|
||||
active: boolean,
|
||||
clients: Array<HyprClient>,
|
||||
box: AgsBox,
|
||||
) => {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
|
||||
const { Box } = Widget;
|
||||
|
||||
import { Box } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import * as VARS from './variables.ts';
|
||||
|
||||
const PADDING = 34;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
|
||||
import { Button, EventBox } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Button, EventBox } = Widget;
|
||||
|
||||
import Cairo from 'cairo';
|
||||
const { Gtk, Gdk } = imports.gi;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
|
||||
import { Box, Overlay, Window } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, Overlay, Window } = Widget;
|
||||
|
||||
import { WorkspaceRow, getWorkspaces, updateWorkspaces } from './workspaces.ts';
|
||||
import { Highlighter, updateCurrentWorkspace } from './current-workspace.ts';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
|
||||
import { Revealer, CenterBox, Box, EventBox, Fixed, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Revealer, CenterBox, Box, EventBox, Fixed, Label } = Widget;
|
||||
|
||||
import { WorkspaceDrop } from './dragndrop.ts';
|
||||
import * as VARS from './variables.ts';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
|
||||
import { CenterBox, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { CenterBox, Label } = Widget;
|
||||
const { execAsync } = Utils;
|
||||
|
||||
import PopupWindow from './misc/popup.ts';
|
||||
import CursorBox from './misc/cursorbox.ts';
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Bluetooth from 'resource:///com/github/Aylur/ags/service/bluetooth.js';
|
||||
const Bluetooth = await Service.import('bluetooth');
|
||||
|
||||
import { Box, Icon, Label, ListBox, Overlay, Revealer, Scrollable } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, Icon, Label, ListBox, Overlay, Revealer, Scrollable } = Widget;
|
||||
|
||||
import CursorBox from '../misc/cursorbox.ts';
|
||||
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Bluetooth from 'resource:///com/github/Aylur/ags/service/bluetooth.js';
|
||||
import Network from 'resource:///com/github/Aylur/ags/service/network.js';
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
const Bluetooth = await Service.import('bluetooth');
|
||||
const Network = await Service.import('network');
|
||||
|
||||
import { Box, Icon, Label, Revealer } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Box, Icon, Label, Revealer } = Widget;
|
||||
const { execAsync } = Utils;
|
||||
|
||||
import { SpeakerIcon, MicIcon } from '../misc/audio-icons.ts';
|
||||
import CursorBox from '../misc/cursorbox.ts';
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { Box, Label, Revealer } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, Label, Revealer } = Widget;
|
||||
|
||||
import ButtonGrid from './button-grid.ts';
|
||||
import SliderBox from './slider-box.ts';
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Network from 'resource:///com/github/Aylur/ags/service/network.js';
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
const Network = await Service.import('network');
|
||||
|
||||
import { Box, Icon, Label, ListBox, Overlay, Revealer, Scrollable } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { Box, Icon, Label, ListBox, Overlay, Revealer, Scrollable } = Widget;
|
||||
const { execAsync } = Utils;
|
||||
|
||||
import CursorBox from '../misc/cursorbox.ts';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Audio from 'resource:///com/github/Aylur/ags/service/audio.js';
|
||||
const Audio = await Service.import('audio');
|
||||
|
||||
import { Box, Slider, Icon } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { Box, Slider, Icon } = Widget;
|
||||
|
||||
const { Gdk } = imports.gi;
|
||||
const display = Gdk.Display.get_default();
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';
|
||||
const Mpris = await Service.import('mpris');
|
||||
|
||||
import { CenterBox, Icon, ToggleButton } from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
const { CenterBox, Icon, ToggleButton } = Widget;
|
||||
|
||||
// Types
|
||||
import AgsRevealer from 'types/widgets/revealer';
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import Hyprland from 'resource:///com/github/Aylur/ags/service/hyprland.js';
|
||||
import Bluetooth from 'resource:///com/github/Aylur/ags/service/bluetooth.js';
|
||||
const Hyprland = await Service.import('hyprland');
|
||||
const Bluetooth = await Service.import('bluetooth');
|
||||
|
||||
import Brightness from '../services/brightness.ts';
|
||||
import Pointers from '../services/pointers.ts';
|
||||
|
|
Loading…
Reference in a new issue