mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
settings: about page
This commit is contained in:
@@ -456,7 +456,6 @@ Scope {
|
||||
bottom: ConfigOptions.bar.bottom ? barContent.top : undefined
|
||||
}
|
||||
height: Appearance.rounding.screenRounding
|
||||
visible: showBarBackground
|
||||
|
||||
RoundCorner {
|
||||
anchors.top: parent.top
|
||||
@@ -464,7 +463,6 @@ Scope {
|
||||
size: Appearance.rounding.screenRounding
|
||||
corner: ConfigOptions.bar.bottom ? cornerEnum.bottomLeft : cornerEnum.topLeft
|
||||
color: showBarBackground ? Appearance.colors.colLayer0 : "transparent"
|
||||
opacity: 1.0 - Appearance.transparency
|
||||
}
|
||||
RoundCorner {
|
||||
anchors.top: parent.top
|
||||
@@ -472,7 +470,6 @@ Scope {
|
||||
size: Appearance.rounding.screenRounding
|
||||
corner: ConfigOptions.bar.bottom ? cornerEnum.bottomRight : cornerEnum.topRight
|
||||
color: showBarBackground ? Appearance.colors.colLayer0 : "transparent"
|
||||
opacity: 1.0 - Appearance.transparency
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,14 +6,18 @@ import "root:/modules/common/widgets/"
|
||||
|
||||
Flickable {
|
||||
id: root
|
||||
property real baseWidth: 400
|
||||
property real baseWidth: 500
|
||||
property bool forceWidth: false
|
||||
|
||||
default property alias data: contentColumn.data
|
||||
|
||||
clip: true
|
||||
contentHeight: contentColumn.implicitHeight
|
||||
implicitWidth: Math.max(contentColumn.implicitWidth, baseWidth)
|
||||
implicitWidth: contentColumn.implicitWidth
|
||||
|
||||
ColumnLayout {
|
||||
id: contentColumn
|
||||
width: root.forceWidth ? root.baseWidth : Math.max(root.baseWidth, implicitWidth)
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
|
||||
@@ -226,12 +226,8 @@ Item { // Notification item area
|
||||
Qt.openUrlExternally(link)
|
||||
Hyprland.dispatch("global quickshell:sidebarRightClose")
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton // Only for hover
|
||||
hoverEnabled: true
|
||||
cursorShape: parent.hoveredLink !== "" ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
|
||||
PointingHandLinkHover {}
|
||||
}
|
||||
|
||||
Flickable { // Notification actions
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
import QtQuick
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton // Only for hover
|
||||
hoverEnabled: true
|
||||
cursorShape: parent.hoveredLink !== "" ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
@@ -7,7 +7,8 @@ import "root:/modules/common/widgets/"
|
||||
RippleButton {
|
||||
id: buttonWithIconRoot
|
||||
property string nerdIcon
|
||||
property string iconText
|
||||
property string materialIcon
|
||||
property bool materialIconFill: true
|
||||
property string mainText: "Button text"
|
||||
property Component mainContentComponent: Component {
|
||||
StyledText {
|
||||
@@ -29,10 +30,10 @@ RippleButton {
|
||||
anchors.centerIn: parent
|
||||
active: !nerdIcon
|
||||
sourceComponent: MaterialSymbol {
|
||||
text: buttonWithIconRoot.iconText
|
||||
text: buttonWithIconRoot.materialIcon
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colOnSecondaryContainer
|
||||
fill: 1
|
||||
fill: buttonWithIconRoot.materialIconFill ? 1 : 0
|
||||
}
|
||||
}
|
||||
Loader {
|
||||
|
||||
@@ -1,13 +1,151 @@
|
||||
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 {
|
||||
StyledText {
|
||||
text: qsTr("About page")
|
||||
font.pixelSize: Appearance.font.pixelSize.larger
|
||||
forceWidth: true
|
||||
|
||||
ContentSection {
|
||||
title: "Distro"
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
spacing: 20
|
||||
Layout.topMargin: 10
|
||||
Layout.bottomMargin: 10
|
||||
IconImage {
|
||||
implicitSize: 100
|
||||
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
|
||||
MaterialSymbol {
|
||||
iconSize: 70
|
||||
text: "files"
|
||||
color: Appearance.colors.colOnSecondaryContainer
|
||||
}
|
||||
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")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ ContentPage {
|
||||
id: rndWallBtn
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
buttonRadius: Appearance.rounding.small
|
||||
iconText: "wallpaper"
|
||||
materialIcon: "wallpaper"
|
||||
mainText: konachanWallProc.running ? "Be patient..." : "Random: Konachan"
|
||||
onClicked: {
|
||||
console.log(konachanWallProc.command.join(" "))
|
||||
@@ -54,7 +54,7 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
iconText: "wallpaper"
|
||||
materialIcon: "wallpaper"
|
||||
StyledToolTip {
|
||||
content: "Pick wallpaper image on your system"
|
||||
}
|
||||
|
||||
@@ -162,12 +162,7 @@ Rectangle {
|
||||
Qt.openUrlExternally(link)
|
||||
Hyprland.dispatch("global quickshell:sidebarLeftClose")
|
||||
}
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.NoButton // Only for hover
|
||||
hoverEnabled: true
|
||||
cursorShape: parent.hoveredLink !== "" ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
}
|
||||
PointingHandLinkHover {}
|
||||
}
|
||||
|
||||
Repeater {
|
||||
|
||||
@@ -9,10 +9,17 @@ import Quickshell.Io
|
||||
* Provides some system info: distro, username.
|
||||
*/
|
||||
Singleton {
|
||||
id: root
|
||||
property string distroName: "Unknown"
|
||||
property string distroId: "unknown"
|
||||
property string distroIcon: "linux-symbolic"
|
||||
property string username: "user"
|
||||
property string homeUrl: ""
|
||||
property string documentationUrl: ""
|
||||
property string supportUrl: ""
|
||||
property string bugReportUrl: ""
|
||||
property string privacyPolicyUrl: ""
|
||||
property string logo: ""
|
||||
|
||||
Timer {
|
||||
triggeredOnStart: true
|
||||
@@ -33,6 +40,20 @@ Singleton {
|
||||
const logoMatch = textOsRelease.match(/^LOGO=(.+)$/m)
|
||||
distroId = logoMatch ? logoMatch[1].replace(/"/g, "") : "unknown"
|
||||
|
||||
// Extract additional URLs and logo
|
||||
const homeUrlMatch = textOsRelease.match(/^HOME_URL="(.+?)"/m)
|
||||
homeUrl = homeUrlMatch ? homeUrlMatch[1] : ""
|
||||
const documentationUrlMatch = textOsRelease.match(/^DOCUMENTATION_URL="(.+?)"/m)
|
||||
documentationUrl = documentationUrlMatch ? documentationUrlMatch[1] : ""
|
||||
const supportUrlMatch = textOsRelease.match(/^SUPPORT_URL="(.+?)"/m)
|
||||
supportUrl = supportUrlMatch ? supportUrlMatch[1] : ""
|
||||
const bugReportUrlMatch = textOsRelease.match(/^BUG_REPORT_URL="(.+?)"/m)
|
||||
bugReportUrl = bugReportUrlMatch ? bugReportUrlMatch[1] : ""
|
||||
const privacyPolicyUrlMatch = textOsRelease.match(/^PRIVACY_POLICY_URL="(.+?)"/m)
|
||||
privacyPolicyUrl = privacyPolicyUrlMatch ? privacyPolicyUrlMatch[1] : ""
|
||||
const logoFieldMatch = textOsRelease.match(/^LOGO="?(.+?)"?$/m)
|
||||
logo = logoFieldMatch ? logoFieldMatch[1] : ""
|
||||
|
||||
// Update the distroIcon property based on distroId
|
||||
switch (distroId) {
|
||||
case "arch": distroIcon = "arch-symbolic"; break;
|
||||
@@ -57,7 +78,7 @@ Singleton {
|
||||
command: ["whoami"]
|
||||
stdout: SplitParser {
|
||||
onRead: data => {
|
||||
username = data.trim()
|
||||
root.username = data.trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ ApplicationWindow {
|
||||
id: rndWallBtn
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
buttonRadius: Appearance.rounding.small
|
||||
iconText: "wallpaper"
|
||||
materialIcon: "wallpaper"
|
||||
mainText: konachanWallProc.running ? "Be patient..." : "Random: Konachan"
|
||||
onClicked: {
|
||||
console.log(konachanWallProc.command.join(" "))
|
||||
@@ -149,7 +149,7 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
iconText: "wallpaper"
|
||||
materialIcon: "wallpaper"
|
||||
StyledToolTip {
|
||||
content: "Pick wallpaper image on your system"
|
||||
}
|
||||
@@ -284,10 +284,10 @@ ApplicationWindow {
|
||||
|
||||
Flow {
|
||||
Layout.fillWidth: true
|
||||
spacing: 10
|
||||
spacing: 5
|
||||
|
||||
RippleButtonWithIcon {
|
||||
iconText: "keyboard_alt"
|
||||
materialIcon: "keyboard_alt"
|
||||
onClicked: {
|
||||
Hyprland.dispatch("global quickshell:cheatsheetOpen")
|
||||
}
|
||||
@@ -317,14 +317,14 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
RippleButtonWithIcon {
|
||||
iconText: "help"
|
||||
materialIcon: "help"
|
||||
mainText: "Usage"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally("https://end-4.github.io/dots-hyprland-wiki/en/ii-qs/02usage/")
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
iconText: "construction"
|
||||
materialIcon: "construction"
|
||||
mainText: "Configuration"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally("https://end-4.github.io/dots-hyprland-wiki/en/ii-qs/03config/")
|
||||
@@ -338,7 +338,7 @@ ApplicationWindow {
|
||||
|
||||
Flow {
|
||||
Layout.fillWidth: true
|
||||
spacing: 10
|
||||
spacing: 5
|
||||
|
||||
RippleButtonWithIcon {
|
||||
nerdIcon: ""
|
||||
@@ -348,7 +348,7 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
RippleButtonWithIcon {
|
||||
iconText: "favorite"
|
||||
materialIcon: "favorite"
|
||||
mainText: "Funny number"
|
||||
onClicked: {
|
||||
Qt.openUrlExternally("https://github.com/sponsors/end-4")
|
||||
|
||||
Reference in New Issue
Block a user