mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
@@ -2,6 +2,7 @@ pragma Singleton
|
|||||||
|
|
||||||
pragma ComponentBehavior: Bound
|
pragma ComponentBehavior: Bound
|
||||||
|
|
||||||
|
import QtCore
|
||||||
import QtQuick
|
import QtQuick
|
||||||
import Quickshell
|
import Quickshell
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
@@ -68,8 +69,8 @@ Singleton {
|
|||||||
function scanSoundThemes() {
|
function scanSoundThemes() {
|
||||||
const xdgDataDirs = Quickshell.env("XDG_DATA_DIRS")
|
const xdgDataDirs = Quickshell.env("XDG_DATA_DIRS")
|
||||||
const searchPaths = xdgDataDirs && xdgDataDirs.trim() !== ""
|
const searchPaths = xdgDataDirs && xdgDataDirs.trim() !== ""
|
||||||
? xdgDataDirs.split(":")
|
? xdgDataDirs.split(":").concat(Paths.strip(StandardPaths.writableLocation(StandardPaths.GenericDataLocation)))
|
||||||
: ["/usr/share", "/usr/local/share", Paths.strip(StandardPaths.writableLocation(StandardPaths.HomeLocation) + "/.local/share")]
|
: ["/usr/share", "/usr/local/share", Paths.strip(StandardPaths.writableLocation(StandardPaths.GenericDataLocation))]
|
||||||
|
|
||||||
const basePaths = searchPaths.map(p => p + "/sounds").join(" ")
|
const basePaths = searchPaths.map(p => p + "/sounds").join(" ")
|
||||||
const script = `
|
const script = `
|
||||||
@@ -134,8 +135,8 @@ Singleton {
|
|||||||
|
|
||||||
const xdgDataDirs = Quickshell.env("XDG_DATA_DIRS")
|
const xdgDataDirs = Quickshell.env("XDG_DATA_DIRS")
|
||||||
const searchPaths = xdgDataDirs && xdgDataDirs.trim() !== ""
|
const searchPaths = xdgDataDirs && xdgDataDirs.trim() !== ""
|
||||||
? xdgDataDirs.split(":")
|
? xdgDataDirs.split(":").concat(Paths.strip(StandardPaths.writableLocation(StandardPaths.GenericDataLocation)))
|
||||||
: ["/usr/share", "/usr/local/share", StandardPaths.writableLocation(StandardPaths.HomeLocation) + "/.local/share"]
|
: ["/usr/share", "/usr/local/share", Paths.strip(StandardPaths.writableLocation(StandardPaths.GenericDataLocation))]
|
||||||
|
|
||||||
const extensions = ["oga", "ogg", "wav", "mp3", "flac"]
|
const extensions = ["oga", "ogg", "wav", "mp3", "flac"]
|
||||||
const themesToSearch = themeName !== "freedesktop" ? `${themeName} freedesktop` : themeName
|
const themesToSearch = themeName !== "freedesktop" ? `${themeName} freedesktop` : themeName
|
||||||
|
|||||||
Reference in New Issue
Block a user