diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-11 15:14:04 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-11 15:14:04 +1000 |
| commit | 0771aad11e5302f8829f1e5490bd936963606519 (patch) | |
| tree | 8791fbade1005dcf6f212e18247a9d903075d84e /modules | |
| parent | lock: add resources (diff) | |
| download | caelestia-shell-0771aad11e5302f8829f1e5490bd936963606519.tar.gz caelestia-shell-0771aad11e5302f8829f1e5490bd936963606519.tar.bz2 caelestia-shell-0771aad11e5302f8829f1e5490bd936963606519.zip | |
lock: add fetch + refactor os info
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/bar/components/OsIcon.qml | 2 | ||||
| -rw-r--r-- | modules/dashboard/dash/User.qml | 6 | ||||
| -rw-r--r-- | modules/lock/Content.qml | 2 | ||||
| -rw-r--r-- | modules/lock/Fetch.qml | 102 |
4 files changed, 108 insertions, 4 deletions
diff --git a/modules/bar/components/OsIcon.qml b/modules/bar/components/OsIcon.qml index ecc69b5..ee24457 100644 --- a/modules/bar/components/OsIcon.qml +++ b/modules/bar/components/OsIcon.qml @@ -4,7 +4,7 @@ import qs.utils import qs.config StyledText { - text: Icons.osIcon + text: SysInfo.osIcon font.pointSize: Appearance.font.size.smaller font.family: Appearance.font.family.mono color: Colours.palette.m3tertiary diff --git a/modules/dashboard/dash/User.qml b/modules/dashboard/dash/User.qml index 53b136b..8dcde1e 100644 --- a/modules/dashboard/dash/User.qml +++ b/modules/dashboard/dash/User.qml @@ -113,15 +113,15 @@ Row { spacing: Appearance.spacing.normal InfoLine { - icon: Icons.osIcon - text: Icons.osName + icon: SysInfo.osIcon + text: SysInfo.osPrettyName || SysInfo.osName colour: Colours.palette.m3primary materialIcon: false } InfoLine { icon: "select_window_2" - text: Quickshell.env("XDG_CURRENT_DESKTOP") || Quickshell.env("XDG_SESSION_DESKTOP") + text: SysInfo.wm colour: Colours.palette.m3secondary } diff --git a/modules/lock/Content.qml b/modules/lock/Content.qml index f74f2d9..3ee9dd8 100644 --- a/modules/lock/Content.qml +++ b/modules/lock/Content.qml @@ -39,6 +39,8 @@ RowLayout { radius: Appearance.rounding.small color: Colours.tPalette.m3surfaceContainer + + Fetch {} } StyledClippingRect { diff --git a/modules/lock/Fetch.qml b/modules/lock/Fetch.qml new file mode 100644 index 0000000..afa6950 --- /dev/null +++ b/modules/lock/Fetch.qml @@ -0,0 +1,102 @@ +import qs.components +import qs.services +import qs.config +import qs.utils +import Quickshell +import Quickshell.Widgets +import QtQuick +import QtQuick.Layouts + +ColumnLayout { + id: root + + anchors.fill: parent + anchors.margins: Appearance.padding.large * 2 + + spacing: Appearance.spacing.large * 2 + + RowLayout { + spacing: Appearance.spacing.normal + + StyledRect { + implicitWidth: prompt.implicitWidth + Appearance.padding.normal * 2 + implicitHeight: prompt.implicitHeight + Appearance.padding.normal * 2 + + color: Colours.palette.m3primary + radius: Appearance.rounding.small + + MonoText { + id: prompt + + anchors.centerIn: parent + text: ">" + color: Colours.palette.m3onPrimary + } + } + + MonoText { + text: "caelestiafetch.sh" + } + } + + RowLayout { + Layout.fillWidth: true + Layout.fillHeight: true + spacing: Appearance.spacing.large * 2 + + IconImage { + Layout.fillHeight: true + source: Quickshell.iconPath(SysInfo.logo) + implicitSize: height + } + + ColumnLayout { + Layout.fillWidth: true + Layout.fillHeight: true + spacing: Appearance.spacing.normal + + FetchText { + text: qsTr("OS : %1").arg(SysInfo.osPrettyName || SysInfo.osName) + } + + FetchText { + text: qsTr("WM : %1").arg(SysInfo.wm) + } + + FetchText { + text: qsTr("USER: %1").arg(SysInfo.user) + } + + FetchText { + text: qsTr("SH : %1").arg(SysInfo.shell) + } + } + } + + RowLayout { + Layout.alignment: Qt.AlignHCenter + spacing: Appearance.spacing.large + + Repeater { + model: 8 + + StyledRect { + required property int index + + implicitWidth: implicitHeight + implicitHeight: Appearance.font.size.larger * 2 + color: Colours.palette[`term${index}`] + radius: Appearance.rounding.small + } + } + } + + component FetchText: MonoText { + font.pointSize: Appearance.font.size.larger + elide: Text.ElideRight + } + + component MonoText: StyledText { + font.family: Appearance.font.family.mono + } +} |