Index: applets/userswitcher/package/contents/config/main.xml
===================================================================
--- applets/userswitcher/package/contents/config/main.xml
+++ applets/userswitcher/package/contents/config/main.xml
@@ -18,6 +18,9 @@
false
+
+ false
+
Index: applets/userswitcher/package/contents/ui/configGeneral.qml
===================================================================
--- applets/userswitcher/package/contents/ui/configGeneral.qml
+++ applets/userswitcher/package/contents/ui/configGeneral.qml
@@ -30,6 +30,7 @@
property bool cfg_showName
property bool cfg_showFullName
property alias cfg_showTechnicalInfo: showTechnicalInfoCheck.checked
+ property alias cfg_switchNoLock: switchNoLock.checked
QtControls.ButtonGroup {
id: nameGroup
@@ -120,4 +121,18 @@
text: i18nc("@option:check", "Show technical session information")
}
+
+
+ Item {
+ Kirigami.FormData.isSection: true
+ }
+
+
+ QtControls.CheckBox {
+ id: switchNoLock
+
+ Kirigami.FormData.label: i18nc("@title:label", "Screen lock:")
+
+ text: i18nc("@option:check", "No lock session on user switch")
+ }
}
Index: applets/userswitcher/package/contents/ui/main.qml
===================================================================
--- applets/userswitcher/package/contents/ui/main.qml
+++ applets/userswitcher/package/contents/ui/main.qml
@@ -45,6 +45,8 @@
// TTY number and X display
readonly property bool showTechnicalInfo: plasmoid.configuration.showTechnicalInfo
+ readonly property bool switchNoLock: plasmoid.configuration.switchNoLock
+
Plasmoid.switchWidth: units.gridUnit * 10
Plasmoid.switchHeight: units.gridUnit * 12
@@ -200,7 +202,13 @@
return ""
}
- onClicked: sessionsModel.switchUser(model.vtNumber, sessionsModel.shouldLock)
+ onClicked: {
+ if (switchNoLock) {
+ sessionsModel.switchUser(model.vtNumber)
+ } else {
+ sessionsModel.switchUser(model.vtNumber, sessionsModel.shouldLock)
+ }
+ }
onContainsMouseChanged: {
if (containsMouse) {
userList.currentIndex = index
@@ -219,7 +227,12 @@
icon: "system-switch-user"
highlight: delegateHighlight
visible: sessionsModel.canStartNewSession
- onClicked: sessionsModel.startNewSession(sessionsModel.shouldLock)
+ onClicked:
+ if (switchNoLock) {
+ sessionsModel.startNewSession()
+ } else {
+ sessionsModel.startNewSession(sessionsModel.shouldLock)
+ }
}
ListDelegate {