diff options
| -rw-r--r-- | packages.txt | 1 | ||||
| -rw-r--r-- | quickshell/.config/quickshell/shell.qml | 10 |
2 files changed, 6 insertions, 5 deletions
diff --git a/packages.txt b/packages.txt index f804104..c6a5707 100644 --- a/packages.txt +++ b/packages.txt @@ -43,6 +43,7 @@ cmake ninja clang gcc +musl rust go zig diff --git a/quickshell/.config/quickshell/shell.qml b/quickshell/.config/quickshell/shell.qml index 1281878..a64a472 100644 --- a/quickshell/.config/quickshell/shell.qml +++ b/quickshell/.config/quickshell/shell.qml @@ -62,6 +62,7 @@ PanelWindow { // ║ 🏢 CENTER: WORKSPACES ║ // ╚══════════════════════════════════════════════════════════════╝ RowLayout { + id: workspacesRow anchors.centerIn: parent spacing: 12 @@ -257,6 +258,7 @@ PanelWindow { // ── 🪟 Window Title ─────────────────────────────────────── Rectangle { + id: windowModule color: root.bg2 Layout.fillHeight: true implicitWidth: windowRow.implicitWidth + 16 @@ -278,11 +280,9 @@ PanelWindow { color: root.fg font.family: "Source Code Pro" font.pixelSize: 14 - text: { - var title = Hyprland.activeToplevel?.title ?? "" - if (title.length > 50) return title.substring(0, 47) + "..." - return title - } + property string fullTitle: Hyprland.activeToplevel?.title ?? "" + property int maxChars: Math.max(5, Math.floor((workspacesRow.x - windowModule.x - 80) / 8)) + text: fullTitle.length > maxChars ? fullTitle.substring(0, maxChars - 3) + "..." : fullTitle } } } |
