diff --git a/.config/ags/modules/bar/normal/music.js b/.config/ags/modules/bar/normal/music.js index a14efa74..bef38e79 100644 --- a/.config/ags/modules/bar/normal/music.js +++ b/.config/ags/modules/bar/normal/music.js @@ -133,18 +133,18 @@ export default () => { ] })] }); - const trackTitle = Scrollable({ + const trackTitle = Label({ hexpand: true, - child: Label({ - className: 'txt-smallie txt-onSurfaceVariant', - setup: (self) => self.hook(Mpris, label => { - const mpris = Mpris.getPlayer(''); - if (mpris) - label.label = `${trimTrackTitle(mpris.trackTitle)} • ${mpris.trackArtists.join(', ')}`; - else - label.label = 'No media'; - }), - }) + className: 'txt-smallie txt-onSurfaceVariant', + truncate: 'end', + maxWidthChars: 10, // Doesn't matter, just needs to be non negative + setup: (self) => self.hook(Mpris, label => { + const mpris = Mpris.getPlayer(''); + if (mpris) + label.label = `${trimTrackTitle(mpris.trackTitle)} • ${mpris.trackArtists.join(', ')}`; + else + label.label = 'No media'; + }), }) const musicStuff = Box({ className: 'spacing-h-10', diff --git a/.config/ags/modules/bar/normal/spaceleft.js b/.config/ags/modules/bar/normal/spaceleft.js index 4f43189a..47529779 100644 --- a/.config/ags/modules/bar/normal/spaceleft.js +++ b/.config/ags/modules/bar/normal/spaceleft.js @@ -14,6 +14,8 @@ const WindowTitle = async () => { children: [ Widget.Label({ xalign: 0, + truncate: 'end', + maxWidthChars: 10, // Doesn't matter, just needs to be non negative className: 'txt-smaller bar-topdesc txt', setup: (self) => self.hook(Hyprland.active.client, label => { // Hyprland.active.client label.label = Hyprland.active.client.class.length === 0 ? 'Desktop' : Hyprland.active.client.class; @@ -21,6 +23,8 @@ const WindowTitle = async () => { }), Widget.Label({ xalign: 0, + truncate: 'end', + maxWidthChars: 10, // Doesn't matter, just needs to be non negative className: 'txt txt-smallie', setup: (self) => self.hook(Hyprland.active.client, label => { // Hyprland.active.client label.label = Hyprland.active.client.title.length === 0 ? `Workspace ${Hyprland.active.workspace.id}` : Hyprland.active.client.title;