Skip to content

Commit

Permalink
Load Gvc in systemvolume plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed Feb 12, 2025
1 parent 4a147f1 commit 0521ed3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/service/plugins/systemvolume.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@
//
// SPDX-License-Identifier: GPL-2.0-or-later

import GIRepository from 'gi://GIRepository';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';

import * as Components from '../components/index.js';
import Config from '../../config.js';
import * as Core from '../core.js';
import Plugin from '../plugin.js';
import {Gvc} from '../components/pulseaudio.js';


let Gvc = null;
try {
// Add gnome-shell's typelib dir to the search path
const typelibDir = GLib.build_filenamev([Config.GNOME_SHELL_LIBDIR, 'gnome-shell']);
GIRepository.Repository.prepend_search_path(typelibDir);
GIRepository.Repository.prepend_library_path(typelibDir);

Gvc = (await import('gi://Gvc')).default;
} catch {}


export const Metadata = {
Expand Down

0 comments on commit 0521ed3

Please sign in to comment.