fixes waybar, adds quickshell
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
// modules/WindowTitleWidget.qml - hyprland/window equivalent
|
||||
import QtQuick
|
||||
import Quickshell.Hyprland
|
||||
import ".."
|
||||
|
||||
Pill {
|
||||
id: root
|
||||
required property var screen
|
||||
|
||||
property string title: {
|
||||
var ws = Hyprland.focusedWorkspace
|
||||
if (!ws) return ""
|
||||
var win = ws.lastWindow
|
||||
if (!win) return ""
|
||||
var t = win.title ?? ""
|
||||
return t.length > 60 ? t.substring(0, 60) + "..." : t
|
||||
}
|
||||
|
||||
visible: title !== ""
|
||||
|
||||
Text {
|
||||
text: root.title
|
||||
font { family: Theme.fontSans; pixelSize: Theme.fontSize }
|
||||
color: Theme.foreground
|
||||
elide: Text.ElideRight
|
||||
maximumLineCount: 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user