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