forked from Shinonome/dots-hyprland
add bg, taskbar items
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
pragma ComponentBehavior: Bound
|
||||
|
||||
import qs
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.common.widgets
|
||||
import qs.modules.common.widgets.widgetCanvas
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
|
||||
import qs.modules.ii.background.widgets
|
||||
import qs.modules.ii.background.widgets.clock
|
||||
import qs.modules.ii.background.widgets.weather
|
||||
|
||||
Variants {
|
||||
id: root
|
||||
model: Quickshell.screens
|
||||
|
||||
PanelWindow {
|
||||
id: panelRoot
|
||||
required property var modelData
|
||||
|
||||
screen: modelData
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
WlrLayershell.layer: WlrLayer.Bottom
|
||||
WlrLayershell.namespace: "quickshell:background"
|
||||
anchors {
|
||||
top: true
|
||||
bottom: true
|
||||
left: true
|
||||
right: true
|
||||
}
|
||||
color: "transparent"
|
||||
|
||||
StyledImage {
|
||||
anchors.fill: parent
|
||||
source: Config.options.background.wallpaperPath
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
AppButton {
|
||||
id: root
|
||||
|
||||
required property var toplevel
|
||||
readonly property bool isSeparator: toplevel.appId === "SEPARATOR"
|
||||
readonly property var desktopEntry: DesktopEntries.heuristicLookup(toplevel.appId)
|
||||
|
||||
Layout.fillHeight: true
|
||||
|
||||
iconName: toplevel.appId
|
||||
}
|
||||
@@ -10,6 +10,7 @@ AppButton {
|
||||
id: root
|
||||
|
||||
iconName: "task-view"
|
||||
separateLightDark: true
|
||||
|
||||
checked: GlobalStates.overviewOpen
|
||||
onClicked: {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
Layout.fillHeight: true
|
||||
implicitHeight: row.implicitHeight
|
||||
implicitWidth: row.implicitWidth
|
||||
|
||||
// Apps row
|
||||
RowLayout {
|
||||
id: row
|
||||
anchors.fill: parent
|
||||
spacing: 4
|
||||
|
||||
Repeater {
|
||||
model: ScriptModel {
|
||||
objectProp: "appId"
|
||||
values: TaskbarApps.apps.filter(app => app.appId !== "SEPARATOR")
|
||||
}
|
||||
delegate: TaskAppButton {
|
||||
required property var modelData
|
||||
toplevel: modelData
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Previews popup
|
||||
}
|
||||
@@ -23,7 +23,7 @@ Scope {
|
||||
screen: modelData
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
exclusiveZone: implicitHeight
|
||||
WlrLayershell.namespace: "quickshell:wBar"
|
||||
WlrLayershell.namespace: "quickshell:bar"
|
||||
|
||||
anchors {
|
||||
left: true
|
||||
|
||||
@@ -57,6 +57,7 @@ Rectangle {
|
||||
StartButton {}
|
||||
SearchButton {}
|
||||
TaskViewButton {}
|
||||
Tasks {}
|
||||
}
|
||||
|
||||
BarGroupRow {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import org.kde.kirigami as Kirigami
|
||||
import qs
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
@@ -13,6 +14,11 @@ AppButton {
|
||||
implicitWidth: expandedForm ? 148 : (height - topInset - bottomInset + leftInset + rightInset)
|
||||
iconName: "widgets"
|
||||
|
||||
checked: GlobalStates.sidebarLeftOpen
|
||||
onClicked: {
|
||||
GlobalStates.sidebarLeftOpen = !GlobalStates.sidebarLeftOpen
|
||||
}
|
||||
|
||||
contentItem: Item {
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
@@ -29,11 +35,20 @@ AppButton {
|
||||
horizontalCenter: root.expandedForm ? undefined : parent.horizontalCenter
|
||||
margins: 8
|
||||
}
|
||||
spacing: 6
|
||||
|
||||
AppIcon {
|
||||
id: iconWidget
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
iconName: root.iconName
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
WText {
|
||||
text: Translation.tr("Widgets")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user