Add terminal spawning quickshell config
This commit is contained in:
parent
6a824b8a58
commit
8364a3b9b9
9 changed files with 308 additions and 72 deletions
117
modules/user/modules/quickshell/shell/shell.qml
Normal file
117
modules/user/modules/quickshell/shell/shell.qml
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Wayland
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import ".."
|
||||
|
||||
ShellRoot {
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
Scope {
|
||||
property var modelData
|
||||
|
||||
PanelWindow {
|
||||
id: window
|
||||
|
||||
screen: modelData
|
||||
WlrLayershell.layer: WlrLayer.Background
|
||||
|
||||
anchors {
|
||||
top: true
|
||||
bottom: true
|
||||
left: true
|
||||
right: true
|
||||
}
|
||||
|
||||
color: "#111111"
|
||||
|
||||
BackgroundImage {
|
||||
anchors.fill: parent
|
||||
screen: window.screen
|
||||
}
|
||||
|
||||
SelectionLayer {
|
||||
id: selectionLayer
|
||||
|
||||
onSelectionComplete: (x, y, width, height) => {
|
||||
console.log(`selection complete: ${x} ${y} ${width} ${height}`)
|
||||
termSpawner.x = x
|
||||
termSpawner.y = y
|
||||
termSpawner.width = width
|
||||
termSpawner.height = height
|
||||
termSpawner.running = true
|
||||
}
|
||||
|
||||
Process {
|
||||
id: termSpawner
|
||||
property real x;
|
||||
property real y;
|
||||
property real width;
|
||||
property real height;
|
||||
|
||||
command: ["hyprctl", "dispatch", "exec", `[float;; noanim; move ${x} ${y}; size ${width} ${height}] alacritty`]
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: ShellIpc
|
||||
|
||||
function onTermSelectChanged() {
|
||||
|
||||
if (ShellIpc.termSelect) {
|
||||
selectionLayer.selectionArea.startSelection();
|
||||
} else {
|
||||
selectionLayer.selectionArea.endSelection();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SelectionArea {
|
||||
anchors.fill: parent
|
||||
screen: window.screen
|
||||
selectionArea: selectionLayer.selectionArea
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
PanelWindow {
|
||||
screen: modelData
|
||||
WlrLayershell.layer: WlrLayer.Overlay
|
||||
|
||||
anchors {
|
||||
right: true
|
||||
bottom: true
|
||||
}
|
||||
|
||||
margins {
|
||||
right: 50
|
||||
bottom: 50
|
||||
}
|
||||
|
||||
width: content.width
|
||||
height: content.height
|
||||
|
||||
color: "transparent"
|
||||
mask: Region {}
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
|
||||
Text {
|
||||
text: "Activate Linux"
|
||||
color: "#50ffffff"
|
||||
font.pointSize: 22
|
||||
}
|
||||
|
||||
Text {
|
||||
text: "Go to Settings to activate Linux"
|
||||
color: "#50ffffff"
|
||||
font.pointSize: 14
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue