mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-24 21:42:51 -05:00
niri: track open modals in modal manager for focus transfers
This commit is contained in:
@@ -715,7 +715,42 @@ Singleton {
|
||||
}
|
||||
|
||||
function detectAvailableIconThemes() {
|
||||
Processes.detectIcons();
|
||||
const xdgDataDirs = Quickshell.env("XDG_DATA_DIRS") || "";
|
||||
const localData = Paths.strip(StandardPaths.writableLocation(StandardPaths.GenericDataLocation));
|
||||
const homeDir = Paths.strip(StandardPaths.writableLocation(StandardPaths.HomeLocation));
|
||||
|
||||
const dataDirs = xdgDataDirs.trim() !== "" ? xdgDataDirs.split(":").concat([localData]) : ["/usr/share", "/usr/local/share", localData];
|
||||
|
||||
const iconPaths = dataDirs.map(d => d + "/icons").concat([homeDir + "/.icons"]);
|
||||
const pathsArg = iconPaths.join(" ");
|
||||
|
||||
const script = `
|
||||
echo "SYSDEFAULT:$(gsettings get org.gnome.desktop.interface icon-theme 2>/dev/null | sed "s/'//g" || echo '')"
|
||||
for dir in ${pathsArg}; do
|
||||
[ -d "$dir" ] || continue
|
||||
for theme in "$dir"/*/; do
|
||||
[ -d "$theme" ] || continue
|
||||
basename "$theme"
|
||||
done
|
||||
done | grep -v '^icons$' | grep -v '^default$' | grep -v '^hicolor$' | grep -v '^locolor$' | sort -u
|
||||
`;
|
||||
|
||||
Proc.runCommand("detectIconThemes", ["sh", "-c", script], (output, exitCode) => {
|
||||
const themes = ["System Default"];
|
||||
if (output && output.trim()) {
|
||||
const lines = output.trim().split('\n');
|
||||
for (let i = 0; i < lines.length; i++) {
|
||||
const line = lines[i].trim();
|
||||
if (line.startsWith("SYSDEFAULT:")) {
|
||||
systemDefaultIconTheme = line.substring(11).trim();
|
||||
continue;
|
||||
}
|
||||
if (line)
|
||||
themes.push(line);
|
||||
}
|
||||
}
|
||||
availableIconThemes = themes;
|
||||
});
|
||||
}
|
||||
|
||||
function getEffectiveTimeFormat() {
|
||||
|
||||
Reference in New Issue
Block a user