sidebar: segcyer api stuff

let me cook
This commit is contained in:
end-4
2024-03-17 00:18:59 +07:00
parent 46642ba4b1
commit 9b69a38c74
9 changed files with 70 additions and 76 deletions
+5 -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,9 @@ 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`;
export let darkMode = !(Utils.readFile(LIGHTDARK_FILE_LOCATION).trim() == '-l');
export const getDistroIcon = () => {
// Arches
if(distroID == 'arch') return 'arch-symbolic';
@@ -40,4 +44,4 @@ export const getDistroName = () => {
if(distroID == 'raspbian') return 'Raspbian';
if(distroID == 'kali') return 'Kali Linux';
return 'Linux';
}
}