quickshell: steal wifi & bluetooth panel
This commit is contained in:
@@ -7,14 +7,16 @@ pragma Singleton
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
property string cacheDir: Quickshell.env("HOME") + "/.cache/quickshell/"
|
||||
property string recordingDir: Quickshell.env("HOME") + "/Videos/recordings/"
|
||||
property var cacheFiles: ["Location.json", "Ip.json", "Notifications.json", "LyricsOffset.txt"]
|
||||
readonly property string cacheDir: Quickshell.env("HOME") + "/.cache/quickshell/"
|
||||
// also create recording directory here
|
||||
readonly property string recordingDir: Quickshell.env("HOME") + "/Videos/recordings/"
|
||||
readonly property var cacheFiles: Object.freeze(["Location.json", "Ip.json", "Notifications.json", "LyricsOffset.txt", "Network.json"])
|
||||
property bool loaded: false
|
||||
property string locationCacheFile: cacheDir + "Location.json"
|
||||
property string ipCacheFile: cacheDir + "Ip.json"
|
||||
property string notificationsCacheFile: cacheDir + "Notifications.json"
|
||||
property string lyricsOffsetCacheFile: cacheDir + "LyricsOffset.txt"
|
||||
readonly property string locationCacheFile: cacheDir + "Location.json"
|
||||
readonly property string ipCacheFile: cacheDir + "Ip.json"
|
||||
readonly property string notificationsCacheFile: cacheDir + "Notifications.json"
|
||||
readonly property string lyricsOffsetCacheFile: cacheDir + "LyricsOffset.txt"
|
||||
readonly property string networkCacheFile: cacheDir + "Network.json"
|
||||
|
||||
Process {
|
||||
id: process
|
||||
@@ -23,7 +25,7 @@ Singleton {
|
||||
command: ["sh", "-c", `mkdir -p ${cacheDir} && mkdir -p ${recordingDir} && touch ${cacheDir + cacheFiles.join(` && touch ${cacheDir}`)}`]
|
||||
onExited: (code, status) => {
|
||||
if (code === 0)
|
||||
root.loaded = true;
|
||||
loaded = true;
|
||||
else
|
||||
Logger.error("CacheService", `Failed to create cache files: ${command.join(" ")}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user