Improve hover behaviour, make font configurable, adjust overview
This commit is contained in:
+45
-8
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Widgets
|
||||
@@ -16,7 +17,7 @@ Grid {
|
||||
horizontalItemAlignment: Grid.AlignHCenter
|
||||
verticalItemAlignment: Grid.AlignVCenter
|
||||
onVisibleChanged: {
|
||||
if (!visible) return
|
||||
if (!visible) return;
|
||||
Hyprland.refreshToplevels()
|
||||
}
|
||||
component WorkspaceView: ClippingRectangle {
|
||||
@@ -52,20 +53,56 @@ Grid {
|
||||
}
|
||||
Repeater {
|
||||
model: Hyprland.toplevels.values.filter(tl => tl.workspace?.id == modelData + 1)
|
||||
delegate: ClippingRectangle {
|
||||
x: modelData.lastIpcObject.at[0] * workspaceView.widthRatio - 2
|
||||
y: modelData.lastIpcObject.at[1] * workspaceView.widthRatio - 2
|
||||
width: modelData.lastIpcObject.size[0] * workspaceView.widthRatio
|
||||
height: modelData.lastIpcObject.size[1] * workspaceView.widthRatio
|
||||
delegate: Item {
|
||||
x: modelData.lastIpcObject.at?.[0] * workspaceView.widthRatio - 2
|
||||
y: modelData.lastIpcObject.at?.[1] * workspaceView.widthRatio - 2
|
||||
width: modelData.lastIpcObject.size?.[0] * workspaceView.widthRatio
|
||||
height: modelData.lastIpcObject.size?.[1] * workspaceView.widthRatio
|
||||
ScreencopyView {
|
||||
anchors.fill: parent
|
||||
captureSource: modelData.wayland
|
||||
live: overview.visible
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
blurEnabled: true
|
||||
blurMax: 8
|
||||
blur: 1
|
||||
autoPaddingEnabled: false
|
||||
}
|
||||
}
|
||||
Image {
|
||||
id: appicon
|
||||
anchors.centerIn: parent
|
||||
width: 36
|
||||
height: width
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
source: {
|
||||
const appId = modelData.wayland?.appId
|
||||
const iconName = DesktopEntries.applications.values.find(
|
||||
app => app.startupClass === appId || app.id === appId
|
||||
)?.icon;
|
||||
return Quickshell.iconPath(iconName)
|
||||
}
|
||||
layer.enabled: true
|
||||
visible: false
|
||||
}
|
||||
MultiEffect {
|
||||
anchors.fill: appicon
|
||||
source: appicon
|
||||
blurMax: 12
|
||||
shadowEnabled: true
|
||||
}
|
||||
MultiEffect {
|
||||
anchors.fill: appicon
|
||||
source: appicon
|
||||
blurMax: 12
|
||||
shadowEnabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
TapHandler { onTapped: {
|
||||
if (modelData < 0) return
|
||||
if (modelData < 0) return;
|
||||
Hyprland.dispatch(`hl.dsp.focus({workspace = ${modelData + 1}})`)
|
||||
root.close()
|
||||
}}
|
||||
@@ -80,7 +117,7 @@ Grid {
|
||||
bottomRightRadius: 12
|
||||
TapHandler {
|
||||
onTapped: {
|
||||
Hyprland.dispatch(`hl.dsp.workspace.toggle_special()`)
|
||||
Hyprland.dispatch('hl.dsp.workspace.toggle_special()')
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user