Compare commits
5 commits
6027d0bbff
...
1c034a3904
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1c034a3904 | ||
|
|
57bfd55094 | ||
|
|
5a4709fe95 | ||
|
|
99f7068956 | ||
|
|
d4ebfbd767 |
7 changed files with 25 additions and 89 deletions
14
modules/Shortcuts.qml
Normal file
14
modules/Shortcuts.qml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import Quickshell
|
||||
import "../widget/"
|
||||
|
||||
Scope {
|
||||
id: root
|
||||
|
||||
LuxShortcut {
|
||||
name: 'launcher'
|
||||
description: 'Open the application launcher'
|
||||
onPressed: {
|
||||
console.log("Launcher shortcut pressed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import "../../styled/"
|
||||
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
StyledWindow {
|
||||
id: background
|
||||
|
||||
required property ShellScreen modelData
|
||||
|
||||
screen: modelData
|
||||
name: "background"
|
||||
WlrLayershell.exclusionMode: ExclusionMode.Ignore
|
||||
WlrLayershell.layer: WlrLayer.Background
|
||||
color: "black"
|
||||
|
||||
anchors.top: true
|
||||
anchors.bottom: true
|
||||
anchors.left: true
|
||||
anchors.right: true
|
||||
|
||||
Image {
|
||||
id: wallpaper
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
opacity: 1
|
||||
|
||||
source: "/home/baobeld/Wallpapers/bailey-zindel-NRQV-hBF10M-unsplash.jpg"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -10,33 +10,25 @@ StyledPopupWindow {
|
|||
id: window
|
||||
|
||||
backgroundColor: Theme.palette.base300
|
||||
margins: 8
|
||||
radius: 8
|
||||
|
||||
property QsMenuOpener menuOpener
|
||||
|
||||
content: ColumnLayout {
|
||||
id: menu
|
||||
|
||||
anchors.margins: 30
|
||||
|
||||
spacing: 8
|
||||
Repeater {
|
||||
id: repeater
|
||||
model: window.menuOpener.children
|
||||
delegate: Loader {
|
||||
id: loader
|
||||
|
||||
required property QsMenuEntry modelData
|
||||
required property int index
|
||||
|
||||
active: true
|
||||
|
||||
opacity: 0
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.minimumWidth: 120
|
||||
|
||||
sourceComponent: modelData.isSeparator ? menuSeperator : menuItem
|
||||
property Component menuSeperator: Rectangle {
|
||||
implicitWidth: menu.width
|
||||
implicitHeight: 2
|
||||
|
||||
color: Theme.palette.base100
|
||||
|
|
@ -44,45 +36,6 @@ StyledPopupWindow {
|
|||
property Component menuItem: MenuItem {
|
||||
menuEntry: modelData
|
||||
}
|
||||
|
||||
states: State {
|
||||
name: "opened"
|
||||
when: window.opened
|
||||
PropertyChanges {
|
||||
loader {
|
||||
opacity: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
transitions: [
|
||||
Transition {
|
||||
from: ""
|
||||
to: "opened"
|
||||
SequentialAnimation {
|
||||
PauseAnimation {
|
||||
duration: (repeater.count / root.animationDuration) * loader.index
|
||||
}
|
||||
NumberAnimation {
|
||||
property: "opacity"
|
||||
duration: 100
|
||||
}
|
||||
}
|
||||
},
|
||||
Transition {
|
||||
from: "opened"
|
||||
to: ""
|
||||
SequentialAnimation {
|
||||
PauseAnimation {
|
||||
duration: 15 * (repeater.count - loader.index)
|
||||
}
|
||||
NumberAnimation {
|
||||
property: "opacity"
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import Quickshell
|
||||
import "../../../../../config/"
|
||||
import "../../../../../styled/"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import Quickshell
|
||||
import "modules/background"
|
||||
import "modules"
|
||||
import "modules/bar"
|
||||
|
||||
ShellRoot {
|
||||
ReloadPopup {}
|
||||
|
||||
// Background {}
|
||||
Bar {}
|
||||
|
||||
Shortcuts {}
|
||||
}
|
||||
|
|
|
|||
5
widget/LuxShortcut.qml
Normal file
5
widget/LuxShortcut.qml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import Quickshell.Hyprland
|
||||
|
||||
GlobalShortcut {
|
||||
appid: "lux"
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue