Move notificationswapper to common, change defaul wrap mode

This commit is contained in:
2025-10-10 20:24:51 -03:00
parent 92a3907b8f
commit f69518aec4
5 changed files with 90 additions and 69 deletions

View File

@@ -4,9 +4,10 @@ import Quickshell
import Quickshell.Hyprland
import Quickshell.Wayland
import Quickshell.Io
import qs.Common
Singleton {
id:root
id: root
readonly property string hyprlandSignature: Quickshell.env("HYPRLAND_INSTANCE_SIGNATURE")
@@ -93,32 +94,32 @@ Singleton {
return workspaceDesktopEntries;
}
Socket {
path: `${Quickshell.env("XDG_RUNTIME_DIR")}/hypr/${Quickshell.env("HYPRLAND_INSTANCE_SIGNATURE")}/.socket2.sock`
connected: true
Socket {
path: `${Quickshell.env("XDG_RUNTIME_DIR")}/hypr/${Quickshell.env("HYPRLAND_INSTANCE_SIGNATURE")}/.socket2.sock`
connected: true
parser: SplitParser {
property var fullscreenRegex: new RegExp("fullscreen>>.");
parser: SplitParser {
property var fullscreenRegex: new RegExp("fullscreen>>.")
property var screencastRegex: new RegExp("screencast>>.*")
onRead: msg => {
let match = fullscreenRegex.exec(msg);
if (match != null) {
if(msg.split(">>")[1] === "1") {
root.hasFullscreen = true
onRead: msg => {
let match = fullscreenRegex.exec(msg);
if (match != null) {
if (msg.split(">>")[1] === "1") {
root.hasFullscreen = true;
} else {
root.hasFullscreen = false
root.hasFullscreen = false;
}
}
match = screencastRegex.exec(msg);
if (match != null) {
if(msg.split(">>")[1].split(',')[0] === "1") {
root.isScreencasting = true
}
match = screencastRegex.exec(msg);
if (match != null) {
if (msg.split(">>")[1].split(',')[0] === "1") {
root.isScreencasting = true;
} else {
root.isScreencasting = false
root.isScreencasting = false;
}
}
}
}
}
}
}
}
}
}