Formatting
This commit is contained in:
parent
ce66b99cee
commit
84c81ecb77
6 changed files with 229 additions and 61 deletions
|
|
@ -26,37 +26,49 @@ Item {
|
|||
label: "Show Active Window"
|
||||
description: "Display the title of the currently focused window below the bar"
|
||||
value: Settings.data.bar.showActiveWindow
|
||||
onToggled: function (newValue) { Settings.data.bar.showActiveWindow = newValue }
|
||||
onToggled: function (newValue) {
|
||||
Settings.data.bar.showActiveWindow = newValue
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Show Active Window Icon"
|
||||
description: "Display the icon of the currently focused window"
|
||||
value: Settings.data.bar.showActiveWindowIcon
|
||||
onToggled: function (newValue) { Settings.data.bar.showActiveWindowIcon = newValue }
|
||||
onToggled: function (newValue) {
|
||||
Settings.data.bar.showActiveWindowIcon = newValue
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Show System Info"
|
||||
description: "Display system information (CPU, RAM, Temperature)"
|
||||
value: Settings.data.bar.showSystemInfo
|
||||
onToggled: function (newValue) { Settings.data.bar.showSystemInfo = newValue }
|
||||
onToggled: function (newValue) {
|
||||
Settings.data.bar.showSystemInfo = newValue
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Show Taskbar"
|
||||
description: "Display a taskbar showing currently open windows"
|
||||
value: Settings.data.bar.showTaskbar
|
||||
onToggled: function (newValue) { Settings.data.bar.showTaskbar = newValue }
|
||||
onToggled: function (newValue) {
|
||||
Settings.data.bar.showTaskbar = newValue
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Show Media"
|
||||
description: "Display media controls and information"
|
||||
value: Settings.data.bar.showMedia
|
||||
onToggled: function (newValue) { Settings.data.bar.showMedia = newValue }
|
||||
onToggled: function (newValue) {
|
||||
Settings.data.bar.showMedia = newValue
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true }
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,17 +13,26 @@ Item {
|
|||
|
||||
// Helper functions to update arrays immutably
|
||||
function addMonitor(list, name) {
|
||||
const arr = (list || []).slice(); if (!arr.includes(name)) arr.push(name); return arr
|
||||
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 })
|
||||
return (list || []).filter(function (n) {
|
||||
return n !== name
|
||||
})
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: Style.marginMedium * scaling
|
||||
|
||||
NText { text: "Per‑monitor configuration"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
||||
NText {
|
||||
text: "Per‑monitor configuration"
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Colors.accentSecondary
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: Quickshell.screens || []
|
||||
|
|
@ -41,12 +50,22 @@ Item {
|
|||
anchors.margins: Style.marginMedium * scaling
|
||||
spacing: Style.marginSmall * scaling
|
||||
|
||||
NText { text: (modelData.name || "Unknown"); font.weight: Style.fontWeightBold; color: Colors.accentPrimary }
|
||||
NText {
|
||||
text: (modelData.name || "Unknown")
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Colors.accentPrimary
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
spacing: Style.marginMedium * scaling
|
||||
NText { text: `Resolution: ${modelData.width}x${modelData.height}`; color: Colors.textSecondary }
|
||||
NText { text: `Position: (${modelData.x}, ${modelData.y})`; color: Colors.textSecondary }
|
||||
NText {
|
||||
text: `Resolution: ${modelData.width}x${modelData.height}`
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
NText {
|
||||
text: `Position: (${modelData.x}, ${modelData.y})`
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
|
|
@ -83,7 +102,8 @@ Item {
|
|||
if (newValue) {
|
||||
Settings.data.notifications.monitors = addMonitor(Settings.data.notifications.monitors, modelData.name)
|
||||
} else {
|
||||
Settings.data.notifications.monitors = removeMonitor(Settings.data.notifications.monitors, modelData.name)
|
||||
Settings.data.notifications.monitors = removeMonitor(Settings.data.notifications.monitors,
|
||||
modelData.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -91,6 +111,8 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true }
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,17 +20,28 @@ Item {
|
|||
color: Colors.accentSecondary
|
||||
}
|
||||
|
||||
NText { text: "Visualizer Type"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
||||
NText { text: "Choose the style of the audio visualizer"; color: Colors.textSecondary }
|
||||
NText {
|
||||
text: "Visualizer Type"
|
||||
color: Colors.textPrimary
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
NText {
|
||||
text: "Choose the style of the audio visualizer"
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
|
||||
NComboBox {
|
||||
id: visualizerTypeComboBox
|
||||
optionsKeys: ["radial", "fire", "diamond"]
|
||||
optionsLabels: ["Radial", "Fire", "Diamond"]
|
||||
currentKey: Settings.data.audioVisualizer.type
|
||||
onSelected: function (key) { Settings.data.audioVisualizer.type = key }
|
||||
onSelected: function (key) {
|
||||
Settings.data.audioVisualizer.type = key
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true }
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,11 @@ Item {
|
|||
anchors.fill: parent
|
||||
spacing: Style.marginMedium * scaling
|
||||
|
||||
NText { text: "Wi‑Fi"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
||||
NText {
|
||||
text: "Wi‑Fi"
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Colors.accentSecondary
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Enable Wi‑Fi"
|
||||
|
|
@ -24,12 +28,19 @@ Item {
|
|||
value: Settings.data.network.wifiEnabled
|
||||
onToggled: function (newValue) {
|
||||
Settings.data.network.wifiEnabled = newValue
|
||||
Quickshell.execDetached(["nmcli", "radio", "wifi", newValue ? "on" : "off"]) }
|
||||
Quickshell.execDetached(["nmcli", "radio", "wifi", newValue ? "on" : "off"])
|
||||
}
|
||||
}
|
||||
|
||||
NDivider { Layout.fillWidth: true }
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NText { text: "Bluetooth"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
||||
NText {
|
||||
text: "Bluetooth"
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Colors.accentSecondary
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Enable Bluetooth"
|
||||
|
|
@ -39,11 +50,14 @@ Item {
|
|||
Settings.data.network.bluetoothEnabled = newValue
|
||||
if (Bluetooth.defaultAdapter) {
|
||||
Bluetooth.defaultAdapter.enabled = newValue
|
||||
if (Bluetooth.defaultAdapter.enabled) Bluetooth.defaultAdapter.discovering = true
|
||||
if (Bluetooth.defaultAdapter.enabled)
|
||||
Bluetooth.defaultAdapter.discovering = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true }
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,11 +14,22 @@ Item {
|
|||
anchors.fill: parent
|
||||
spacing: Style.marginMedium * scaling
|
||||
|
||||
NText { text: "Screen Recording"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
||||
NText {
|
||||
text: "Screen Recording"
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Colors.accentSecondary
|
||||
}
|
||||
|
||||
// Output Directory
|
||||
NText { text: "Output Directory"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
||||
NText { text: "Directory where screen recordings will be saved"; color: Colors.textSecondary }
|
||||
NText {
|
||||
text: "Output Directory"
|
||||
color: Colors.textPrimary
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
NText {
|
||||
text: "Directory where screen recordings will be saved"
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
NTextBox {
|
||||
text: Settings.data.screenRecorder.directory
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -26,78 +37,141 @@ Item {
|
|||
}
|
||||
|
||||
// Frame Rate
|
||||
NText { text: "Frame Rate"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
||||
NText { text: "Target frame rate for screen recordings (default: 60)"; color: Colors.textSecondary }
|
||||
NText {
|
||||
text: "Frame Rate"
|
||||
color: Colors.textPrimary
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
NText {
|
||||
text: "Target frame rate for screen recordings (default: 60)"
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
NText { text: Settings.data.screenRecorder.frameRate + " FPS"; color: Colors.textPrimary }
|
||||
Item { Layout.fillWidth: true }
|
||||
NText {
|
||||
text: Settings.data.screenRecorder.frameRate + " FPS"
|
||||
color: Colors.textPrimary
|
||||
}
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
NSlider {
|
||||
Layout.fillWidth: true
|
||||
from: 24; to: 144; stepSize: 1
|
||||
from: 24
|
||||
to: 144
|
||||
stepSize: 1
|
||||
value: Settings.data.screenRecorder.frameRate
|
||||
onMoved: Settings.data.screenRecorder.frameRate = Math.round(value)
|
||||
cutoutColor: Colors.surface
|
||||
}
|
||||
|
||||
// Audio Source
|
||||
NText { text: "Audio Source"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
||||
NText { text: "Audio source to capture during recording"; color: Colors.textSecondary }
|
||||
NText {
|
||||
text: "Audio Source"
|
||||
color: Colors.textPrimary
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
NText {
|
||||
text: "Audio source to capture during recording"
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
NComboBox {
|
||||
optionsKeys: ["default_output", "default_input", "both"]
|
||||
optionsLabels: ["System Audio", "Microphone", "System Audio + Microphone"]
|
||||
currentKey: Settings.data.screenRecorder.audioSource
|
||||
onSelected: function (key) { Settings.data.screenRecorder.audioSource = key }
|
||||
onSelected: function (key) {
|
||||
Settings.data.screenRecorder.audioSource = key
|
||||
}
|
||||
}
|
||||
|
||||
// Video Quality
|
||||
NText { text: "Video Quality"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
||||
NText { text: "Higher quality results in larger file sizes"; color: Colors.textSecondary }
|
||||
NText {
|
||||
text: "Video Quality"
|
||||
color: Colors.textPrimary
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
NText {
|
||||
text: "Higher quality results in larger file sizes"
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
NComboBox {
|
||||
optionsKeys: ["medium", "high", "very_high", "ultra"]
|
||||
optionsLabels: ["Medium", "High", "Very High", "Ultra"]
|
||||
currentKey: Settings.data.screenRecorder.quality
|
||||
onSelected: function (key) { Settings.data.screenRecorder.quality = key }
|
||||
onSelected: function (key) {
|
||||
Settings.data.screenRecorder.quality = key
|
||||
}
|
||||
}
|
||||
|
||||
// Video Codec
|
||||
NText { text: "Video Codec"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
||||
NText { text: "Different codecs offer different compression and compatibility"; color: Colors.textSecondary }
|
||||
NText {
|
||||
text: "Video Codec"
|
||||
color: Colors.textPrimary
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
NText {
|
||||
text: "Different codecs offer different compression and compatibility"
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
NComboBox {
|
||||
optionsKeys: ["h264", "hevc", "av1", "vp8", "vp9"]
|
||||
optionsLabels: ["H264", "HEVC", "AV1", "VP8", "VP9"]
|
||||
currentKey: Settings.data.screenRecorder.videoCodec
|
||||
onSelected: function (key) { Settings.data.screenRecorder.videoCodec = key }
|
||||
onSelected: function (key) {
|
||||
Settings.data.screenRecorder.videoCodec = key
|
||||
}
|
||||
}
|
||||
|
||||
// Audio Codec
|
||||
NText { text: "Audio Codec"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
||||
NText { text: "Opus is recommended for best performance and smallest audio size"; color: Colors.textSecondary }
|
||||
NText {
|
||||
text: "Audio Codec"
|
||||
color: Colors.textPrimary
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
NText {
|
||||
text: "Opus is recommended for best performance and smallest audio size"
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
NComboBox {
|
||||
optionsKeys: ["opus", "aac"]
|
||||
optionsLabels: ["OPUS", "AAC"]
|
||||
currentKey: Settings.data.screenRecorder.audioCodec
|
||||
onSelected: function (key) { Settings.data.screenRecorder.audioCodec = key }
|
||||
onSelected: function (key) {
|
||||
Settings.data.screenRecorder.audioCodec = key
|
||||
}
|
||||
}
|
||||
|
||||
// Color Range
|
||||
NText { text: "Color Range"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
||||
NText { text: "Limited is recommended for better compatibility"; color: Colors.textSecondary }
|
||||
NText {
|
||||
text: "Color Range"
|
||||
color: Colors.textPrimary
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
NText {
|
||||
text: "Limited is recommended for better compatibility"
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
NComboBox {
|
||||
optionsKeys: ["limited", "full"]
|
||||
optionsLabels: ["Limited", "Full"]
|
||||
currentKey: Settings.data.screenRecorder.colorRange
|
||||
onSelected: function (key) { Settings.data.screenRecorder.colorRange = key }
|
||||
onSelected: function (key) {
|
||||
Settings.data.screenRecorder.colorRange = key
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Show Cursor"
|
||||
description: "Record mouse cursor in the video"
|
||||
value: Settings.data.screenRecorder.showCursor
|
||||
onToggled: function (newValue) { Settings.data.screenRecorder.showCursor = newValue }
|
||||
onToggled: function (newValue) {
|
||||
Settings.data.screenRecorder.showCursor = newValue
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true }
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,28 +14,49 @@ Item {
|
|||
anchors.fill: parent
|
||||
spacing: Style.marginMedium * scaling
|
||||
|
||||
NText { text: "Time"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
||||
NText {
|
||||
text: "Time"
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Colors.accentSecondary
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "Use 12 Hour Clock"
|
||||
description: "Display time in 12-hour format (e.g., 2:30 PM) instead of 24-hour format"
|
||||
value: Settings.data.location.use12HourClock
|
||||
onToggled: function (newValue) { Settings.data.location.use12HourClock = newValue }
|
||||
onToggled: function (newValue) {
|
||||
Settings.data.location.use12HourClock = newValue
|
||||
}
|
||||
}
|
||||
|
||||
NToggle {
|
||||
label: "US Style Date"
|
||||
description: "Display dates in MM/DD/YYYY format instead of DD/MM/YYYY"
|
||||
value: Settings.data.location.reverseDayMonth
|
||||
onToggled: function (newValue) { Settings.data.location.reverseDayMonth = newValue }
|
||||
onToggled: function (newValue) {
|
||||
Settings.data.location.reverseDayMonth = newValue
|
||||
}
|
||||
}
|
||||
|
||||
NDivider { Layout.fillWidth: true }
|
||||
NDivider {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
NText { text: "Weather"; font.weight: Style.fontWeightBold; color: Colors.accentSecondary }
|
||||
NText {
|
||||
text: "Weather"
|
||||
font.weight: Style.fontWeightBold
|
||||
color: Colors.accentSecondary
|
||||
}
|
||||
|
||||
NText { text: "City"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
||||
NText { text: "Your city name for weather information"; color: Colors.textSecondary }
|
||||
NText {
|
||||
text: "City"
|
||||
color: Colors.textPrimary
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
NText {
|
||||
text: "Your city name for weather information"
|
||||
color: Colors.textSecondary
|
||||
}
|
||||
NTextBox {
|
||||
text: Settings.data.location.name
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -45,18 +66,32 @@ Item {
|
|||
RowLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginSmall * scaling
|
||||
ColumnLayout { Layout.fillWidth: true; spacing: 2 * scaling
|
||||
NText { text: "Temperature Unit"; color: Colors.textPrimary; font.weight: Style.fontWeightBold }
|
||||
NText { text: "Choose between Celsius and Fahrenheit"; color: Colors.textSecondary; wrapMode: Text.WordWrap }
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: 2 * scaling
|
||||
NText {
|
||||
text: "Temperature Unit"
|
||||
color: Colors.textPrimary
|
||||
font.weight: Style.fontWeightBold
|
||||
}
|
||||
NText {
|
||||
text: "Choose between Celsius and Fahrenheit"
|
||||
color: Colors.textSecondary
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
NComboBox {
|
||||
optionsKeys: ["c", "f"]
|
||||
optionsLabels: ["Celsius", "Fahrenheit"]
|
||||
currentKey: Settings.data.location.useFahrenheit ? "f" : "c"
|
||||
onSelected: function (key) { Settings.data.location.useFahrenheit = (key === "f") }
|
||||
onSelected: function (key) {
|
||||
Settings.data.location.useFahrenheit = (key === "f")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item { Layout.fillHeight: true }
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue