Remove global service declarations and change to declarations upon usage. (#761)
* Remove global service declarations and change to declarations upon usage. * Only load cava service if cava is enabled.
This commit is contained in:
6
app.ts
6
app.ts
@@ -7,6 +7,9 @@ import './src/globals/dropdown';
|
||||
import './src/globals/utilities';
|
||||
import './src/components/bar/utils/sideEffects';
|
||||
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
const hyprland = AstalHyprland.get_default();
|
||||
|
||||
import { Bar } from './src/components/bar';
|
||||
import { DropdownMenus, StandardWindows } from './src/components/menus/exports';
|
||||
import Notifications from './src/components/notifications';
|
||||
@@ -16,7 +19,6 @@ import options from 'src/options';
|
||||
import OSD from 'src/components/osd/index';
|
||||
import { App } from 'astal/gtk3';
|
||||
import { execAsync } from 'astal';
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import { handleRealization } from 'src/components/menus/shared/dropdown/helpers';
|
||||
import { isDropdownMenu } from 'src/lib/constants/options.js';
|
||||
import { initializeSystemBehaviors } from 'src/lib/behaviors';
|
||||
@@ -64,7 +66,7 @@ App.start({
|
||||
},
|
||||
});
|
||||
|
||||
hyprlandService.connect('monitor-added', () => {
|
||||
hyprland.connect('monitor-added', () => {
|
||||
const { restartCommand } = options.hyprpanel;
|
||||
|
||||
if (options.hyprpanel.restartAgs.get()) {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
import { errorHandler } from 'src/lib/utils';
|
||||
import { Command } from '../../types';
|
||||
import { execAsync, Gio, GLib } from 'astal';
|
||||
import { checkDependencies } from './checkDependencies';
|
||||
import { audioService } from 'src/lib/constants/services';
|
||||
|
||||
const audio = AstalWp.get_default();
|
||||
|
||||
export const utilityCommands: Command[] = [
|
||||
{
|
||||
@@ -49,7 +51,12 @@ export const utilityCommands: Command[] = [
|
||||
],
|
||||
handler: (args: Record<string, unknown>): number => {
|
||||
try {
|
||||
const speaker = audioService.defaultSpeaker;
|
||||
const speaker = audio?.defaultSpeaker;
|
||||
|
||||
if (speaker === undefined) {
|
||||
throw new Error('A default speaker was not found.');
|
||||
}
|
||||
|
||||
const volumeInput = Number(args['volume']) / 100;
|
||||
|
||||
if (options.menus.volume.raiseMaximumVolume.get()) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { batteryService } from 'src/lib/constants/services.js';
|
||||
import AstalBattery from 'gi://AstalBattery?version=0.1';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
import { openMenu } from '../../utils/menu';
|
||||
import options from 'src/options';
|
||||
@@ -6,10 +6,10 @@ import { BarBoxChild } from 'src/lib/types/bar.js';
|
||||
import { runAsyncCommand, throttledScrollHandler } from 'src/components/bar/utils/helpers.js';
|
||||
import Variable from 'astal/variable';
|
||||
import { bind } from 'astal';
|
||||
import AstalBattery from 'gi://AstalBattery?version=0.1';
|
||||
import { onMiddleClick, onPrimaryClick, onScroll, onSecondaryClick } from 'src/lib/shared/eventHandlers';
|
||||
import { getBatteryIcon } from './helpers';
|
||||
|
||||
const batteryService = AstalBattery.get_default();
|
||||
const { label: show_label, rightClick, middleClick, scrollUp, scrollDown, hideLabelWhenFull } = options.bar.battery;
|
||||
|
||||
const BatteryLabel = (): BarBoxChild => {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { bluetoothService } from 'src/lib/constants/services.js';
|
||||
import options from 'src/options.js';
|
||||
import { openMenu } from '../../utils/menu.js';
|
||||
import { BarBoxChild } from 'src/lib/types/bar.js';
|
||||
@@ -8,6 +7,8 @@ import { onMiddleClick, onPrimaryClick, onScroll, onSecondaryClick } from 'src/l
|
||||
import AstalBluetooth from 'gi://AstalBluetooth?version=0.1';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
|
||||
const bluetoothService = AstalBluetooth.get_default();
|
||||
|
||||
const { rightClick, middleClick, scrollDown, scrollUp } = options.bar.bluetooth;
|
||||
|
||||
const Bluetooth = (): BarBoxChild => {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import { cavaService, mprisService } from 'src/lib/constants/services';
|
||||
import AstalCava from 'gi://AstalCava?version=0.1';
|
||||
import AstalMpris from 'gi://AstalMpris?version=0.1';
|
||||
import options from 'src/options';
|
||||
|
||||
const mprisService = AstalMpris.get_default();
|
||||
const {
|
||||
showActiveOnly,
|
||||
bars,
|
||||
@@ -20,8 +22,10 @@ const {
|
||||
*
|
||||
* @param isVis - A variable that holds the visibility status.
|
||||
*/
|
||||
export function initVisibilityTracker(isVis: Variable<boolean>): void {
|
||||
Variable.derive([bind(showActiveOnly), bind(mprisService, 'players')], (showActive, players) => {
|
||||
export function initVisibilityTracker(isVis: Variable<boolean>): Variable<void> {
|
||||
const cavaService = AstalCava.get_default();
|
||||
|
||||
return Variable.derive([bind(showActiveOnly), bind(mprisService, 'players')], (showActive, players) => {
|
||||
isVis.set(cavaService !== null && (!showActive || players?.length > 0));
|
||||
});
|
||||
}
|
||||
@@ -29,14 +33,14 @@ export function initVisibilityTracker(isVis: Variable<boolean>): void {
|
||||
/**
|
||||
* Initializes a settings tracker that updates the CAVA service settings based on the provided options.
|
||||
*/
|
||||
export function initSettingsTracker(): void {
|
||||
const cava = cavaService;
|
||||
export function initSettingsTracker(): Variable<void> | undefined {
|
||||
const cava = AstalCava.get_default();
|
||||
|
||||
if (!cava) {
|
||||
return;
|
||||
}
|
||||
|
||||
Variable.derive(
|
||||
return Variable.derive(
|
||||
[
|
||||
bind(bars),
|
||||
bind(channels),
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Variable, bind } from 'astal';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
import { cavaService } from 'src/lib/constants/services';
|
||||
import { BarBoxChild } from 'src/lib/types/bar';
|
||||
import { Module } from '../../shared/Module';
|
||||
import { inputHandler } from '../../utils/helpers';
|
||||
import options from 'src/options';
|
||||
import { initSettingsTracker, initVisibilityTracker } from './helpers';
|
||||
import AstalCava from 'gi://AstalCava?version=0.1';
|
||||
|
||||
const {
|
||||
icon,
|
||||
@@ -22,12 +22,13 @@ const {
|
||||
|
||||
const isVis = Variable(!showActiveOnly.get());
|
||||
|
||||
initVisibilityTracker(isVis);
|
||||
initSettingsTracker();
|
||||
|
||||
export const Cava = (): BarBoxChild => {
|
||||
let labelBinding: Variable<string> = Variable('');
|
||||
|
||||
const visTracker = initVisibilityTracker(isVis);
|
||||
const settingsTracker = initSettingsTracker();
|
||||
const cavaService = AstalCava.get_default();
|
||||
|
||||
if (cavaService) {
|
||||
labelBinding = Variable.derive(
|
||||
[bind(cavaService, 'values'), bind(spaceCharacter), bind(barCharacters)],
|
||||
@@ -71,6 +72,8 @@ export const Cava = (): BarBoxChild => {
|
||||
},
|
||||
onDestroy: () => {
|
||||
labelBinding.drop();
|
||||
visTracker.drop();
|
||||
settingsTracker?.drop();
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import options from 'src/options';
|
||||
import { Module } from '../../shared/Module';
|
||||
import { inputHandler } from 'src/components/bar/utils/helpers';
|
||||
@@ -7,7 +6,9 @@ import { BarBoxChild } from 'src/lib/types/bar';
|
||||
import { bind } from 'astal';
|
||||
import { useHook } from 'src/lib/shared/hookHandler';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
const { label, labelType, icon, leftClick, rightClick, middleClick, scrollUp, scrollDown } =
|
||||
options.bar.customModules.kbLayout;
|
||||
|
||||
|
||||
@@ -2,13 +2,14 @@ import { openMenu } from '../../utils/menu.js';
|
||||
import options from 'src/options.js';
|
||||
import { runAsyncCommand, throttledScrollHandler } from 'src/components/bar/utils/helpers.js';
|
||||
import { generateMediaLabel } from './helpers/index.js';
|
||||
import { mprisService } from 'src/lib/constants/services.js';
|
||||
import { onMiddleClick, onPrimaryClick, onScroll, onSecondaryClick } from 'src/lib/shared/eventHandlers.js';
|
||||
import { bind, Variable } from 'astal';
|
||||
import { BarBoxChild } from 'src/lib/types/bar.js';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
import { activePlayer, mediaAlbum, mediaArtist, mediaTitle } from 'src/globals/media.js';
|
||||
import AstalMpris from 'gi://AstalMpris?version=0.1';
|
||||
|
||||
const mprisService = AstalMpris.get_default();
|
||||
const {
|
||||
truncation,
|
||||
truncation_size,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
import options from 'src/options';
|
||||
import { Module } from '../../shared/Module';
|
||||
import { inputHandler } from 'src/components/bar/utils/helpers';
|
||||
@@ -12,6 +11,7 @@ import { bind, Variable } from 'astal';
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
const {
|
||||
label,
|
||||
labelType,
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
import { bind, Variable } from 'astal';
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
|
||||
export const wiredIcon: Variable<string> = Variable('');
|
||||
export const wirelessIcon: Variable<string> = Variable('');
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
let wiredIconBinding: Variable<void> | undefined;
|
||||
let wirelessIconBinding: Variable<void> | undefined;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { networkService } from 'src/lib/constants/services.js';
|
||||
import options from 'src/options';
|
||||
import { openMenu } from '../../utils/menu';
|
||||
import { runAsyncCommand, throttledScrollHandler } from 'src/components/bar/utils/helpers.js';
|
||||
@@ -9,6 +8,7 @@ import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
import { BarBoxChild } from 'src/lib/types/bar.js';
|
||||
import { formatWifiInfo, wiredIcon, wirelessIcon } from './helpers';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
const { label, truncation, truncation_size, rightClick, middleClick, scrollDown, scrollUp, showWifiInfo } =
|
||||
options.bar.network;
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ import { BarBoxChild } from 'src/lib/types/bar.js';
|
||||
import { runAsyncCommand, throttledScrollHandler } from 'src/components/bar/utils/helpers.js';
|
||||
import { bind, Variable } from 'astal';
|
||||
import { onMiddleClick, onPrimaryClick, onScroll, onSecondaryClick } from 'src/lib/shared/eventHandlers';
|
||||
import { notifdService } from 'src/lib/constants/services';
|
||||
|
||||
const notifdService = AstalNotifd.get_default();
|
||||
const { show_total, rightClick, middleClick, scrollUp, scrollDown, hideCountWhenZero } = options.bar.notifications;
|
||||
const { ignore } = options.notifications;
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Variable } from 'astal';
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
|
||||
/**
|
||||
* Determines if a submap is enabled based on the provided submap name.
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import options from 'src/options';
|
||||
import { Module } from '../../shared/Module';
|
||||
import { inputHandler } from 'src/components/bar/utils/helpers';
|
||||
@@ -7,7 +6,9 @@ import { capitalizeFirstLetter } from 'src/lib/utils';
|
||||
import { getInitialSubmap, isSubmapEnabled } from './helpers';
|
||||
import { bind, Variable } from 'astal';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
const {
|
||||
label,
|
||||
showSubmapName,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { audioService } from 'src/lib/constants/services.js';
|
||||
import { openMenu } from '../../utils/menu.js';
|
||||
import options from 'src/options';
|
||||
import { runAsyncCommand, throttledScrollHandler } from 'src/components/bar/utils/helpers.js';
|
||||
@@ -7,6 +6,10 @@ import { onMiddleClick, onPrimaryClick, onScroll, onSecondaryClick } from 'src/l
|
||||
import { getIcon } from './helpers/index.js';
|
||||
import { BarBoxChild } from 'src/lib/types/bar.js';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
const audioService = wireplumber?.audio;
|
||||
|
||||
const { rightClick, middleClick, scrollUp, scrollDown } = options.bar.volume;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import options from 'src/options';
|
||||
import { capitalizeFirstLetter } from 'src/lib/utils';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import { bind, Variable } from 'astal';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
export const clientTitle = Variable('');
|
||||
let clientBinding: Variable<void> | undefined;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { runAsyncCommand, throttledScrollHandler } from 'src/components/bar/utils/helpers';
|
||||
import { BarBoxChild } from 'src/lib/types/bar';
|
||||
import options from 'src/options';
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
import { onMiddleClick, onPrimaryClick, onScroll, onSecondaryClick } from 'src/lib/shared/eventHandlers';
|
||||
import { bind, Variable } from 'astal';
|
||||
import { clientTitle, getTitle, getWindowMatch, truncateTitle } from './helpers/title';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
const { leftClick, rightClick, middleClick, scrollDown, scrollUp } = options.bar.windowtitle;
|
||||
|
||||
const ClientTitle = (): BarBoxChild => {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Variable } from 'astal';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import { MonitorMap, WorkspaceMonitorMap, WorkspaceRule } from 'src/lib/types/workspace';
|
||||
import { range } from 'src/lib/utils';
|
||||
import options from 'src/options';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
const { workspaces, reverse_scroll, ignored } = options.bar.workspaces;
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
import { defaultApplicationIcons } from 'src/lib/constants/workspaces';
|
||||
import { AppIconOptions, WorkspaceIconMap } from 'src/lib/types/workspace';
|
||||
import { isValidGjsColor } from 'src/lib/utils';
|
||||
import options from 'src/options';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
const { monochrome, background } = options.theme.bar.buttons;
|
||||
const { background: wsBackground, active } = options.theme.bar.buttons.workspaces;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import options from 'src/options';
|
||||
import { forceUpdater, getWorkspacesToRender, initWorkspaceEvents, workspaceRules } from './helpers';
|
||||
import { getAppIcon, getWsColor, renderClassnames, renderLabel } from './helpers/utils';
|
||||
@@ -8,6 +7,7 @@ import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { isPrimaryClick } from 'src/lib/utils';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
const {
|
||||
workspaces,
|
||||
monitorSpecific,
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import { Gdk } from 'astal/gtk3';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
import { BarLayout, BarLayouts } from 'src/lib/types/options';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
|
||||
type GdkMonitors = {
|
||||
[key: string]: {
|
||||
key: string;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { audioService } from 'src/lib/constants/services';
|
||||
import { SliderItem } from '../sliderItem/SliderItem';
|
||||
import { ActiveDeviceMenu } from '..';
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
const audioService = wireplumber.audio;
|
||||
|
||||
const ActiveDeviceContainer = ({ children }: ActiveDeviceContainerProps): JSX.Element => {
|
||||
return (
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { bind } from 'astal';
|
||||
import { audioService } from 'src/lib/constants/services';
|
||||
import { SliderItem } from '../sliderItem/SliderItem';
|
||||
import { ActiveDeviceMenu } from '..';
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
const audioService = wireplumber.audio;
|
||||
|
||||
const NoStreams = (): JSX.Element => {
|
||||
return <label className={'no-playbacks dim'} label={'No active playbacks found.'} expand />;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { audioService } from 'src/lib/constants/services.js';
|
||||
import { bind } from 'astal';
|
||||
import { AudioDevice } from './Device';
|
||||
import { NotFoundButton } from './NotFoundButton';
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
const audioService = wireplumber.audio;
|
||||
|
||||
export const InputDevices = (): JSX.Element => {
|
||||
const inputDevices = bind(audioService, 'microphones');
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
import { audioService } from 'src/lib/constants/services.js';
|
||||
import { bind } from 'astal';
|
||||
import { AudioDevice } from './Device';
|
||||
import { NotFoundButton } from './NotFoundButton';
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
const audioService = wireplumber.audio;
|
||||
|
||||
export const PlaybackDevices = (): JSX.Element => {
|
||||
const playbackDevices = bind(audioService, 'speakers');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { execAsync } from 'astal';
|
||||
import AstalBluetooth from 'gi://AstalBluetooth?version=0.1';
|
||||
import { bluetoothService } from 'src/lib/constants/services';
|
||||
|
||||
const bluetoothService = AstalBluetooth.get_default();
|
||||
|
||||
/**
|
||||
* Retrieves the list of available Bluetooth devices.
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import { bluetoothService } from 'src/lib/constants/services.js';
|
||||
import { getAvailableBluetoothDevices, getConnectedBluetoothDevices } from './helpers.js';
|
||||
import { NoBluetoothDevices } from './NoBluetoothDevices.js';
|
||||
import { BluetoothDisabled } from './BluetoothDisabled.js';
|
||||
import { DeviceListItem } from './DeviceListItem.js';
|
||||
import AstalBluetooth from 'gi://AstalBluetooth?version=0.1';
|
||||
|
||||
const bluetoothService = AstalBluetooth.get_default();
|
||||
|
||||
export const BluetoothDevices = (): JSX.Element => {
|
||||
const deviceListBinding = Variable.derive(
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { bluetoothService } from 'src/lib/constants/services';
|
||||
import { isPrimaryClick } from 'src/lib/utils';
|
||||
import { bind, timeout } from 'astal';
|
||||
import { isDiscovering } from './helper';
|
||||
import AstalBluetooth from 'gi://AstalBluetooth?version=0.1';
|
||||
|
||||
const bluetoothService = AstalBluetooth.get_default();
|
||||
|
||||
export const DiscoverButton = (): JSX.Element => (
|
||||
<button
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { bluetoothService } from 'src/lib/constants/services';
|
||||
import AstalBluetooth from 'gi://AstalBluetooth?version=0.1';
|
||||
|
||||
const bluetoothService = AstalBluetooth.get_default();
|
||||
|
||||
const isPowered = Variable(false);
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import { bluetoothService } from 'src/lib/constants/services';
|
||||
import AstalBluetooth from 'gi://AstalBluetooth?version=0.1';
|
||||
|
||||
const bluetoothService = AstalBluetooth.get_default();
|
||||
|
||||
export const isDiscovering: Variable<boolean> = Variable(false);
|
||||
let discoveringBinding: Variable<void> | undefined;
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
import { bind } from 'astal';
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
import { bluetoothService } from 'src/lib/constants/services';
|
||||
import { notifdService } from 'src/lib/constants/services';
|
||||
import { audioService } from 'src/lib/constants/services';
|
||||
import { isPrimaryClick } from 'src/lib/utils';
|
||||
import { isWifiEnabled } from './helpers';
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
import AstalBluetooth from 'gi://AstalBluetooth?version=0.1';
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
const audioService = wireplumber.audio;
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
const bluetoothService = AstalBluetooth.get_default();
|
||||
|
||||
const notifdService = AstalNotifd.get_default();
|
||||
|
||||
export const WifiButton = (): JSX.Element => {
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
export const isWifiEnabled: Variable<boolean> = Variable(false);
|
||||
let wifiEnabledBinding: Variable<void> | undefined;
|
||||
|
||||
@@ -2,10 +2,11 @@ import { bind, execAsync, Variable } from 'astal';
|
||||
import { App, Gdk, Gtk } from 'astal/gtk3';
|
||||
import Menu from 'src/components/shared/Menu';
|
||||
import MenuItem from 'src/components/shared/MenuItem';
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import { isRecording } from '../helpers';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
|
||||
const MonitorListDropdown = (): JSX.Element => {
|
||||
const monitorList: Variable<AstalHyprland.Monitor[]> = Variable([]);
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { bind } from 'astal';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { brightnessService } from 'src/lib/constants/services';
|
||||
import Brightness from 'src/services/Brightness';
|
||||
|
||||
const brightnessService = Brightness.get_default();
|
||||
|
||||
export const BrightnessPercentage = (): JSX.Element => {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { bind } from 'astal';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { brightnessService } from 'src/lib/constants/services';
|
||||
import Brightness from 'src/services/Brightness';
|
||||
|
||||
const brightnessService = Brightness.get_default();
|
||||
|
||||
export const BrightnessSlider = (): JSX.Element => {
|
||||
return (
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { bind } from 'astal';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import AstalPowerProfiles from 'gi://AstalPowerProfiles?version=0.1';
|
||||
import { powerProfilesService } from 'src/lib/constants/services';
|
||||
import icons from 'src/lib/icons/icons';
|
||||
import { ProfileType } from 'src/lib/types/powerprofiles';
|
||||
import { isPrimaryClick } from 'src/lib/utils';
|
||||
|
||||
const powerProfilesService = AstalPowerProfiles.get_default();
|
||||
|
||||
export const PowerProfiles = (): JSX.Element => {
|
||||
const powerProfiles = powerProfilesService.get_profiles();
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { bind } from 'astal';
|
||||
import { Astal, Gtk, Widget } from 'astal/gtk3';
|
||||
import { mprisService } from 'src/lib/constants/services';
|
||||
import { isPrimaryClick } from 'src/lib/utils';
|
||||
import { getNextPlayer, getPreviousPlayer } from './helpers';
|
||||
import AstalMpris from 'gi://AstalMpris?version=0.1';
|
||||
|
||||
const mprisService = AstalMpris.get_default();
|
||||
|
||||
export const PreviousPlayer = (): JSX.Element => {
|
||||
const className = bind(mprisService, 'players').as((players) => {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import AstalMpris from 'gi://AstalMpris?version=0.1';
|
||||
import { activePlayer } from 'src/globals/media';
|
||||
import { mprisService } from 'src/lib/constants/services';
|
||||
import icons2 from 'src/lib/icons/icons2';
|
||||
import { PlaybackIconMap } from 'src/lib/types/mpris';
|
||||
|
||||
const mprisService = AstalMpris.get_default();
|
||||
|
||||
/**
|
||||
* Determines if the loop status is active.
|
||||
*
|
||||
|
||||
@@ -2,9 +2,9 @@ import { Binding } from 'astal';
|
||||
import { bind, Variable } from 'astal';
|
||||
import AstalMpris from 'gi://AstalMpris?version=0.1';
|
||||
import { mediaArtUrl } from 'src/globals/media';
|
||||
import { mprisService } from 'src/lib/constants/services';
|
||||
import options from 'src/options';
|
||||
|
||||
const mprisService = AstalMpris.get_default();
|
||||
const { tint, color } = options.theme.bar.menus.menu.media.card;
|
||||
|
||||
const curPlayer = Variable('');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
/*******************************************
|
||||
* Values *
|
||||
|
||||
@@ -3,9 +3,11 @@ import { Ethernet } from './ethernet/index.js';
|
||||
import { Wifi } from './wifi/index.js';
|
||||
import options from 'src/options.js';
|
||||
import { bind } from 'astal';
|
||||
import { networkService } from 'src/lib/constants/services.js';
|
||||
import { NoWifi } from './wifi/WirelessAPs/NoWifi.js';
|
||||
import { RevealerTransitionMap } from 'src/lib/constants/options.js';
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
export default (): JSX.Element => {
|
||||
return (
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { bind } from 'astal/binding';
|
||||
import { Variable } from 'astal';
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
import { AccessPoint } from './AccessPoint';
|
||||
import { PasswordInput } from './PasswordInput';
|
||||
import { connecting, staging } from '../WirelessAPs/helpers';
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
export const APStaging = (): JSX.Element => {
|
||||
const stagingBinding = Variable.derive([bind(networkService, 'wifi'), bind(staging)], () => {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
import { bind } from 'astal';
|
||||
import { isPrimaryClick } from 'src/lib/utils';
|
||||
import { isScanning } from './helpers';
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
export const RefreshButton = (): JSX.Element => {
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
export const WifiSwitch = (): JSX.Element => (
|
||||
<switch
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
export const isScanning: Variable<boolean> = Variable(false);
|
||||
let scanningBinding: Variable<void> | undefined;
|
||||
|
||||
@@ -3,9 +3,10 @@ import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
import { getWifiIcon } from '../../utils';
|
||||
import { connectToAP, getWifiStatus, isDisconnecting, isApEnabled, isApActive } from './helpers';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
import Spinner from 'src/components/shared/Spinner';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
export const AccessPoint = ({ connecting, accessPoint }: AccessPointProps): JSX.Element => {
|
||||
const ConnectionIcon = (): JSX.Element => {
|
||||
return (
|
||||
|
||||
@@ -2,9 +2,10 @@ import { bind, execAsync, Variable } from 'astal';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
import { DEVICE_STATES } from 'src/lib/constants/network';
|
||||
import { networkService } from 'src/lib/constants/services';
|
||||
import { isPrimaryClick, Notify } from 'src/lib/utils';
|
||||
|
||||
const networkService = AstalNetwork.get_default();
|
||||
|
||||
export const isWifiEnabled: Variable<boolean> = Variable(false);
|
||||
export const wifiAccessPoints: Variable<AstalNetwork.AccessPoint[]> = Variable([]);
|
||||
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import { bind } from 'astal';
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
import { clearNotifications } from 'src/globals/notification';
|
||||
import { notifdService } from 'src/lib/constants/services';
|
||||
import { isPrimaryClick } from 'src/lib/utils';
|
||||
import options from 'src/options';
|
||||
|
||||
const notifdService = AstalNotifd.get_default();
|
||||
|
||||
const { clearDelay } = options.notifications;
|
||||
|
||||
export const ClearNotificationsButton = (): JSX.Element => {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { bind } from 'astal';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { notifdService } from 'src/lib/constants/services';
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
|
||||
const notifdService = AstalNotifd.get_default();
|
||||
|
||||
export const DndSwitch = (): JSX.Element => {
|
||||
return (
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
import { notifdService } from 'src/lib/constants/services';
|
||||
const { displayedTotal } = options.notifications;
|
||||
|
||||
const notifdService = AstalNotifd.get_default();
|
||||
|
||||
/**
|
||||
* Handles page boundaries for notifications.
|
||||
*
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { bind } from 'astal';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { notifdService } from 'src/lib/constants/services';
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
|
||||
const notifdService = AstalNotifd.get_default();
|
||||
|
||||
export const Placeholder = (): JSX.Element => {
|
||||
return (
|
||||
|
||||
@@ -3,10 +3,11 @@ import { filterNotifications } from 'src/lib/shared/notifications.js';
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import { bind, Variable } from 'astal';
|
||||
import { notifdService } from 'src/lib/constants/services.js';
|
||||
import { NotificationCard } from 'src/components/notifications/Notification.js';
|
||||
import { Placeholder } from './Placeholder';
|
||||
|
||||
const notifdService = AstalNotifd.get_default();
|
||||
|
||||
const { displayedTotal, ignore, showActionsOnHover } = options.notifications;
|
||||
|
||||
export const NotificationsContainer = ({ curPage }: NotificationsContainerProps): JSX.Element => {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import { Gtk } from 'astal/gtk3';
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
import { notifdService } from 'src/lib/constants/services';
|
||||
import options from 'src/options';
|
||||
import { FirstPageButton, LastPageButton, NextPageButton, PreviousPageButton } from './Buttons';
|
||||
|
||||
const notifdService = AstalNotifd.get_default();
|
||||
|
||||
const { displayedTotal } = options.notifications;
|
||||
const { show: showPager } = options.theme.bar.menus.menu.notifications.pager;
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@ import options from 'src/options';
|
||||
import { globalEventBoxes } from 'src/globals/dropdown';
|
||||
import { GLib } from 'astal';
|
||||
import { EventBox } from 'astal/gtk3/widget';
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
const { location } = options.theme.bar;
|
||||
const { scalingPriority } = options;
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import { bind, timeout, Variable } from 'astal';
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
import options from 'src/options';
|
||||
import { hyprlandService, notifdService } from 'src/lib/constants/services';
|
||||
import { isNotificationIgnored } from 'src/lib/shared/notifications';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
|
||||
const notifdService = AstalNotifd.get_default();
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
|
||||
const { ignore, timeout: popupTimeout, autoDismiss } = options.notifications;
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { hyprlandService } from 'src/lib/constants/services.js';
|
||||
import options from 'src/options.js';
|
||||
import { getPosition } from 'src/lib/utils.js';
|
||||
import { bind, Variable } from 'astal';
|
||||
@@ -6,7 +5,9 @@ import { trackActiveMonitor, trackAutoTimeout, trackPopupNotifications } from '.
|
||||
import { Astal } from 'astal/gtk3';
|
||||
import { NotificationCard } from './Notification.js';
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
const { position, monitor, active_monitor, showActionsOnHover, displayedTotal } = options.notifications;
|
||||
const { tear } = options;
|
||||
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
import LevelBar from 'src/components/shared/LevelBar';
|
||||
import { audioService, brightnessService } from 'src/lib/constants/services';
|
||||
import Brightness from 'src/services/Brightness';
|
||||
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
const audioService = wireplumber.audio;
|
||||
|
||||
const brightnessService = Brightness.get_default();
|
||||
|
||||
/**
|
||||
* Sets up the OSD bar for a LevelBar instance.
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
import { bind, timeout, Variable } from 'astal';
|
||||
import { Widget } from 'astal/gtk3';
|
||||
import { audioService, brightnessService, hyprlandService } from 'src/lib/constants/services';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
import options from 'src/options';
|
||||
import Brightness from 'src/services/Brightness';
|
||||
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
const audioService = wireplumber.audio;
|
||||
const brightnessService = Brightness.get_default();
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
|
||||
const { enable, duration, active_monitor, monitor } = options.theme.osd;
|
||||
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import { Widget } from 'astal/gtk3';
|
||||
import { audioService, brightnessService } from 'src/lib/constants/services';
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
import Brightness from 'src/services/Brightness';
|
||||
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
const audioService = wireplumber.audio;
|
||||
const brightnessService = Brightness.get_default();
|
||||
|
||||
type OSDIcon = {
|
||||
micVariable: Variable<unknown>;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import { Widget } from 'astal/gtk3';
|
||||
import { audioService, brightnessService } from 'src/lib/constants/services';
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
import Brightness from 'src/services/Brightness';
|
||||
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
const audioService = wireplumber.audio;
|
||||
const brightnessService = Brightness.get_default();
|
||||
|
||||
/**
|
||||
* Sets up the OSD label for a given widget.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import AstalMpris from 'gi://AstalMpris?version=0.1';
|
||||
import { getTimeStamp } from 'src/components/menus/media/components/timebar/helpers';
|
||||
import { mprisService } from 'src/lib/constants/services';
|
||||
import options from 'src/options';
|
||||
|
||||
const mprisService = AstalMpris.get_default();
|
||||
const { noMediaText } = options.menus.media;
|
||||
|
||||
export const activePlayer = Variable<AstalMpris.Player | undefined>(undefined);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { notifdService } from 'src/lib/constants/services';
|
||||
import icons from 'src/lib/icons/icons2';
|
||||
import options from 'src/options';
|
||||
import { errorHandler, lookUpIcon } from 'src/lib/utils';
|
||||
import { Variable } from 'astal';
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
|
||||
const notifdService = AstalNotifd.get_default();
|
||||
const { clearDelay } = options.notifications;
|
||||
|
||||
export const removingNotifications = Variable<boolean>(false);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { bind, Variable } from 'astal';
|
||||
import { hyprlandService } from '../constants/services';
|
||||
import { App } from 'astal/gtk3';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
import { forceUpdater } from 'src/components/bar/modules/workspaces/helpers';
|
||||
import options from 'src/options';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
const { autoHide } = options.bar;
|
||||
|
||||
const focusedClient = (focusedClient: AstalHyprland.Client): void => {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
import { batteryService } from '../constants/services';
|
||||
import AstalBattery from 'gi://AstalBattery?version=0.1';
|
||||
import icons from '../icons/icons';
|
||||
import { Notify } from '../utils';
|
||||
|
||||
const batteryService = AstalBattery.get_default();
|
||||
|
||||
export function warnOnLowBattery(): void {
|
||||
let sentLowNotification = false;
|
||||
let sentHalfLowNotification = false;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { hyprlandService } from '../constants/services';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
|
||||
const floatSettingsDialog = (): void => {
|
||||
hyprlandService.message(`keyword windowrulev2 float, title:^(hyprpanel-settings)$`);
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* NOTE: This approach is not recommended if the program is going to be
|
||||
* running as a client.
|
||||
* ---------------------------------------
|
||||
* Hyprpanel will not be, so this is fine.
|
||||
* ---------------------------------------
|
||||
*/
|
||||
import Hyprland from 'gi://AstalHyprland';
|
||||
export const hyprlandService = Hyprland.get_default();
|
||||
|
||||
import AstalMpris from 'gi://AstalMpris?version=0.1';
|
||||
export const mprisService = AstalMpris.get_default();
|
||||
|
||||
import AstalWp from 'gi://AstalWp?version=0.1';
|
||||
const wireplumber = AstalWp.get_default() as AstalWp.Wp;
|
||||
export const audioService = wireplumber.audio;
|
||||
|
||||
import AstalNetwork from 'gi://AstalNetwork?version=0.1';
|
||||
export const networkService = AstalNetwork.get_default();
|
||||
|
||||
import AstalBluetooth from 'gi://AstalBluetooth?version=0.1';
|
||||
export const bluetoothService = AstalBluetooth.get_default();
|
||||
|
||||
import AstalBattery from 'gi://AstalBattery?version=0.1';
|
||||
export const batteryService = AstalBattery.get_default();
|
||||
|
||||
import AstalNotifd from 'gi://AstalNotifd?version=0.1';
|
||||
export const notifdService = AstalNotifd.get_default();
|
||||
|
||||
import Brightness from 'src/services/Brightness';
|
||||
export const brightnessService = Brightness.get_default();
|
||||
|
||||
import AstalPowerProfiles from 'gi://AstalPowerProfiles?version=0.1';
|
||||
export const powerProfilesService = AstalPowerProfiles.get_default();
|
||||
|
||||
import AstalCava from 'gi://AstalCava';
|
||||
export const cavaService = AstalCava.get_default();
|
||||
@@ -1,5 +1,6 @@
|
||||
import AstalMpris from 'gi://AstalMpris?version=0.1';
|
||||
import { mprisService } from '../constants/services';
|
||||
|
||||
const mprisService = AstalMpris.get_default();
|
||||
|
||||
export const getCurrentPlayer = (
|
||||
activePlayer: AstalMpris.Player = mprisService.get_players()[0],
|
||||
|
||||
@@ -3,8 +3,9 @@ import { dependencies, sh } from '../lib/utils';
|
||||
import options from '../options';
|
||||
import { execAsync } from 'astal/process';
|
||||
import { monitorFile } from 'astal/file';
|
||||
import { hyprlandService } from 'src/lib/constants/services';
|
||||
import AstalHyprland from 'gi://AstalHyprland?version=0.1';
|
||||
|
||||
const hyprlandService = AstalHyprland.get_default();
|
||||
const WP = `${GLib.get_home_dir()}/.config/background`;
|
||||
|
||||
@register({ GTypeName: 'Wallpaper' })
|
||||
|
||||
Reference in New Issue
Block a user