add noctalia and fuzzel
This commit is contained in:
+123
@@ -0,0 +1,123 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginL
|
||||
function insertToken(token) {
|
||||
if (formatInput.inputItem) {
|
||||
var input = formatInput.inputItem;
|
||||
var cursorPos = input.cursorPosition;
|
||||
var currentText = input.text;
|
||||
var newText = currentText.substring(0, cursorPos) + token + currentText.substring(cursorPos);
|
||||
input.text = newText + " ";
|
||||
input.cursorPosition = cursorPos + token.length + 1;
|
||||
input.forceActiveFocus();
|
||||
}
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
label: I18n.tr("panels.lock-screen.clock-style-label")
|
||||
description: I18n.tr("panels.lock-screen.clock-style-description")
|
||||
model: [
|
||||
{
|
||||
"key": "analog",
|
||||
"name": I18n.tr("panels.lock-screen.clock-style-analog")
|
||||
},
|
||||
{
|
||||
"key": "digital",
|
||||
"name": I18n.tr("panels.lock-screen.clock-style-digital")
|
||||
},
|
||||
{
|
||||
"key": "custom",
|
||||
"name": I18n.tr("panels.lock-screen.clock-style-custom")
|
||||
}
|
||||
]
|
||||
currentKey: Settings.data.general.clockStyle
|
||||
onSelected: key => Settings.data.general.clockStyle = key
|
||||
defaultValue: Settings.getDefaultValue("general.clockStyle")
|
||||
z: 10
|
||||
}
|
||||
|
||||
NTextInput {
|
||||
id: formatInput
|
||||
label: I18n.tr("panels.lock-screen.clock-format-label")
|
||||
description: I18n.tr("panels.lock-screen.clock-format-description")
|
||||
text: Settings.data.general.clockFormat
|
||||
onTextChanged: Settings.data.general.clockFormat = text
|
||||
visible: Settings.data.general.clockStyle === "custom"
|
||||
defaultValue: Settings.getDefaultValue("general.clockFormat")
|
||||
}
|
||||
|
||||
NDateTimeTokens {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 300
|
||||
visible: Settings.data.general.clockStyle === "custom"
|
||||
onTokenClicked: token => root.insertToken(token)
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.password-chars-label")
|
||||
description: I18n.tr("panels.lock-screen.password-chars-description")
|
||||
checked: Settings.data.general.passwordChars
|
||||
onToggled: checked => Settings.data.general.passwordChars = checked
|
||||
defaultValue: Settings.getDefaultValue("general.passwordChars")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.compact-lockscreen-label")
|
||||
description: I18n.tr("panels.lock-screen.compact-lockscreen-description")
|
||||
checked: Settings.data.general.compactLockScreen
|
||||
onToggled: checked => Settings.data.general.compactLockScreen = checked
|
||||
defaultValue: Settings.getDefaultValue("general.compactLockScreen")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.enable-lockscreen-media-controls-label")
|
||||
description: I18n.tr("panels.lock-screen.enable-lockscreen-media-controls-description")
|
||||
checked: Settings.data.general.enableLockScreenMediaControls
|
||||
onToggled: checked => Settings.data.general.enableLockScreenMediaControls = checked
|
||||
visible: !Settings.data.general.compactLockScreen
|
||||
defaultValue: Settings.getDefaultValue("general.enableLockScreenMediaControls")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.lock-screen-animations-label")
|
||||
description: I18n.tr("panels.lock-screen.lock-screen-animations-description")
|
||||
checked: Settings.data.general.lockScreenAnimations
|
||||
onToggled: checked => Settings.data.general.lockScreenAnimations = checked
|
||||
defaultValue: Settings.getDefaultValue("general.lockScreenAnimations")
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.lock-screen.lock-screen-blur-strength-label")
|
||||
description: I18n.tr("panels.lock-screen.lock-screen-blur-strength-description")
|
||||
from: 0.0
|
||||
to: 1.0
|
||||
stepSize: 0.01
|
||||
showReset: true
|
||||
value: Settings.data.general.lockScreenBlur
|
||||
onMoved: value => Settings.data.general.lockScreenBlur = value
|
||||
text: ((Settings.data.general.lockScreenBlur) * 100).toFixed(0) + "%"
|
||||
defaultValue: Settings.getDefaultValue("general.lockScreenBlur")
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.lock-screen.lock-screen-tint-strength-label")
|
||||
description: I18n.tr("panels.lock-screen.lock-screen-tint-strength-description")
|
||||
from: 0.0
|
||||
to: 1.0
|
||||
stepSize: 0.01
|
||||
showReset: true
|
||||
value: Settings.data.general.lockScreenTint
|
||||
onMoved: value => Settings.data.general.lockScreenTint = value
|
||||
text: ((Settings.data.general.lockScreenTint) * 100).toFixed(0) + "%"
|
||||
defaultValue: Settings.getDefaultValue("general.lockScreenTint")
|
||||
}
|
||||
}
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: Style.marginL
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.lock-on-suspend-label")
|
||||
description: I18n.tr("panels.lock-screen.lock-on-suspend-description")
|
||||
checked: Settings.data.general.lockOnSuspend
|
||||
onToggled: checked => Settings.data.general.lockOnSuspend = checked
|
||||
defaultValue: Settings.getDefaultValue("general.lockOnSuspend")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.auto-start-auth-label")
|
||||
description: I18n.tr("panels.lock-screen.auto-start-auth-description")
|
||||
checked: Settings.data.general.autoStartAuth
|
||||
onToggled: checked => Settings.data.general.autoStartAuth = checked
|
||||
defaultValue: Settings.getDefaultValue("general.autoStartAuth")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.allow-password-with-fprintd-label")
|
||||
description: I18n.tr("panels.lock-screen.allow-password-with-fprintd-description")
|
||||
checked: Settings.data.general.allowPasswordWithFprintd
|
||||
onToggled: checked => Settings.data.general.allowPasswordWithFprintd = checked
|
||||
defaultValue: Settings.getDefaultValue("general.allowPasswordWithFprintd")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.show-session-buttons-label")
|
||||
description: I18n.tr("panels.lock-screen.show-session-buttons-description")
|
||||
checked: Settings.data.general.showSessionButtonsOnLockScreen
|
||||
onToggled: checked => Settings.data.general.showSessionButtonsOnLockScreen = checked
|
||||
defaultValue: Settings.getDefaultValue("general.showSessionButtonsOnLockScreen")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.lock-screen.show-hibernate-label")
|
||||
description: I18n.tr("panels.lock-screen.show-hibernate-description")
|
||||
checked: Settings.data.general.showHibernateOnLockScreen
|
||||
onToggled: checked => Settings.data.general.showHibernateOnLockScreen = checked
|
||||
visible: Settings.data.general.showSessionButtonsOnLockScreen
|
||||
defaultValue: Settings.getDefaultValue("general.showSessionButtonsOnLockScreen")
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: I18n.tr("panels.session-menu.enable-countdown-label")
|
||||
description: I18n.tr("panels.session-menu.enable-countdown-description")
|
||||
checked: Settings.data.general.enableLockScreenCountdown
|
||||
onToggled: checked => Settings.data.general.enableLockScreenCountdown = checked
|
||||
visible: Settings.data.general.showSessionButtonsOnLockScreen
|
||||
defaultValue: Settings.getDefaultValue("general.enableLockScreenCountdown")
|
||||
}
|
||||
|
||||
NValueSlider {
|
||||
visible: Settings.data.general.showSessionButtonsOnLockScreen && Settings.data.general.enableLockScreenCountdown
|
||||
Layout.fillWidth: true
|
||||
label: I18n.tr("panels.session-menu.countdown-duration-label")
|
||||
description: I18n.tr("panels.session-menu.countdown-duration-description")
|
||||
from: 1000
|
||||
to: 30000
|
||||
stepSize: 1000
|
||||
showReset: true
|
||||
value: Settings.data.general.lockScreenCountdownDuration
|
||||
onMoved: value => Settings.data.general.lockScreenCountdownDuration = value
|
||||
text: Math.round(Settings.data.general.lockScreenCountdownDuration / 1000) + "s"
|
||||
defaultValue: Settings.getDefaultValue("general.lockScreenCountdownDuration")
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import qs.Commons
|
||||
import qs.Widgets
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
spacing: 0
|
||||
|
||||
NTabBar {
|
||||
id: subTabBar
|
||||
Layout.fillWidth: true
|
||||
Layout.bottomMargin: Style.marginM
|
||||
distributeEvenly: true
|
||||
currentIndex: tabView.currentIndex
|
||||
|
||||
NTabButton {
|
||||
text: I18n.tr("common.appearance")
|
||||
tabIndex: 0
|
||||
checked: subTabBar.currentIndex === 0
|
||||
}
|
||||
NTabButton {
|
||||
text: I18n.tr("common.behavior")
|
||||
tabIndex: 1
|
||||
checked: subTabBar.currentIndex === 1
|
||||
}
|
||||
NTabButton {
|
||||
text: I18n.tr("common.monitors")
|
||||
tabIndex: 2
|
||||
checked: subTabBar.currentIndex === 2
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Style.marginL
|
||||
}
|
||||
|
||||
NTabView {
|
||||
id: tabView
|
||||
currentIndex: subTabBar.currentIndex
|
||||
|
||||
AppearanceSubTab {}
|
||||
BehaviorSubTab {}
|
||||
MonitorsSubTab {}
|
||||
}
|
||||
}
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.Commons
|
||||
import qs.Services.Compositor
|
||||
import qs.Widgets
|
||||
|
||||
ColumnLayout {
|
||||
id: root
|
||||
enabled: true
|
||||
spacing: Style.marginL
|
||||
Layout.fillWidth: true
|
||||
|
||||
// Helper functions to update arrays immutably
|
||||
function addMonitor(list, name) {
|
||||
const arr = (list || []).slice();
|
||||
if (!arr.includes(name))
|
||||
arr.push(name);
|
||||
return arr;
|
||||
}
|
||||
function removeMonitor(list, name) {
|
||||
return (list || []).filter(function (n) {
|
||||
return n !== name;
|
||||
});
|
||||
}
|
||||
|
||||
NText {
|
||||
text: I18n.tr("panels.lock-screen.monitors-desc")
|
||||
wrapMode: Text.WordWrap
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: Quickshell.screens || []
|
||||
delegate: NCheckbox {
|
||||
Layout.fillWidth: true
|
||||
readonly property real compositorScale: {
|
||||
const info = CompositorService.displayScales[modelData.name];
|
||||
return (info && info.scale) ? info.scale : 1.0;
|
||||
}
|
||||
label: modelData.name || "Unknown"
|
||||
description: {
|
||||
I18n.tr("system.monitor-description", {
|
||||
"model": modelData.model,
|
||||
"width": modelData.width * compositorScale,
|
||||
"height": modelData.height * compositorScale,
|
||||
"scale": compositorScale
|
||||
});
|
||||
}
|
||||
checked: (Settings.data.general.lockScreenMonitors || []).indexOf(modelData.name) !== -1
|
||||
onToggled: checked => {
|
||||
if (checked) {
|
||||
Settings.data.general.lockScreenMonitors = root.addMonitor(Settings.data.general.lockScreenMonitors, modelData.name);
|
||||
} else {
|
||||
Settings.data.general.lockScreenMonitors = root.removeMonitor(Settings.data.general.lockScreenMonitors, modelData.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user