use Hyprland.sendMessage; add more async catches

This commit is contained in:
end-4
2024-02-19 20:18:14 +07:00
parent c7a7cce618
commit fb376edfe4
11 changed files with 60 additions and 58 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ export async function firstRunWelcome() {
Utils.writeFile(FIRST_RUN_FILE_CONTENT, FIRST_RUN_PATH)
.then(() => {
// Note that we add a little delay to make sure the cool circular progress works
Utils.execAsync(['hyprctl', 'keyword', 'bind', "Super,Slash,exec,ags -t cheatsheet"]);
Utils.execAsync(['hyprctl', 'keyword', 'bind', "Super,Slash,exec,ags -t cheatsheet"]).catch(print);
Utils.execAsync(['bash', '-c',
`sleep 0.5; notify-send "Millis since epoch" "$(date +%s%N | cut -b1-13)"; sleep 0.5; notify-send '${FIRST_RUN_NOTIF_TITLE}' '${FIRST_RUN_NOTIF_BODY}' -a '${APP_NAME}' &`
]).catch(print)
@@ -54,5 +54,5 @@ async function batteryMessage() {
// Run them
firstRunWelcome();
Utils.timeout(1, () => {
Battery.connect('changed', () => batteryMessage());
Battery.connect('changed', () => batteryMessage().catch(print));
})
+1 -1
View File
@@ -152,7 +152,7 @@ class WaifuService extends Service {
}
this.emit('updateResponse', newMessageId);
})
.catch(console.error)
.catch(print);
}
}