imports: use typescript import paths

This commit is contained in:
2 * r + 2 * t 2025-01-30 21:31:58 +11:00
parent ad22dbdfeb
commit 47db47fe9f
11 changed files with 37 additions and 37 deletions

16
app.tsx
View file

@ -1,13 +1,13 @@
import Bar from "@/modules/bar";
import Launcher from "@/modules/launcher";
import NotifPopups from "@/modules/notifpopups";
import Osds from "@/modules/osds";
import Popdowns from "@/modules/popdowns";
import Session from "@/modules/session";
import Monitors from "@/services/monitors";
import Players from "@/services/players";
import { execAsync, GLib, monitorFile, readFileAsync, writeFileAsync } from "astal";
import { App } from "astal/gtk3";
import Bar from "./src/modules/bar";
import Launcher from "./src/modules/launcher";
import NotifPopups from "./src/modules/notifpopups";
import Osds from "./src/modules/osds";
import Popdowns from "./src/modules/popdowns";
import Session from "./src/modules/session";
import Monitors from "./src/services/monitors";
import Players from "./src/services/players";
const loadStyleAsync = async () => {
let scheme = "mocha";

View file

@ -1,16 +1,16 @@
import { Apps } from "@/services/apps";
import MathService, { type HistoryItem } from "@/services/math";
import { getAppCategoryIcon } from "@/utils/icons";
import { launch, notify } from "@/utils/system";
import type { Client } from "@/utils/types";
import { MenuItem, setupCustomTooltip } from "@/utils/widgets";
import PopupWindow from "@/widgets/popupwindow";
import { bind, execAsync, Gio, GLib, readFile, register, timeout, Variable } from "astal";
import { App, Astal, Gtk, Widget } from "astal/gtk3";
import { launcher as config } from "config";
import fuzzysort from "fuzzysort";
import type AstalApps from "gi://AstalApps";
import AstalHyprland from "gi://AstalHyprland";
import { launcher as config } from "../../config";
import { Apps } from "../services/apps";
import MathService, { type HistoryItem } from "../services/math";
import { getAppCategoryIcon } from "../utils/icons";
import { launch, notify } from "../utils/system";
import type { Client } from "../utils/types";
import { MenuItem, setupCustomTooltip } from "../utils/widgets";
import PopupWindow from "../widgets/popupwindow";
type Mode = "apps" | "files" | "math" | "windows";

View file

@ -1,13 +1,13 @@
import Monitors, { type Monitor } from "@/services/monitors";
import PopupWindow from "@/widgets/popupwindow";
import { execAsync, register, timeout, Variable, type Time } from "astal";
import { App, Astal, Gtk, Widget } from "astal/gtk3";
import cairo from "cairo";
import { osds as config } from "config";
import AstalWp from "gi://AstalWp";
import Cairo from "gi://cairo";
import Pango from "gi://Pango";
import PangoCairo from "gi://PangoCairo";
import { osds as config } from "../../config";
import Monitors, { type Monitor } from "../services/monitors";
import PopupWindow from "../widgets/popupwindow";
const getStyle = (context: Gtk.StyleContext, prop: string) => context.get_property(prop, Gtk.StateFlags.NORMAL);
const getNumStyle = (context: Gtk.StyleContext, prop: string) => getStyle(context, prop) as number;

View file

@ -1,9 +1,9 @@
import Players from "@/services/players";
import { isRealPlayer } from "@/utils/mpris";
import PopupWindow from "@/widgets/popupwindow";
import { bind, Variable } from "astal";
import { Astal, Gtk } from "astal/gtk3";
import AstalMpris from "gi://AstalMpris";
import Players from "../../services/players";
import { isRealPlayer } from "../../utils/mpris";
import PopupWindow from "../../widgets/popupwindow";
const shuffleToIcon = (s: AstalMpris.Shuffle) =>
`caelestia-${s === AstalMpris.Shuffle.ON ? "shuffle" : "consecutive"}-symbolic`;

View file

@ -1,10 +1,10 @@
import SWeather, { type WeatherData } from "@/services/weather";
import { ellipsize } from "@/utils/strings";
import { bindCurrentTime } from "@/utils/system";
import { Calendar as WCal } from "@/utils/widgets";
import PopupWindow from "@/widgets/popupwindow";
import { bind, timeout } from "astal";
import { Astal, Gtk, type Gdk } from "astal/gtk3";
import SWeather, { type WeatherData } from "../../services/weather";
import { ellipsize } from "../../utils/strings";
import { bindCurrentTime } from "../../utils/system";
import { Calendar as WCal } from "../../utils/widgets";
import PopupWindow from "../../widgets/popupwindow";
const getHoursFromUpdate = (data: WeatherData, hours: number) => {
const updateTime = data.location.localtime_epoch;

View file

@ -1,8 +1,8 @@
import Updates, { Repo as IRepo, Update as IUpdate } from "@/services/updates";
import { MenuItem } from "@/utils/widgets";
import PopdownWindow from "@/widgets/popdownwindow";
import { bind, execAsync, Variable } from "astal";
import { App, Astal, Gtk } from "astal/gtk3";
import Updates, { Repo as IRepo, Update as IUpdate } from "../../services/updates";
import { MenuItem } from "../../utils/widgets";
import PopdownWindow from "../../widgets/popdownwindow";
const constructItem = (label: string, exec: string, quiet = true) =>
new MenuItem({

View file

@ -1,6 +1,6 @@
import { GLib, GObject, property, readFile, register, writeFileAsync } from "astal";
import { math as config } from "config";
import { derivative, evaluate, rationalize, simplify } from "mathjs/number";
import { math as config } from "../../config";
export interface HistoryItem {
equation: string;

View file

@ -1,5 +1,5 @@
import { execAsync, GLib, GObject, property, readFileAsync, register, writeFileAsync } from "astal";
import { updates as config } from "../../config";
import { updates as config } from "config";
export interface Update {
full: string;

View file

@ -1,6 +1,6 @@
import { notify } from "@/utils/system";
import { execAsync, GLib, GObject, interval, property, readFileAsync, register, writeFileAsync } from "astal";
import { weather as config } from "../../config";
import { notify } from "../utils/system";
import { weather as config } from "config";
export interface WeatherCondition {
text: string;

View file

@ -1,6 +1,6 @@
import { Apps } from "@/services/apps";
import { Gio } from "astal";
import type AstalApps from "gi://AstalApps";
import { Apps } from "../services/apps";
// Code points from https://www.github.com/lukas-w/font-logos
export const osIcons: Record<string, number> = {

View file

@ -1,8 +1,8 @@
import { desktopEntrySubs } from "@/utils/icons";
import { GLib, register, timeout } from "astal";
import { Astal, Gtk, Widget } from "astal/gtk3";
import { notifpopups as config } from "config";
import AstalNotifd from "gi://AstalNotifd";
import { notifpopups as config } from "../../config";
import { desktopEntrySubs } from "../utils/icons";
const urgencyToString = (urgency: AstalNotifd.Urgency) => {
switch (urgency) {