Skip to content

Commit

Permalink
Update bar.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
koeqaife authored Jun 24, 2024
1 parent 8b9940b commit 9fd3413
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ags/modules/bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ function Wifi() {


function MediaPlayer() {
const metadata = mpris.players[0]?.metadata;
let metadata = mpris.players[0]?.metadata;
const button = Widget.Button({
class_name: "filled_tonal_button awesome_icon",
on_primary_click: () => {
Expand All @@ -240,6 +240,7 @@ function MediaPlayer() {
}).hook(mpris, self => {
if (mpris.players.length > 0) {
self.visible = true;
metadata = mpris.players[0]?.metadata;
if (metadata)
self.tooltip_text = `${metadata["xesam:artist"]} - ${metadata["xesam:title"]}`;
} else {
Expand All @@ -251,6 +252,7 @@ function MediaPlayer() {
return button
}


function KeyboardLayout() {
const widget = Widget.Label({
class_name: "keyboard",
Expand Down

0 comments on commit 9fd3413

Please sign in to comment.