This commit is contained in:
Hannes
2026-06-14 00:49:24 +02:00
parent 5c91cec113
commit 6ab83915a1
35 changed files with 550 additions and 486 deletions
+3 -4
View File
@@ -4,8 +4,7 @@ import Quickshell
import Quickshell.Io
import Quickshell.Wayland
import "../../colors"
import "../../states/wallpaperdir" as Global
import "../../config"
Variants {
id: root
@@ -33,7 +32,7 @@ Variants {
Keys.onPressed: event => {
if (event.key == Qt.Key_Escape) {
console.log("Pressed Escape, closing Wallpaper Picker")
console.log("Wallpaper Dir:", Global.WallpaperState.wallpaperDir)
console.log("Wallpaper Dir:", Config.wallpaperDir)
wlogoutLoader.active = false
} else {
for (let i = 0; i < buttons.length; i++) {
@@ -56,7 +55,7 @@ Variants {
Image {
anchors.fill: parent
source: Global.WallpaperState.wallpaperDir + "/Static/blurred.jpg"
source: Config.wallpaperDir + "/Static/blurred.jpg"
fillMode: Image.PreserveAspectCrop
}
+7 -6
View File
@@ -1,10 +1,11 @@
import QtQuick
import Quickshell
import "../../config"
ShellRoot {
WLogout {
LogoutButton {
command: Quickshell.env("HOME") + "/.config/quickshell/modules/wlogout/scripts/lock.sh"
command: Config.configDir + "/modules/wlogout/scripts/lock.sh"
keybind: Qt.Key_L
text: "Lock"
icon: "lock"
@@ -12,7 +13,7 @@ ShellRoot {
}
LogoutButton {
command: Quickshell.env("HOME") + "/.config/quickshell/modules/wlogout/scripts/logout.sh"
command: Config.configDir + "/modules/wlogout/scripts/logout.sh"
keybind: Qt.Key_E
text: "Logout"
icon: "logout"
@@ -20,7 +21,7 @@ ShellRoot {
}
LogoutButton {
command: Quickshell.env("HOME") + "/.config/quickshell/modules/wlogout/scripts/suspend.sh"
command: Config.configDir + "/modules/wlogout/scripts/suspend.sh"
keybind: Qt.Key_U
text: "Suspend"
icon: "suspend"
@@ -28,7 +29,7 @@ ShellRoot {
}
LogoutButton {
command: Quickshell.env("HOME") + "/.config/quickshell/modules/wlogout/scripts/hibernate.sh"
command: Config.configDir + "/modules/wlogout/scripts/hibernate.sh"
keybind: Qt.Key_H
text: "Hibernate"
icon: "hibernate"
@@ -36,7 +37,7 @@ ShellRoot {
}
LogoutButton {
command: Quickshell.env("HOME") + "/.config/quickshell/modules/wlogout/scripts/shutdown.sh"
command: Config.configDir + "/modules/wlogout/scripts/shutdown.sh"
keybind: Qt.Key_K
text: "Shutdown"
icon: "shutdown"
@@ -44,7 +45,7 @@ ShellRoot {
}
LogoutButton {
command: Quickshell.env("HOME") + "/.config/quickshell/modules/wlogout/scripts/reboot.sh"
command: Config.configDir + "/modules/wlogout/scripts/reboot.sh"
keybind: Qt.Key_R
text: "Reboot"
icon: "reboot"
+2 -18
View File
@@ -2,27 +2,12 @@ import QtQuick
import Quickshell
import Quickshell.Hyprland
import Quickshell.Io
import "../../states/wallpaperdir" as Global
import "../../config"
Item { // container, invisible
id: wlLoader
Process {
id: getWallpaper
command: ["sh", "-c", Quickshell.env("HOME") + "/.config/quickshell/scripts/wallpaper_dir.sh"]
stdout: StdioCollector {
onStreamFinished: function() {
console.log("getWallpaper: " + this.text)
Global.WallpaperState.wallpaperDir = this.text.trim()
wlogoutLoader.active = true
}
}
}
Loader {
id: wlogoutLoader
active: false
@@ -37,8 +22,7 @@ Item { // container, invisible
onPressed: {
console.log("Pressed Meta+Shift+W (Hyprland global shortcut)")
getWallpaper.running = true
// wlogoutLoader.active = !wlogoutLoader.active
wlogoutLoader.active = !wlogoutLoader.active
}
}