diff --git a/config/Theme.qml b/config/Theme.qml index 91fbf0b..076c50b 100644 --- a/config/Theme.qml +++ b/config/Theme.qml @@ -16,24 +16,16 @@ Singleton { id: palette property color primary: "#1fb854" - property color primarycontent: "#000000" property color secondary: "#1eb88e" - property color secondarycontent: "#000c07" property color accent: "#1fb8ab" - property color accentcontent: "#010c0b" property color neutral: "#19362d" - property color neutralcontent: "#cdd3d1" property color base100: "#1b1717" property color base200: "#161212" property color base300: "#110d0d" property color basecontent: "#cac9c9" property color info: "#00b5ff" - property color infocontent: "#000000" property color success: "#00a96e" - property color successcontent: "#000000" property color warning: "#ffbe00" - property color warningcontent: "#000000" property color error: "#ff5861" - property color errorcontent: "#000000" } } diff --git a/modules/Shell.qml b/modules/Shell.qml deleted file mode 100644 index 8e92771..0000000 --- a/modules/Shell.qml +++ /dev/null @@ -1,20 +0,0 @@ -import "bar" -import "powermenu" -import Quickshell -import Quickshell.Wayland -import Quickshell.Hyprland -import QtQuick -import QtQuick.Effects - -Variants { - model: Quickshell.screens - - Scope { - id: scope - - required property ShellScreen modelData - - Bar {} - PowerMenu {} - } -} diff --git a/modules/Shortcuts.qml b/modules/Shortcuts.qml index b0dcb10..d965bec 100644 --- a/modules/Shortcuts.qml +++ b/modules/Shortcuts.qml @@ -1,4 +1,3 @@ -import qs.services import qs.widgets import Quickshell @@ -12,10 +11,4 @@ Scope { console.log("Launcher shortcut pressed"); } } - - LuxShortcut { - name: 'power-menu' - description: 'Open the Power Menu' - onPressed: Visibility.powermenu = !Visibility.powermenu - } } diff --git a/modules/bar/Bar.qml b/modules/bar/Bar.qml index 06f5572..8ca1c91 100644 --- a/modules/bar/Bar.qml +++ b/modules/bar/Bar.qml @@ -8,105 +8,107 @@ import "components/hyprland" import "components/notifications" import "components/tray" -PanelWindow { - id: parentWindow +Scope { + PanelWindow { + id: parentWindow - anchors.top: true - anchors.left: true - anchors.right: true + anchors.top: true + anchors.left: true + anchors.right: true - implicitHeight: Dimensions.bar.height - color: 'transparent' + implicitHeight: Dimensions.bar.height + color: 'transparent' - Item { + Item { - anchors.fill: parent - anchors.leftMargin: Dimensions.bar.horizontalMargins - anchors.rightMargin: Dimensions.bar.horizontalMargins - anchors.topMargin: Dimensions.bar.verticalMargins - anchors.bottomMargin: Dimensions.bar.verticalMargins - - Rectangle { - id: background anchors.fill: parent - color: Theme.palette.base300 - radius: Dimensions.radius + anchors.leftMargin: Dimensions.bar.horizontalMargins + anchors.rightMargin: Dimensions.bar.horizontalMargins + anchors.topMargin: Dimensions.bar.verticalMargins + anchors.bottomMargin: Dimensions.bar.verticalMargins - border { - color: Theme.palette.base100 - width: Dimensions.bar.border - pixelAligned: true - } - } + Rectangle { + id: background + anchors.fill: parent + color: Theme.palette.base300 + radius: Dimensions.radius - RowLayout { - id: leftbar - - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - - anchors.leftMargin: Dimensions.bar.horizontalPadding - anchors.topMargin: Dimensions.bar.verticalPadding - anchors.bottomMargin: Dimensions.bar.verticalPadding - - spacing: Dimensions.bar.spacing - - SystemLogo { - implicitSize: 22 + border { + color: Theme.palette.base100 + width: Dimensions.bar.border + pixelAligned: true + } } - Workspaces {} + RowLayout { + id: leftbar - Tray {} - } + anchors.left: parent.left + anchors.verticalCenter: parent.verticalCenter - RowLayout { - id: centerbar + anchors.leftMargin: Dimensions.bar.horizontalPadding + anchors.topMargin: Dimensions.bar.verticalPadding + anchors.bottomMargin: Dimensions.bar.verticalPadding - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter + spacing: Dimensions.bar.spacing - anchors.topMargin: Dimensions.bar.verticalPadding - anchors.bottomMargin: Dimensions.bar.verticalPadding + SystemLogo { + implicitSize: 22 + } - spacing: Dimensions.bar.spacing + Workspaces {} - Mpris {} - } + Tray {} + } - RowLayout { - id: rightbar + RowLayout { + id: centerbar - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: parent.verticalCenter - anchors.rightMargin: Dimensions.bar.horizontalPadding - anchors.topMargin: Dimensions.bar.verticalPadding - anchors.bottomMargin: Dimensions.bar.verticalPadding + anchors.topMargin: Dimensions.bar.verticalPadding + anchors.bottomMargin: Dimensions.bar.verticalPadding - spacing: Dimensions.bar.spacing + spacing: Dimensions.bar.spacing - Pywal {} + Mpris {} + } - Pipewire {} + RowLayout { + id: rightbar - Caffeine {} + anchors.right: parent.right + anchors.verticalCenter: parent.verticalCenter - Network {} + anchors.rightMargin: Dimensions.bar.horizontalPadding + anchors.topMargin: Dimensions.bar.verticalPadding + anchors.bottomMargin: Dimensions.bar.verticalPadding - Bluetooth {} + spacing: Dimensions.bar.spacing - Storage {} + Pywal {} - Memory {} + Pipewire {} - Cpu {} + Caffeine {} - Gpu {} + Network {} - Clock {} + Bluetooth {} - Notifications {} + Storage {} + + Memory {} + + Cpu {} + + Gpu {} + + Clock {} + + Notifications {} + } } } } diff --git a/modules/powermenu/PowerMenu.qml b/modules/powermenu/PowerMenu.qml deleted file mode 100644 index a9f1533..0000000 --- a/modules/powermenu/PowerMenu.qml +++ /dev/null @@ -1,127 +0,0 @@ -pragma ComponentBehavior: Bound - -import qs.config -import qs.services -import qs.widgets -import Quickshell.Hyprland -import Quickshell.Io -import Quickshell.Wayland -import Quickshell.Widgets -import QtQuick -import QtQuick.Layouts - -StyledWindow { - id: root - name: "powermenu" - - visible: Visibility.powermenu - implicitWidth: rect.width - implicitHeight: rect.height - - WlrLayershell.layer: WlrLayer.Top - WlrLayershell.keyboardFocus: root.visible ? WlrKeyboardFocus.OnDemand : WlrKeyboardFocus.None - - Process { - id: process - } - - WrapperRectangle { - id: rect - - color: Theme.palette.base300 - margin: 14 - radius: 8 - - HyprlandFocusGrab { - active: Visibility.powermenu - windows: [root] - onCleared: { - Visibility.powermenu = false; - } - } - - StyledListView { - id: list - - Layout.fillWidth: true - - focus: Visibility.powermenu - Keys.onEscapePressed: event => { - event.accepted = true; - root.visible = false; - } - Keys.onEnterPressed: event => { - event.accepted = true; - console.log(list.currentItem.command); - } - Keys.onUpPressed: event => { - event.accepted = true; - list.decrementCurrentIndex(); - } - Keys.onDownPressed: event => { - event.accepted = true; - list.incrementCurrentIndex(); - } - - model: [ - { - text: "󰍃 Logout", - command: "hyprctl dispatch exit" - }, - { - text: "󰜉 Reboot", - command: "systemctl reboot" - }, - { - text: " Shutdown", - command: "systemctl poweroff" - } - ] - - spacing: 8 - - implicitWidth: 220 - implicitHeight: 185 - - highlightMoveDuration: 1000 - highlightResizeDuration: 0 - highlight: Rectangle { - radius: 8 - color: Theme.palette.primary - } - - onCurrentItemChanged: { - process.command = ["sh", "-c", list.currentItem.modelData.command]; - } - - delegate: StyledText { - id: button - required property var modelData - required property int index - - anchors.left: parent.left - anchors.right: parent.right - - MouseArea { - hoverEnabled: true - anchors.fill: button - onEntered: { - console.log("blyat"); - list.currentIndex = button.index; - } - onClicked: { - console.log(process.command); - process.running = true; - // process.startDetached(); - } - } - - padding: 16 - color: list.currentIndex == index ? Theme.palette.primarycontent : Theme.palette.basecontent - text: modelData.text - font.pixelSize: 18 - font.bold: true - } - } - } -} diff --git a/services/Visibility.qml b/services/Visibility.qml index 1e93a77..3015f7a 100644 --- a/services/Visibility.qml +++ b/services/Visibility.qml @@ -4,7 +4,6 @@ import qs.widgets import Quickshell Singleton { - property bool powermenu property StyledPopupWindow activePopup function togglePopup(popup: StyledPopupWindow) { diff --git a/shell.qml b/shell.qml index caf8510..6c722f8 100644 --- a/shell.qml +++ b/shell.qml @@ -2,11 +2,12 @@ import Quickshell import "modules" +import "modules/bar" ShellRoot { ReloadPopup {} - Shell {} + Bar {} Shortcuts {} } diff --git a/widgets/StyledText.qml b/widgets/StyledText.qml index eca51b9..a11a4ea 100644 --- a/widgets/StyledText.qml +++ b/widgets/StyledText.qml @@ -2,12 +2,6 @@ import qs.config import QtQuick Text { - font.family: Theme.fontFamily color: Theme.palette.basecontent - Behavior on color { - ColorAnimation { - duration: 200 - easing.type: Easing.InOutQuad - } - } + font.family: Theme.fontFamily }