quickshell lets gooo
This commit is contained in:
75
dots/quickshell/modules/bar/popouts/ActiveWindow.qml
Normal file
75
dots/quickshell/modules/bar/popouts/ActiveWindow.qml
Normal file
@@ -0,0 +1,75 @@
|
||||
import "root:/widgets"
|
||||
import "root:/services"
|
||||
import "root:/utils"
|
||||
import "root:/config"
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Wayland
|
||||
import QtQuick
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
implicitWidth: Hyprland.activeClient ? child.implicitWidth : -Appearance.padding.large * 2
|
||||
implicitHeight: child.implicitHeight
|
||||
|
||||
Column {
|
||||
id: child
|
||||
|
||||
anchors.centerIn: parent
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
Row {
|
||||
id: detailsRow
|
||||
|
||||
spacing: Appearance.spacing.normal
|
||||
|
||||
IconImage {
|
||||
id: icon
|
||||
|
||||
implicitSize: details.implicitHeight
|
||||
source: Icons.getAppIcon(Hyprland.activeClient?.wmClass ?? "", "image-missing")
|
||||
}
|
||||
|
||||
Column {
|
||||
id: details
|
||||
|
||||
StyledText {
|
||||
text: Hyprland.activeClient?.title ?? ""
|
||||
font.pointSize: Appearance.font.size.normal
|
||||
|
||||
elide: Text.ElideRight
|
||||
width: preview.implicitWidth - icon.implicitWidth - detailsRow.spacing
|
||||
}
|
||||
|
||||
StyledText {
|
||||
text: Hyprland.activeClient?.wmClass ?? ""
|
||||
color: Colours.palette.m3onSurfaceVariant
|
||||
|
||||
elide: Text.ElideRight
|
||||
width: preview.implicitWidth - icon.implicitWidth - detailsRow.spacing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ClippingWrapperRectangle {
|
||||
color: "transparent"
|
||||
radius: Appearance.rounding.small
|
||||
|
||||
ScreencopyView {
|
||||
id: preview
|
||||
|
||||
captureSource: Hyprland.activeClient ? ToplevelManager.activeToplevel : null
|
||||
live: visible
|
||||
|
||||
constraintSize.width: Config.bar.sizes.windowPreviewSize
|
||||
constraintSize.height: Config.bar.sizes.windowPreviewSize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
component Anim: NumberAnimation {
|
||||
duration: Appearance.anim.durations.normal
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Appearance.anim.curves.emphasized
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user