mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Make the phoneshell a bit more flexible
Use plasma-open-settings to open configs instead of directly plasma-settings. This way we're less dependent on specific set up.
This commit is contained in:
parent
d30744789f
commit
31448728b8
5 changed files with 15 additions and 8 deletions
|
|
@ -60,6 +60,13 @@ add_subdirectory(applets)
|
|||
add_subdirectory(containments)
|
||||
add_subdirectory(components)
|
||||
|
||||
find_program(PlasmaOpenSettings plasma-open-settings)
|
||||
set_package_properties(PlasmaOpenSettings PROPERTIES
|
||||
URL https://invent.kde.org/plasma/kde-cli-tools/
|
||||
DESCRIPTION "Opens KCMs properly"
|
||||
TYPE RUNTIME
|
||||
PURPOSE "Used on the top panel")
|
||||
|
||||
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
|
||||
|
||||
# add clang-format target for all our real source files
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ Item {
|
|||
text: i18n("Battery")
|
||||
icon: "battery-full" + (batteryProvider.pluggedIn ? "-charging" : "")
|
||||
enabled: false
|
||||
settingsCommand: "plasma-settings -m kcm_mobile_power"
|
||||
settingsCommand: "plasma-open-settings kcm_mobile_power"
|
||||
}
|
||||
Component.onCompleted: quickSettings.quickSettingsModel.include(setting)
|
||||
}
|
||||
|
|
@ -161,7 +161,7 @@ Item {
|
|||
text: i18n("Sound")
|
||||
icon: "audio-speakers-symbolic"
|
||||
enabled: false
|
||||
settingsCommand: "plasma-settings -m kcm_pulseaudio"
|
||||
settingsCommand: "plasma-open-settings kcm_pulseaudio"
|
||||
function toggle() {
|
||||
volumeProvider.showVolumeOverlay()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ HomeScreenComponents.QuickSettingsModel
|
|||
text: i18n("Settings")
|
||||
icon: "configure"
|
||||
enabled: false
|
||||
settingsCommand: "plasma-settings"
|
||||
settingsCommand: "plasma-open-settings"
|
||||
}
|
||||
HomeScreenComponents.QuickSetting {
|
||||
PlasmaNM.Handler {
|
||||
|
|
@ -49,7 +49,7 @@ HomeScreenComponents.QuickSettingsModel
|
|||
|
||||
text: i18n("Wi-Fi")
|
||||
icon: "network-wireless-signal"
|
||||
settingsCommand: "plasma-settings -m kcm_mobile_wifi"
|
||||
settingsCommand: "plasma-open-settings kcm_mobile_wifi"
|
||||
function toggle() {
|
||||
nmHandler.enableWireless(!enabledConnections.wirelessEnabled)
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ HomeScreenComponents.QuickSettingsModel
|
|||
HomeScreenComponents.QuickSetting {
|
||||
text: i18n("Bluetooth")
|
||||
icon: "network-bluetooth"
|
||||
settingsCommand: "plasma-settings -m kcm_bluetooth"
|
||||
settingsCommand: "plasma-open-settings kcm_bluetooth"
|
||||
function toggle() {
|
||||
var enable = !BluezQt.Manager.bluetoothOperational;
|
||||
BluezQt.Manager.bluetoothBlocked = !enable;
|
||||
|
|
@ -73,7 +73,7 @@ HomeScreenComponents.QuickSettingsModel
|
|||
HomeScreenComponents.QuickSetting {
|
||||
text: i18n("Mobile Data")
|
||||
icon: "network-modem"
|
||||
settingsCommand: "plasma-settings -m kcm_mobile_broadband"
|
||||
settingsCommand: "plasma-open-settings kcm_mobile_broadband"
|
||||
enabled: enabledConnections.wwanEnabled
|
||||
function toggle() {
|
||||
nmHandler.enableWwan(!enabledConnections.wwanEnabled)
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ NanoShell.FullScreenOverlay {
|
|||
onClicked: {
|
||||
let coords = mapToItem(flickable, 0, 0);
|
||||
NanoShell.StartupFeedback.open("audio-volume-high", i18n("Audio Settings"), coords.x, coords.y, PlasmaCore.Units.iconSizes.medium);
|
||||
plasmoid.nativeInterface.executeCommand("plasma-settings -m kcm_pulseaudio");
|
||||
plasmoid.nativeInterface.executeCommand("plasma-open-settings kcm_pulseaudio");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ HomeScreenComponents.QuickSetting {
|
|||
text: i18n("Night Color")
|
||||
icon: "redshift-status-on"
|
||||
enabled: compositorAdaptor.active
|
||||
settingsCommand: "plasma-settings -m kcm_nightcolor"
|
||||
settingsCommand: "plasma-open-settings kcm_nightcolor"
|
||||
|
||||
CC.CompositorAdaptor {
|
||||
id: compositorAdaptor
|
||||
|
|
|
|||
Loading…
Reference in a new issue