Added ags to hyprland
This commit is contained in:
14
home/desktops/hyprland/ags/modules/.miscutils/files.js
Normal file
14
home/desktops/hyprland/ags/modules/.miscutils/files.js
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user