first run experience: welcome app

This commit is contained in:
end-4
2025-06-15 16:22:47 +02:00
parent eb8fc41c01
commit 41c5c2a99b
8 changed files with 318 additions and 6 deletions
+1 -1
View File
@@ -300,7 +300,7 @@ Singleton {
const model = models[modelId]
// See if policy prevents online models
if (ConfigOptions.policies.ai === 2 && !model.endpoint.includes("localhost")) {
root.addMessage(StringUtils.format(StringUtils.format("Policy disallows online models\n\nControlled by `policies.ai` config option"), model.name), root.interfaceRole);
root.addMessage(StringUtils.format(StringUtils.format("Online models disallowed\n\nControlled by `policies.ai` config option"), model.name), root.interfaceRole);
return;
}
PersistentStateManager.setState("ai.model", modelId);
@@ -13,14 +13,22 @@ Singleton {
property string firstRunNotifSummary: "Welcome!"
property string firstRunNotifBody: "Hit Super+/ for a list of keybinds"
property string defaultWallpaperPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/assets/images/default_wallpaper.png`)
property string welcomeQmlPath: FileUtils.trimFileProtocol(`${Directories.config}/quickshell/welcome.qml`)
function load() {
firstRunFileView.reload()
}
function enableNextTime() {
Hyprland.dispatch(`exec rm -f '${root.firstRunFilePath}'`)
}
function disableNextTime() {
Hyprland.dispatch(`exec echo '${root.firstRunFileContent}' > '${root.firstRunFilePath}'`)
}
function handleFirstRun() {
Hyprland.dispatch(`exec notify-send '${root.firstRunNotifSummary}' '${root.firstRunNotifBody}' -a 'Shell'`)
Hyprland.dispatch(`exec '${Directories.wallpaperSwitchScriptPath}' '${root.defaultWallpaperPath}'`)
Hyprland.dispatch(`exec qs -p '${root.welcomeQmlPath}'`)
}
FileView {