🗑️ ags(scripts/utils): remove unnecessary getUserDirs() method

use GLib methods instead
This commit is contained in:
retrozinndev
2025-05-11 22:12:25 -03:00
parent c9eef9fce8
commit dbd65835e9
+1 -11
View File
@@ -9,16 +9,6 @@ export function getHyprlandVersion(): string {
return exec(`${GLib.getenv("HYPRLAND_CMD") || "Hyprland"} --version | head -n1`).split(" ")[1]; return exec(`${GLib.getenv("HYPRLAND_CMD") || "Hyprland"} --version | head -n1`).split(" ")[1];
} }
export function getUserDirs() {
return {
home: GLib.get_home_dir(),
state: GLib.get_user_state_dir(),
cache: GLib.get_user_cache_dir(),
config: GLib.get_user_config_dir(),
data: GLib.get_user_data_dir()
};
}
export function makeDirectory(dir: string): void { export function makeDirectory(dir: string): void {
execAsync([ "mkdir", "-p", dir ]); execAsync([ "mkdir", "-p", dir ]);
} }
@@ -28,7 +18,7 @@ export function deleteFile(path: string): void {
} }
export function isInstalled(commandName: string): boolean { export function isInstalled(commandName: string): boolean {
const output = exec(["command", "-v", commandName]); const output = exec(["bash", "-c", `command -v ${commandName}`]);
if(output) if(output)
return true; return true;