Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikReider authored May 3, 2024
2 parents edcbb9f + 931bea2 commit 098072e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 6 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,19 @@ These widgets can be customized, added, removed and even reordered

## Install

### Alpine Linux

```zsh
apk add swaync
````

### Arch

The package is available on the AUR:
```zsh
sudo pacman -S swaync
```

- [swaync](https://aur.archlinux.org/packages/swaync/)
- [swaync-git](https://aur.archlinux.org/packages/swaync-git/)
Alternatively, [swaync-git](https://aur.archlinux.org/packages/swaync-git/) is available on the AUR.

### Fedora

Expand Down
4 changes: 2 additions & 2 deletions src/configSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@
"default": 12
},
"blur": {
"type": "bool",
"type": "boolean",
"description": "Appy the artwork as the MPRIS background and blur it",
"default": true
}
Expand Down Expand Up @@ -446,7 +446,7 @@
"default": ""
},
"active": {
"type": "bool",
"type": "boolean",
"description": "Wether the toggle button is active as default or not",
"default": false
}
Expand Down
18 changes: 17 additions & 1 deletion src/controlCenter/widgets/mpris/mpris_player.vala
Original file line number Diff line number Diff line change
Expand Up @@ -380,12 +380,28 @@ namespace SwayNotificationCenter.Widgets.Mpris {
if (desktop_entry is DesktopAppInfo) {
icon = desktop_entry.get_icon ();
}
Gtk.IconInfo ? icon_info = null;
if (icon != null) {
album_art.set_from_gicon (icon, Gtk.IconSize.INVALID);
icon_info = Gtk.IconTheme.get_default ().lookup_by_gicon (icon,
mpris_config.image_size,
Gtk.IconLookupFlags.USE_BUILTIN);
} else {
// Default icon
album_art.set_from_icon_name ("audio-x-generic-symbolic",
string icon_name = "audio-x-generic-symbolic";
album_art.set_from_icon_name (icon_name,
Gtk.IconSize.INVALID);
icon_info = Gtk.IconTheme.get_default ().lookup_icon (icon_name,
mpris_config.image_size,
Gtk.IconLookupFlags.USE_BUILTIN);
}

if (icon_info != null) {
try {
this.album_art_pixbuf = icon_info.load_icon ();
} catch (Error e) {
warning ("Could not load icon: %s", e.message);
}
}
}

Expand Down

0 comments on commit 098072e

Please sign in to comment.