✨ chore: lots of improvements, exec apps with uwsm if in usage
also, started using `AstalWp.Endpoint.description` instead of the `name` property when showing device names, thanks to @NotMephisto in #9
This commit is contained in:
@@ -3,17 +3,15 @@ import { Gtk, Widget } from "astal/gtk3";
|
||||
import AstalMpris from "gi://AstalMpris";
|
||||
import { Separator, SeparatorProps } from "../Separator";
|
||||
import { Windows } from "../../windows";
|
||||
import { Clipboard } from "../../scripts/clipboard";
|
||||
|
||||
|
||||
const playerIcons = {
|
||||
spotify: "spotify-symbolic",
|
||||
mpv: "mpv-symbolic",
|
||||
Clapper: "com.github.rafostar.Clapper-symbolic"
|
||||
}
|
||||
};
|
||||
|
||||
export function Media(): Gtk.Widget {
|
||||
|
||||
const connections: Array<number> = [];
|
||||
|
||||
const mediaControlsRevealer: Widget.Revealer = new Widget.Revealer({
|
||||
@@ -32,11 +30,9 @@ export function Media(): Gtk.Widget {
|
||||
icon: "edit-paste-symbolic"
|
||||
} as Widget.IconProps),
|
||||
tooltipText: "Copy link to Clipboard",
|
||||
visible: bind(players[0], "metadata").as((meta) =>
|
||||
Boolean(meta["xesam:url"]?.get_string()[0])),
|
||||
onClick: () => Clipboard.getDefault().copyAsync(
|
||||
players[0].metadata["xesam:url"].get_string()[0]
|
||||
)
|
||||
visible: bind(players[0], "metadata").as((metadata) =>
|
||||
metadata["xesam:url"]?.get_string()[0] != null),
|
||||
onClick: () => console.log(players[0].metadata["xesam:url"]?.get_string()[0]!)
|
||||
} as Widget.ButtonProps),
|
||||
new Widget.Button({
|
||||
className: "previous",
|
||||
|
||||
Reference in New Issue
Block a user