mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
overview: no cursor warp for click-to-focus, add ws focus
This commit is contained in:
parent
e612abad23
commit
700b126a9e
2 changed files with 18 additions and 4 deletions
|
|
@ -5,6 +5,7 @@ import Qt5Compat.GraphicalEffects
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
|
|
@ -32,9 +33,10 @@ Item {
|
|||
property Component windowComponent: OverviewWindow {}
|
||||
property list<OverviewWindow> windowWidgets: []
|
||||
|
||||
// onWindowsChanged: {
|
||||
// console.log("Windows changed")
|
||||
// }
|
||||
Process {
|
||||
id: closeOverview
|
||||
command: ["bash", "-c", "qs ipc call overview close &"] // Somehow has to by async to work?
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: overviewBackground
|
||||
|
|
@ -69,6 +71,15 @@ Item {
|
|||
color: Appearance.colors.colLayer1 // TODO: reconsider this color for a cleaner look
|
||||
radius: Appearance.rounding.screenRounding * root.scale
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
onClicked: (event) => {
|
||||
closeOverview.running = true
|
||||
Hyprland.dispatch(`workspace ${workspace.workspaceValue}`)
|
||||
}
|
||||
}
|
||||
|
||||
StyledText {
|
||||
z: 9999
|
||||
anchors.left: parent.left
|
||||
|
|
|
|||
|
|
@ -80,10 +80,13 @@ Rectangle { // Window
|
|||
onExited: root.hovered = false
|
||||
onPressed: root.pressed = true
|
||||
onReleased: root.pressed = false
|
||||
onClicked: {
|
||||
onClicked: (event) => {
|
||||
if (windowData) {
|
||||
closeOverview.running = true
|
||||
Hyprland.dispatch(`keyword cursor:no_warps true`)
|
||||
Hyprland.dispatch(`focuswindow address:${windowData.address}`)
|
||||
Hyprland.dispatch(`keyword cursor:no_warps false`)
|
||||
event.accepted = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue