Add startup application picker
This commit is contained in:
@@ -12,6 +12,7 @@ SettingsPage {
|
||||
lede: "Choose what opens your files and links, and what starts with your session."
|
||||
|
||||
property string expandedRole: ""
|
||||
property bool addingAutostart: false
|
||||
readonly property var applications: DesktopEntries.applications.values
|
||||
readonly property var roles: [
|
||||
{ key: "browser", label: "Browser", detail: "Web links and HTML pages", categorySets: [["webbrowser"]], terms: ["web browser", "browser"] },
|
||||
@@ -178,7 +179,28 @@ SettingsPage {
|
||||
|
||||
SettingsCard {
|
||||
title: "User autostart"
|
||||
subtitle: "These desktop entries live in your user configuration. Select a row to toggle it."
|
||||
subtitle: "Choose what starts with your session. Entries live in your user configuration, not the compositor."
|
||||
|
||||
ActionRow {
|
||||
label: "Add an application"
|
||||
detail: root.addingAutostart
|
||||
? "Search the applications installed on this machine"
|
||||
: "Start another installed application when you sign in"
|
||||
action: root.addingAutostart ? "Close" : "Choose"
|
||||
divider: !root.addingAutostart || DefaultApps.autostartEntries.length > 0
|
||||
enabled: !DefaultApps.busy
|
||||
onTriggered: root.addingAutostart = !root.addingAutostart
|
||||
}
|
||||
|
||||
AutostartAppPicker {
|
||||
visible: root.addingAutostart
|
||||
width: parent.width
|
||||
existing: DefaultApps.autostartEntries.map(entry => entry.id)
|
||||
onPicked: id => {
|
||||
DefaultApps.addAutostart(id);
|
||||
root.addingAutostart = false;
|
||||
}
|
||||
}
|
||||
|
||||
TextRow {
|
||||
visible: !DefaultApps.busy && DefaultApps.autostartEntries.length === 0
|
||||
|
||||
Reference in New Issue
Block a user