user config round 2 (#271)

This commit is contained in:
end-4
2024-03-01 23:49:18 +07:00
parent e1bb1c9790
commit b1b4fd4394
15 changed files with 71 additions and 56 deletions
+14
View File
@@ -0,0 +1,14 @@
const { Gio, GLib, Gtk } = imports.gi;
export function fileExists(filePath) {
let file = Gio.File.new_for_path(filePath);
return file.query_exists(null);
}
export function expandTilde(path) {
if (path.startsWith('~')) {
return GLib.get_home_dir() + path.slice(1);
} else {
return path;
}
}