Compare commits
10 Commits
5eaf088e6d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
d5f8e91d91
|
|||
|
2b0a2f58bd
|
|||
|
2621f4a30a
|
|||
|
44756cbead
|
|||
|
846b558686
|
|||
|
57b5e8e2ef
|
|||
|
45e7f8d0bc
|
|||
|
4fc7f85983
|
|||
|
eed62014cc
|
|||
|
35f5e9d9fb
|
@@ -33,13 +33,7 @@ PanelWindow {
|
|||||||
// fullscreen windows.
|
// fullscreen windows.
|
||||||
WlrLayershell.layer: WlrLayer.Overlay
|
WlrLayershell.layer: WlrLayer.Overlay
|
||||||
|
|
||||||
Pill {
|
ColumnLayout {
|
||||||
Text {
|
|
||||||
text: "Ahhh"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
id: content
|
id: content
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|||||||
@@ -36,8 +36,10 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Pill {
|
Pill {
|
||||||
|
id: volume
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
anchors.right: music.left
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: 10
|
anchors.rightMargin: 10
|
||||||
Volume {}
|
Volume {}
|
||||||
}
|
}
|
||||||
@@ -45,7 +47,7 @@ PanelWindow {
|
|||||||
Pill {
|
Pill {
|
||||||
id: music
|
id: music
|
||||||
|
|
||||||
anchors.right: parent.right
|
anchors.right: volume.left
|
||||||
anchors.rightMargin: 10
|
anchors.rightMargin: 10
|
||||||
Music {
|
Music {
|
||||||
player: Mpris.players.values.find(e => e.identity == "Spotify")
|
player: Mpris.players.values.find(e => e.identity == "Spotify")
|
||||||
|
|||||||
31
bar/SystemTray.qml
Normal file
31
bar/SystemTray.qml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Quickshell
|
||||||
|
import Quickshell.Services.SystemTray
|
||||||
|
import Quickshell.Widgets
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
Repeater {
|
||||||
|
model: ScriptModel {
|
||||||
|
values: SystemTray.items.values.filter(e => e.status != Status.Passive)
|
||||||
|
}
|
||||||
|
|
||||||
|
IconImage {
|
||||||
|
required property SystemTrayItem modelData
|
||||||
|
|
||||||
|
width: 25
|
||||||
|
height: 15
|
||||||
|
|
||||||
|
source: modelData.icon
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: (event) => {
|
||||||
|
console.log( JSON.stringify(parent.modelData))
|
||||||
|
// parent.modelData.display(parent,0,0)
|
||||||
|
// menu.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,6 +5,7 @@ import QtQuick.Controls
|
|||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import "root:/singeltons"
|
import "root:/singeltons"
|
||||||
|
import "root:/utils"
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: root
|
id: root
|
||||||
@@ -20,10 +21,10 @@ PanelWindow {
|
|||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
||||||
WlrLayershell.layer: WlrLayer.Top
|
WlrLayershell.layer: WlrLayer.Top
|
||||||
|
|
||||||
IpcHandler {
|
CustomShortcut {
|
||||||
target: "launcher"
|
name: "openLauncher"
|
||||||
|
description: "Open launcher"
|
||||||
function open(): void {root.show = true; }
|
onPressed: {root.show = true; }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Main window
|
// Main window
|
||||||
@@ -64,6 +65,7 @@ PanelWindow {
|
|||||||
case (Qt.Key_Escape):
|
case (Qt.Key_Escape):
|
||||||
root.show = false
|
root.show = false
|
||||||
event.accepted = true
|
event.accepted = true
|
||||||
|
searchInput.clear()
|
||||||
break
|
break
|
||||||
case (Qt.Key_Return):
|
case (Qt.Key_Return):
|
||||||
case (Qt.Key_Enter):
|
case (Qt.Key_Enter):
|
||||||
@@ -73,6 +75,7 @@ PanelWindow {
|
|||||||
}
|
}
|
||||||
root.show = false
|
root.show = false
|
||||||
event.accepted = true
|
event.accepted = true
|
||||||
|
searchInput.clear()
|
||||||
break
|
break
|
||||||
case (Qt.Key_Down):
|
case (Qt.Key_Down):
|
||||||
case (Qt.Key_Tab):
|
case (Qt.Key_Tab):
|
||||||
|
|||||||
@@ -5,17 +5,18 @@ import QtQuick.Controls
|
|||||||
import Quickshell.Wayland
|
import Quickshell.Wayland
|
||||||
import Quickshell.Io
|
import Quickshell.Io
|
||||||
import "root:/singeltons"
|
import "root:/singeltons"
|
||||||
|
import "root:/utils"
|
||||||
|
|
||||||
PanelWindow {
|
PanelWindow {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property bool show: false
|
property bool show: false
|
||||||
property int selectedIndex: 0
|
property int selectedIndex: 0
|
||||||
property int buttonCount: 4
|
property int buttonCount: 5
|
||||||
|
|
||||||
|
|
||||||
implicitWidth: 600
|
implicitWidth: 600
|
||||||
implicitHeight: 400
|
implicitHeight: 150
|
||||||
visible: show
|
visible: show
|
||||||
focusable: true
|
focusable: true
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
@@ -23,32 +24,28 @@ PanelWindow {
|
|||||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
||||||
WlrLayershell.layer: WlrLayer.Top
|
WlrLayershell.layer: WlrLayer.Top
|
||||||
|
|
||||||
IpcHandler {
|
CustomShortcut {
|
||||||
target: "powermenu"
|
name: "openPowermenu"
|
||||||
|
description: "Open powermenu"
|
||||||
function open(): void {
|
onPressed: {root.show = true; }
|
||||||
root.selectedIndex = 0
|
|
||||||
root.show = true
|
|
||||||
}
|
|
||||||
|
|
||||||
function close(): void {
|
|
||||||
root.show = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function executeButton(index){
|
function executeButton(index){
|
||||||
switch (index){
|
switch (index){
|
||||||
case 0:
|
case 0:
|
||||||
console.log("0")
|
Quickshell.execDetached(["systemctl", "poweroff"])
|
||||||
break
|
break
|
||||||
case 1:
|
case 1:
|
||||||
console.log("1")
|
Quickshell.execDetached(["systemctl", "reboot"])
|
||||||
break
|
break
|
||||||
case 2:
|
case 2:
|
||||||
console.log("2")
|
Quickshell.execDetached(["loginctl", "lock-session"])
|
||||||
break
|
break
|
||||||
case 3:
|
case 3:
|
||||||
console.log("3")
|
Quickshell.execDetached(["hyprctl", "dispatch", "exit"])
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
Quickshell.execDetached(["sh", "-c", "boot-windows && systemctl reboot"])
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,6 +116,13 @@ PanelWindow {
|
|||||||
|
|
||||||
PowermenuButton {
|
PowermenuButton {
|
||||||
active: root.selectedIndex == 3
|
active: root.selectedIndex == 3
|
||||||
|
icon: ""
|
||||||
|
}
|
||||||
|
|
||||||
|
Item { Layout.fillWidth: true } // spacer
|
||||||
|
|
||||||
|
PowermenuButton {
|
||||||
|
active: root.selectedIndex == 4
|
||||||
icon: ""
|
icon: ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ Rectangle {
|
|||||||
property string icon: "?"
|
property string icon: "?"
|
||||||
|
|
||||||
color: active
|
color: active
|
||||||
? "#5b6078" // Hover/focus color
|
? "#5b6078"
|
||||||
: "#494d64" // Normal color
|
: "#494d64"
|
||||||
radius: 12
|
radius: 12
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|||||||
@@ -10,12 +10,13 @@ ShellRoot{
|
|||||||
//
|
//
|
||||||
// ActivateLinux {}
|
// ActivateLinux {}
|
||||||
// }
|
// }
|
||||||
//
|
|
||||||
Variants {
|
Variants {
|
||||||
model: Quickshell.screens
|
model: Quickshell.screens
|
||||||
|
|
||||||
StatusBar {}
|
StatusBar {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Launcher {}
|
Launcher {}
|
||||||
|
Powermenu {}
|
||||||
}
|
}
|
||||||
|
|||||||
5
utils/CustomShortcut.qml
Normal file
5
utils/CustomShortcut.qml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import Quickshell.Hyprland
|
||||||
|
|
||||||
|
GlobalShortcut {
|
||||||
|
appid: "quickshell"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user