Compare commits
7 Commits
4fc7f85983
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
d5f8e91d91
|
|||
|
2b0a2f58bd
|
|||
|
2621f4a30a
|
|||
|
44756cbead
|
|||
|
846b558686
|
|||
|
57b5e8e2ef
|
|||
|
45e7f8d0bc
|
@@ -36,8 +36,10 @@ PanelWindow {
|
||||
}
|
||||
|
||||
Pill {
|
||||
id: volume
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: music.left
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 10
|
||||
Volume {}
|
||||
}
|
||||
@@ -45,21 +47,10 @@ PanelWindow {
|
||||
Pill {
|
||||
id: music
|
||||
|
||||
anchors.right: tray.left
|
||||
anchors.right: volume.left
|
||||
anchors.rightMargin: 10
|
||||
Music {
|
||||
player: Mpris.players.values.find(e => e.identity == "Spotify")
|
||||
}
|
||||
}
|
||||
|
||||
// Pill {
|
||||
// id: tray
|
||||
//
|
||||
// anchors.right: parent.right
|
||||
// anchors.rightMargin: 10
|
||||
//
|
||||
// SystemTray {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import QtQuick.Controls
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Io
|
||||
import "root:/singeltons"
|
||||
import "root:/utils"
|
||||
|
||||
PanelWindow {
|
||||
id: root
|
||||
@@ -20,10 +21,10 @@ PanelWindow {
|
||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
|
||||
IpcHandler {
|
||||
target: "launcher"
|
||||
|
||||
function open(): void {root.show = true; }
|
||||
CustomShortcut {
|
||||
name: "openLauncher"
|
||||
description: "Open launcher"
|
||||
onPressed: {root.show = true; }
|
||||
}
|
||||
|
||||
// Main window
|
||||
@@ -64,6 +65,7 @@ PanelWindow {
|
||||
case (Qt.Key_Escape):
|
||||
root.show = false
|
||||
event.accepted = true
|
||||
searchInput.clear()
|
||||
break
|
||||
case (Qt.Key_Return):
|
||||
case (Qt.Key_Enter):
|
||||
@@ -73,6 +75,7 @@ PanelWindow {
|
||||
}
|
||||
root.show = false
|
||||
event.accepted = true
|
||||
searchInput.clear()
|
||||
break
|
||||
case (Qt.Key_Down):
|
||||
case (Qt.Key_Tab):
|
||||
|
||||
@@ -5,6 +5,7 @@ import QtQuick.Controls
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Io
|
||||
import "root:/singeltons"
|
||||
import "root:/utils"
|
||||
|
||||
PanelWindow {
|
||||
id: root
|
||||
@@ -23,43 +24,28 @@ PanelWindow {
|
||||
WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive
|
||||
WlrLayershell.layer: WlrLayer.Top
|
||||
|
||||
IpcHandler {
|
||||
target: "powermenu"
|
||||
|
||||
function open(): void {
|
||||
root.selectedIndex = 0
|
||||
root.show = true
|
||||
}
|
||||
|
||||
function close(): void {
|
||||
root.show = false
|
||||
}
|
||||
CustomShortcut {
|
||||
name: "openPowermenu"
|
||||
description: "Open powermenu"
|
||||
onPressed: {root.show = true; }
|
||||
}
|
||||
|
||||
function executeButton(index){
|
||||
switch (index){
|
||||
case 0:
|
||||
console.log("0")
|
||||
// systemctl poweroff
|
||||
Quickshell.execDetached(["systemctl", "poweroff"])
|
||||
break
|
||||
case 1:
|
||||
console.log("1")
|
||||
// systemctl reboot
|
||||
Quickshell.execDetached(["systemctl", "reboot"])
|
||||
break
|
||||
case 2:
|
||||
console.log("2")
|
||||
// loginctl lock-session
|
||||
Quickshell.execDetached(["loginctl", "lock-session"])
|
||||
break
|
||||
case 3:
|
||||
console.log("3")
|
||||
// if [[ "$XDG_CURRENT_DESKTOP" == 'Hyprland' ]]; then
|
||||
// ${pkgs.hyprland}/bin/hyprctl dispatch exit
|
||||
// fi
|
||||
Quickshell.execDetached(["hyprctl", "dispatch", "exit"])
|
||||
break
|
||||
case 4:
|
||||
console.log("4")
|
||||
// boot-windows
|
||||
// systemctl reboot
|
||||
Quickshell.execDetached(["sh", "-c", "boot-windows && systemctl reboot"])
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
10
shell.qml
10
shell.qml
@@ -5,11 +5,11 @@ import "./bar"
|
||||
import "./launcher/"
|
||||
|
||||
ShellRoot{
|
||||
Variants{
|
||||
model: Quickshell.screens
|
||||
|
||||
ActivateLinux {}
|
||||
}
|
||||
// Variants{
|
||||
// model: Quickshell.screens
|
||||
//
|
||||
// ActivateLinux {}
|
||||
// }
|
||||
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
||||
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