diff --git a/.config/ags/services/messages.js b/.config/ags/services/messages.js index d9448716..11e7c564 100644 --- a/.config/ags/services/messages.js +++ b/.config/ags/services/messages.js @@ -8,13 +8,14 @@ export function fileExists(filePath) { } const FIRST_RUN_FILE = "firstrun.txt"; -const FIRST_RUN_PATH = GLib.build_filenamev([GLib.get_user_cache_dir(), "ags", "user", FIRST_RUN_FILE]); +const FIRST_RUN_PATH = `${GLib.get_user_state_dir()}/ags/user/${FIRST_RUN_FILE}`; const FIRST_RUN_FILE_CONTENT = "Just a file to confirm that you have been greeted ;)"; const APP_NAME = "illogical-impulse"; const FIRST_RUN_NOTIF_TITLE = "Welcome!"; const FIRST_RUN_NOTIF_BODY = `First run? 👀 CTRL+SUPER+T to pick a wallpaper (or styles will break!)\nFor a list of keybinds, hit Super + /.`; export async function firstRunWelcome() { + GLib.mkdir_with_parents(`${GLib.get_user_state_dir()}/ags/user`, 755); if (!fileExists(FIRST_RUN_PATH)) { Utils.writeFile(FIRST_RUN_FILE_CONTENT, FIRST_RUN_PATH) .then(() => { @@ -54,7 +55,7 @@ async function batteryMessage() { } // Run them -firstRunWelcome(); +firstRunWelcome().catch(print); Utils.timeout(1, () => { Battery.connect('changed', () => batteryMessage().catch(print)); -}) \ No newline at end of file +})