remove app2unit in launcher settings

This commit is contained in:
notiant
2026-03-13 01:30:55 +01:00
committed by GitHub
parent 906d265bce
commit bb2e311dca
8 changed files with 2 additions and 67 deletions
-1
View File
@@ -235,7 +235,6 @@
"clipboardWatchImageCommand": "wl-paste --type image --watch cliphist store", "clipboardWatchImageCommand": "wl-paste --type image --watch cliphist store",
"position": "center", "position": "center",
"pinnedApps": [], "pinnedApps": [],
"useApp2Unit": false,
"sortByMostUsed": true, "sortByMostUsed": true,
"terminalCommand": "alacritty -e", "terminalCommand": "alacritty -e",
"customLaunchPrefixEnabled": false, "customLaunchPrefixEnabled": false,
-9
View File
@@ -1308,15 +1308,6 @@
"Settings.data.appLauncher.enableClipboardHistory" "Settings.data.appLauncher.enableClipboardHistory"
] ]
}, },
{
"labelKey": "panels.launcher.settings-use-app2unit-label",
"descriptionKey": "panels.launcher.settings-use-app2unit-description",
"widget": "NToggle",
"tab": 8,
"tabLabel": "panels.launcher.title",
"subTab": 2,
"subTabLabel": "common.execute"
},
{ {
"labelKey": "panels.launcher.settings-terminal-command-label", "labelKey": "panels.launcher.settings-terminal-command-label",
"descriptionKey": "panels.launcher.settings-terminal-command-description", "descriptionKey": "panels.launcher.settings-terminal-command-description",
-1
View File
@@ -424,7 +424,6 @@ Singleton {
property string clipboardWatchImageCommand: "wl-paste --type image --watch cliphist store" property string clipboardWatchImageCommand: "wl-paste --type image --watch cliphist store"
property string position: "center" // Position: center, top_left, top_right, bottom_left, bottom_right, bottom_center, top_center property string position: "center" // Position: center, top_left, top_right, bottom_left, bottom_right, bottom_center, top_center
property list<string> pinnedApps: [] property list<string> pinnedApps: []
property bool useApp2Unit: false
property bool sortByMostUsed: true property bool sortByMostUsed: true
property string terminalCommand: "alacritty -e" property string terminalCommand: "alacritty -e"
property bool customLaunchPrefixEnabled: false property bool customLaunchPrefixEnabled: false
-7
View File
@@ -425,14 +425,7 @@ Item {
const command = prefix.concat(app.command); const command = prefix.concat(app.command);
Quickshell.execDetached(command); Quickshell.execDetached(command);
} }
} else if (Settings.data.appLauncher.useApp2Unit && ProgramCheckerService.app2unitAvailable && app.id) {
Logger.d("Taskbar", `Using app2unit for: ${app.id}`);
if (app.runInTerminal)
Quickshell.execDetached(["app2unit", "--", app.id + ".desktop"]);
else
Quickshell.execDetached(["app2unit", "--"].concat(app.command));
} else { } else {
// Fallback logic when app2unit is not used
if (app.runInTerminal) { if (app.runInTerminal) {
Logger.d("Taskbar", "Executing terminal app manually: " + app.name); Logger.d("Taskbar", "Executing terminal app manually: " + app.name);
const terminal = Settings.data.appLauncher.terminalCommand.split(" "); const terminal = Settings.data.appLauncher.terminalCommand.split(" ");
-6
View File
@@ -156,12 +156,6 @@ Item {
const command = prefix.concat(app.command); const command = prefix.concat(app.command);
Quickshell.execDetached(command); Quickshell.execDetached(command);
} }
} else if (Settings.data.appLauncher.useApp2Unit && ProgramCheckerService.app2unitAvailable && app.id) {
Logger.d("Dock", `Using app2unit for: ${app.id}`);
if (app.runInTerminal)
Quickshell.execDetached(["app2unit", "--", app.id + ".desktop"]);
else
Quickshell.execDetached(["app2unit", "--"].concat(app.command));
} else { } else {
if (app.runInTerminal) { if (app.runInTerminal) {
Logger.d("Dock", "Executing terminal app manually: " + app.name); Logger.d("Dock", "Executing terminal app manually: " + app.name);
@@ -568,14 +568,7 @@ Item {
Logger.d("ApplicationsProvider", `Executing command (with prefix): ${command.join(" ")}`); Logger.d("ApplicationsProvider", `Executing command (with prefix): ${command.join(" ")}`);
Quickshell.execDetached(command); Quickshell.execDetached(command);
} }
} else if (Settings.data.appLauncher.useApp2Unit && ProgramCheckerService.app2unitAvailable && app.id) {
Logger.d("ApplicationsProvider", `Using app2unit for: ${app.id}`);
if (app.runInTerminal)
Quickshell.execDetached(["app2unit", "--", app.id + ".desktop"]);
else
Quickshell.execDetached(["app2unit", "--"].concat(app.command));
} else { } else {
// Fallback logic when app2unit is not used
if (app.runInTerminal) { if (app.runInTerminal) {
Logger.d("ApplicationsProvider", "Executing terminal app manually: " + app.name); Logger.d("ApplicationsProvider", "Executing terminal app manually: " + app.name);
const terminal = Settings.data.appLauncher.terminalCommand.split(" "); const terminal = Settings.data.appLauncher.terminalCommand.split(" ");
@@ -10,23 +10,6 @@ ColumnLayout {
spacing: Style.marginL spacing: Style.marginL
Layout.fillWidth: true Layout.fillWidth: true
NToggle {
label: I18n.tr("panels.launcher.settings-use-app2unit-label")
description: I18n.tr("panels.launcher.settings-use-app2unit-description")
checked: Settings.data.appLauncher.useApp2Unit && ProgramCheckerService.app2unitAvailable
enabled: ProgramCheckerService.app2unitAvailable && !Settings.data.appLauncher.customLaunchPrefixEnabled
opacity: ProgramCheckerService.app2unitAvailable ? 1.0 : 0.6
onToggled: checked => {
if (ProgramCheckerService.app2unitAvailable) {
Settings.data.appLauncher.useApp2Unit = checked;
if (checked) {
Settings.data.appLauncher.customLaunchPrefixEnabled = false;
}
}
}
defaultValue: Settings.getDefaultValue("appLauncher.useApp2Unit")
}
NTextInput { NTextInput {
label: I18n.tr("panels.launcher.settings-terminal-command-label") label: I18n.tr("panels.launcher.settings-terminal-command-label")
description: I18n.tr("panels.launcher.settings-terminal-command-description") description: I18n.tr("panels.launcher.settings-terminal-command-description")
@@ -41,13 +24,7 @@ ColumnLayout {
label: I18n.tr("panels.launcher.settings-custom-launch-prefix-enabled-label") label: I18n.tr("panels.launcher.settings-custom-launch-prefix-enabled-label")
description: I18n.tr("panels.launcher.settings-custom-launch-prefix-enabled-description") description: I18n.tr("panels.launcher.settings-custom-launch-prefix-enabled-description")
checked: Settings.data.appLauncher.customLaunchPrefixEnabled checked: Settings.data.appLauncher.customLaunchPrefixEnabled
enabled: !Settings.data.appLauncher.useApp2Unit onToggled: checked => Settings.data.appLauncher.customLaunchPrefixEnabled = checked
onToggled: checked => {
Settings.data.appLauncher.customLaunchPrefixEnabled = checked;
if (checked) {
Settings.data.appLauncher.useApp2Unit = false;
}
}
defaultValue: Settings.getDefaultValue("appLauncher.customLaunchPrefixEnabled") defaultValue: Settings.getDefaultValue("appLauncher.customLaunchPrefixEnabled")
} }
+1 -12
View File
@@ -14,7 +14,6 @@ Singleton {
property bool nmcliAvailable: false property bool nmcliAvailable: false
property bool bluetoothctlAvailable: false property bool bluetoothctlAvailable: false
property bool wlsunsetAvailable: false property bool wlsunsetAvailable: false
property bool app2unitAvailable: false
property bool gnomeCalendarAvailable: false property bool gnomeCalendarAvailable: false
property bool pythonAvailable: false property bool pythonAvailable: false
property bool wtypeAvailable: false property bool wtypeAvailable: false
@@ -24,7 +23,6 @@ Singleton {
"bluetoothctlAvailable": ["sh", "-c", "command -v bluetoothctl"], "bluetoothctlAvailable": ["sh", "-c", "command -v bluetoothctl"],
"nmcliAvailable": ["sh", "-c", "command -v nmcli"], "nmcliAvailable": ["sh", "-c", "command -v nmcli"],
"wlsunsetAvailable": ["sh", "-c", "command -v wlsunset"], "wlsunsetAvailable": ["sh", "-c", "command -v wlsunset"],
"app2unitAvailable": ["sh", "-c", "command -v app2unit"],
"gnomeCalendarAvailable": ["sh", "-c", "command -v gnome-calendar"], "gnomeCalendarAvailable": ["sh", "-c", "command -v gnome-calendar"],
"wtypeAvailable": ["sh", "-c", "command -v wtype"], "wtypeAvailable": ["sh", "-c", "command -v wtype"],
"pythonAvailable": ["sh", "-c", "command -v python3"] "pythonAvailable": ["sh", "-c", "command -v python3"]
@@ -42,22 +40,13 @@ Singleton {
// Signal emitted when all checks are complete // Signal emitted when all checks are complete
signal checksCompleted signal checksCompleted
// disable app2unit in settings if it is not available // disable Night Light in settings if wlsunset is not available
onChecksCompleted: { onChecksCompleted: {
if (!app2unitAvailable && Settings.data.appLauncher.useApp2Unit) {
Settings.data.appLauncher.useApp2Unit = false;
}
if (!wlsunsetAvailable && Settings.data.nightLight.enabled) { if (!wlsunsetAvailable && Settings.data.nightLight.enabled) {
Settings.data.nightLight.enabled = false; Settings.data.nightLight.enabled = false;
} }
} }
onApp2unitAvailableChanged: {
if (!app2unitAvailable && Settings.data.appLauncher.useApp2Unit) {
Settings.data.appLauncher.useApp2Unit = false;
}
}
onWlsunsetAvailableChanged: { onWlsunsetAvailableChanged: {
if (!wlsunsetAvailable && Settings.data.nightLight.enabled) { if (!wlsunsetAvailable && Settings.data.nightLight.enabled) {
Settings.data.nightLight.enabled = false; Settings.data.nightLight.enabled = false;