Rearrange for tidier structure (#2212)

This commit is contained in:
clsty
2025-10-16 07:19:55 +08:00
parent 13065d7e5a
commit 8b493e091d
529 changed files with 165 additions and 138 deletions
@@ -0,0 +1,150 @@
import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Widgets
import qs.services
import qs.modules.common
import qs.modules.common.widgets
ContentPage {
forceWidth: true
ContentSection {
icon: "box"
title: Translation.tr("Distro")
RowLayout {
Layout.alignment: Qt.AlignHCenter
spacing: 20
Layout.topMargin: 10
Layout.bottomMargin: 10
IconImage {
implicitSize: 80
source: Quickshell.iconPath(SystemInfo.logo)
}
ColumnLayout {
Layout.alignment: Qt.AlignVCenter
// spacing: 10
StyledText {
text: SystemInfo.distroName
font.pixelSize: Appearance.font.pixelSize.title
}
StyledText {
font.pixelSize: Appearance.font.pixelSize.normal
text: SystemInfo.homeUrl
textFormat: Text.MarkdownText
onLinkActivated: (link) => {
Qt.openUrlExternally(link)
}
PointingHandLinkHover {}
}
}
}
Flow {
Layout.fillWidth: true
spacing: 5
RippleButtonWithIcon {
materialIcon: "auto_stories"
mainText: Translation.tr("Documentation")
onClicked: {
Qt.openUrlExternally(SystemInfo.documentationUrl)
}
}
RippleButtonWithIcon {
materialIcon: "support"
mainText: Translation.tr("Help & Support")
onClicked: {
Qt.openUrlExternally(SystemInfo.supportUrl)
}
}
RippleButtonWithIcon {
materialIcon: "bug_report"
mainText: Translation.tr("Report a Bug")
onClicked: {
Qt.openUrlExternally(SystemInfo.bugReportUrl)
}
}
RippleButtonWithIcon {
materialIcon: "policy"
materialIconFill: false
mainText: Translation.tr("Privacy Policy")
onClicked: {
Qt.openUrlExternally(SystemInfo.privacyPolicyUrl)
}
}
}
}
ContentSection {
icon: "folder_managed"
title: Translation.tr("Dotfiles")
RowLayout {
Layout.alignment: Qt.AlignHCenter
spacing: 20
Layout.topMargin: 10
Layout.bottomMargin: 10
IconImage {
implicitSize: 80
source: Quickshell.iconPath("illogical-impulse")
}
ColumnLayout {
Layout.alignment: Qt.AlignVCenter
// spacing: 10
StyledText {
text: Translation.tr("illogical-impulse")
font.pixelSize: Appearance.font.pixelSize.title
}
StyledText {
text: "https://github.com/end-4/dots-hyprland"
font.pixelSize: Appearance.font.pixelSize.normal
textFormat: Text.MarkdownText
onLinkActivated: (link) => {
Qt.openUrlExternally(link)
}
PointingHandLinkHover {}
}
}
}
Flow {
Layout.fillWidth: true
spacing: 5
RippleButtonWithIcon {
materialIcon: "auto_stories"
mainText: Translation.tr("Documentation")
onClicked: {
Qt.openUrlExternally("https://end-4.github.io/dots-hyprland-wiki/en/ii-qs/02usage/")
}
}
RippleButtonWithIcon {
materialIcon: "adjust"
materialIconFill: false
mainText: Translation.tr("Issues")
onClicked: {
Qt.openUrlExternally("https://github.com/end-4/dots-hyprland/issues")
}
}
RippleButtonWithIcon {
materialIcon: "forum"
mainText: Translation.tr("Discussions")
onClicked: {
Qt.openUrlExternally("https://github.com/end-4/dots-hyprland/discussions")
}
}
RippleButtonWithIcon {
materialIcon: "favorite"
mainText: Translation.tr("Donate")
onClicked: {
Qt.openUrlExternally("https://github.com/sponsors/end-4")
}
}
}
}
}
@@ -0,0 +1,93 @@
import QtQuick
import qs.services
import qs.modules.common
import qs.modules.common.widgets
ContentPage {
forceWidth: true
ContentSection {
icon: "colors"
title: Translation.tr("Color generation")
ConfigSwitch {
buttonIcon: "hardware"
text: Translation.tr("Shell & utilities")
checked: Config.options.appearance.wallpaperTheming.enableAppsAndShell
onCheckedChanged: {
Config.options.appearance.wallpaperTheming.enableAppsAndShell = checked;
}
}
ConfigSwitch {
buttonIcon: "tv_options_input_settings"
text: Translation.tr("Qt apps")
checked: Config.options.appearance.wallpaperTheming.enableQtApps
onCheckedChanged: {
Config.options.appearance.wallpaperTheming.enableQtApps = checked;
}
StyledToolTip {
text: Translation.tr("Shell & utilities theming must also be enabled")
}
}
ConfigSwitch {
buttonIcon: "terminal"
text: Translation.tr("Terminal")
checked: Config.options.appearance.wallpaperTheming.enableTerminal
onCheckedChanged: {
Config.options.appearance.wallpaperTheming.enableTerminal = checked;
}
StyledToolTip {
text: Translation.tr("Shell & utilities theming must also be enabled")
}
}
ConfigRow {
uniform: true
ConfigSwitch {
buttonIcon: "dark_mode"
text: Translation.tr("Force dark mode in terminal")
checked: Config.options.appearance.wallpaperTheming.terminalGenerationProps.forceDarkMode
onCheckedChanged: {
Config.options.appearance.wallpaperTheming.terminalGenerationProps.forceDarkMode= checked;
}
StyledToolTip {
text: Translation.tr("Ignored if terminal theming is not enabled")
}
}
}
ConfigSpinBox {
icon: "invert_colors"
text: Translation.tr("Terminal: Harmony (%)")
value: Config.options.appearance.wallpaperTheming.terminalGenerationProps.harmony * 100
from: 0
to: 100
stepSize: 10
onValueChanged: {
Config.options.appearance.wallpaperTheming.terminalGenerationProps.harmony = value / 100;
}
}
ConfigSpinBox {
icon: "gradient"
text: Translation.tr("Terminal: Harmonize threshold")
value: Config.options.appearance.wallpaperTheming.terminalGenerationProps.harmonizeThreshold
from: 0
to: 100
stepSize: 10
onValueChanged: {
Config.options.appearance.wallpaperTheming.terminalGenerationProps.harmonizeThreshold = value;
}
}
ConfigSpinBox {
icon: "format_color_text"
text: Translation.tr("Terminal: Foreground boost (%)")
value: Config.options.appearance.wallpaperTheming.terminalGenerationProps.termFgBoost * 100
from: 0
to: 100
stepSize: 10
onValueChanged: {
Config.options.appearance.wallpaperTheming.terminalGenerationProps.termFgBoost = value / 100;
}
}
}
}
@@ -0,0 +1,298 @@
import QtQuick
import QtQuick.Layouts
import qs.services
import qs.modules.common
import qs.modules.common.widgets
ContentPage {
forceWidth: true
ContentSection {
icon: "notifications"
title: Translation.tr("Notifications")
ConfigSwitch {
buttonIcon: "counter_2"
text: Translation.tr("Unread indicator: show count")
checked: Config.options.bar.indicators.notifications.showUnreadCount
onCheckedChanged: {
Config.options.bar.indicators.notifications.showUnreadCount = checked;
}
}
}
ContentSection {
icon: "spoke"
title: Translation.tr("Positioning")
ConfigRow {
ContentSubsection {
title: Translation.tr("Bar position")
Layout.fillWidth: true
ConfigSelectionArray {
currentValue: (Config.options.bar.bottom ? 1 : 0) | (Config.options.bar.vertical ? 2 : 0)
onSelected: newValue => {
Config.options.bar.bottom = (newValue & 1) !== 0;
Config.options.bar.vertical = (newValue & 2) !== 0;
}
options: [
{
displayName: Translation.tr("Top"),
icon: "arrow_upward",
value: 0 // bottom: false, vertical: false
},
{
displayName: Translation.tr("Left"),
icon: "arrow_back",
value: 2 // bottom: false, vertical: true
},
{
displayName: Translation.tr("Bottom"),
icon: "arrow_downward",
value: 1 // bottom: true, vertical: false
},
{
displayName: Translation.tr("Right"),
icon: "arrow_forward",
value: 3 // bottom: true, vertical: true
}
]
}
}
ContentSubsection {
title: Translation.tr("Automatically hide")
Layout.fillWidth: false
ConfigSelectionArray {
currentValue: Config.options.bar.autoHide.enable
onSelected: newValue => {
Config.options.bar.autoHide.enable = newValue; // Update local copy
}
options: [
{
displayName: Translation.tr("No"),
icon: "close",
value: false
},
{
displayName: Translation.tr("Yes"),
icon: "check",
value: true
}
]
}
}
}
ConfigRow {
ContentSubsection {
title: Translation.tr("Corner style")
Layout.fillWidth: true
ConfigSelectionArray {
currentValue: Config.options.bar.cornerStyle
onSelected: newValue => {
Config.options.bar.cornerStyle = newValue; // Update local copy
}
options: [
{
displayName: Translation.tr("Hug"),
icon: "line_curve",
value: 0
},
{
displayName: Translation.tr("Float"),
icon: "page_header",
value: 1
},
{
displayName: Translation.tr("Rect"),
icon: "toolbar",
value: 2
}
]
}
}
ContentSubsection {
title: Translation.tr("Group style")
Layout.fillWidth: false
ConfigSelectionArray {
currentValue: Config.options.bar.borderless
onSelected: newValue => {
Config.options.bar.borderless = newValue; // Update local copy
}
options: [
{
displayName: Translation.tr("Pills"),
icon: "location_chip",
value: false
},
{
displayName: Translation.tr("Line-separated"),
icon: "split_scene",
value: true
}
]
}
}
}
}
ContentSection {
icon: "shelf_auto_hide"
title: Translation.tr("Tray")
ConfigSwitch {
buttonIcon: "keep"
text: Translation.tr('Make icons pinned by default')
checked: Config.options.bar.tray.invertPinnedItems
onCheckedChanged: {
Config.options.bar.tray.invertPinnedItems = checked;
}
}
ConfigSwitch {
buttonIcon: "colors"
text: Translation.tr('Tint icons')
checked: Config.options.bar.tray.monochromeIcons
onCheckedChanged: {
Config.options.bar.tray.monochromeIcons = checked;
}
}
}
ContentSection {
icon: "widgets"
title: Translation.tr("Utility buttons")
ConfigRow {
uniform: true
ConfigSwitch {
buttonIcon: "content_cut"
text: Translation.tr("Screen snip")
checked: Config.options.bar.utilButtons.showScreenSnip
onCheckedChanged: {
Config.options.bar.utilButtons.showScreenSnip = checked;
}
}
ConfigSwitch {
buttonIcon: "colorize"
text: Translation.tr("Color picker")
checked: Config.options.bar.utilButtons.showColorPicker
onCheckedChanged: {
Config.options.bar.utilButtons.showColorPicker = checked;
}
}
}
ConfigRow {
uniform: true
ConfigSwitch {
buttonIcon: "keyboard"
text: Translation.tr("Keyboard toggle")
checked: Config.options.bar.utilButtons.showKeyboardToggle
onCheckedChanged: {
Config.options.bar.utilButtons.showKeyboardToggle = checked;
}
}
ConfigSwitch {
buttonIcon: "mic"
text: Translation.tr("Mic toggle")
checked: Config.options.bar.utilButtons.showMicToggle
onCheckedChanged: {
Config.options.bar.utilButtons.showMicToggle = checked;
}
}
}
ConfigRow {
uniform: true
ConfigSwitch {
buttonIcon: "dark_mode"
text: Translation.tr("Dark/Light toggle")
checked: Config.options.bar.utilButtons.showDarkModeToggle
onCheckedChanged: {
Config.options.bar.utilButtons.showDarkModeToggle = checked;
}
}
ConfigSwitch {
buttonIcon: "speed"
text: Translation.tr("Performance Profile toggle")
checked: Config.options.bar.utilButtons.showPerformanceProfileToggle
onCheckedChanged: {
Config.options.bar.utilButtons.showPerformanceProfileToggle = checked;
}
}
}
}
ContentSection {
icon: "cloud"
title: Translation.tr("Weather")
ConfigSwitch {
buttonIcon: "check"
text: Translation.tr("Enable")
checked: Config.options.bar.weather.enable
onCheckedChanged: {
Config.options.bar.weather.enable = checked;
}
}
}
ContentSection {
icon: "workspaces"
title: Translation.tr("Workspaces")
ConfigSwitch {
buttonIcon: "counter_1"
text: Translation.tr('Always show numbers')
checked: Config.options.bar.workspaces.alwaysShowNumbers
onCheckedChanged: {
Config.options.bar.workspaces.alwaysShowNumbers = checked;
}
}
ConfigSwitch {
buttonIcon: "award_star"
text: Translation.tr('Show app icons')
checked: Config.options.bar.workspaces.showAppIcons
onCheckedChanged: {
Config.options.bar.workspaces.showAppIcons = checked;
}
}
ConfigSwitch {
buttonIcon: "colors"
text: Translation.tr('Tint app icons')
checked: Config.options.bar.workspaces.monochromeIcons
onCheckedChanged: {
Config.options.bar.workspaces.monochromeIcons = checked;
}
}
ConfigSpinBox {
icon: "view_column"
text: Translation.tr("Workspaces shown")
value: Config.options.bar.workspaces.shown
from: 1
to: 30
stepSize: 1
onValueChanged: {
Config.options.bar.workspaces.shown = value;
}
}
ConfigSpinBox {
icon: "touch_long"
text: Translation.tr("Number show delay when pressing Super (ms)")
value: Config.options.bar.workspaces.showNumberDelay
from: 0
to: 1000
stepSize: 50
onValueChanged: {
Config.options.bar.workspaces.showNumberDelay = value;
}
}
}
}
@@ -0,0 +1,291 @@
import QtQuick
import Quickshell
import Quickshell.Io
import QtQuick.Layouts
import qs.services
import qs.modules.common
import qs.modules.common.widgets
ContentPage {
forceWidth: true
Process {
id: translationProc
property string locale: ""
command: [Directories.aiTranslationScriptPath, translationProc.locale]
}
ContentSection {
icon: "volume_up"
title: Translation.tr("Audio")
ConfigSwitch {
buttonIcon: "hearing"
text: Translation.tr("Earbang protection")
checked: Config.options.audio.protection.enable
onCheckedChanged: {
Config.options.audio.protection.enable = checked;
}
StyledToolTip {
text: Translation.tr("Prevents abrupt increments and restricts volume limit")
}
}
ConfigRow {
enabled: Config.options.audio.protection.enable
ConfigSpinBox {
icon: "arrow_warm_up"
text: Translation.tr("Max allowed increase")
value: Config.options.audio.protection.maxAllowedIncrease
from: 0
to: 100
stepSize: 2
onValueChanged: {
Config.options.audio.protection.maxAllowedIncrease = value;
}
}
ConfigSpinBox {
icon: "vertical_align_top"
text: Translation.tr("Volume limit")
value: Config.options.audio.protection.maxAllowed
from: 0
to: 154 // pavucontrol allows up to 153%
stepSize: 2
onValueChanged: {
Config.options.audio.protection.maxAllowed = value;
}
}
}
}
ContentSection {
icon: "battery_android_full"
title: Translation.tr("Battery")
ConfigRow {
uniform: true
ConfigSpinBox {
icon: "warning"
text: Translation.tr("Low warning")
value: Config.options.battery.low
from: 0
to: 100
stepSize: 5
onValueChanged: {
Config.options.battery.low = value;
}
}
ConfigSpinBox {
icon: "dangerous"
text: Translation.tr("Critical warning")
value: Config.options.battery.critical
from: 0
to: 100
stepSize: 5
onValueChanged: {
Config.options.battery.critical = value;
}
}
}
ConfigRow {
uniform: false
Layout.fillWidth: false
ConfigSwitch {
buttonIcon: "pause"
text: Translation.tr("Automatic suspend")
checked: Config.options.battery.automaticSuspend
onCheckedChanged: {
Config.options.battery.automaticSuspend = checked;
}
StyledToolTip {
text: Translation.tr("Automatically suspends the system when battery is low")
}
}
ConfigSpinBox {
enabled: Config.options.battery.automaticSuspend
text: Translation.tr("at")
value: Config.options.battery.suspend
from: 0
to: 100
stepSize: 5
onValueChanged: {
Config.options.battery.suspend = value;
}
}
}
}
ContentSection {
icon: "language"
title: Translation.tr("Language")
ContentSubsection {
title: Translation.tr("Interface Language")
tooltip: Translation.tr("Select the language for the user interface.\n\"Auto\" will use your system's locale.")
ConfigSelectionArray {
id: languageSelector
currentValue: Config.options.language.ui
onSelected: newValue => {
Config.options.language.ui = newValue;
}
options: [
{
displayName: Translation.tr("Auto (System)"),
value: "auto"
},
...Translation.allAvailableLanguages.map(lang => {
return {
displayName: lang,
value: lang
};
})
]
}
}
ContentSubsection {
title: Translation.tr("Generate translation with Gemini")
ConfigRow {
MaterialTextArea {
id: localeInput
Layout.fillWidth: true
placeholderText: Translation.tr("Locale code, e.g. fr_FR, de_DE, zh_CN...")
text: Config.options.language.ui === "auto" ? Qt.locale().name : Config.options.language.ui
}
RippleButtonWithIcon {
id: generateTranslationBtn
Layout.fillHeight: true
nerdIcon: ""
enabled: !translationProc.running || (translationProc.locale !== localeInput.text.trim())
mainText: enabled ? Translation.tr("Generate\nTypically takes 2 minutes") : Translation.tr("Generating...\nDon't close this window!")
onClicked: {
translationProc.locale = localeInput.text.trim();
translationProc.running = false;
translationProc.running = true;
}
}
}
}
}
ContentSection {
icon: "rule"
title: Translation.tr("Policies")
ConfigRow {
// AI policy
ColumnLayout {
ContentSubsectionLabel {
text: Translation.tr("AI")
}
ConfigSelectionArray {
currentValue: Config.options.policies.ai
onSelected: newValue => {
Config.options.policies.ai = newValue;
}
options: [
{
displayName: Translation.tr("No"),
icon: "close",
value: 0
},
{
displayName: Translation.tr("Yes"),
icon: "check",
value: 1
},
{
displayName: Translation.tr("Local only"),
icon: "sync_saved_locally",
value: 2
}
]
}
}
// Weeb policy
ColumnLayout {
ContentSubsectionLabel {
text: Translation.tr("Weeb")
}
ConfigSelectionArray {
currentValue: Config.options.policies.weeb
onSelected: newValue => {
Config.options.policies.weeb = newValue;
}
options: [
{
displayName: Translation.tr("No"),
icon: "close",
value: 0
},
{
displayName: Translation.tr("Yes"),
icon: "check",
value: 1
},
{
displayName: Translation.tr("Closet"),
icon: "ev_shadow",
value: 2
}
]
}
}
}
}
ContentSection {
icon: "nest_clock_farsight_analog"
title: Translation.tr("Time")
ConfigSwitch {
buttonIcon: "pace"
text: Translation.tr("Second precision")
checked: Config.options.time.secondPrecision
onCheckedChanged: {
Config.options.time.secondPrecision = checked;
}
StyledToolTip {
text: Translation.tr("Enable if you want clocks to show seconds accurately")
}
}
ContentSubsection {
title: Translation.tr("Format")
tooltip: ""
ConfigSelectionArray {
currentValue: Config.options.time.format
onSelected: newValue => {
if (newValue === "hh:mm") {
Quickshell.execDetached(["bash", "-c", `sed -i 's/\\TIME12\\b/TIME/' '${FileUtils.trimFileProtocol(Directories.config)}/hypr/hyprlock.conf'`]);
} else {
Quickshell.execDetached(["bash", "-c", `sed -i 's/\\TIME\\b/TIME12/' '${FileUtils.trimFileProtocol(Directories.config)}/hypr/hyprlock.conf'`]);
}
Config.options.time.format = newValue;
}
options: [
{
displayName: Translation.tr("24h"),
value: "hh:mm"
},
{
displayName: Translation.tr("12h am/pm"),
value: "h:mm ap"
},
{
displayName: Translation.tr("12h AM/PM"),
value: "h:mm AP"
},
]
}
}
}
}
@@ -0,0 +1,787 @@
import QtQuick
import QtQuick.Layouts
import qs.services
import qs.modules.common
import qs.modules.common.widgets
ContentPage {
forceWidth: true
ContentSection {
icon: "wallpaper"
title: Translation.tr("Background")
ConfigSwitch {
buttonIcon: "nest_clock_farsight_analog"
text: Translation.tr("Show clock")
checked: Config.options.background.clock.show
onCheckedChanged: {
Config.options.background.clock.show = checked;
}
}
ConfigSpinBox {
icon: "loupe"
text: Translation.tr("Scale (%)")
value: Config.options.background.clock.scale * 100
from: 1
to: 200
stepSize: 2
onValueChanged: {
Config.options.background.clock.scale = value / 100;
}
}
ContentSubsection {
title: Translation.tr("Clock style")
ConfigSelectionArray {
currentValue: Config.options.background.clock.style
onSelected: newValue => {
Config.options.background.clock.style = newValue;
}
options: [
{
displayName: Translation.tr("Simple digital"),
icon: "timer_10",
value: "digital"
},
{
displayName: Translation.tr("Material cookie"),
icon: "cookie",
value: "cookie"
}
]
}
}
ContentSubsection {
visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Cookie clock settings")
ConfigSwitch {
buttonIcon: "wand_stars"
text: Translation.tr("Auto styling with Gemini")
checked: Config.options.background.clock.cookie.aiStyling
onCheckedChanged: {
Config.options.background.clock.cookie.aiStyling = checked;
}
StyledToolTip {
text: Translation.tr("Uses Gemini to categorize the wallpaper then picks a preset based on it.\nYou'll need to set Gemini API key on the left sidebar first.\nImages are downscaled for performance, but just to be safe,\ndo not select wallpapers with sensitive information.")
}
}
ConfigSpinBox {
icon: "add_triangle"
text: Translation.tr("Sides")
value: Config.options.background.clock.cookie.sides
from: 0
to: 40
stepSize: 1
onValueChanged: {
Config.options.background.clock.cookie.sides = value;
}
}
ConfigSwitch {
buttonIcon: "autoplay"
text: Translation.tr("Constantly rotate")
checked: Config.options.background.clock.cookie.constantlyRotate
onCheckedChanged: {
Config.options.background.clock.cookie.constantlyRotate = checked;
}
StyledToolTip {
text: "Makes the clock always rotate. This is extremely expensive\n(expect 50% usage on Intel UHD Graphics) and thus impractical."
}
}
ConfigRow {
ConfigSwitch {
enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle === "dots" || Config.options.background.clock.cookie.dialNumberStyle === "full"
buttonIcon: "brightness_7"
text: Translation.tr("Hour marks")
checked: Config.options.background.clock.cookie.hourMarks
onEnabledChanged: {
checked = Config.options.background.clock.cookie.hourMarks;
}
onCheckedChanged: {
Config.options.background.clock.cookie.hourMarks = checked;
}
StyledToolTip {
text: "Can only be turned on using the 'Dots' or 'Full' dial style for aesthetic reasons"
}
}
ConfigSwitch {
enabled: Config.options.background.clock.style === "cookie" && Config.options.background.clock.cookie.dialNumberStyle !== "numbers"
buttonIcon: "timer_10"
text: Translation.tr("Digits in the middle")
checked: Config.options.background.clock.cookie.timeIndicators
onEnabledChanged: {
checked = Config.options.background.clock.cookie.timeIndicators;
}
onCheckedChanged: {
Config.options.background.clock.cookie.timeIndicators = checked;
}
StyledToolTip {
text: "Can't be turned on when using 'Numbers' dial style for aesthetic reasons"
}
}
}
}
ContentSubsection {
visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Dial style")
ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.dialNumberStyle
onSelected: newValue => {
Config.options.background.clock.cookie.dialNumberStyle = newValue;
if (newValue !== "dots" && newValue !== "full") {
Config.options.background.clock.cookie.hourMarks = false;
}
if (newValue === "numbers") {
Config.options.background.clock.cookie.timeIndicators = false;
}
}
options: [
{
displayName: "",
icon: "block",
value: "none"
},
{
displayName: Translation.tr("Dots"),
icon: "graph_6",
value: "dots"
},
{
displayName: Translation.tr("Full"),
icon: "history_toggle_off",
value: "full"
},
{
displayName: Translation.tr("Numbers"),
icon: "counter_1",
value: "numbers"
}
]
}
}
ContentSubsection {
visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Hour hand")
ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.hourHandStyle
onSelected: newValue => {
Config.options.background.clock.cookie.hourHandStyle = newValue;
}
options: [
{
displayName: "",
icon: "block",
value: "hide"
},
{
displayName: Translation.tr("Classic"),
icon: "radio",
value: "classic"
},
{
displayName: Translation.tr("Hollow"),
icon: "circle",
value: "hollow"
},
{
displayName: Translation.tr("Fill"),
icon: "eraser_size_5",
value: "fill"
},
]
}
}
ContentSubsection {
visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Minute hand")
ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.minuteHandStyle
onSelected: newValue => {
Config.options.background.clock.cookie.minuteHandStyle = newValue;
}
options: [
{
displayName: "",
icon: "block",
value: "hide"
},
{
displayName: Translation.tr("Classic"),
icon: "radio",
value: "classic"
},
{
displayName: Translation.tr("Thin"),
icon: "line_end",
value: "thin"
},
{
displayName: Translation.tr("Medium"),
icon: "eraser_size_2",
value: "medium"
},
{
displayName: Translation.tr("Bold"),
icon: "eraser_size_4",
value: "bold"
},
]
}
}
ContentSubsection {
visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Second hand")
ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.secondHandStyle
onSelected: newValue => {
Config.options.background.clock.cookie.secondHandStyle = newValue;
}
options: [
{
displayName: "",
icon: "block",
value: "hide"
},
{
displayName: Translation.tr("Classic"),
icon: "radio",
value: "classic"
},
{
displayName: Translation.tr("Line"),
icon: "line_end",
value: "line"
},
{
displayName: Translation.tr("Dot"),
icon: "adjust",
value: "dot"
},
]
}
}
ContentSubsection {
visible: Config.options.background.clock.style === "cookie"
title: Translation.tr("Date style")
ConfigSelectionArray {
currentValue: Config.options.background.clock.cookie.dateStyle
onSelected: newValue => {
Config.options.background.clock.cookie.dateStyle = newValue;
}
options: [
{
displayName: "",
icon: "block",
value: "hide"
},
{
displayName: Translation.tr("Bubble"),
icon: "bubble_chart",
value: "bubble"
},
{
displayName: Translation.tr("Border"),
icon: "rotate_right",
value: "border"
},
{
displayName: Translation.tr("Rect"),
icon: "rectangle",
value: "rect"
}
]
}
}
ContentSubsection {
title: Translation.tr("Quote settings")
ConfigSwitch {
buttonIcon: "format_quote"
text: Translation.tr("Show quote")
checked: Config.options.background.showQuote
onCheckedChanged: {
Config.options.background.showQuote = checked;
}
}
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("Quote")
text: Config.options.background.quote
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.background.quote = text;
}
}
}
ContentSubsection {
title: Translation.tr("Wallpaper parallax")
ConfigSwitch {
buttonIcon: "unfold_more_double"
text: Translation.tr("Vertical")
checked: Config.options.background.parallax.vertical
onCheckedChanged: {
Config.options.background.parallax.vertical = checked;
}
}
ConfigRow {
uniform: true
ConfigSwitch {
buttonIcon: "counter_1"
text: Translation.tr("Depends on workspace")
checked: Config.options.background.parallax.enableWorkspace
onCheckedChanged: {
Config.options.background.parallax.enableWorkspace = checked;
}
}
ConfigSwitch {
buttonIcon: "side_navigation"
text: Translation.tr("Depends on sidebars")
checked: Config.options.background.parallax.enableSidebar
onCheckedChanged: {
Config.options.background.parallax.enableSidebar = checked;
}
}
}
ConfigSpinBox {
icon: "loupe"
text: Translation.tr("Preferred wallpaper zoom (%)")
value: Config.options.background.parallax.workspaceZoom * 100
from: 100
to: 150
stepSize: 1
onValueChanged: {
Config.options.background.parallax.workspaceZoom = value / 100;
}
}
}
}
ContentSection {
icon: "point_scan"
title: Translation.tr("Crosshair overlay")
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("Crosshair code (in Valorant's format)")
text: Config.options.crosshair.code
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.crosshair.code = text;
}
}
RowLayout {
StyledText {
Layout.leftMargin: 10
color: Appearance.colors.colSubtext
font.pixelSize: Appearance.font.pixelSize.smallie
text: Translation.tr("Press Super+G to toggle appearance")
}
Item {
Layout.fillWidth: true
}
RippleButtonWithIcon {
id: editorButton
buttonRadius: Appearance.rounding.full
materialIcon: "open_in_new"
mainText: Translation.tr("Open editor")
onClicked: {
Qt.openUrlExternally(`https://www.vcrdb.net/builder?c=${Config.options.crosshair.code}`);
}
StyledToolTip {
text: "www.vcrdb.net"
}
}
}
}
ContentSection {
icon: "call_to_action"
title: Translation.tr("Dock")
ConfigSwitch {
buttonIcon: "check"
text: Translation.tr("Enable")
checked: Config.options.dock.enable
onCheckedChanged: {
Config.options.dock.enable = checked;
}
}
ConfigRow {
uniform: true
ConfigSwitch {
buttonIcon: "highlight_mouse_cursor"
text: Translation.tr("Hover to reveal")
checked: Config.options.dock.hoverToReveal
onCheckedChanged: {
Config.options.dock.hoverToReveal = checked;
}
}
ConfigSwitch {
buttonIcon: "keep"
text: Translation.tr("Pinned on startup")
checked: Config.options.dock.pinnedOnStartup
onCheckedChanged: {
Config.options.dock.pinnedOnStartup = checked;
}
}
}
ConfigSwitch {
buttonIcon: "colors"
text: Translation.tr("Tint app icons")
checked: Config.options.dock.monochromeIcons
onCheckedChanged: {
Config.options.dock.monochromeIcons = checked;
}
}
}
ContentSection {
icon: "lock"
title: Translation.tr("Lock screen")
ConfigSwitch {
buttonIcon: "water_drop"
text: Translation.tr('Use Hyprlock (instead of Quickshell)')
checked: Config.options.lock.useHyprlock
onCheckedChanged: {
Config.options.lock.useHyprlock = checked;
}
StyledToolTip {
text: Translation.tr("If you want to somehow use fingerprint unlock...")
}
}
ConfigSwitch {
buttonIcon: "account_circle"
text: Translation.tr('Launch on startup')
checked: Config.options.lock.launchOnStartup
onCheckedChanged: {
Config.options.lock.launchOnStartup = checked;
}
}
ContentSubsection {
title: Translation.tr("Security")
ConfigSwitch {
buttonIcon: "settings_power"
text: Translation.tr('Require password to power off/restart')
checked: Config.options.lock.security.requirePasswordToPower
onCheckedChanged: {
Config.options.lock.security.requirePasswordToPower = checked;
}
StyledToolTip {
text: Translation.tr("Remember that on most devices one can always hold the power button to force shutdown\nThis only makes it a tiny bit harder for accidents to happen")
}
}
ConfigSwitch {
buttonIcon: "key_vertical"
text: Translation.tr('Also unlock keyring')
checked: Config.options.lock.security.unlockKeyring
onCheckedChanged: {
Config.options.lock.security.unlockKeyring = checked;
}
StyledToolTip {
text: Translation.tr("This is usually safe and needed for your browser and AI sidebar anyway\nMostly useful for those who use lock on startup instead of a display manager that does it (GDM, SDDM, etc.)")
}
}
}
ContentSubsection {
title: Translation.tr("Style: general")
ConfigSwitch {
buttonIcon: "center_focus_weak"
text: Translation.tr('Center clock')
checked: Config.options.lock.centerClock
onCheckedChanged: {
Config.options.lock.centerClock = checked;
}
}
ConfigSwitch {
buttonIcon: "info"
text: Translation.tr('Show "Locked" text')
checked: Config.options.lock.showLockedText
onCheckedChanged: {
Config.options.lock.showLockedText = checked;
}
}
}
ContentSubsection {
title: Translation.tr("Style: Blurred")
ConfigSwitch {
buttonIcon: "blur_on"
text: Translation.tr('Enable blur')
checked: Config.options.lock.blur.enable
onCheckedChanged: {
Config.options.lock.blur.enable = checked;
}
}
ConfigSpinBox {
icon: "loupe"
text: Translation.tr("Extra wallpaper zoom (%)")
value: Config.options.lock.blur.extraZoom * 100
from: 1
to: 150
stepSize: 2
onValueChanged: {
Config.options.lock.blur.extraZoom = value / 100;
}
}
}
}
ContentSection {
icon: "notifications"
title: Translation.tr("Notifications")
ConfigSpinBox {
icon: "av_timer"
text: Translation.tr("Timeout duration (if not defined by notification) (ms)")
value: Config.options.notifications.timeout
from: 1000
to: 60000
stepSize: 1000
onValueChanged: {
Config.options.notifications.timeout = value;
}
}
}
ContentSection {
icon: "side_navigation"
title: Translation.tr("Sidebars")
ConfigSwitch {
buttonIcon: "memory"
text: Translation.tr('Keep right sidebar loaded')
checked: Config.options.sidebar.keepRightSidebarLoaded
onCheckedChanged: {
Config.options.sidebar.keepRightSidebarLoaded = checked;
}
StyledToolTip {
text: Translation.tr("When enabled keeps the content of the right sidebar loaded to reduce the delay when opening,\nat the cost of around 15MB of consistent RAM usage. Delay significance depends on your system's performance.\nUsing a custom kernel like linux-cachyos might help")
}
}
ConfigSwitch {
buttonIcon: "translate"
text: Translation.tr('Enable translator')
checked: Config.options.sidebar.translator.enable
onCheckedChanged: {
Config.options.sidebar.translator.enable = checked;
}
}
ContentSubsection {
title: Translation.tr("Corner open")
tooltip: Translation.tr("Allows you to open sidebars by clicking or hovering screen corners regardless of bar position")
ConfigRow {
uniform: true
ConfigSwitch {
buttonIcon: "check"
text: Translation.tr("Enable")
checked: Config.options.sidebar.cornerOpen.enable
onCheckedChanged: {
Config.options.sidebar.cornerOpen.enable = checked;
}
}
ConfigSwitch {
buttonIcon: "highlight_mouse_cursor"
text: Translation.tr("Hover to trigger")
checked: Config.options.sidebar.cornerOpen.clickless
onCheckedChanged: {
Config.options.sidebar.cornerOpen.clickless = checked;
}
StyledToolTip {
text: Translation.tr("When this is off you'll have to click")
}
}
}
ConfigRow {
uniform: true
ConfigSwitch {
buttonIcon: "vertical_align_bottom"
text: Translation.tr("Place at bottom")
checked: Config.options.sidebar.cornerOpen.bottom
onCheckedChanged: {
Config.options.sidebar.cornerOpen.bottom = checked;
}
StyledToolTip {
text: Translation.tr("Place the corners to trigger at the bottom")
}
}
ConfigSwitch {
buttonIcon: "unfold_more_double"
text: Translation.tr("Value scroll")
checked: Config.options.sidebar.cornerOpen.valueScroll
onCheckedChanged: {
Config.options.sidebar.cornerOpen.valueScroll = checked;
}
StyledToolTip {
text: Translation.tr("Brightness and volume")
}
}
}
ConfigSwitch {
buttonIcon: "visibility"
text: Translation.tr("Visualize region")
checked: Config.options.sidebar.cornerOpen.visualize
onCheckedChanged: {
Config.options.sidebar.cornerOpen.visualize = checked;
}
}
ConfigRow {
ConfigSpinBox {
icon: "arrow_range"
text: Translation.tr("Region width")
value: Config.options.sidebar.cornerOpen.cornerRegionWidth
from: 1
to: 300
stepSize: 1
onValueChanged: {
Config.options.sidebar.cornerOpen.cornerRegionWidth = value;
}
}
ConfigSpinBox {
icon: "height"
text: Translation.tr("Region height")
value: Config.options.sidebar.cornerOpen.cornerRegionHeight
from: 1
to: 300
stepSize: 1
onValueChanged: {
Config.options.sidebar.cornerOpen.cornerRegionHeight = value;
}
}
}
}
}
ContentSection {
icon: "voting_chip"
title: Translation.tr("On-screen display")
ConfigSpinBox {
icon: "av_timer"
text: Translation.tr("Timeout (ms)")
value: Config.options.osd.timeout
from: 100
to: 3000
stepSize: 100
onValueChanged: {
Config.options.osd.timeout = value;
}
}
}
ContentSection {
icon: "overview_key"
title: Translation.tr("Overview")
ConfigSwitch {
buttonIcon: "check"
text: Translation.tr("Enable")
checked: Config.options.overview.enable
onCheckedChanged: {
Config.options.overview.enable = checked;
}
}
ConfigSpinBox {
icon: "loupe"
text: Translation.tr("Scale (%)")
value: Config.options.overview.scale * 100
from: 1
to: 100
stepSize: 1
onValueChanged: {
Config.options.overview.scale = value / 100;
}
}
ConfigRow {
uniform: true
ConfigSpinBox {
icon: "splitscreen_bottom"
text: Translation.tr("Rows")
value: Config.options.overview.rows
from: 1
to: 20
stepSize: 1
onValueChanged: {
Config.options.overview.rows = value;
}
}
ConfigSpinBox {
icon: "splitscreen_right"
text: Translation.tr("Columns")
value: Config.options.overview.columns
from: 1
to: 20
stepSize: 1
onValueChanged: {
Config.options.overview.columns = value;
}
}
}
}
ContentSection {
icon: "screenshot_frame_2"
title: Translation.tr("Screenshot tool")
ConfigSwitch {
buttonIcon: "nearby"
text: Translation.tr('Show regions of potential interest')
checked: Config.options.screenshotTool.showContentRegions
onCheckedChanged: {
Config.options.screenshotTool.showContentRegions = checked;
}
StyledToolTip {
text: Translation.tr("Such regions could be images or parts of the screen that have some containment.\nMight not always be accurate.\nThis is done with an image processing algorithm run locally and no AI is used.")
}
}
}
ContentSection {
icon: "wallpaper_slideshow"
title: Translation.tr("Wallpaper selector")
ConfigSwitch {
buttonIcon: "ad"
text: Translation.tr('Use system file picker')
checked: Config.options.wallpaperSelector.useSystemFileDialog
onCheckedChanged: {
Config.options.wallpaperSelector.useSystemFileDialog = checked;
}
}
}
}
@@ -0,0 +1,336 @@
import QtQuick
import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import Quickshell
import Quickshell.Io
import qs.services
import qs.modules.common
import qs.modules.common.widgets
import qs.modules.common.functions
ContentPage {
forceWidth: true
Process {
id: randomWallProc
property string status: ""
property string scriptPath: `${Directories.scriptPath}/colors/random/random_konachan_wall.sh`
command: ["bash", "-c", FileUtils.trimFileProtocol(randomWallProc.scriptPath)]
stdout: SplitParser {
onRead: data => {
randomWallProc.status = data.trim();
}
}
}
component SmallLightDarkPreferenceButton: RippleButton {
id: smallLightDarkPreferenceButton
required property bool dark
property color colText: toggled ? Appearance.colors.colOnPrimary : Appearance.colors.colOnLayer2
padding: 5
Layout.fillWidth: true
toggled: Appearance.m3colors.darkmode === dark
colBackground: Appearance.colors.colLayer2
onClicked: {
Quickshell.execDetached(["bash", "-c", `${Directories.wallpaperSwitchScriptPath} --mode ${dark ? "dark" : "light"} --noswitch`]);
}
contentItem: Item {
anchors.centerIn: parent
ColumnLayout {
anchors.centerIn: parent
spacing: 0
MaterialSymbol {
Layout.alignment: Qt.AlignHCenter
iconSize: 30
text: dark ? "dark_mode" : "light_mode"
color: smallLightDarkPreferenceButton.colText
}
StyledText {
Layout.alignment: Qt.AlignHCenter
text: dark ? Translation.tr("Dark") : Translation.tr("Light")
font.pixelSize: Appearance.font.pixelSize.smaller
color: smallLightDarkPreferenceButton.colText
}
}
}
}
// Wallpaper selection
ContentSection {
icon: "format_paint"
title: Translation.tr("Wallpaper & Colors")
Layout.fillWidth: true
RowLayout {
Layout.fillWidth: true
Item {
implicitWidth: 340
implicitHeight: 200
StyledImage {
id: wallpaperPreview
anchors.fill: parent
sourceSize.width: parent.implicitWidth
sourceSize.height: parent.implicitHeight
fillMode: Image.PreserveAspectCrop
source: Config.options.background.wallpaperPath
cache: false
layer.enabled: true
layer.effect: OpacityMask {
maskSource: Rectangle {
width: 360
height: 200
radius: Appearance.rounding.normal
}
}
}
}
ColumnLayout {
RippleButtonWithIcon {
enabled: !randomWallProc.running
visible: Config.options.policies.weeb === 1
Layout.fillWidth: true
buttonRadius: Appearance.rounding.small
materialIcon: "ifl"
mainText: randomWallProc.running ? Translation.tr("Be patient...") : Translation.tr("Random: Konachan")
onClicked: {
randomWallProc.scriptPath = `${Directories.scriptPath}/colors/random/random_konachan_wall.sh`;
randomWallProc.running = true;
}
StyledToolTip {
text: Translation.tr("Random SFW Anime wallpaper from Konachan\nImage is saved to ~/Pictures/Wallpapers")
}
}
RippleButtonWithIcon {
enabled: !randomWallProc.running
visible: Config.options.policies.weeb === 1
Layout.fillWidth: true
buttonRadius: Appearance.rounding.small
materialIcon: "ifl"
mainText: randomWallProc.running ? Translation.tr("Be patient...") : Translation.tr("Random: osu! seasonal")
onClicked: {
randomWallProc.scriptPath = `${Directories.scriptPath}/colors/random/random_osu_wall.sh`;
randomWallProc.running = true;
}
StyledToolTip {
text: Translation.tr("Random osu! seasonal background\nImage is saved to ~/Pictures/Wallpapers")
}
}
RippleButtonWithIcon {
Layout.fillWidth: true
materialIcon: "wallpaper"
StyledToolTip {
text: Translation.tr("Pick wallpaper image on your system")
}
onClicked: {
Quickshell.execDetached(`${Directories.wallpaperSwitchScriptPath}`);
}
mainContentComponent: Component {
RowLayout {
spacing: 10
StyledText {
font.pixelSize: Appearance.font.pixelSize.small
text: Translation.tr("Choose file")
color: Appearance.colors.colOnSecondaryContainer
}
RowLayout {
spacing: 3
KeyboardKey {
key: "Ctrl"
}
KeyboardKey {
key: "󰖳"
}
StyledText {
Layout.alignment: Qt.AlignVCenter
text: "+"
}
KeyboardKey {
key: "T"
}
}
}
}
}
RowLayout {
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
Layout.fillHeight: true
uniformCellSizes: true
SmallLightDarkPreferenceButton {
Layout.fillHeight: true
dark: false
}
SmallLightDarkPreferenceButton {
Layout.fillHeight: true
dark: true
}
}
}
}
ConfigSelectionArray {
currentValue: Config.options.appearance.palette.type
onSelected: newValue => {
Config.options.appearance.palette.type = newValue;
Quickshell.execDetached(["bash", "-c", `${Directories.wallpaperSwitchScriptPath} --noswitch`]);
}
options: [
{
"value": "auto",
"displayName": Translation.tr("Auto")
},
{
"value": "scheme-content",
"displayName": Translation.tr("Content")
},
{
"value": "scheme-expressive",
"displayName": Translation.tr("Expressive")
},
{
"value": "scheme-fidelity",
"displayName": Translation.tr("Fidelity")
},
{
"value": "scheme-fruit-salad",
"displayName": Translation.tr("Fruit Salad")
},
{
"value": "scheme-monochrome",
"displayName": Translation.tr("Monochrome")
},
{
"value": "scheme-neutral",
"displayName": Translation.tr("Neutral")
},
{
"value": "scheme-rainbow",
"displayName": Translation.tr("Rainbow")
},
{
"value": "scheme-tonal-spot",
"displayName": Translation.tr("Tonal Spot")
}
]
}
ConfigSwitch {
buttonIcon: "ev_shadow"
text: Translation.tr("Transparency")
checked: Config.options.appearance.transparency.enable
onCheckedChanged: {
Config.options.appearance.transparency.enable = checked;
}
StyledToolTip {
text: Translation.tr("Might look ass. Unsupported.")
}
}
}
ContentSection {
icon: "screenshot_monitor"
title: Translation.tr("Bar & screen")
ConfigRow {
ContentSubsection {
title: Translation.tr("Bar position")
ConfigSelectionArray {
currentValue: (Config.options.bar.bottom ? 1 : 0) | (Config.options.bar.vertical ? 2 : 0)
onSelected: newValue => {
Config.options.bar.bottom = (newValue & 1) !== 0;
Config.options.bar.vertical = (newValue & 2) !== 0;
}
options: [
{
displayName: Translation.tr("Top"),
icon: "arrow_upward",
value: 0 // bottom: false, vertical: false
},
{
displayName: Translation.tr("Left"),
icon: "arrow_back",
value: 2 // bottom: false, vertical: true
},
{
displayName: Translation.tr("Bottom"),
icon: "arrow_downward",
value: 1 // bottom: true, vertical: false
},
{
displayName: Translation.tr("Right"),
icon: "arrow_forward",
value: 3 // bottom: true, vertical: true
}
]
}
}
ContentSubsection {
title: Translation.tr("Bar style")
ConfigSelectionArray {
currentValue: Config.options.bar.cornerStyle
onSelected: newValue => {
Config.options.bar.cornerStyle = newValue; // Update local copy
}
options: [
{
displayName: Translation.tr("Hug"),
icon: "line_curve",
value: 0
},
{
displayName: Translation.tr("Float"),
icon: "page_header",
value: 1
},
{
displayName: Translation.tr("Rect"),
icon: "toolbar",
value: 2
}
]
}
}
}
ConfigRow {
ContentSubsection {
title: Translation.tr("Screen round corner")
ConfigSelectionArray {
currentValue: Config.options.appearance.fakeScreenRounding
onSelected: newValue => {
Config.options.appearance.fakeScreenRounding = newValue;
}
options: [
{
displayName: Translation.tr("No"),
icon: "close",
value: 0
},
{
displayName: Translation.tr("Yes"),
icon: "check",
value: 1
},
{
displayName: Translation.tr("When not fullscreen"),
icon: "fullscreen_exit",
value: 2
}
]
}
}
}
}
NoticeBox {
Layout.fillWidth: true
text: Translation.tr('Not all options are available in this app. You should also check the config file by hitting the "Config file" button on the topleft corner or opening %1 manually.').arg(Directories.shellConfigPath)
}
}
@@ -0,0 +1,151 @@
import QtQuick
import QtQuick.Layouts
import qs.services
import qs.modules.common
import qs.modules.common.widgets
ContentPage {
forceWidth: true
ContentSection {
icon: "neurology"
title: Translation.tr("AI")
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("System prompt")
text: Config.options.ai.systemPrompt
wrapMode: TextEdit.Wrap
onTextChanged: {
Qt.callLater(() => {
Config.options.ai.systemPrompt = text;
});
}
}
}
ContentSection {
icon: "cell_tower"
title: Translation.tr("Networking")
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("User agent (for services that require it)")
text: Config.options.networking.userAgent
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.networking.userAgent = text;
}
}
}
ContentSection {
icon: "memory"
title: Translation.tr("Resources")
ConfigSpinBox {
icon: "av_timer"
text: Translation.tr("Polling interval (ms)")
value: Config.options.resources.updateInterval
from: 100
to: 10000
stepSize: 100
onValueChanged: {
Config.options.resources.updateInterval = value;
}
}
}
ContentSection {
icon: "search"
title: Translation.tr("Search")
ConfigSwitch {
text: Translation.tr("Use Levenshtein distance-based algorithm instead of fuzzy")
checked: Config.options.search.sloppy
onCheckedChanged: {
Config.options.search.sloppy = checked;
}
StyledToolTip {
text: Translation.tr("Could be better if you make a ton of typos,\nbut results can be weird and might not work with acronyms\n(e.g. \"GIMP\" might not give you the paint program)")
}
}
ContentSubsection {
title: Translation.tr("Prefixes")
ConfigRow {
uniform: true
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("Action")
text: Config.options.search.prefix.action
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.search.prefix.action = text;
}
}
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("Clipboard")
text: Config.options.search.prefix.clipboard
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.search.prefix.clipboard = text;
}
}
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("Emojis")
text: Config.options.search.prefix.emojis
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.search.prefix.emojis = text;
}
}
}
ConfigRow {
uniform: true
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("Math")
text: Config.options.search.prefix.math
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.search.prefix.math = text;
}
}
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("Shell command")
text: Config.options.search.prefix.shellCommand
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.search.prefix.shellCommand = text;
}
}
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("Web search")
text: Config.options.search.prefix.webSearch
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.search.prefix.webSearch = text;
}
}
}
}
ContentSubsection {
title: Translation.tr("Web search")
MaterialTextArea {
Layout.fillWidth: true
placeholderText: Translation.tr("Base URL")
text: Config.options.search.engineBaseUrl
wrapMode: TextEdit.Wrap
onTextChanged: {
Config.options.search.engineBaseUrl = text;
}
}
}
}
}