formatter

This commit is contained in:
Zacharias-Brohn
2026-02-24 23:20:11 +01:00
parent 40cd984b6d
commit d56a0260fb
202 changed files with 15037 additions and 15352 deletions
+23 -25
View File
@@ -5,33 +5,31 @@ import Quickshell
import qs.Config
Singleton {
id: root
id: root
readonly property string home: Quickshell.env("HOME")
readonly property string pictures: Quickshell.env("XDG_PICTURES_DIR") || `${home}/Pictures`
readonly property string videos: Quickshell.env("XDG_VIDEOS_DIR") || `${home}/Videos`
readonly property string cache: `${Quickshell.env("XDG_CACHE_HOME") || `${home}/.cache`}/zshell`
readonly property string config: `${Quickshell.env("XDG_CONFIG_HOME") || `${home}/.config`}/zshell`
readonly property string data: `${Quickshell.env("XDG_DATA_HOME") || `${home}/.local/share`}/zshell`
readonly property string home: Quickshell.env("HOME")
readonly property string imagecache: `${cache}/imagecache`
readonly property string libdir: Quickshell.env("ZSHELL_LIB_DIR") || "/usr/lib/zshell"
readonly property string notifimagecache: `${imagecache}/notifs`
readonly property string pictures: Quickshell.env("XDG_PICTURES_DIR") || `${home}/Pictures`
readonly property string recsdir: Quickshell.env("ZSHELL_RECORDINGS_DIR") || `${videos}/Recordings`
readonly property string state: `${Quickshell.env("XDG_STATE_HOME") || `${home}/.local/state`}/zshell`
readonly property string videos: Quickshell.env("XDG_VIDEOS_DIR") || `${home}/Videos`
readonly property string wallsdir: Quickshell.env("ZSHELL_WALLPAPERS_DIR") || absolutePath(Config.wallpaperPath)
readonly property string data: `${Quickshell.env("XDG_DATA_HOME") || `${home}/.local/share`}/zshell`
readonly property string state: `${Quickshell.env("XDG_STATE_HOME") || `${home}/.local/state`}/zshell`
readonly property string cache: `${Quickshell.env("XDG_CACHE_HOME") || `${home}/.cache`}/zshell`
readonly property string config: `${Quickshell.env("XDG_CONFIG_HOME") || `${home}/.config`}/zshell`
function absolutePath(path: string): string {
return toLocalFile(path.replace("~", home));
}
readonly property string imagecache: `${cache}/imagecache`
readonly property string notifimagecache: `${imagecache}/notifs`
readonly property string wallsdir: Quickshell.env("ZSHELL_WALLPAPERS_DIR") || absolutePath(Config.wallpaperPath)
readonly property string recsdir: Quickshell.env("ZSHELL_RECORDINGS_DIR") || `${videos}/Recordings`
readonly property string libdir: Quickshell.env("ZSHELL_LIB_DIR") || "/usr/lib/zshell"
function shortenHome(path: string): string {
return path.replace(home, "~");
}
function toLocalFile(path: url): string {
path = Qt.resolvedUrl(path);
return path.toString() ? ZShellIo.toLocalFile(path) : "";
}
function absolutePath(path: string): string {
return toLocalFile(path.replace("~", home));
}
function shortenHome(path: string): string {
return path.replace(home, "~");
}
function toLocalFile(path: url): string {
path = Qt.resolvedUrl(path);
return path.toString() ? ZShellIo.toLocalFile(path) : "";
}
}