forked from Shinonome/dots-hyprland
move quickshell config to subfolder to ease distribution
https://quickshell.outfoxxed.me/docs/guide/distribution/
This commit is contained in:
@@ -0,0 +1,150 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import "root:/services/"
|
||||
import "root:/modules/common/"
|
||||
import "root:/modules/common/widgets/"
|
||||
|
||||
ContentPage {
|
||||
forceWidth: true
|
||||
|
||||
ContentSection {
|
||||
title: "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: "Documentation"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(SystemInfo.documentationUrl)
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
materialIcon: "support"
|
||||
mainText: "Help & Support"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(SystemInfo.supportUrl)
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
materialIcon: "bug_report"
|
||||
mainText: "Report a Bug"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(SystemInfo.bugReportUrl)
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
materialIcon: "policy"
|
||||
materialIconFill: false
|
||||
mainText: "Privacy Policy"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally(SystemInfo.privacyPolicyUrl)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
ContentSection {
|
||||
title: "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: "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: "Documentation"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally("https://end-4.github.io/dots-hyprland-wiki/en/ii-qs/02usage/")
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
materialIcon: "adjust"
|
||||
materialIconFill: false
|
||||
mainText: "Issues"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally("https://github.com/end-4/dots-hyprland/issues")
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
materialIcon: "forum"
|
||||
mainText: "Discussions"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally("https://github.com/end-4/dots-hyprland/discussions")
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
materialIcon: "favorite"
|
||||
mainText: "Donate"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally("https://github.com/sponsors/end-4")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,374 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "root:/services/"
|
||||
import "root:/modules/common/"
|
||||
import "root:/modules/common/widgets/"
|
||||
|
||||
ContentPage {
|
||||
forceWidth: true
|
||||
ContentSection {
|
||||
title: "Policies"
|
||||
|
||||
ConfigRow {
|
||||
ColumnLayout {
|
||||
// Weeb policy
|
||||
ContentSubsectionLabel {
|
||||
text: "Weeb"
|
||||
}
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.policies.weeb
|
||||
configOptionName: "policies.weeb"
|
||||
onSelected: newValue => {
|
||||
Config.options.policies.weeb = newValue;
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: "No",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
displayName: "Yes",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
displayName: "Closet",
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
// AI policy
|
||||
ContentSubsectionLabel {
|
||||
text: "AI"
|
||||
}
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.policies.ai
|
||||
configOptionName: "policies.ai"
|
||||
onSelected: newValue => {
|
||||
Config.options.policies.ai = newValue;
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: "No",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
displayName: "Yes",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
displayName: "Local only",
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Bar"
|
||||
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.bar.cornerStyle
|
||||
configOptionName: "bar.cornerStyle"
|
||||
onSelected: newValue => {
|
||||
Config.options.bar.cornerStyle = newValue;
|
||||
}
|
||||
options: [
|
||||
{
|
||||
displayName: "Hug",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
displayName: "Float",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
displayName: "Plain rectangle",
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
ContentSubsection {
|
||||
title: "Appearance"
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: 'Borderless'
|
||||
checked: Config.options.bar.borderless
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.borderless = checked;
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
text: 'Show background'
|
||||
checked: Config.options.bar.showBackground
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.showBackground = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Note: turning off can hurt readability"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSubsection {
|
||||
title: "Buttons"
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: "Screen snip"
|
||||
checked: Config.options.bar.utilButtons.showScreenSnip
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.utilButtons.showScreenSnip = checked;
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
text: "Color picker"
|
||||
checked: Config.options.bar.utilButtons.showColorPicker
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.utilButtons.showColorPicker = checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: "Mic toggle"
|
||||
checked: Config.options.bar.utilButtons.showMicToggle
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.utilButtons.showMicToggle = checked;
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
text: "Keyboard toggle"
|
||||
checked: Config.options.bar.utilButtons.showKeyboardToggle
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.utilButtons.showKeyboardToggle = checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: "Dark/Light toggle"
|
||||
checked: Config.options.bar.utilButtons.showDarkModeToggle
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.utilButtons.showDarkModeToggle = checked;
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
opacity: 0
|
||||
enabled: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSubsection {
|
||||
title: "Workspaces"
|
||||
tooltip: "Tip: Hide icons and always show numbers for\nthe classic illogical-impulse experience"
|
||||
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: 'Show app icons'
|
||||
checked: Config.options.bar.workspaces.showAppIcons
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.workspaces.showAppIcons = checked;
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
text: 'Always show numbers'
|
||||
checked: Config.options.bar.workspaces.alwaysShowNumbers
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.workspaces.alwaysShowNumbers = checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Workspaces shown"
|
||||
value: Config.options.bar.workspaces.shown
|
||||
from: 1
|
||||
to: 30
|
||||
stepSize: 1
|
||||
onValueChanged: {
|
||||
Config.options.bar.workspaces.shown = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSubsection {
|
||||
title: "Weather"
|
||||
ConfigSwitch {
|
||||
text: "Enable"
|
||||
checked: Config.options.bar.weather.enable
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.weather.enable = checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Battery"
|
||||
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSpinBox {
|
||||
text: "Low warning"
|
||||
value: Config.options.battery.low
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.low = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Critical warning"
|
||||
value: Config.options.battery.critical
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.critical = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: "Automatic suspend"
|
||||
checked: Config.options.battery.automaticSuspend
|
||||
onCheckedChanged: {
|
||||
Config.options.battery.automaticSuspend = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Automatically suspends the system when battery is low"
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Suspend at"
|
||||
value: Config.options.battery.suspend
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.suspend = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Dock"
|
||||
|
||||
ConfigSwitch {
|
||||
text: "Enable"
|
||||
checked: Config.options.dock.enable
|
||||
onCheckedChanged: {
|
||||
Config.options.dock.enable = checked;
|
||||
}
|
||||
}
|
||||
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: "Hover to reveal"
|
||||
checked: Config.options.dock.hoverToReveal
|
||||
onCheckedChanged: {
|
||||
Config.options.dock.hoverToReveal = checked;
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
text: "Pinned on startup"
|
||||
checked: Config.options.dock.pinnedOnStartup
|
||||
onCheckedChanged: {
|
||||
Config.options.dock.pinnedOnStartup = checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "On-screen display"
|
||||
ConfigSpinBox {
|
||||
text: "Timeout (ms)"
|
||||
value: Config.options.osd.timeout
|
||||
from: 100
|
||||
to: 3000
|
||||
stepSize: 100
|
||||
onValueChanged: {
|
||||
Config.options.osd.timeout = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Overview"
|
||||
ConfigSpinBox {
|
||||
text: "Scale (%)"
|
||||
value: Config.options.overview.scale * 100
|
||||
from: 1
|
||||
to: 100
|
||||
stepSize: 1
|
||||
onValueChanged: {
|
||||
Config.options.overview.scale = value / 100;
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSpinBox {
|
||||
text: "Rows"
|
||||
value: Config.options.overview.rows
|
||||
from: 1
|
||||
to: 20
|
||||
stepSize: 1
|
||||
onValueChanged: {
|
||||
Config.options.overview.rows = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Columns"
|
||||
value: Config.options.overview.columns
|
||||
from: 1
|
||||
to: 20
|
||||
stepSize: 1
|
||||
onValueChanged: {
|
||||
Config.options.overview.columns = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Screenshot tool"
|
||||
|
||||
ConfigSwitch {
|
||||
text: 'Show regions of potential interest'
|
||||
checked: Config.options.screenshotTool.showContentRegions
|
||||
onCheckedChanged: {
|
||||
Config.options.screenshotTool.showContentRegions = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "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."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,202 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "root:/services/"
|
||||
import "root:/modules/common/"
|
||||
import "root:/modules/common/widgets/"
|
||||
|
||||
ContentPage {
|
||||
forceWidth: true
|
||||
|
||||
ContentSection {
|
||||
title: "Audio"
|
||||
|
||||
ConfigSwitch {
|
||||
text: "Earbang protection"
|
||||
checked: Config.options.audio.protection.enable
|
||||
onCheckedChanged: {
|
||||
Config.options.audio.protection.enable = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Prevents abrupt increments and restricts volume limit"
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
// uniform: true
|
||||
ConfigSpinBox {
|
||||
text: "Max allowed increase"
|
||||
value: Config.options.audio.protection.maxAllowedIncrease
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 2
|
||||
onValueChanged: {
|
||||
Config.options.audio.protection.maxAllowedIncrease = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Volume limit"
|
||||
value: Config.options.audio.protection.maxAllowed
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 2
|
||||
onValueChanged: {
|
||||
Config.options.audio.protection.maxAllowed = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ContentSection {
|
||||
title: "AI"
|
||||
MaterialTextField {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "System prompt"
|
||||
text: Config.options.ai.systemPrompt
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
Qt.callLater(() => {
|
||||
Config.options.ai.systemPrompt = text;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Battery"
|
||||
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSpinBox {
|
||||
text: "Low warning"
|
||||
value: Config.options.battery.low
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.low = value;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Critical warning"
|
||||
value: Config.options.battery.critical
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.critical = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: "Automatic suspend"
|
||||
checked: Config.options.battery.automaticSuspend
|
||||
onCheckedChanged: {
|
||||
Config.options.battery.automaticSuspend = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Automatically suspends the system when battery is low"
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
text: "Suspend at"
|
||||
value: Config.options.battery.suspend
|
||||
from: 0
|
||||
to: 100
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.battery.suspend = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Networking"
|
||||
MaterialTextField {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "User agent (for services that require it)"
|
||||
text: Config.options.networking.userAgent
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
Config.options.networking.userAgent = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Resources"
|
||||
ConfigSpinBox {
|
||||
text: "Polling interval (ms)"
|
||||
value: Config.options.resources.updateInterval
|
||||
from: 100
|
||||
to: 10000
|
||||
stepSize: 100
|
||||
onValueChanged: {
|
||||
Config.options.resources.updateInterval = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Search"
|
||||
|
||||
ConfigSwitch {
|
||||
text: "Use Levenshtein distance-based algorithm instead of fuzzy"
|
||||
checked: Config.options.search.sloppy
|
||||
onCheckedChanged: {
|
||||
Config.options.search.sloppy = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "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: "Prefixes"
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
|
||||
MaterialTextField {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Action"
|
||||
text: Config.options.search.prefix.action
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
Config.options.search.prefix.action = text;
|
||||
}
|
||||
}
|
||||
MaterialTextField {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Clipboard"
|
||||
text: Config.options.search.prefix.clipboard
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
Config.options.search.prefix.clipboard = text;
|
||||
}
|
||||
}
|
||||
MaterialTextField {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Emojis"
|
||||
text: Config.options.search.prefix.emojis
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
Config.options.search.prefix.emojis = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ContentSubsection {
|
||||
title: "Web search"
|
||||
MaterialTextField {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: "Base URL"
|
||||
text: Config.options.search.engineBaseUrl
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
Config.options.search.engineBaseUrl = text;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,214 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Hyprland
|
||||
import "root:/services/"
|
||||
import "root:/modules/common/"
|
||||
import "root:/modules/common/widgets/"
|
||||
import "root:/modules/common/functions/color_utils.js" as ColorUtils
|
||||
import "root:/modules/common/functions/file_utils.js" as FileUtils
|
||||
|
||||
ContentPage {
|
||||
baseWidth: lightDarkButtonGroup.implicitWidth
|
||||
forceWidth: true
|
||||
|
||||
Process {
|
||||
id: konachanWallProc
|
||||
property string status: ""
|
||||
command: ["bash", "-c", FileUtils.trimFileProtocol(`${Directories.scriptPath}/colors/random_konachan_wall.sh`)]
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
console.log(`Konachan wall proc output: ${data}`);
|
||||
konachanWallProc.status = data.trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Colors & Wallpaper"
|
||||
|
||||
// Light/Dark mode preference
|
||||
ButtonGroup {
|
||||
id: lightDarkButtonGroup
|
||||
Layout.fillWidth: true
|
||||
LightDarkPreferenceButton {
|
||||
dark: false
|
||||
}
|
||||
LightDarkPreferenceButton {
|
||||
dark: true
|
||||
}
|
||||
}
|
||||
|
||||
// Material palette selection
|
||||
ContentSubsection {
|
||||
title: "Material palette"
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.appearance.palette.type
|
||||
configOptionName: "appearance.palette.type"
|
||||
onSelected: (newValue) => {
|
||||
Config.options.appearance.palette.type = newValue;
|
||||
Quickshell.execDetached(["bash", "-c", `${Directories.wallpaperSwitchScriptPath} --noswitch`])
|
||||
}
|
||||
options: [
|
||||
{"value": "auto", "displayName": "Auto"},
|
||||
{"value": "scheme-content", "displayName": "Content"},
|
||||
{"value": "scheme-expressive", "displayName": "Expressive"},
|
||||
{"value": "scheme-fidelity", "displayName": "Fidelity"},
|
||||
{"value": "scheme-fruit-salad", "displayName": "Fruit Salad"},
|
||||
{"value": "scheme-monochrome", "displayName": "Monochrome"},
|
||||
{"value": "scheme-neutral", "displayName": "Neutral"},
|
||||
{"value": "scheme-rainbow", "displayName": "Rainbow"},
|
||||
{"value": "scheme-tonal-spot", "displayName": "Tonal Spot"}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Wallpaper selection
|
||||
ContentSubsection {
|
||||
title: "Wallpaper"
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
RippleButtonWithIcon {
|
||||
id: rndWallBtn
|
||||
buttonRadius: Appearance.rounding.small
|
||||
materialIcon: "wallpaper"
|
||||
mainText: konachanWallProc.running ? "Be patient..." : "Random: Konachan"
|
||||
onClicked: {
|
||||
console.log(konachanWallProc.command.join(" "))
|
||||
konachanWallProc.running = true;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Random SFW Anime wallpaper from Konachan\nImage is saved to ~/Pictures/Wallpapers"
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
materialIcon: "wallpaper"
|
||||
StyledToolTip {
|
||||
content: "Pick wallpaper image on your system"
|
||||
}
|
||||
onClicked: {
|
||||
Quickshell.execDetached(`${Directories.wallpaperSwitchScriptPath}`)
|
||||
}
|
||||
mainContentComponent: Component {
|
||||
RowLayout {
|
||||
spacing: 10
|
||||
StyledText {
|
||||
font.pixelSize: Appearance.font.pixelSize.small
|
||||
text: "Choose file"
|
||||
color: Appearance.colors.colOnSecondaryContainer
|
||||
}
|
||||
RowLayout {
|
||||
spacing: 3
|
||||
KeyboardKey {
|
||||
key: "Ctrl"
|
||||
}
|
||||
KeyboardKey {
|
||||
key: ""
|
||||
}
|
||||
StyledText {
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: "+"
|
||||
}
|
||||
KeyboardKey {
|
||||
key: "T"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
Layout.topMargin: 5
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: "Alternatively use /dark, /light, /img in the launcher"
|
||||
font.pixelSize: Appearance.font.pixelSize.smaller
|
||||
color: Appearance.colors.colSubtext
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
title: "Decorations & Effects"
|
||||
|
||||
ContentSubsection {
|
||||
title: "Transparency"
|
||||
|
||||
ConfigRow {
|
||||
ConfigSwitch {
|
||||
text: "Enable"
|
||||
checked: Config.options.appearance.transparency
|
||||
onCheckedChanged: {
|
||||
Config.options.appearance.transparency = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
content: "Might look ass. Unsupported."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSubsection {
|
||||
title: "Fake screen rounding"
|
||||
|
||||
ButtonGroup {
|
||||
id: fakeScreenRoundingButtonGroup
|
||||
property int selectedPolicy: Config.options.appearance.fakeScreenRounding
|
||||
spacing: 2
|
||||
SelectionGroupButton {
|
||||
property int value: 0
|
||||
leftmost: true
|
||||
buttonText: "No"
|
||||
toggled: (fakeScreenRoundingButtonGroup.selectedPolicy === value)
|
||||
onClicked: {
|
||||
Config.options.appearance.fakeScreenRounding = value;
|
||||
}
|
||||
}
|
||||
SelectionGroupButton {
|
||||
property int value: 1
|
||||
buttonText: "Yes"
|
||||
toggled: (fakeScreenRoundingButtonGroup.selectedPolicy === value)
|
||||
onClicked: {
|
||||
Config.options.appearance.fakeScreenRounding = value;
|
||||
}
|
||||
}
|
||||
SelectionGroupButton {
|
||||
property int value: 2
|
||||
rightmost: true
|
||||
buttonText: "When not fullscreen"
|
||||
toggled: (fakeScreenRoundingButtonGroup.selectedPolicy === value)
|
||||
onClicked: {
|
||||
Config.options.appearance.fakeScreenRounding = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSubsection {
|
||||
title: "Shell windows"
|
||||
|
||||
ConfigRow {
|
||||
uniform: true
|
||||
ConfigSwitch {
|
||||
text: "Title bar"
|
||||
checked: Config.options.windows.showTitlebar
|
||||
onCheckedChanged: {
|
||||
Config.options.windows.showTitlebar = checked;
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
text: "Center title"
|
||||
checked: Config.options.windows.centerTitle
|
||||
onCheckedChanged: {
|
||||
Config.options.windows.centerTitle = checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user