Merge with latest upstream

This commit is contained in:
midn8hustlr
2024-03-17 16:55:38 +05:30
19 changed files with 246 additions and 203 deletions
+6 -1
View File
@@ -1,3 +1,4 @@
const { GLib } = imports.gi;
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
const { execAsync, exec } = Utils;
@@ -6,6 +7,10 @@ export const isDebianDistro = (distroID == 'linuxmint' || distroID == 'ubuntu' |
export const isArchDistro = (distroID == 'arch' || distroID == 'endeavouros' || distroID == 'cachyos');
export const hasFlatpak = !!exec(`bash -c 'command -v flatpak'`);
const LIGHTDARK_FILE_LOCATION = `${GLib.get_user_cache_dir()}/ags/user/colormode.txt`;
const colorMode = Utils.exec('bash -c "sed -n \'1p\' $HOME/.cache/ags/user/colormode.txt"');
export let darkMode = !(Utils.readFile(LIGHTDARK_FILE_LOCATION).trim() == 'light');
export const getDistroIcon = () => {
// Arches
if(distroID == 'arch') return 'arch-symbolic';
@@ -40,4 +45,4 @@ export const getDistroName = () => {
if(distroID == 'raspbian') return 'Raspbian';
if(distroID == 'kali') return 'Kali Linux';
return 'Linux';
}
}