Compare commits

..
6 Commits
Author SHA1 Message Date
Ansho Rei d90191618d fix: centre the logo on the login screen 2026-11-04 13:05:46 +01:00
Ansho Rei 936e28b483 feat: add an Exit button to the login screen
The login screen could only be left with Ctrl+Q, which a gamepad cannot
press. Exit sits below Connect as the last focus stop and goes through
Action::Quit.
2026-11-04 13:05:45 +01:00
Ansho Rei 62169be746 feat: keep the screensaver off while music is playing
Holds org.freedesktop.ScreenSaver.Inhibit, the call Electron apps
such as VacuumTube use to stay awake in Steam's Game Mode, and the
XDG portal's idle inhibit, from play until pause, stop or quit.
zbus 6 cannot connect through Flatpak's D-Bus proxy, so this uses
zbus 5.
2026-11-04 12:57:14 +01:00
Ansho Rei 5a2386e817 build: add make publish to release a version on Gitea with its bundle
Releases on Gitea had nothing to install, so getting remus onto a Steam
machine meant building the bundle and copying it across by hand. After
a bump and a push with tags, make publish builds the Flatpak bundle for
the tagged commit and creates the release, with the changelog entry as
its notes and remus-X.Y.Z.flatpak attached.

Every check runs before the slow build: a clean tree, HEAD tagged with
the Cargo.toml version, a token, the same tag on the remote and no
release for it yet. The token is read from GITEA_TOKEN or
~/.config/gitea/token and passed to curl in a header file, so it is
never on a command line. If the upload fails, the release is deleted
so the next run starts clean.
2026-11-04 11:25:32 +01:00
Ansho Rei e915d00226 feat: restore the queue and position after a restart
Quitting, a crash or SteamOS restarting the app lost the queue and how
far into the track playback was, which hurts most for long items. The
queue is now saved to queue.json in the state directory, one queue per
user and server, on a track change, on pause, when songs are queued,
every 15 seconds while playing and on quit. It holds song metadata,
never a stream URL, since those carry the token or the password.

On start the saved track is loaded paused and seeked to once it has
prerolled. Nothing plays, and the server is not told about the track,
until play is pressed. An unreadable file is logged and ignored.

Two player bugs had to go for this. A failing source posts several
errors, and the later ones counted against the next track, so one
missing song skipped two tracks or stopped the queue. Play pressed
while a track was still loading was dropped.
2026-11-04 11:23:31 +01:00
Ansho Rei 28a8b8af11 feat: show keyboard keys or the controller's own buttons in the hint bar
The hint bar always named Xbox buttons, so someone at a keyboard was
told to press buttons they did not have, and owners of other pads got
the wrong letters. Hints now name an action, and the keys or button
icons come from the input used last: keyboard, or an Xbox, PlayStation,
Switch or Steam Deck controller.

Behind Steam, every pad is Steam's virtual one. remus reads the file
Steam names in SteamVirtualGamepadInfo to find the physical controller,
matching the slot in the pad's name, as SDL does. Icons are Kenney's
Input Prompts (CC0), with the licence beside them.
2026-11-04 10:43:56 +01:00
77 changed files with 1909 additions and 106 deletions
+37
View File
@@ -2,6 +2,43 @@
One section per version, newest first.
## v0.6.1 (2026-11-04)
### Bug fixes
- The logo is centred on the login screen.
## v0.6.0 (2026-11-04)
### Features
- The login screen has an Exit button below Connect, so remus can be closed from a controller before logging in.
## v0.5.0 (2026-11-04)
### Features
- While music plays, remus asks the system to keep the screensaver and sleep away, and lets go when playback is paused or stopped, or remus quits.
## v0.4.0 (2026-11-04)
### Features
- The queue survives a restart, a crash or SteamOS closing the app. It comes back paused on the same track, at most 15 seconds before where it was, and the server hears nothing until play is pressed. Each server keeps its own saved queue.
- Each release on Gitea has the Flatpak bundle attached, so installing on a Steam machine no longer needs a local build.
### Bug fixes
- A track that cannot be played is skipped on its own. Before, it could skip the next track too, or stop the queue.
- Play pressed while a track is still loading is no longer ignored.
## v0.3.0 (2026-11-04)
### Features
- The hint bar shows the keys to press when there is no controller, and switches to whichever was used last, keyboard or controller.
- Controller hints use button icons for Xbox, PlayStation, Switch and Steam Deck controllers. Behind Steam, remus finds the physical controller the way SDL does. Icons are Kenney's Input Prompts (CC0).
## v0.2.1 (2026-11-04)
### Bug fixes
Generated
+5 -1
View File
@@ -4385,7 +4385,7 @@ checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
[[package]]
name = "remus"
version = "0.2.1"
version = "0.6.1"
dependencies = [
"anyhow",
"directories",
@@ -4404,6 +4404,7 @@ dependencies = [
"slint-build",
"tokio",
"toml",
"zbus",
]
[[package]]
@@ -5407,8 +5408,10 @@ dependencies = [
"libc",
"mio",
"pin-project-lite",
"signal-hook-registry",
"socket2",
"tokio-macros",
"tracing",
"windows-sys 0.61.2",
]
@@ -6727,6 +6730,7 @@ dependencies = [
"rustix 1.1.6",
"serde",
"serde_repr",
"tokio",
"tracing",
"uds_windows",
"uuid",
+2 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "remus"
version = "0.2.1"
version = "0.6.1"
edition = "2024"
license = "MIT"
@@ -21,6 +21,7 @@ serde_json = "1.0.154"
slint = "1.18.1"
tokio = { version = "1.54.1", features = ["rt-multi-thread", "sync", "macros", "time"] }
toml = "1.1.8"
zbus = { version = "5.19.0", default-features = false, features = ["tokio"] }
[build-dependencies]
slint-build = "1.18.1"
+15 -2
View File
@@ -60,13 +60,13 @@ test-live: ## Every Subsonic call against a real server (DEMO_URL, DEMO_USER, DE
.PHONY: shots
shots: ## Screenshot the main screens against the demo server into target/shots
@mkdir -p $(SHOTS_DIR) $(SCRATCH)/config/remus $(SCRATCH)/cache
@mkdir -p $(SHOTS_DIR) $(SCRATCH)/config/remus $(SCRATCH)/cache $(SCRATCH)/state
@salt=$$(head -c 8 /dev/urandom | od -An -tx1 | tr -d ' \n'); \
token=$$(printf '%s%s' '$(DEMO_PASS)' "$$salt" | md5sum | cut -d' ' -f1); \
printf 'url = "%s"\nusername = "%s"\nsalt = "%s"\ntoken = "%s"\n' \
'$(DEMO_URL)' '$(DEMO_USER)' "$$salt" "$$token" > $(SCRATCH)/config/remus/config.toml
cargo build
XDG_CONFIG_HOME=$(CURDIR)/$(SCRATCH)/config XDG_CACHE_HOME=$(CURDIR)/$(SCRATCH)/cache \
XDG_CONFIG_HOME=$(CURDIR)/$(SCRATCH)/config XDG_CACHE_HOME=$(CURDIR)/$(SCRATCH)/cache XDG_STATE_HOME=$(CURDIR)/$(SCRATCH)/state \
REMUS_DEV_SCRIPT="wait:4000,shot:$(SHOTS_DIR)/home.png,right,activate,wait:3000,shot:$(SHOTS_DIR)/album.png,down,activate,wait:3000,now-playing,wait:2500,shot:$(SHOTS_DIR)/now-playing.png,play-pause,back,section-next,section-next,section-next,wait:3000,shot:$(SHOTS_DIR)/artists.png,quit" \
./target/debug/remus
@@ -187,6 +187,19 @@ bump:
git tag -a "v$$new" -m "v$$new"; \
echo "$$current -> $$new, tagged v$$new on $$(git rev-parse --short HEAD) ($$(git log -1 --format=%s))"
# Publishing. Builds the bundle for the version tagged on HEAD and attaches it
# to a new Gitea release, with the changelog entry as its notes.
GITEA_URL ?= https://gitea.anshorei.me
GITEA_REPO ?= Fettleshed/Remus
GITEA_REMOTE ?= origin
GITEA_TOKEN_FILE ?= $(HOME)/.config/gitea/token
.PHONY: publish
publish: ## Release the tagged version on Gitea with the Flatpak bundle attached
@VERSION="$(CURRENT)" GITEA_URL="$(GITEA_URL)" GITEA_REPO="$(GITEA_REPO)" \
GITEA_REMOTE="$(GITEA_REMOTE)" GITEA_TOKEN_FILE="$(GITEA_TOKEN_FILE)" \
bash scripts/publish.sh
.PHONY: clean
clean: ## Remove build output, screenshots and scratch config
cargo clean
+19 -4
View File
@@ -27,7 +27,7 @@ Preferences live apart from the login, in `~/.config/remus/settings.toml`, so lo
## Install on SteamOS
Build the bundle on any Linux machine with Flatpak:
A published version has `remus-<version>.flatpak` attached to its release on Gitea (see [Versions](#versions)). Download that, or build the bundle on any Linux machine with Flatpak:
```
make flatpak-bundle # writes target/flatpak/remus.flatpak
@@ -37,13 +37,13 @@ make flatpak-bundle # writes target/flatpak/remus.flatpak
On the Steam machine, in Desktop Mode:
1. Copy `remus.flatpak` over and install it from a terminal: `flatpak install --user remus.flatpak`. Flatpak pulls the freedesktop 26.08 runtime from Flathub.
1. Copy the bundle over and install it from a terminal: `flatpak install --user remus.flatpak`. Flatpak pulls the freedesktop 26.08 runtime from Flathub.
2. In Steam, choose Games → Add a Non-Steam Game to My Library and pick Remus.
3. Back in Game Mode, open its controller settings and pick a Gamepad layout, so Steam passes the buttons through as a controller and not as keyboard and mouse.
The Flatpak keeps its login and cover cache in `~/.var/app/me.anshorei.Fettleshed.Remus/`, not in `~/.config` and `~/.cache`. Flatpak sets `XDG_CONFIG_HOME` itself there, so overriding it with `flatpak run --env` has no effect.
To update, build a new bundle and install it the same way.
A bundle does not update itself. To update, install the next version's bundle the same way.
## Controls
@@ -82,7 +82,7 @@ make shots # fullscreen screenshots of the main screens into target/shots
REMUS_DEV_SCRIPT="wait:3000,shot:home.png,right,activate,wait:2000,shot:album.png,quit" cargo run
```
A scripted run starts fullscreen like a normal one, so it also checks that startup reaches fullscreen. Add `--windowed` to capture a window instead. Steps: `size:WxH`, `size:full`, `wait:MS`, `shot:PATH`, and action names (`up`, `down`, `left`, `right`, `activate`, `back`, `queue`, `next`, `play-pause`, `section-next`, `now-playing`, `search`, `quit`). Point `XDG_CONFIG_HOME` and `XDG_CACHE_HOME` at a scratch directory to keep test runs away from your own config.
A scripted run starts fullscreen like a normal one, so it also checks that startup reaches fullscreen. Add `--windowed` to capture a window instead. Steps: `size:WxH`, `size:full`, `wait:MS`, `shot:PATH`, `prompts:KIND` (hint icons for `xbox`, `playstation`, `switch`, `steamdeck` or `keyboard`), and action names (`up`, `down`, `left`, `right`, `activate`, `back`, `queue`, `next`, `play-pause`, `section-next`, `now-playing`, `search`, `quit`). Point `XDG_CONFIG_HOME` and `XDG_CACHE_HOME` at a scratch directory to keep test runs away from your own config.
### Versions
@@ -92,3 +92,18 @@ Every finished ticket bumps the version, so a build on the Deck can be matched t
- Before bumping, add a `## v<new> (<date>)` entry at the top of `CHANGELOG.md`, with `### Features` and `### Bug fixes` subsections (leave out an empty one), and commit it with the change. `make version` prints the current version.
- Bump on local `master` only: fast-forward `master` to the finished work, switch to it, then bump. The targets refuse any other branch.
- The bump writes the new version to `Cargo.toml`, `Cargo.lock` and the Flatpak metainfo, amends that into the last commit and tags it `v<new>`. It refuses a dirty tree, a commit that is already tagged or pushed, and a version the changelog has no entry for.
To release a version once it is bumped:
1. `git push --follow-tags origin master`
2. `make publish`
`make publish` builds the Flatpak bundle for the version tagged on HEAD and creates its Gitea release. The release has the tag as its title and the changelog entry as its notes, and `remus-<version>.flatpak` is attached. It needs a Gitea token with `write:repository`, from `GITEA_TOKEN` or the file `~/.config/gitea/token` (`GITEA_TOKEN_FILE` to put it elsewhere). It checks everything before the build and refuses when:
- the tree is dirty
- HEAD is not tagged with the version in `Cargo.toml`
- there is no token
- the tag is not on the remote, or the remote's tag is a different one
- the version already has a release
If the upload fails, it deletes the release again so the next run starts clean. `GITEA_URL`, `GITEA_REPO` and `GITEA_REMOTE` default to this repository on `gitea.anshorei.me`.
@@ -20,6 +20,11 @@
</supports>
<content_rating type="oars-1.1"/>
<releases>
<release version="0.6.1" date="2026-11-04"/>
<release version="0.6.0" date="2026-11-04"/>
<release version="0.5.0" date="2026-11-04"/>
<release version="0.4.0" date="2026-11-04"/>
<release version="0.3.0" date="2026-11-04"/>
<release version="0.2.1" date="2026-11-04"/>
<release version="0.2.0" date="2026-11-04"/>
<release version="0.1.0" date="2026-11-04"/>
+3
View File
@@ -15,6 +15,9 @@ finish-args:
# GPU rendering and gamepads (evdev). --device=input would be narrower but
# needs Flatpak 1.15.6, which not every SteamOS release ships.
- --device=all
# Keeps the screensaver off while music plays, the way Chromium and
# Electron apps do. The XDG portal route needs no permission.
- --talk-name=org.freedesktop.ScreenSaver
build-options:
append-path: /usr/lib/sdk/rust-stable/bin
+119
View File
@@ -0,0 +1,119 @@
#!/usr/bin/env bash
# Publishes the tagged version on HEAD as a Gitea release with the Flatpak
# bundle attached. Run by `make publish`, after a bump and a push with tags.
#
# Every check runs before the slow Flatpak build, so a refusal costs seconds.
#
# Environment, set by the Makefile:
# VERSION version in Cargo.toml
# GITEA_URL e.g. https://gitea.anshorei.me
# GITEA_REPO owner/name, e.g. Fettleshed/Remus
# GITEA_REMOTE git remote that holds the tags
# GITEA_TOKEN or GITEA_TOKEN_FILE API token with write:repository
set -euo pipefail
fail() {
echo "error: $*" >&2
exit 1
}
for tool in curl jq git awk; do
command -v "$tool" >/dev/null || fail "$tool is not installed"
done
[ -n "${VERSION:-}" ] || fail "no version found in the [package] table of Cargo.toml"
tag="v$VERSION"
api="${GITEA_URL%/}/api/v1/repos/$GITEA_REPO"
asset="remus-$VERSION.flatpak"
# The bundle is built from the working tree, so it has to be the tagged commit.
if [ -n "$(git status --porcelain)" ]; then
echo "error: working tree is dirty, and the bundle would not be what $tag names:" >&2
git status --short >&2
exit 1
fi
head_tags=$(git tag --points-at HEAD --list 'v*')
if ! grep -qxF "$tag" <<<"$head_tags"; then
if [ -n "$head_tags" ]; then
fail "HEAD is tagged $(paste -sd' ' <<<"$head_tags"), but Cargo.toml says $VERSION"
fi
fail "HEAD is not tagged $tag. Check out the tag, or bump first with make patch, minor or major."
fi
# The token goes to curl in a header file, so it is never on a command line
# or in the output.
if [ -n "${GITEA_TOKEN:-}" ]; then
token=$GITEA_TOKEN
elif [ -n "${GITEA_TOKEN_FILE:-}" ] && [ -r "$GITEA_TOKEN_FILE" ]; then
token=$(tr -d '[:space:]' <"$GITEA_TOKEN_FILE")
else
fail "no Gitea token. Set GITEA_TOKEN, or put one in ${GITEA_TOKEN_FILE:-a file named by GITEA_TOKEN_FILE}. It needs write:repository."
fi
[ -n "$token" ] || fail "the Gitea token is empty"
tmp=$(mktemp -d)
trap 'rm -rf "$tmp"' EXIT
(umask 077 && printf 'Authorization: token %s\n' "$token" >"$tmp/auth")
unset token GITEA_TOKEN
# Calls the API. Prints the body and returns the HTTP status in $status.
call() {
local method=$1 url=$2
shift 2
status=$(curl -sS -o "$tmp/body" -w '%{http_code}' -X "$method" -H @"$tmp/auth" "$@" "$url") ||
fail "could not reach $GITEA_URL"
}
# The local tag object has to be the one on the remote, or the release would
# point at a tag that names another commit, or at none.
remote_tag=$(git ls-remote --tags "$GITEA_REMOTE" "refs/tags/$tag" | cut -f1) ||
fail "could not list the tags on $GITEA_REMOTE"
[ -n "$remote_tag" ] || fail "$tag is not on $GITEA_REMOTE yet. Push it first: git push --follow-tags $GITEA_REMOTE"
[ "$remote_tag" = "$(git rev-parse "refs/tags/$tag")" ] ||
fail "$tag on $GITEA_REMOTE is not the local $tag. Find out which one is right before publishing."
notes=$(awk -v h="## $tag " '
index($0, h) == 1 { found = 1; next }
found && /^## / { exit }
found { print }
' CHANGELOG.md | sed -e '/./,$!d')
[ -n "$notes" ] || fail "CHANGELOG.md has no text under '## $tag'"
call GET "$api"
case $status in
200) ;;
401 | 403) fail "Gitea refused the token ($status). It needs write:repository on $GITEA_REPO." ;;
404) fail "no repository $GITEA_REPO on $GITEA_URL, or the token cannot see it" ;;
*) fail "checking $GITEA_REPO returned HTTP $status: $(cat "$tmp/body")" ;;
esac
call GET "$api/releases/tags/$tag"
case $status in
404) ;;
200) fail "$tag is already published: $(jq -r .html_url "$tmp/body"). Delete that release on Gitea to publish it again." ;;
*) fail "checking for an existing release returned HTTP $status: $(cat "$tmp/body")" ;;
esac
echo "Building the Flatpak bundle for $tag"
"${MAKE:-make}" --no-print-directory flatpak-bundle
cp target/flatpak/remus.flatpak "target/flatpak/$asset"
body=$(jq -n --arg tag "$tag" --arg notes "$notes" \
'{tag_name: $tag, name: $tag, body: $notes, draft: false, prerelease: false}')
call POST "$api/releases" -H 'Content-Type: application/json' --data "$body"
[ "$status" = 201 ] || fail "creating the release returned HTTP $status: $(cat "$tmp/body")"
id=$(jq -r .id "$tmp/body")
url=$(jq -r .html_url "$tmp/body")
call POST "$api/releases/$id/assets?name=$asset" -F "attachment=@target/flatpak/$asset"
if [ "$status" != 201 ]; then
echo "error: uploading $asset returned HTTP $status: $(cat "$tmp/body")" >&2
# A release without its bundle would block the next try, so take it back.
call DELETE "$api/releases/$id"
if [ "$status" = 204 ]; then
echo "Removed the release again, so make publish can be rerun." >&2
else
echo "Could not remove the release ($status). Delete $url by hand before rerunning." >&2
fi
exit 1
fi
echo "Published $tag with $asset: $url"
+228 -38
View File
@@ -2,7 +2,7 @@
//! through `slint::invoke_from_event_loop` + `with_app`.
use std::cell::RefCell;
use std::collections::HashSet;
use std::collections::{HashMap, HashSet};
use std::future::Future;
use std::num::NonZeroUsize;
use std::path::PathBuf;
@@ -17,8 +17,11 @@ use tokio::runtime::Handle;
use tokio::sync::Semaphore;
use crate::config::{self, Config, Settings};
use crate::inhibit::Inhibitor;
use crate::palette::{Lab, Palette, Role, Tone};
use crate::player::{Player, PlayerEvent};
use crate::prompts::{self, Control, Family, Prompts};
use crate::saved_queue::{self, SavedQueue, SavedQueues};
use crate::subsonic::{self, Album, Artist, Client, Playlist, SearchResult, Song};
use crate::{Action, AppWindow, Area, Header, Hint, Item, Screen, Theme};
@@ -43,7 +46,7 @@ pub fn install(ui: &AppWindow, rt: Handle) {
let app = App::new(ui.clone_strong(), rt);
APP.with(|cell| *cell.borrow_mut() = Some(app));
ui.on_action(|a| with_app(move |app| app.action(a)));
ui.on_action(|a| with_app(move |app| app.key_action(a)));
ui.on_item_clicked(|i| with_app(move |app| app.item_clicked(i.max(0) as usize)));
ui.on_wheel(|d| with_app(move |app| app.wheel(d)));
ui.on_sidebar_clicked(|i| with_app(move |app| app.sidebar_clicked(i.max(0) as usize)));
@@ -57,12 +60,22 @@ pub fn install(ui: &AppWindow, rt: Handle) {
with_app(|app| app.start());
}
/// Drops the app, which stops playback.
/// Saves the queue and drops the app, which stops playback.
pub fn shutdown() {
let app = APP.with(|cell| cell.borrow_mut().take());
drop(app);
if let Some(mut app) = app {
app.save_queue();
if let Some(i) = app.inhibitor.take() {
i.shutdown();
}
}
}
/// How often the position is saved while playing, so a crash or power loss
/// costs at most this much. A queue of a few hundred songs is tens of KB, so
/// even hours of play write little compared to what flash storage is rated for.
const SAVE_EVERY: Duration = Duration::from_secs(15);
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
enum Section {
Recent,
@@ -197,6 +210,8 @@ pub struct App {
rt: Handle,
client: Option<Client>,
player: Option<Player>,
/// Keeps the screensaver off while music plays. Taken at shutdown.
inhibitor: Option<Inhibitor>,
screen: Screen,
area: Area,
section: usize,
@@ -214,8 +229,22 @@ pub struct App {
duration: f64,
paused: bool,
scrobbled: bool,
/// Queue restored paused and not played since: the now-playing update
/// waits for the user to press play.
held: bool,
now_playing_due: bool,
/// Track index and position being restored, until the player reports
/// that track. Saved in its place if the app quits before then.
restoring: Option<(usize, f64)>,
saved: SavedQueues,
saved_path: Option<PathBuf>,
last_save: Instant,
login_focus: i32,
toast_timer: Timer,
/// Keyboard keys or the buttons of the controller used last.
prompts: Prompts,
/// Decoded hint icons, so a selection move does not parse SVG again.
icons: RefCell<HashMap<(Prompts, Control), Vec<Image>>>,
settings: Settings,
fade: Fade,
}
@@ -226,17 +255,21 @@ impl App {
let queue_items = Rc::new(VecModel::default());
ui.set_items(ModelRc::from(items.clone()));
ui.set_queue_items(ModelRc::from(queue_items.clone()));
let saved_path = saved_queue::path();
let saved = saved_path.as_deref().map(saved_queue::load).unwrap_or_default();
let dir = config::cache_dir().map(|d| d.join("covers"));
if let Some(d) = &dir
&& let Err(e) = std::fs::create_dir_all(d)
{
log::warn!("cover cache disabled, cannot create {}: {e}", d.display());
}
let inhibitor = Inhibitor::spawn(&rt);
App {
ui,
rt,
client: None,
player: None,
inhibitor: Some(inhibitor),
screen: Screen::Login,
area: Area::Content,
section: 0,
@@ -261,8 +294,16 @@ impl App {
duration: 0.0,
paused: false,
scrobbled: false,
held: false,
now_playing_due: false,
restoring: None,
saved,
saved_path,
last_save: Instant::now(),
login_focus: 0,
toast_timer: Timer::default(),
prompts: Prompts::Keyboard,
icons: RefCell::default(),
settings: config::load_settings(),
fade: Fade {
from: Palette::brand(),
@@ -329,7 +370,7 @@ impl App {
}
fn set_login_focus(&mut self, i: i32) {
self.login_focus = i.clamp(0, 3);
self.login_focus = i.clamp(0, 4);
self.ui.set_login_focus(self.login_focus);
self.ui.invoke_focus_login(self.login_focus);
self.render_hints();
@@ -340,6 +381,7 @@ impl App {
Action::Up | Action::SectionPrev => self.set_login_focus(self.login_focus - 1),
Action::Down | Action::SectionNext => self.set_login_focus(self.login_focus + 1),
Action::Activate if self.login_focus < 2 => self.set_login_focus(self.login_focus + 1),
Action::Activate if self.login_focus == 4 => self.action(Action::Quit),
Action::Activate => self.login_submit(),
_ => {}
}
@@ -401,10 +443,37 @@ impl App {
self.section = usize::MAX;
self.select_section(0);
self.set_area(Area::Content);
if self.queue.is_empty() {
self.restore_queue();
}
}
// ---------------------------------------------------------------- input
/// A key pressed in the window.
pub fn key_action(&mut self, a: Action) {
self.set_prompts(Prompts::Keyboard);
self.action(a);
}
/// A button pressed on a controller of this family.
pub fn pad_action(&mut self, a: Action, family: Family) {
self.set_prompts(Prompts::Pad(family));
self.action(a);
}
/// A controller connected (its family) or the last one disconnected.
pub fn pad_present(&mut self, family: Option<Family>) {
self.set_prompts(family.map_or(Prompts::Keyboard, Prompts::Pad));
}
fn set_prompts(&mut self, prompts: Prompts) {
if prompts != self.prompts {
self.prompts = prompts;
self.render_hints();
}
}
pub fn action(&mut self, a: Action) {
match a {
Action::Quit => {
@@ -1225,26 +1294,37 @@ impl App {
}
fn render_hints(&self) {
let h = |k: &str, l: &str| Hint {
key: k.into(),
label: l.into(),
};
let mut hints = Vec::new();
let mut h = |c: Control, l: &str| {
let icons = self.hint_icons(c);
// Nothing to press for it with this input, such as Steam + X on a keyboard.
if !icons.is_empty() {
hints.push(Hint {
icons: ModelRc::new(VecModel::from(icons)),
label: l.into(),
});
}
};
match self.screen {
Screen::Login => {
hints.push(h("A", if self.login_focus < 2 { "Next" } else { "Connect" }));
let label = match self.login_focus {
0 | 1 => "Next",
4 => "Exit",
_ => "Connect",
};
h(Control::Activate, label);
}
Screen::Browse => match self.area {
Area::Sidebar => {
hints.push(h("A", "Open"));
hints.push(h("X", "Play / Pause"));
hints.push(h("VIEW", "Search"));
hints.push(h("MENU", "Now playing"));
h(Control::Activate, "Open");
h(Control::PlayPause, "Play / Pause");
h(Control::Search, "Search");
h(Control::NowPlaying, "Now playing");
}
Area::Search => {
hints.push(h("A", "Search"));
hints.push(h("B", "Back"));
hints.push(h("STEAM + X", "Keyboard"));
h(Control::Activate, "Search");
h(Control::Back, "Back");
h(Control::OnScreenKeyboard, "Keyboard");
}
_ => {
let target = self
@@ -1252,34 +1332,53 @@ impl App {
.and_then(|p| p.entries.get(p.sel))
.map(|e| &e.target);
match target {
Some(Target::Song(_)) => hints.push(h("A", "Play")),
Some(Target::Setting(_)) => hints.push(h("A", "Change")),
Some(_) => hints.push(h("A", "Open")),
Some(Target::Song(_)) => h(Control::Activate, "Play"),
Some(Target::Setting(_)) => h(Control::Activate, "Change"),
Some(_) => h(Control::Activate, "Open"),
None if self.current_page().is_some_and(|p| p.error.is_some()) => {
hints.push(h("A", "Try again"))
h(Control::Activate, "Try again")
}
None => {}
}
hints.push(h("B", "Back"));
h(Control::Back, "Back");
if matches!(target, Some(Target::Song(_) | Target::Album(_) | Target::Playlist(_))) {
hints.push(h("Y", "Add to queue"));
h(Control::Queue, "Add to queue");
}
hints.push(h("X", "Play / Pause"));
hints.push(h("LT RT", "Sections"));
hints.push(h("MENU", "Now playing"));
h(Control::PlayPause, "Play / Pause");
h(Control::Sections, "Sections");
h(Control::NowPlaying, "Now playing");
}
},
Screen::NowPlaying => {
hints.push(h("A", "Play selected"));
hints.push(h("B", "Back"));
hints.push(h("X", "Play / Pause"));
hints.push(h("LB RB", "Skip"));
hints.push(h("◀ ▶", "Seek"));
h(Control::Activate, "Play selected");
h(Control::Back, "Back");
h(Control::PlayPause, "Play / Pause");
h(Control::Skip, "Skip");
h(Control::Seek, "Seek");
}
}
self.ui.set_hints(ModelRc::new(VecModel::from(hints)));
}
fn hint_icons(&self, control: Control) -> Vec<Image> {
self.icons
.borrow_mut()
.entry((self.prompts, control))
.or_insert_with(|| {
prompts::icons(self.prompts, control)
.iter()
.filter_map(|svg| match Image::load_from_svg_data(svg) {
Ok(img) => Some(img),
Err(e) => {
log::warn!("hint icon for {control:?}: {e:?}");
None
}
})
.collect()
})
.clone()
}
fn toast(&mut self, text: String) {
self.ui.set_toast(text.into());
self.toast_timer
@@ -1462,6 +1561,7 @@ impl App {
let n = songs.len();
self.queue.extend(songs);
self.sync_queue(true);
self.save_queue();
self.toast(if n == 1 {
format!("Queued {what}")
} else {
@@ -1509,6 +1609,9 @@ impl App {
self.position = p;
self.render_progress();
self.maybe_scrobble();
if !self.paused && self.last_save.elapsed() >= SAVE_EVERY {
self.save_queue();
}
}
PlayerEvent::Duration(d) => {
self.duration = d;
@@ -1517,6 +1620,14 @@ impl App {
PlayerEvent::Paused(p) => {
self.paused = p;
self.ui.set_np_paused(p);
if p {
self.save_queue();
} else {
self.held = false;
if std::mem::take(&mut self.now_playing_due) {
self.send_now_playing();
}
}
}
PlayerEvent::Track(t) => {
// Reported once per track started, so the same index again is a
@@ -1525,13 +1636,16 @@ impl App {
self.current = t;
self.position = 0.0;
self.scrobbled = false;
if let (Some(song), Some(client)) = (t.and_then(|i| self.queue.get(i)), self.client.clone()) {
let id = song.id.clone();
self.spawn(async move { client.scrobble(&id, false).await }, |_, r| {
if let Err(e) = r {
log::debug!("now-playing update failed: {e:#}");
}
});
if let Some((i, _)) = self.restoring.take()
&& t == Some(i)
{
// Paused, so the player reports no duration until played.
self.duration = self.queue[i].duration.unwrap_or(0) as f64;
}
if self.held {
self.now_playing_due = t.is_some();
} else {
self.send_now_playing();
}
if let Some(i) = t
&& self.screen == Screen::NowPlaying
@@ -1541,8 +1655,84 @@ impl App {
self.render_player();
self.sync_items(true);
self.sync_queue(true);
self.save_queue();
}
}
self.sync_inhibit();
}
/// Inhibits only while sound is coming out: a restored queue is loaded
/// paused and held until play is pressed.
fn sync_inhibit(&self) {
if let Some(i) = &self.inhibitor {
i.set(self.current.is_some() && !self.paused && !self.held);
}
}
fn send_now_playing(&self) {
let (Some(song), Some(client)) = (self.current.and_then(|i| self.queue.get(i)), self.client.clone()) else {
return;
};
let id = song.id.clone();
self.spawn(async move { client.scrobble(&id, false).await }, |_, r| {
if let Err(e) = r {
log::debug!("now-playing update failed: {e:#}");
}
});
}
/// Loads the queue saved for this server, paused at the track and
/// position it was at.
fn restore_queue(&mut self) {
let (Some(client), Some(player)) = (&self.client, &self.player) else {
return;
};
let Some(saved) = self.saved.get(client).cloned() else {
return;
};
if saved.songs.is_empty() {
return;
}
let current = saved.current.filter(|&i| i < saved.songs.len());
log::info!(
"restoring a queue of {} songs at {:?}, {:.0}s",
saved.songs.len(),
current,
saved.position
);
let urls: Vec<String> = saved.songs.iter().map(|s| client.stream_url(&s.id)).collect();
player.load_paused(&urls, current, saved.position);
self.queue = saved.songs;
self.current = None;
self.queue_sel = current.unwrap_or(0);
self.held = current.is_some();
self.restoring = current.map(|i| (i, saved.position));
self.sync_queue(true);
}
/// Writes the queue to disk. Failures are logged rather than shown,
/// since this runs every few seconds while playing.
fn save_queue(&mut self) {
self.last_save = Instant::now();
let (Some(client), Some(path)) = (&self.client, &self.saved_path) else {
return;
};
let (current, position) = match (self.current, self.restoring) {
(None, Some((i, pos))) => (Some(i), pos),
(current, _) => (current, self.position),
};
let queue = SavedQueue {
songs: self.queue.clone(),
current,
position,
};
if self.saved.get(client) == Some(&queue) {
return;
}
self.saved.set(client, queue);
if let Err(e) = saved_queue::save(path, &self.saved) {
log::warn!("could not save the queue: {e:#}");
}
}
/// Submits a play once half the track (or four minutes) has been heard,
+10 -2
View File
@@ -63,6 +63,12 @@ pub fn cache_dir() -> Option<PathBuf> {
dirs().map(|d| d.cache_dir().to_path_buf())
}
/// For state that is not configuration, such as the saved queue. Not every
/// platform has a state directory, so it falls back to the data directory.
pub fn state_dir() -> Option<PathBuf> {
dirs().map(|d| d.state_dir().unwrap_or(d.data_dir()).to_path_buf())
}
pub fn load() -> Result<Option<Config>> {
let Some(path) = config_path() else { return Ok(None) };
match fs::read_to_string(&path) {
@@ -119,11 +125,13 @@ pub fn save_settings(s: &Settings) -> Result<()> {
/// Writes aside, syncs, then renames over the old file, so a power cut
/// mid-save leaves either the old file or the new one, never a torn one.
/// Owner-only, since the login file holds a token.
fn write_atomic(path: &Path, text: &str) -> Result<()> {
pub fn write_atomic(path: &Path, text: &str) -> Result<()> {
if let Some(dir) = path.parent() {
fs::create_dir_all(dir)?;
}
let tmp = path.with_extension("toml.tmp");
let mut tmp = path.as_os_str().to_owned();
tmp.push(".tmp");
let tmp = PathBuf::from(tmp);
let mut f = fs::OpenOptions::new()
.write(true)
.create(true)
+11
View File
@@ -56,6 +56,17 @@ fn step(ui: slint::Weak<AppWindow>, steps: Vec<String>, i: usize) {
Err(e) => log::error!("snapshot failed: {e}"),
}
}
Some(("prompts", kind)) => {
use crate::prompts::Family;
let family = match kind {
"xbox" => Some(Family::Xbox),
"playstation" => Some(Family::PlayStation),
"switch" => Some(Family::Switch),
"steamdeck" => Some(Family::SteamDeck),
_ => None,
};
app::with_app(move |app| app.pad_present(family));
}
Some(("login", creds)) => {
let mut parts = creds.splitn(3, '|').map(str::to_string);
let (url, user, pass) = (
+316
View File
@@ -0,0 +1,316 @@
//! Keeps the screensaver and idle sleep away while music plays.
//!
//! Two routes, each held independently: org.freedesktop.ScreenSaver, the one
//! Chromium and Electron apps use during playback, and the XDG portal's
//! Inhibit, which needs no Flatpak permission and covers desktops where the
//! first is not served. A route that fails is logged once and otherwise
//! ignored. Services normally drop an inhibit when its client leaves the bus,
//! so a crash should not leave one behind.
use std::collections::HashMap;
use std::time::Duration;
use anyhow::Result;
use tokio::runtime::Handle;
use tokio::sync::{oneshot, watch};
use zbus::Connection;
use zbus::zvariant::{OwnedObjectPath, Value};
const APP: &str = "remus";
const REASON: &str = "Playing music";
/// The portal's idle and suspend flags.
const PORTAL_FLAGS: u32 = 4 | 8;
pub struct Inhibitor {
want: watch::Sender<bool>,
done: oneshot::Receiver<()>,
rt: Handle,
}
impl Inhibitor {
pub fn spawn(rt: &Handle) -> Inhibitor {
let (want, rx) = watch::channel(false);
let (done_tx, done) = oneshot::channel();
rt.spawn(async move {
run(DBus::default(), rx).await;
let _ = done_tx.send(());
});
Inhibitor {
want,
done,
rt: rt.clone(),
}
}
/// Hold the inhibit while `on`, release it otherwise.
pub fn set(&self, on: bool) {
self.want.send_if_modified(|v| std::mem::replace(v, on) != on);
}
/// Releases what is held before the runtime goes away. Called from
/// outside the runtime, so it may block briefly.
pub fn shutdown(self) {
let Inhibitor { want, done, rt } = self;
drop(want);
// The timer needs the runtime, so it is made inside block_on.
let _ = rt.block_on(async { tokio::time::timeout(Duration::from_secs(1), done).await });
}
}
/// One way of inhibiting, so the loop can be tested without a bus.
trait Backend {
/// Takes every route that is not held yet.
async fn acquire(&mut self);
/// Gives back every route that is held.
async fn release(&mut self);
}
/// Follows the wanted state until the sender is dropped, then releases.
async fn run(mut backend: impl Backend, mut want: watch::Receiver<bool>) {
while want.changed().await.is_ok() {
// Changes that arrive while a call is in flight coalesce into the latest.
if *want.borrow_and_update() {
backend.acquire().await;
} else {
backend.release().await;
}
}
backend.release().await;
}
#[derive(Default)]
struct DBus {
conn: Option<Connection>,
cookie: Option<u32>,
request: Option<OwnedObjectPath>,
warned_bus: bool,
warned_screensaver: bool,
warned_portal: bool,
}
impl DBus {
async fn connection(&mut self) -> Option<Connection> {
if self.conn.is_none() {
match Connection::session().await {
Ok(c) => self.conn = Some(c),
Err(e) => {
warn_once(
&mut self.warned_bus,
format_args!("no session bus, the screensaver stays on: {e}"),
);
return None;
}
}
}
self.conn.clone()
}
}
impl Backend for DBus {
async fn acquire(&mut self) {
let Some(conn) = self.connection().await else { return };
if self.cookie.is_none() {
match screensaver_inhibit(&conn).await {
Ok(c) => {
log::debug!("screensaver inhibited (cookie {c})");
self.cookie = Some(c);
}
Err(e) => warn_once(
&mut self.warned_screensaver,
format_args!("org.freedesktop.ScreenSaver inhibit failed: {e:#}"),
),
}
}
if self.request.is_none() {
match portal_inhibit(&conn).await {
Ok(r) => {
log::debug!("portal inhibit requested ({})", r.as_str());
self.request = Some(r);
}
Err(e) => warn_once(&mut self.warned_portal, format_args!("portal inhibit failed: {e:#}")),
}
}
}
async fn release(&mut self) {
let Some(conn) = self.conn.clone() else { return };
if let Some(c) = self.cookie.take() {
let r = conn
.call_method(
Some("org.freedesktop.ScreenSaver"),
"/org/freedesktop/ScreenSaver",
Some("org.freedesktop.ScreenSaver"),
"UnInhibit",
&(c,),
)
.await;
match r {
Ok(_) => log::debug!("screensaver released (cookie {c})"),
Err(e) => log::warn!("org.freedesktop.ScreenSaver uninhibit failed: {e}"),
}
}
if let Some(r) = self.request.take()
&& let Err(e) = conn
.call_method(
Some("org.freedesktop.portal.Desktop"),
r.as_str(),
Some("org.freedesktop.portal.Request"),
"Close",
&(),
)
.await
{
if gone(&e) {
// Some portal backends drop the request at once, for example
// when they do not implement Inhibit, so there is nothing to close.
log::debug!("portal inhibit was not held any more: {e}");
} else {
log::warn!("portal inhibit release failed: {e}");
}
}
}
}
async fn screensaver_inhibit(conn: &Connection) -> Result<u32> {
let reply = conn
.call_method(
Some("org.freedesktop.ScreenSaver"),
"/org/freedesktop/ScreenSaver",
Some("org.freedesktop.ScreenSaver"),
"Inhibit",
&(APP, REASON),
)
.await?;
Ok(reply.body().deserialize::<u32>()?)
}
async fn portal_inhibit(conn: &Connection) -> Result<OwnedObjectPath> {
let options: HashMap<&str, Value<'_>> = HashMap::from([("reason", Value::from(REASON))]);
let reply = conn
.call_method(
Some("org.freedesktop.portal.Desktop"),
"/org/freedesktop/portal/desktop",
Some("org.freedesktop.portal.Inhibit"),
"Inhibit",
// No parent window identifier: the inhibit is for the whole app.
&("", PORTAL_FLAGS, options),
)
.await?;
Ok(reply.body().deserialize::<OwnedObjectPath>()?)
}
/// The object being called no longer exists.
fn gone(e: &zbus::Error) -> bool {
const GONE: [&str; 2] = [
"org.freedesktop.DBus.Error.UnknownMethod",
"org.freedesktop.DBus.Error.UnknownObject",
];
match e {
zbus::Error::MethodError(name, ..) => GONE.contains(&name.as_str()),
zbus::Error::FDO(f) => {
matches!(
**f,
zbus::fdo::Error::UnknownMethod(_) | zbus::fdo::Error::UnknownObject(_)
)
}
_ => false,
}
}
fn warn_once(warned: &mut bool, msg: std::fmt::Arguments<'_>) {
if std::mem::replace(warned, true) {
log::debug!("{msg}");
} else {
log::warn!("{msg}");
}
}
#[cfg(test)]
mod tests {
use std::sync::{Arc, Mutex};
use super::*;
#[derive(Clone, Default)]
struct Fake {
calls: Arc<Mutex<Vec<&'static str>>>,
held: Arc<Mutex<bool>>,
}
impl Backend for Fake {
async fn acquire(&mut self) {
self.calls.lock().unwrap().push("acquire");
*self.held.lock().unwrap() = true;
}
async fn release(&mut self) {
self.calls.lock().unwrap().push("release");
*self.held.lock().unwrap() = false;
}
}
/// Sends each state and lets the loop act on it before the next.
async fn drive(states: &[bool]) -> Fake {
let fake = Fake::default();
let (tx, rx) = watch::channel(false);
let task = tokio::spawn(run(fake.clone(), rx));
for &s in states {
tx.send_if_modified(|v| std::mem::replace(v, s) != s);
tokio::task::yield_now().await;
}
drop(tx);
task.await.unwrap();
fake
}
#[tokio::test]
async fn follows_play_and_pause() {
let fake = drive(&[true, false, true]).await;
assert_eq!(
*fake.calls.lock().unwrap(),
["acquire", "release", "acquire", "release"]
);
}
#[tokio::test]
async fn repeated_state_does_not_call_again() {
let fake = drive(&[true, true, true]).await;
assert_eq!(*fake.calls.lock().unwrap(), ["acquire", "release"]);
}
#[tokio::test]
async fn releases_when_dropped_while_held() {
let fake = drive(&[true]).await;
assert!(!*fake.held.lock().unwrap());
}
#[tokio::test]
async fn nothing_held_when_never_played() {
let fake = drive(&[false]).await;
assert_eq!(*fake.calls.lock().unwrap(), ["release"]);
assert!(!*fake.held.lock().unwrap());
}
/// Against the real session bus: `cargo test live_inhibit -- --ignored`.
/// Prints which routes this session serves rather than failing on a
/// missing one, since a desktop may serve only one of them.
#[tokio::test]
#[ignore]
async fn live_inhibit() {
let conn = Connection::session().await.expect("session bus");
let ss = screensaver_inhibit(&conn).await;
let portal = portal_inhibit(&conn).await;
println!("org.freedesktop.ScreenSaver: {ss:?}");
println!("portal: {portal:?}");
assert!(ss.is_ok() || portal.is_ok(), "neither route is served");
let mut bus = DBus {
conn: Some(conn),
cookie: ss.ok(),
request: portal.ok(),
..DBus::default()
};
bus.release().await;
assert!(bus.cookie.is_none() && bus.request.is_none());
}
}
+96 -11
View File
@@ -1,14 +1,27 @@
//! Gamepad input. Buttons map to the same `Action`s as the keyboard bindings in app.slint.
use std::collections::HashMap;
use std::time::{Duration, Instant};
use gilrs::{Axis, Button, EventType, GamepadId, Gilrs};
use crate::Action;
use crate::prompts::{self, Family, PRODUCT_STEAM_VIRTUAL_GAMEPAD, VENDOR_VALVE};
/// Steam's virtual controllers. When one is present the physical pad behind it
/// also shows up as an evdev device, so only Steam's is listened to.
const STEAM_VENDOR: u16 = 0x28de;
const STEAM_VENDOR: u16 = VENDOR_VALVE;
/// How often to look again for the physical controller behind a Steam virtual
/// pad that Steam's file did not list yet. SDL checks as often.
const RECHECK_VIRTUAL: Duration = Duration::from_secs(3);
pub enum PadEvent {
/// A press, from a controller of this family.
Action(Action, Family),
/// The family of a connected controller, or None when the last one went.
Present(Option<Family>),
}
const REPEAT_DELAY: Duration = Duration::from_millis(380);
const REPEAT_SLOW: Duration = Duration::from_millis(110);
@@ -27,11 +40,12 @@ enum Source {
struct Held {
source: Source,
action: Action,
family: Family,
since: Instant,
next: Instant,
}
pub fn spawn_gamepad(emit: impl Fn(Action) + Send + 'static) {
pub fn spawn_gamepad(emit: impl Fn(PadEvent) + Send + 'static) {
let spawned = std::thread::Builder::new().name("gamepad".into()).spawn(move || {
let mut gilrs = match Gilrs::new() {
Ok(g) => g,
@@ -40,22 +54,35 @@ pub fn spawn_gamepad(emit: impl Fn(Action) + Send + 'static) {
return;
}
};
for (_, pad) in gilrs.gamepads() {
log::info!("gamepad: {} (vendor {:04x?})", pad.name(), pad.vendor_id());
let mut families = Families::default();
for (id, pad) in gilrs.gamepads() {
log::info!(
"gamepad: {} (vendor {:04x?}, product {:04x?}), {:?} prompts",
pad.name(),
pad.vendor_id(),
pad.product_id(),
families.family(&gilrs, id)
);
}
emit(PadEvent::Present(present(&gilrs, &mut families)));
let mut held: Option<Held> = None;
loop {
while let Some(ev) = gilrs.next_event_blocking(Some(Duration::from_millis(15))) {
if matches!(ev.event, EventType::Connected | EventType::Disconnected) {
families.forget(ev.id);
emit(PadEvent::Present(present(&gilrs, &mut families)));
}
if !accept_from(&gilrs, ev.id) {
continue;
}
let family = families.family(&gilrs, ev.id);
match ev.event {
EventType::ButtonPressed(b, _) => {
if let Some(a) = dpad_action(b) {
held = Some(start_hold(Source::DPad, a));
emit(a);
held = Some(start_hold(Source::DPad, a, family));
emit(PadEvent::Action(a, family));
} else if let Some(a) = button_action(b) {
emit(a);
emit(PadEvent::Action(a, family));
}
}
EventType::ButtonReleased(b, _) => {
@@ -74,8 +101,8 @@ pub fn spawn_gamepad(emit: impl Fn(Action) + Send + 'static) {
match (dir, held.as_ref()) {
(Some(a), Some(h)) if h.source == source && h.action == a => {}
(Some(a), _) => {
held = Some(start_hold(source, a));
emit(a);
held = Some(start_hold(source, a, family));
emit(PadEvent::Action(a, family));
}
(None, Some(h)) if h.source == source => held = None,
_ => {}
@@ -88,7 +115,7 @@ pub fn spawn_gamepad(emit: impl Fn(Action) + Send + 'static) {
if let Some(h) = held.as_mut() {
let now = Instant::now();
if now >= h.next {
emit(h.action);
emit(PadEvent::Action(h.action, h.family));
let step = if now - h.since > FAST_AFTER {
REPEAT_FAST
} else {
@@ -109,16 +136,74 @@ fn accept_from(gilrs: &Gilrs, id: GamepadId) -> bool {
!steam_present || gilrs.gamepad(id).vendor_id() == Some(STEAM_VENDOR)
}
fn start_hold(source: Source, action: Action) -> Held {
fn start_hold(source: Source, action: Action, family: Family) -> Held {
let now = Instant::now();
Held {
source,
action,
family,
since: now,
next: now + REPEAT_DELAY,
}
}
/// The family of the first controller listened to, if any.
fn present(gilrs: &Gilrs, families: &mut Families) -> Option<Family> {
let id = gilrs.gamepads().map(|(id, _)| id).find(|&id| accept_from(gilrs, id))?;
Some(families.family(gilrs, id))
}
/// Controller families per pad. A Steam virtual pad whose physical controller
/// is not in Steam's file yet is looked up again now and then.
#[derive(Default)]
struct Families {
known: HashMap<GamepadId, (Family, Option<Instant>)>,
}
impl Families {
fn family(&mut self, gilrs: &Gilrs, id: GamepadId) -> Family {
if let Some(&(family, unresolved)) = self.known.get(&id)
&& unresolved.is_none_or(|at| at.elapsed() < RECHECK_VIRTUAL)
{
return family;
}
let (family, resolved) = resolve_family(&gilrs.gamepad(id));
self.known.insert(id, (family, (!resolved).then(Instant::now)));
family
}
fn forget(&mut self, id: GamepadId) {
self.known.remove(&id);
}
}
/// The family of a pad, and whether it is certain. For Steam's virtual pad the
/// physical controller comes from the file Steam names in
/// SteamVirtualGamepadInfo, the way SDL finds it.
fn resolve_family(pad: &gilrs::Gamepad<'_>) -> (Family, bool) {
let (vendor, product) = (pad.vendor_id(), pad.product_id());
if (vendor, product) != (Some(VENDOR_VALVE), Some(PRODUCT_STEAM_VIRTUAL_GAMEPAD)) {
return (prompts::family_from_ids(vendor, product), true);
}
let physical = prompts::virtual_slot(pad.os_name()).and_then(|slot| {
let path = std::env::var_os("SteamVirtualGamepadInfo")?;
let text = std::fs::read_to_string(path).ok()?;
prompts::parse_virtual_pads(&text).remove(&slot)
});
match physical {
Some(p) => {
log::info!(
"Steam virtual pad '{}' is a {:04x?}:{:04x?}",
pad.os_name(),
p.vendor,
p.product
);
(prompts::family_from_ids(p.vendor, p.product), true)
}
None => (Family::Xbox, false),
}
}
fn dpad_action(b: Button) -> Option<Action> {
Some(match b {
Button::DPadUp => Action::Up,
+10 -2
View File
@@ -3,9 +3,12 @@ slint::include_modules!();
mod app;
mod config;
mod devscript;
mod inhibit;
mod input;
mod palette;
mod player;
mod prompts;
mod saved_queue;
mod subsonic;
use std::time::Duration;
@@ -24,8 +27,13 @@ fn main() -> anyhow::Result<()> {
let ui = AppWindow::new()?;
ui.set_version(env!("CARGO_PKG_VERSION").into());
app::install(&ui, rt.handle().clone());
input::spawn_gamepad(|action| {
let _ = slint::invoke_from_event_loop(move || app::with_app(move |app| app.action(action)));
input::spawn_gamepad(|ev| {
let _ = slint::invoke_from_event_loop(move || {
app::with_app(move |app| match ev {
input::PadEvent::Action(action, family) => app.pad_action(action, family),
input::PadEvent::Present(family) => app.pad_present(family),
})
});
});
// Kept alive until the event loop ends.
+155 -15
View File
@@ -26,6 +26,11 @@ struct Queue {
current: Option<usize>,
/// Handed to playbin, becomes `current` at its stream-start.
pending: Option<usize>,
/// Loaded paused by `load_paused` and not played since: a track that
/// fails is skipped without starting playback.
hold: bool,
/// Seconds to seek to once the paused track has prerolled.
seek_to: Option<f64>,
}
pub struct Player {
@@ -103,11 +108,34 @@ impl Player {
}
}
/// Replaces the queue with `urls` and readies `index` paused at
/// `position` seconds, so nothing plays until `toggle_pause`. With no
/// index the queue is only stored, as after it played to the end.
pub fn load_paused(&self, urls: &[String], index: Option<usize>, position: f64) {
let url = {
let mut q = lock(&self.queue);
q.urls = urls.to_vec();
q.current = None;
q.pending = None;
q.hold = false;
q.seek_to = None;
let Some(i) = index else { return };
let Some(url) = q.urls.get(i).cloned() else { return };
q.pending = Some(i);
q.hold = true;
q.seek_to = (position > 0.0).then_some(position);
url
};
start_paused(&self.playbin, &url);
}
pub fn play_index(&self, index: usize) {
let url = {
let mut q = lock(&self.queue);
let Some(url) = q.urls.get(index).cloned() else { return };
q.pending = Some(index);
q.hold = false;
q.seek_to = None;
url
};
// Not under the lock: a state change waits for the streaming threads,
@@ -116,11 +144,22 @@ impl Player {
}
pub fn toggle_pause(&self) {
let target = match self.playbin.current_state() {
// Toggles where the pipeline is heading, so play pressed while a
// paused track is still loading is not lost.
let (_, current, pending) = self.playbin.state(gst::ClockTime::ZERO);
let heading = if pending == gst::State::VoidPending {
current
} else {
pending
};
let target = match heading {
gst::State::Playing => gst::State::Paused,
gst::State::Paused => gst::State::Playing,
_ => return,
};
if target == gst::State::Playing {
lock(&self.queue).hold = false;
}
let _ = self.playbin.set_state(target);
}
@@ -142,17 +181,7 @@ impl Player {
let Some(pos) = self.playbin.query_position::<gst::ClockTime>() else {
return;
};
let mut target = (pos.seconds_f64() + seconds).max(0.0);
if let Some(dur) = self.playbin.query_duration::<gst::ClockTime>() {
target = target.min((dur.seconds_f64() - 1.0).max(0.0));
}
let flags = gst::SeekFlags::FLUSH | gst::SeekFlags::KEY_UNIT;
if let Err(e) = self
.playbin
.seek_simple(flags, gst::ClockTime::from_seconds_f64(target))
{
log::debug!("seek failed: {e}");
}
seek_to(&self.playbin, pos.seconds_f64() + seconds);
}
}
@@ -178,6 +207,27 @@ fn start(playbin: &gst::Element, url: &str) {
}
}
fn start_paused(playbin: &gst::Element, url: &str) {
let _ = playbin.set_state(gst::State::Ready);
playbin.set_property("uri", url);
if let Err(e) = playbin.set_state(gst::State::Paused) {
log::warn!("could not load the track: {e}");
}
}
/// Seeks to `seconds`, kept a second short of the end so a stale position
/// does not land past a track that has since changed.
fn seek_to(playbin: &gst::Element, seconds: f64) {
let mut target = seconds.max(0.0);
if let Some(dur) = playbin.query_duration::<gst::ClockTime>() {
target = target.min((dur.seconds_f64() - 1.0).max(0.0));
}
let flags = gst::SeekFlags::FLUSH | gst::SeekFlags::KEY_UNIT;
if let Err(e) = playbin.seek_simple(flags, gst::ClockTime::from_seconds_f64(target)) {
log::debug!("seek failed: {e}");
}
}
fn watch_bus(playbin: &gst::Element, queue: &Mutex<Queue>, stop: &AtomicBool, emit: &dyn Fn(PlayerEvent)) {
let Some(bus) = playbin.bus() else { return };
let mut last_tick = Instant::now();
@@ -217,6 +267,16 @@ fn watch_bus(playbin: &gst::Element, queue: &Mutex<Queue>, stop: &AtomicBool, em
gst::State::Paused if s.pending() == gst::State::VoidPending => emit(PlayerEvent::Paused(true)),
_ => {}
},
// Prerolled: the first moment a paused track can seek, and the
// ticks below report no position while paused, so report it here.
MessageView::AsyncDone(_) => {
let target = lock(queue).seek_to.take();
if let Some(s) = target {
seek_to(playbin, s);
} else if let Some(p) = playbin.query_position::<gst::ClockTime>() {
emit(PlayerEvent::Position(p.seconds_f64()));
}
}
MessageView::Eos(_) => {
{
let mut q = lock(queue);
@@ -226,15 +286,23 @@ fn watch_bus(playbin: &gst::Element, queue: &Mutex<Queue>, stop: &AtomicBool, em
let _ = playbin.set_state(gst::State::Ready);
report_track(None, false);
}
// A failing source posts several errors. Once the first has moved
// on to the next track, the source is out of playbin and the rest
// would count as the next track failing too.
MessageView::Error(err) if err.src().is_some_and(|s| !s.has_as_ancestor(playbin)) => {
log::debug!("dropping an error from a track already skipped: {}", err.error());
}
MessageView::Error(err) => {
let detail = err.debug().map(|d| d.to_string()).unwrap_or_default();
log::warn!("playback error: {} ({})", err.error(), strip_queries(&detail));
// Skip the track that failed rather than stopping the queue.
let (next, len) = {
let (next, len, hold) = {
let mut q = lock(queue);
let failed = q.pending.take().or(q.current);
q.current = None;
(failed.map_or(usize::MAX, |i| i + 1), q.urls.len())
// The position belonged to the track that failed.
q.seek_to = None;
(failed.map_or(usize::MAX, |i| i + 1), q.urls.len(), q.hold)
};
if next < len {
let url = {
@@ -242,7 +310,11 @@ fn watch_bus(playbin: &gst::Element, queue: &Mutex<Queue>, stop: &AtomicBool, em
q.pending = Some(next);
q.urls[next].clone()
};
start(playbin, &url);
if hold {
start_paused(playbin, &url);
} else {
start(playbin, &url);
}
} else {
let _ = playbin.set_state(gst::State::Ready);
report_track(None, false);
@@ -395,4 +467,72 @@ mod tests {
drop(player);
let _ = std::fs::remove_dir_all(&dir);
}
#[test]
fn a_paused_load_seeks_and_waits_for_play() {
// SAFETY: set before any thread reads the environment in this test.
unsafe { std::env::set_var("REMUS_AUDIO_SINK", "fakesink") };
let dir = std::env::temp_dir().join(format!("remus-player-paused-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
// The saved track no longer exists, so the next one is readied instead.
let missing = format!("file://{}", dir.join("gone.wav").display());
let urls = vec![
silent_wav(&dir, "a.wav", 10.0),
missing,
silent_wav(&dir, "c.wav", 10.0),
];
let (tx, rx) = mpsc::channel();
let player = Player::spawn(move |ev| {
let _ = tx.send(ev);
})
.unwrap();
player.load_paused(&urls, Some(1), 5.0);
let mut track = None;
let mut started = false;
let deadline = Instant::now() + Duration::from_secs(2);
while let Some(left) = deadline.checked_duration_since(Instant::now()) {
match rx.recv_timeout(left) {
Ok(PlayerEvent::Track(t)) => track = t,
Ok(PlayerEvent::Paused(false)) => started = true,
Ok(PlayerEvent::Position(p)) if p > 0.0 => started = true,
Ok(_) => {}
Err(_) => break,
}
}
assert_eq!(track, Some(2), "skipped the missing track");
assert!(!started, "nothing plays before play is pressed");
player.toggle_pause();
let mut played = false;
while let Ok(ev) = rx.recv_timeout(Duration::from_secs(3)) {
if let PlayerEvent::Position(p) = ev
&& p > 0.0
{
played = true;
// The seek was dropped with the track it belonged to.
assert!(p < 4.0, "position {p}");
break;
}
}
assert!(played, "plays once play is pressed");
player.load_paused(&urls, Some(0), 5.0);
player.toggle_pause();
let mut pos = None;
while let Ok(ev) = rx.recv_timeout(Duration::from_secs(3)) {
if let PlayerEvent::Position(p) = ev
&& p > 0.0
{
pos = Some(p);
break;
}
}
let p = pos.expect("a position once playing");
assert!((4.5..7.0).contains(&p), "resumed at {p}");
drop(player);
let _ = std::fs::remove_dir_all(&dir);
}
}
+307
View File
@@ -0,0 +1,307 @@
//! Which icons the hint bar shows: keyboard keys, or the buttons of the
//! controller in use. Icons are Kenney's Input Prompts (CC0), in ui/prompts.
use std::collections::HashMap;
/// Controller families with their own button icons.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum Family {
Xbox,
PlayStation,
Switch,
SteamDeck,
}
/// What the hints are drawn for.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum Prompts {
Keyboard,
Pad(Family),
}
/// An action the hint bar can point at. Each maps to one control per input:
/// the gamepad side matches `button_action` in src/input.rs, the keyboard
/// side the key-pressed handler in ui/app.slint.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum Control {
Activate,
Back,
PlayPause,
Queue,
Skip,
Sections,
Search,
NowPlaying,
Seek,
/// Steam + X brings up Steam's on-screen keyboard. Nothing to show for a
/// real keyboard.
OnScreenKeyboard,
}
#[cfg(test)]
impl Control {
pub const ALL: [Control; 10] = [
Control::Activate,
Control::Back,
Control::PlayPause,
Control::Queue,
Control::Skip,
Control::Sections,
Control::Search,
Control::NowPlaying,
Control::Seek,
Control::OnScreenKeyboard,
];
}
macro_rules! icon {
($dir:literal, $name:literal) => {
include_bytes!(concat!("../ui/prompts/", $dir, "/", $name, ".svg")) as &'static [u8]
};
}
/// The SVG icons for `control`, left to right. Empty when there is nothing to
/// press for it with this input.
pub fn icons(prompts: Prompts, control: Control) -> &'static [&'static [u8]] {
use Control::*;
match prompts {
Prompts::Keyboard => match control {
Activate => &[icon!("keyboard", "keyboard_enter")],
Back => &[icon!("keyboard", "keyboard_escape")],
PlayPause => &[icon!("keyboard", "keyboard_space")],
Queue => &[icon!("keyboard", "keyboard_q")],
Skip => &[icon!("keyboard", "keyboard_p"), icon!("keyboard", "keyboard_n")],
Sections => &[icon!("keyboard", "keyboard_tab")],
Search => &[icon!("keyboard", "keyboard_slash_forward")],
NowPlaying => &[icon!("keyboard", "keyboard_f")],
Seek => &[icon!("keyboard", "keyboard_arrows_horizontal")],
OnScreenKeyboard => &[],
},
Prompts::Pad(Family::Xbox) => match control {
Activate => &[icon!("xbox", "xbox_button_color_a")],
Back => &[icon!("xbox", "xbox_button_color_b")],
PlayPause => &[icon!("xbox", "xbox_button_color_x")],
Queue => &[icon!("xbox", "xbox_button_color_y")],
Skip => &[icon!("xbox", "xbox_lb"), icon!("xbox", "xbox_rb")],
Sections => &[icon!("xbox", "xbox_lt"), icon!("xbox", "xbox_rt")],
Search => &[icon!("xbox", "xbox_button_view")],
NowPlaying => &[icon!("xbox", "xbox_button_menu")],
Seek => &[icon!("xbox", "xbox_dpad_horizontal")],
OnScreenKeyboard => &[icon!("xbox", "xbox_guide"), icon!("xbox", "xbox_button_color_x")],
},
Prompts::Pad(Family::PlayStation) => match control {
Activate => &[icon!("playstation", "playstation_button_color_cross")],
Back => &[icon!("playstation", "playstation_button_color_circle")],
PlayPause => &[icon!("playstation", "playstation_button_color_square")],
Queue => &[icon!("playstation", "playstation_button_color_triangle")],
Skip => &[
icon!("playstation", "playstation_trigger_l1"),
icon!("playstation", "playstation_trigger_r1"),
],
Sections => &[
icon!("playstation", "playstation_trigger_l2"),
icon!("playstation", "playstation_trigger_r2"),
],
Search => &[icon!("playstation", "playstation5_button_create")],
NowPlaying => &[icon!("playstation", "playstation5_button_options")],
Seek => &[icon!("playstation", "playstation_dpad_horizontal")],
// The pack has no PS button; Steam's own label says the same thing.
OnScreenKeyboard => &[
icon!("steamdeck", "steamdeck_button_guide"),
icon!("playstation", "playstation_button_color_square"),
],
},
// By position, as gilrs reports buttons: the bottom face button is B on a Switch.
Prompts::Pad(Family::Switch) => match control {
Activate => &[icon!("switch", "switch_button_b")],
Back => &[icon!("switch", "switch_button_a")],
PlayPause => &[icon!("switch", "switch_button_y")],
Queue => &[icon!("switch", "switch_button_x")],
Skip => &[icon!("switch", "switch_button_l"), icon!("switch", "switch_button_r")],
Sections => &[icon!("switch", "switch_button_zl"), icon!("switch", "switch_button_zr")],
Search => &[icon!("switch", "switch_button_minus")],
NowPlaying => &[icon!("switch", "switch_button_plus")],
Seek => &[icon!("switch", "switch_dpad_horizontal")],
OnScreenKeyboard => &[
icon!("switch", "switch_button_home"),
icon!("switch", "switch_button_y"),
],
},
Prompts::Pad(Family::SteamDeck) => match control {
Activate => &[icon!("steamdeck", "steamdeck_button_a")],
Back => &[icon!("steamdeck", "steamdeck_button_b")],
PlayPause => &[icon!("steamdeck", "steamdeck_button_x")],
Queue => &[icon!("steamdeck", "steamdeck_button_y")],
Skip => &[
icon!("steamdeck", "steamdeck_button_l1"),
icon!("steamdeck", "steamdeck_button_r1"),
],
Sections => &[
icon!("steamdeck", "steamdeck_button_l2"),
icon!("steamdeck", "steamdeck_button_r2"),
],
Search => &[icon!("steamdeck", "steamdeck_button_view")],
NowPlaying => &[icon!("steamdeck", "steamdeck_button_options")],
Seek => &[icon!("steamdeck", "steamdeck_dpad_horizontal")],
OnScreenKeyboard => &[
icon!("steamdeck", "steamdeck_button_guide"),
icon!("steamdeck", "steamdeck_button_x"),
],
},
}
}
const VENDOR_MICROSOFT: u16 = 0x045e;
const VENDOR_SONY: u16 = 0x054c;
const VENDOR_NINTENDO: u16 = 0x057e;
pub const VENDOR_VALVE: u16 = 0x28de;
/// Steam's virtual gamepad, which stands in for whatever is really connected.
pub const PRODUCT_STEAM_VIRTUAL_GAMEPAD: u16 = 0x11ff;
const PRODUCT_STEAM_DECK: u16 = 0x1205;
/// The family of a physical controller, by its USB ids. Unknown controllers,
/// and Steam's virtual one, get Xbox icons: most pads follow that layout.
pub fn family_from_ids(vendor: Option<u16>, product: Option<u16>) -> Family {
match (vendor, product) {
(Some(VENDOR_SONY), _) => Family::PlayStation,
(Some(VENDOR_NINTENDO), _) => Family::Switch,
(Some(VENDOR_VALVE), Some(PRODUCT_STEAM_DECK)) => Family::SteamDeck,
(Some(VENDOR_MICROSOFT), _) => Family::Xbox,
_ => Family::Xbox,
}
}
/// One physical controller listed in Steam's virtual gamepad file.
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct VirtualPad {
pub vendor: Option<u16>,
pub product: Option<u16>,
}
/// Parses the file `SteamVirtualGamepadInfo` points at, as SDL does
/// (src/joystick/SDL_steam_virtual_gamepad.c): `[slot N]` sections with
/// `VID=` and `PID=` lines, numbers in C notation (0x for hex).
pub fn parse_virtual_pads(text: &str) -> HashMap<u32, VirtualPad> {
let mut pads = HashMap::new();
let mut slot: Option<u32> = None;
for line in text.lines().map(str::trim) {
if let Some(n) = line.strip_prefix("[slot").and_then(|r| r.strip_suffix(']')) {
slot = n.trim().parse().ok();
if let Some(s) = slot {
pads.entry(s).or_insert(VirtualPad {
vendor: None,
product: None,
});
}
continue;
}
let (Some(s), Some((key, value))) = (slot, line.split_once('=')) else {
continue;
};
let Some(pad) = pads.get_mut(&s) else { continue };
match key {
"VID" => pad.vendor = parse_c_number(value),
"PID" => pad.product = parse_c_number(value),
_ => {}
}
}
pads
}
fn parse_c_number(s: &str) -> Option<u16> {
let s = s.trim();
match s.strip_prefix("0x").or_else(|| s.strip_prefix("0X")) {
Some(hex) => u16::from_str_radix(hex, 16).ok(),
None if s.len() > 1 && s.starts_with('0') => u16::from_str_radix(&s[1..], 8).ok(),
None => s.parse().ok(),
}
}
/// The slot of a Steam virtual pad, from its OS name ("... pad 2" is slot 2),
/// as SDL reads it.
pub fn virtual_slot(os_name: &str) -> Option<u32> {
let rest = &os_name[os_name.find("pad ")? + 4..];
let digits: String = rest.chars().take_while(char::is_ascii_digit).collect();
digits.parse().ok()
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn every_control_has_icons_for_every_controller() {
for family in [Family::Xbox, Family::PlayStation, Family::Switch, Family::SteamDeck] {
for control in Control::ALL {
assert!(
!icons(Prompts::Pad(family), control).is_empty(),
"{family:?} {control:?}"
);
}
}
}
#[test]
fn keyboard_has_icons_for_everything_but_steam_keyboard() {
for control in Control::ALL {
let n = icons(Prompts::Keyboard, control).len();
if control == Control::OnScreenKeyboard {
assert_eq!(n, 0);
} else {
assert!(n > 0, "{control:?}");
}
}
}
#[test]
fn icons_are_svg() {
for prompts in [
Prompts::Keyboard,
Prompts::Pad(Family::Xbox),
Prompts::Pad(Family::PlayStation),
Prompts::Pad(Family::Switch),
Prompts::Pad(Family::SteamDeck),
] {
for control in Control::ALL {
for svg in icons(prompts, control) {
assert!(svg.starts_with(b"<svg") || svg.starts_with(b"<?xml"));
}
}
}
}
#[test]
fn families_by_usb_ids() {
assert_eq!(family_from_ids(Some(0x054c), Some(0x0ce6)), Family::PlayStation);
assert_eq!(family_from_ids(Some(0x057e), Some(0x2009)), Family::Switch);
assert_eq!(family_from_ids(Some(0x28de), Some(0x1205)), Family::SteamDeck);
assert_eq!(family_from_ids(Some(0x045e), Some(0x0b12)), Family::Xbox);
assert_eq!(family_from_ids(Some(0x28de), Some(0x11ff)), Family::Xbox);
assert_eq!(family_from_ids(None, None), Family::Xbox);
}
#[test]
fn steam_virtual_pad_file() {
let text = "[slot 0]\nname=Steam Deck\nVID=0x28de\nPID=0x1205\ntype=steamdeck\nhandle=0x1\n\n\
[slot 1]\r\nname=DualSense\r\nVID=0x054c\r\nPID=3302\r\n";
let pads = parse_virtual_pads(text);
assert_eq!(
pads[&0],
VirtualPad {
vendor: Some(0x28de),
product: Some(0x1205)
}
);
assert_eq!(pads[&1].product, Some(3302));
assert_eq!(family_from_ids(pads[&1].vendor, pads[&1].product), Family::PlayStation);
assert!(parse_virtual_pads("VID=0x054c\ngarbage\n").is_empty());
}
#[test]
fn slots_come_from_the_pad_name() {
assert_eq!(virtual_slot("Microsoft X-Box 360 pad 0"), Some(0));
assert_eq!(virtual_slot("Microsoft X-Box 360 pad 12"), Some(12));
assert_eq!(virtual_slot("Steam Virtual Gamepad"), None);
assert_eq!(virtual_slot("gamepad x"), None);
}
}
+166
View File
@@ -0,0 +1,166 @@
//! The queue saved to disk, so a restart picks up where playback was.
//!
//! One file holds a queue per server, keyed by user and server address. It
//! stores song ids and what is needed to draw the queue, never a stream URL:
//! those carry the token or the password, and are rebuilt from the client.
use std::collections::BTreeMap;
use std::fs;
use std::path::{Path, PathBuf};
use anyhow::Result;
use serde::{Deserialize, Serialize};
use crate::config;
use crate::subsonic::{Client, Song};
const VERSION: u32 = 1;
#[derive(Debug, Clone, Default, PartialEq, Serialize, Deserialize)]
pub struct SavedQueue {
pub songs: Vec<Song>,
pub current: Option<usize>,
/// Seconds into the current song.
pub position: f64,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SavedQueues {
version: u32,
servers: BTreeMap<String, SavedQueue>,
}
impl Default for SavedQueues {
fn default() -> Self {
SavedQueues {
version: VERSION,
servers: BTreeMap::new(),
}
}
}
impl SavedQueues {
pub fn get(&self, client: &Client) -> Option<&SavedQueue> {
self.servers.get(&key(client))
}
pub fn set(&mut self, client: &Client, queue: SavedQueue) {
self.servers.insert(key(client), queue);
}
}
/// Song ids are only unique within one server, and two users of a server
/// have their own queues.
fn key(client: &Client) -> String {
format!("{}@{}", client.user(), client.base())
}
pub fn path() -> Option<PathBuf> {
config::state_dir().map(|d| d.join("queue.json"))
}
/// The saved queues, or none when there is no file or it cannot be read.
/// A bad file is logged and left for the next save to replace.
pub fn load(path: &Path) -> SavedQueues {
let text = match fs::read_to_string(path) {
Ok(text) => text,
Err(e) if e.kind() == std::io::ErrorKind::NotFound => return SavedQueues::default(),
Err(e) => {
log::warn!("reading {}: {e}", path.display());
return SavedQueues::default();
}
};
match serde_json::from_str::<SavedQueues>(&text) {
Ok(q) if q.version == VERSION => q,
Ok(q) => {
log::warn!("ignoring {}: unknown version {}", path.display(), q.version);
SavedQueues::default()
}
Err(e) => {
log::warn!("ignoring {}: {e}", path.display());
SavedQueues::default()
}
}
}
pub fn save(path: &Path, queues: &SavedQueues) -> Result<()> {
config::write_atomic(path, &serde_json::to_string(queues)?)
}
#[cfg(test)]
mod tests {
use super::*;
use crate::subsonic::Auth;
fn song(id: &str) -> Song {
serde_json::from_value(serde_json::json!({
"id": id, "title": format!("Song {id}"), "artist": "A", "album": "B",
"coverArt": "al-1", "duration": 200, "track": 1,
}))
.unwrap()
}
fn temp(name: &str) -> PathBuf {
let dir = std::env::temp_dir().join(format!("remus-queue-{name}-{}", std::process::id()));
let _ = fs::remove_dir_all(&dir);
dir.join("queue.json")
}
#[test]
fn round_trips_a_queue_per_server() {
let path = temp("round-trip");
let home = Client::new("https://home", "u", Auth::Password("secret-pass".into()));
let other = Client::new(
"https://other",
"u",
Auth::Token {
salt: "s".into(),
token: "secret-token".into(),
},
);
let mut queues = SavedQueues::default();
let a = SavedQueue {
songs: vec![song("1"), song("2")],
current: Some(1),
position: 93.5,
};
let b = SavedQueue {
songs: vec![song("9")],
current: None,
position: 0.0,
};
queues.set(&home, a.clone());
queues.set(&other, b.clone());
save(&path, &queues).unwrap();
let back = load(&path);
assert_eq!(back.get(&home), Some(&a));
assert_eq!(back.get(&other), Some(&b));
let text = fs::read_to_string(&path).unwrap();
assert!(!text.contains("secret") && !text.contains("stream"), "{text}");
let _ = fs::remove_dir_all(path.parent().unwrap());
}
#[test]
fn an_unreadable_file_loads_as_empty() {
let path = temp("unreadable");
fs::create_dir_all(path.parent().unwrap()).unwrap();
let client = Client::new("https://h", "u", Auth::Password("p".into()));
for text in ["{ not json", "{\"version\": 99, \"servers\": {}}", ""] {
fs::write(&path, text).unwrap();
assert_eq!(load(&path).get(&client), None, "{text:?}");
}
// A directory in its place cannot be read as a file at all.
fs::remove_file(&path).unwrap();
fs::create_dir(&path).unwrap();
assert_eq!(load(&path).get(&client), None);
let _ = fs::remove_dir_all(path.parent().unwrap());
}
#[test]
fn a_missing_file_loads_as_empty() {
let path = temp("missing");
assert_eq!(load(&path), SavedQueues::default());
}
}
+2 -2
View File
@@ -4,8 +4,8 @@ use std::hash::{BuildHasher, RandomState};
use std::time::{SystemTime, UNIX_EPOCH};
use anyhow::{Context, Result, anyhow, bail};
use serde::Deserialize;
use serde::de::{DeserializeOwned, Deserializer};
use serde::{Deserialize, Serialize};
const API_VERSION: &str = "1.16.1";
const CLIENT_NAME: &str = "remus";
@@ -415,7 +415,7 @@ pub struct AlbumDetail {
pub song: Vec<Song>,
}
#[derive(Debug, Clone, Deserialize)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Song {
#[serde(deserialize_with = "de_id")]
+28 -28
View File
@@ -42,7 +42,7 @@ export struct Header {
round: bool,
}
export struct Hint { key: string, label: string }
export struct Hint { icons: [image], label: string }
export global Theme {
in-out property <float> s: 1.0;
@@ -556,14 +556,6 @@ component HintBar inherits Rectangle {
in property <[Hint]> hints;
in property <string> version;
pure function key-color(k: string) -> color {
if (k == "A") { return #3fb950; }
if (k == "B") { return #f0605d; }
if (k == "X") { return #4d8ff7; }
if (k == "Y") { return #e3b341; }
return Theme.line;
}
HorizontalLayout {
padding-left: 28px * Theme.s;
padding-right: 28px * Theme.s;
@@ -572,24 +564,15 @@ component HintBar inherits Rectangle {
for h in root.hints: HorizontalLayout {
spacing: 9px * Theme.s;
VerticalLayout {
alignment: center;
Rectangle {
min-width: 26px * Theme.s;
height: 26px * Theme.s;
border-radius: 13px * Theme.s;
background: root.key-color(h.key);
HorizontalLayout {
padding-left: 8px * Theme.s;
padding-right: 8px * Theme.s;
Text {
text: h.key;
font-size: 12px * Theme.s;
font-weight: 800;
color: #ffffff;
horizontal-alignment: center;
vertical-alignment: center;
}
HorizontalLayout {
spacing: 3px * Theme.s;
for icon in h.icons: VerticalLayout {
alignment: center;
Image {
source: icon;
height: 30px * Theme.s;
// Keys such as Space are wider than a button.
width: self.height * icon.width / max(1, icon.height);
}
}
}
@@ -658,6 +641,7 @@ component LoginView inherits Rectangle {
in property <string> error;
in property <bool> busy;
callback submit;
callback exit;
callback field-clicked(int);
public function focus-field(i: int) {
if (i == 0) {
@@ -682,7 +666,7 @@ component LoginView inherits Rectangle {
spacing: 20px * Theme.s;
HorizontalLayout {
alignment: start;
alignment: center;
Image {
source: @image-url("../branding/svg/remus-logo.svg");
height: 68px * Theme.s;
@@ -728,6 +712,21 @@ component LoginView inherits Rectangle {
clicked => { root.submit(); }
}
}
// Secondary to Connect: outlined, no fill, and only lit when focused.
Rectangle {
height: 46px * Theme.s;
border-radius: 12px * Theme.s;
border-width: 2px * Theme.s;
border-color: root.focus-index == 4 ? Theme.focus : Theme.line;
Text {
text: "Exit";
font-size: 17px * Theme.s;
color: root.focus-index == 4 ? Theme.text : Theme.muted;
}
TouchArea {
clicked => { root.exit(); }
}
}
if root.error != "": Text {
text: root.error;
font-size: 15px * Theme.s;
@@ -1016,6 +1015,7 @@ export component AppWindow inherits Window {
error: root.login-error;
busy: root.login-busy;
submit => { root.login-submit(); }
exit => { root.action(Action.quit); }
field-clicked(i) => { root.login-field-clicked(i); }
}
+28
View File
@@ -0,0 +1,28 @@
Input Prompts (1.5A)
Created/distributed by Kenney (www.kenney.nl)
Creation date: 11-07-2026
------------------------------
License: (Creative Commons Zero, CC0)
http://creativecommons.org/publicdomain/zero/1.0/
You can use this content for personal, educational, and commercial purposes.
Support by crediting 'Kenney' or 'www.kenney.nl' (this is not a requirement)
------------------------------
• Website : www.kenney.nl
• Donate : www.kenney.nl/donate
• Patreon : patreon.com/kenney
Follow on social media for updates:
• Twitter: twitter.com/KenneyNL
• Instagram: instagram.com/kenney_nl
• Mastodon: mastodon.gamedev.place/@kenney
@@ -0,0 +1,7 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#E73246" d="M45 33 L51 33 Q55 33 55 37 L55 43 Q55 47 51 47 L45 47 Q41 47 41 43 L41 37 Q41 33 45 33 M13 33 L19 33 Q23 33 23 37 L23 43 Q23 47 19 47 L13 47 Q9 47 9 43 L9 37 Q9 33 13 33"/>
<path stroke="none" fill="#FFFFFF" d="M29 17 L35 17 Q39 17 39 21 L39 27 Q39 31 35 31 L29 31 Q25 31 25 27 L25 21 Q25 17 29 17 M29 33 L35 33 Q39 33 39 37 L39 43 Q39 47 35 47 L29 47 Q25 47 25 43 L25 37 Q25 33 29 33"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 570 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 40 8 38.95 8 36 Q8 28 16 28 L28 28 28 16 Q28 8 36 8 L38.95 8 40 8 48 8 M46.1 43 L45 43 45 41 46.05 41 Q46.45 41 46.7 41.25 L47 42 46.75 42.7 46.7 42.7 46.45 42.9 46.1 43 M48.1 44.1 Q49 43.25 49 42 49 40.75 48.1 39.85 47.25 39 46.05 39 L44 39 Q43.6 39 43.3 39.3 43 39.6 43 40 L43 48 Q43 48.4 43.3 48.7 43.6 49 44 49 L44.7 48.7 45 48 45 45 45.4 45 47.1 48.45 Q47.3 48.8 47.7 48.95 L48.45 48.9 48.95 48.35 Q49.1 47.95 48.9 47.55 L47.45 44.65 48.1 44.15 48.1 44.1 M36 40 L36 48 Q36 48.4 36.3 48.7 L37 49 41 49 41.7 48.7 42 48 41.7 47.3 Q41.4 47 41 47 L38 47 38 45 41 45 41.7 44.7 42 44 41.7 43.3 Q41.4 43 41 43 L38 43 38 41 41 41 41.7 40.7 42 40 41.7 39.3 Q41.4 39 41 39 L37 39 Q36.6 39 36.3 39.3 36 39.6 36 40 M20 43 L17 43 17 41 20 41 20.7 40.7 21 40 20.7 39.3 Q20.4 39 20 39 L16 39 Q15.6 39 15.3 39.3 15 39.6 15 40 L15 48 Q15 48.4 15.3 48.7 L16 49 20 49 20.7 48.7 21 48 20.7 47.3 Q20.4 47 20 47 L17 47 17 45 20 45 20.7 44.7 21 44 20.7 43.3 Q20.4 43 20 43 M28 48 L28 40 27.7 39.3 Q27.4 39 27 39 26.6 39 26.3 39.3 26 39.6 26 40 L26 43.75 23.9 39.55 23.45 39.1 22.8 39.05 22.25 39.4 Q22 39.65 22 40 L22 48 Q22 48.4 22.3 48.7 22.6 49 23 49 L23.7 48.7 24 48 24 44.25 26.1 48.45 Q26.25 48.75 26.6 48.9 L27.25 49 27.8 48.65 28 48 M30 41 L31 41 31 48 Q31 48.4 31.3 48.7 31.6 49 32 49 L32.7 48.7 33 48 33 41 34 41 Q34.4 41 34.7 40.7 L35 40 34.7 39.3 Q34.4 39 34 39 L30 39 Q29.6 39 29.3 39.3 29 39.6 29 40 29 40.4 29.3 40.7 L30 41"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M16 8 L48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8 M44.8 37 Q46.05 35.8 46 34.3 L46 32.8 43 32.8 43 34.3 42.75 34.8 42 35 41.2 34.8 41 34.3 41 28.75 41.2 28.3 41.25 28.25 Q41.55 28 42 28 42.45 28 42.8 28.3 L43 28.75 43 30.25 46 30.25 46 28.75 Q46 27.15 44.75 26.05 43.55 25 42 25 40.4 25 39.25 26.05 L39.2 26.05 Q38 27.15 38 28.75 L38 34.3 Q38 35.8 39.15 36.95 L39.2 37.05 39.3 37.1 Q40.4 38 42 38 43.55 38 44.7 37.1 L44.8 37 M18 25 L18 38 26 38 26 35 21 35 21 33 26 33 26 30 21 30 21 28 26 28 26 25 18 25 M32 28 L36 28 36 25 32 25 Q30.4 25 29.2 26.2 28 27.4 28 29 28 30.6 29.2 31.8 30.4 33 31.95 33 L32.05 33 Q32.4 33 32.7 33.3 L33 34 32.7 34.7 32 35 28 35 28 38 32 38 Q33.6 38 34.8 36.8 36 35.6 36 34 36 32.4 34.8 31.2 33.6 30 32.05 30 L31.95 30 31.3 29.7 Q31 29.4 31 29 31 28.6 31.3 28.3 31.6 28 32 28"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1013 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M16 8 L48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8 M24 22 L24 42 28 42 28 34 40 34 40 30 28 30 28 26 40 26 40 22 24 22"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 327 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M16 8 L48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8 M28 42 L28 30 36 42 40 42 40 22 36 22 36 34 28 22 24 22 24 42 28 42"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 327 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M25 22 L24 23 24 42 28 42 28 36 34 36 34.2 36 Q35.75 35.95 37 35.2 L38.1 34.4 38.1 34.35 38.2 34.25 38.25 34.2 39.6 32.3 40 30 40 28 Q40 25.5 38.25 23.75 L38.2 23.7 37 22.8 Q35.75 22.05 34.2 22 L25 22 M28 26 L34 26 Q34.8 26 35.4 26.6 L35.45 26.6 Q36 27.15 36 28 L36 30.4 35.45 31.35 35.35 31.45 34.9 31.8 34.05 32 28 32 28 26 M16 8 L48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 585 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M16 8 L48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8 M28 30 Q28 28.35 29.2 27.2 30.35 26 32 26 33.65 26 34.85 27.2 36 28.35 36 30 L36 34.1 35.9 34.9 35 34 32 34 32 37 32.9 37.9 32 38 Q30.35 38 29.2 36.85 28.05 35.7 28 34.1 L28 30 M24 30 L24 34.2 Q24.05 37.35 26.35 39.65 L28 40.95 Q29.8 42 32 42 34.2 42 36 41 L37 42 40 42 40 39 39 38 Q39.95 36.25 40 34.2 L40 30 Q40 26.7 37.65 24.35 35.3 22 32 22 28.7 22 26.35 24.35 24 26.7 24 30"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 638 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8 L48 8 M39 26 L39 23 38 22 35 22 25 38 25 41 26 42 29 42 39 26"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 315 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M41.1 36.25 Q42 35.35 42 34.25 L41.7 33.55 Q41.4 33.25 41 33.25 40.6 33.25 40.3 33.55 40 33.85 40 34.25 L39.75 34.8 39.75 34.75 39 35 38.2 34.75 38 34.25 38 29.8 Q38 29.45 38.25 29.2 L38.2 29.3 Q38.55 29 39 29 39.45 29 39.75 29.3 L39.75 29.25 40 29.8 Q40 30.2 40.3 30.5 L41 30.8 41.7 30.5 42 29.8 Q42 28.65 41.1 27.8 L41.05 27.75 Q40.15 27 39 27 37.75 27 36.9 27.75 L36.85 27.8 Q36 28.65 36 29.8 L36 34.25 Q36 35.35 36.85 36.2 L36.9 36.3 Q37.75 37 39 37 40.15 37 41.05 36.3 L41.1 36.25 M31 29.8 Q31 29.45 31.25 29.2 L31.2 29.3 Q31.55 29 32 29 32.45 29 32.75 29.3 L32.75 29.25 33 29.8 33 32 31 32 31 29.8 M29 29.8 L29 36 Q29 36.4 29.3 36.7 L30 37 Q30.4 37 30.7 36.7 L31 36 31 34 33 34 33 36 Q33 36.4 33.3 36.7 L34 37 Q34.4 37 34.7 36.7 L35 36 35 29.8 Q35 28.65 34.1 27.8 L34.05 27.75 Q33.15 27 32 27 30.75 27 29.9 27.75 L29.85 27.8 Q29 28.65 29 29.8 M48 27 L44 27 Q43.6 27 43.3 27.3 43 27.6 43 28 L43 36 Q43 36.4 43.3 36.7 43.6 37 44 37 L48 37 Q48.4 37 48.7 36.7 L49 36 48.7 35.3 Q48.4 35 48 35 L45 35 45 33 48 33 Q48.4 33 48.7 32.7 L49 32 48.7 31.3 Q48.4 31 48 31 L45 31 45 29 48 29 Q48.4 29 48.7 28.7 L49 28 48.7 27.3 Q48.4 27 48 27 M16 18 L48 18 Q56 18 56 26 L56 38 Q56 42.9 53 44.8 51.1 46 48 46 L16 46 Q12.9 46 11 44.8 8 42.9 8 38 L8 26 Q8 18 16 18 M18 29 L20 29 20.7 28.7 21 28 20.7 27.3 Q20.4 27 20 27 L18 27 Q16.8 27 15.9 27.9 15 28.8 15 30 15 31.2 15.9 32.1 16.8 33 17.95 33 L18.05 33 Q18.4 33 18.7 33.3 L19 34 18.7 34.7 Q18.4 35 18 35 L16 35 Q15.6 35 15.3 35.3 15 35.6 15 36 15 36.4 15.3 36.7 L16 37 18 37 Q19.2 37 20.1 36.1 21 35.2 21 34 21 32.8 20.1 31.9 19.2 31 18.05 31 L17.95 31 Q17.6 31 17.3 30.7 17 30.4 17 30 17 29.6 17.3 29.3 17.6 29 18 29 M25.1 33 L26.35 32.7 26.45 32.65 27.1 32.15 27.1 32.1 Q28 31.25 28 30 28 28.75 27.1 27.85 26.25 27 25.05 27 L23 27 Q22.6 27 22.3 27.3 22 27.6 22 28 L22 36 Q22 36.4 22.3 36.7 22.6 37 23 37 L23.7 36.7 24 36 24 33 25.1 33 M25.1 31 L24 31 24 29 25.05 29 25.7 29.25 26 30 25.75 30.7 25.7 30.7 25.45 30.9 25.1 31"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 22 L56 42 Q56 46.9 53 48.8 51.1 50 48 50 L16 50 Q12.9 50 11 48.8 8 46.9 8 42 L8 22 Q8 14 16 14 L48 14 Q56 14 56 22 M42.5 29.9 L42.3 30 41 30 41 28 42.05 28 Q42.45 28 42.7 28.25 L43 29 42.75 29.65 42.7 29.7 42.5 29.9 M46 29 Q46 27.35 44.8 26.15 43.65 25 42.05 25 L38 25 38 38 42.15 38 Q43 38 43.85 37.6 L44 37.5 44.8 36.8 44.8 36.85 Q46 35.7 46 34 46 32.55 45.15 31.5 46 30.45 46 29 M42.3 33 Q42.5 33.05 42.7 33.25 L43 34 42.75 34.65 42.7 34.7 42.5 34.9 42.15 35 41 35 41 33 42.3 33 M17 28 L20 28 20 38 23 38 23 28 26 28 26 25 17 25 17 28 M31 28.75 L31.2 28.3 31.25 28.25 Q31.55 28 32 28 32.45 28 32.8 28.3 L33 28.75 33 31 31 31 31 28.75 M28 28.75 L28 38 31 38 31 34 33 34 33 38 36 38 36 28.75 Q36 27.15 34.75 26.05 33.55 25 32 25 30.4 25 29.25 26.05 L29.2 26.05 Q28 27.15 28 28.75"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 966 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M28.15 26.25 Q31.45 25.35 34.45 27.05 37.35 28.85 38.25 32.25 L41.7 45.3 Q42.55 48.65 40.85 51.65 39.2 54.75 35.8 55.65 32.55 56.6 29.6 54.8 26.6 53.1 25.7 49.7 L22.3 36.6 Q21.4 33.25 23.15 30.2 24.85 27.2 28.15 26.25 M38.1 14.55 Q38.3 14.2 38.7 14.05 L39.45 14.1 39.95 14.7 39.9 15.45 36.9 21.45 36.35 21.95 35.55 21.9 35.05 21.35 Q34.9 20.95 35.1 20.55 L38.1 14.55 M18.1 15.45 Q17.9 15.05 18.05 14.7 L18.55 14.1 19.35 14.05 19.9 14.55 22.9 20.55 22.95 21.35 22.45 21.9 21.7 21.95 Q21.3 21.8 21.1 21.45 L18.1 15.45 M28 12 Q28 11.6 28.3 11.3 28.6 11 29 11 L29.7 11.3 30 12 30 20 29.7 20.7 29 21 Q28.6 21 28.3 20.7 28 20.4 28 20 L28 12"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 816 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M35.85 26.25 Q39.15 27.2 40.85 30.2 42.6 33.25 41.7 36.6 L38.3 49.7 Q37.4 53.1 34.4 54.8 31.45 56.6 28.2 55.65 24.8 54.75 23.15 51.65 21.45 48.65 22.3 45.3 L25.75 32.25 Q26.65 28.85 29.55 27.05 32.55 25.35 35.85 26.25 M28 10 L40 10 40 12 28 12 28 10 M28 18 L40 18 40 20 28 20 28 18 M28 14 L40 14 40 16 28 16 28 14"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 495 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FF6666" d="M37.7 26.35 Q40 28.65 40 32 40 35.35 37.7 37.7 35.35 40 32 40 28.7 40 26.4 37.7 L26.35 37.65 Q24 35.3 24 32 24 28.7 26.35 26.35 L26.4 26.35 Q28.7 24 32 24 35.35 24 37.7 26.35 M44 32 Q44 27 40.5 23.5 37 20 32 20 27.05 20 23.55 23.5 20 27 20 32 20 37 23.55 40.5 27.05 44 32 44 37 44 40.5 40.5 44 37 44 32 M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 606 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#7C66E8" d="M22.8 20 L20 22.8 29.2 32 20 41.2 22.8 44 32 34.8 41.2 44 44 41.2 34.8 32 44 22.8 41.2 20 32 29.2 22.8 20 M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 409 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FF69F8" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M20 20 L20 44 44 44 44 20 20 20 M24 40 L24 24 40 24 40 40 24 40"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 367 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#40E2A0" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M46 42 L32 18 18 42 46 42 M32 25.95 L39.05 38 25 38 32 25.95"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 364 B

@@ -0,0 +1,7 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#E73246" d="M56 26 L56 38 Q56 38.85 55.45 39.45 54.85 40 54 40 L44.85 40 Q44 40 43.45 39.45 L37.45 33.45 Q36.85 32.85 36.85 32 36.85 31.15 37.45 30.6 L43.45 24.6 Q44 24 44.85 24 L54 24 Q54.85 24 55.45 24.6 56 25.15 56 26 M19.15 40 L10 40 Q9.15 40 8.6 39.45 8 38.85 8 38 L8 26 Q8 25.15 8.6 24.6 9.15 24 10 24 L19.15 24 Q20 24 20.6 24.6 L26.6 30.6 Q27.15 31.15 27.15 32 27.15 32.85 26.6 33.45 L20.6 39.45 Q20 40 19.15 40"/>
<path stroke="none" fill="#FFFFFF" d="M40 10 L40 19.15 Q40 20 39.45 20.6 L33.45 26.6 Q32.85 27.15 32 27.15 31.15 27.15 30.6 26.6 L24.6 20.6 Q24 20 24 19.15 L24 10 Q24 9.15 24.6 8.6 25.15 8 26 8 L38 8 Q38.85 8 39.45 8.6 40 9.15 40 10 M33.45 37.45 L39.45 43.45 Q40 44 40 44.85 L40 54 Q40 54.85 39.45 55.45 38.85 56 38 56 L26 56 Q25.15 56 24.6 55.45 24 54.85 24 54 L24 44.85 Q24 44 24.6 43.45 L30.6 37.45 Q31.15 36.85 32 36.85 32.85 36.85 33.45 37.45"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M42 25 L38 25 35 28 35 29.95 38 29.95 38 34.85 38 34.95 38 42 42 42 42 25 M12 30 Q12 21.7 17.8 15.8 20.2 13.45 22.95 12.1 27.05 10 32 10 40.25 10 46.1 15.8 49.85 19.55 51.25 24.3 L51.8 26.9 52 29.6 52 46 52 46.45 Q51.85 49.15 50.1 51.2 L49.65 51.65 49.45 51.85 Q48 53.2 46.25 53.7 L44 54 20 54 Q16.7 54 14.35 51.65 12 49.3 12 46 L12 30 M22 25 L22 42 34 42 34 38 26 38 26 25 22 25"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 561 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M23 23 L23 40 35 40 35 36 27 36 27 23 23 23 M16 30 L16 16 Q16 12.7 18.35 10.35 20.7 8 24 8 L48 8 Q51.3 8 53.65 10.35 55.75 12.45 56 15.25 L56 16 56 40 Q56 46.6 51.3 51.3 46.6 56 40 56 L12.8 56 Q10.75 56 9.45 54.75 8 53.45 8 51.6 8 50.15 12 43.6 15.75 37.4 16 30 M44.5 27.4 Q45.25 28.15 44 29.45 L37 36 37 40 41.85 40 41.95 40 49 40 49 36 43 36 47.45 31.55 Q49.65 29.35 48.4 26 L47.4 24.65 47.35 24.6 Q45.75 23 43.5 23 L41.85 23 Q39.9 23.05 38.5 24.4 L38.4 24.5 Q37.35 25.6 37.1 27 L37 28 41 28 Q41 27.6 41.3 27.3 41.55 27.05 41.85 27 L41.95 27 43.5 27 Q44.1 27 44.5 27.4"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 752 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M21 25 L21 42 25 42 25 37 28 37 30.5 42 34.5 42 31.45 35.9 32.2 35.25 32.25 35.2 33.2 34 Q34 32.65 34 31 34 28.5 32.25 26.75 L31.35 26 Q29.9 25 28 25 L21 25 M43 25 L39 25 36 28 36 29.95 39 29.95 39 34.85 39 34.95 39 42 43 42 43 25 M12 30 Q12 21.7 17.8 15.8 23.7 10 32 10 40.25 10 46.1 15.8 49.85 19.55 51.25 24.3 L51.8 26.9 52 29.6 52 46 52 46.45 Q51.85 49.15 50.1 51.2 L49.65 51.65 49.45 51.85 Q48 53.2 46.25 53.7 L44 54 20 54 Q16.85 54 14.55 51.85 L14.35 51.65 Q12 49.3 12 46 L12 30 M28 29 Q28.8 29 29.4 29.6 30 30.2 30 31 30 31.8 29.45 32.35 L29.35 32.45 Q28.8 33 28 33 L25 33 25 29 28 29"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 773 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M48 30 Q48.25 37.4 52 43.6 56 50.15 56 51.6 56 53.45 54.55 54.75 53.25 56 51.2 56 L24 56 Q17.4 56 12.7 51.3 8 46.6 8 40 L8 16 Q8 12.7 10.35 10.35 12.7 8 16 8 L40 8 Q43.3 8 45.65 10.35 48 12.7 48 16 L48 30 M37.5 27.4 Q38.25 28.15 37 29.45 L30 36 30 40 34.85 40 34.95 40 42 40 42 36 36 36 40.45 31.55 Q42.65 29.35 41.4 26 L40.4 24.65 40.35 24.6 Q38.75 23 36.5 23 L34.85 23 Q32.9 23.05 31.5 24.4 L31.4 24.5 Q30.35 25.6 30.1 27 L30 28 34 28 Q34 27.6 34.3 27.3 34.55 27.05 34.85 27 L34.95 27 36.5 27 Q37.1 27 37.5 27.4 M22 27 Q22.8 27 23.4 27.6 24 28.2 24 29 24 29.8 23.45 30.35 L23.35 30.45 Q22.8 31 22 31 L19 31 19 27 22 27 M15 23 L15 40 19 40 19 35 22 35 24.5 40 28.5 40 25.45 33.9 26.2 33.25 26.25 33.2 Q28 31.45 28 29 28 26.5 26.25 24.75 24.5 23 22 23 L15 23"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 940 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M38 42 L42 42 34 22 30 22 22 42 26 42 27.6 38 36.4 38 38 42 M32 27 L34.8 34 29.2 34 32 27"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 393 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M37 28 Q37 28.85 36.45 29.4 L36.4 29.4 Q35.8 30 35 30 L29 30 29 26 35 26 Q35.8 26 36.35 26.55 L36.45 26.65 Q37 27.2 37 28 M41 36 Q41 33.7 39.5 32 41 30.3 41 28 41 25.55 39.25 23.8 L39.2 23.75 Q37.45 22 35 22 L25 22 25 42 35 42 Q37.45 42 39.2 40.25 L39.25 40.2 Q41 38.45 41 36 M37 36 Q37 36.8 36.45 37.35 L36.35 37.45 Q35.8 38 35 38 L29 38 29 34 35 34 Q35.8 34 36.4 34.6 L36.45 34.6 Q37 35.15 37 36"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 701 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M20 20 L44 20 Q48.95 20 52.45 23.5 56 27.05 56 32 56 36.95 52.45 40.45 48.95 44 44 44 L20 44 Q15.05 44 11.5 40.45 8 36.95 8 32 8 27.05 11.5 23.5 15.05 20 20 20 M24.15 34.9 L25.4 34.9 25.4 30.15 27.2 30.15 27.2 29.1 22.35 29.1 22.35 30.15 24.15 30.15 24.15 34.9 M36.5 30.5 L37.35 32.8 35.7 32.8 36.5 30.5 M32.2 31.45 L29.8 31.45 29.8 30.15 32.55 30.15 32.55 29.1 28.55 29.1 28.55 34.9 32.55 34.9 32.55 33.85 29.8 33.85 29.8 32.5 32.2 32.5 32.2 31.45 M35.35 33.8 L37.65 33.8 38.1 34.9 39.45 34.9 37.15 29.1 35.9 29.1 33.65 34.9 34.95 34.9 35.35 33.8 M21.25 29.55 L20.45 29.2 19.25 29 Q18.3 29 17.7 29.45 17.1 29.9 17.1 30.7 17.1 31.4 17.55 31.8 17.9 32.15 18.75 32.4 L19.75 32.75 Q20.1 32.95 20.1 33.25 L19.85 33.7 19.05 33.9 Q18.2 33.9 17.4 33.45 L17 34.5 Q17.9 35 19.1 35 L20.75 34.55 Q21.4 34.05 21.4 33.15 21.4 32.55 21 32.15 20.7 31.85 19.9 31.6 L18.8 31.2 Q18.4 31 18.4 30.65 18.4 30.35 18.65 30.2 L19.3 30.05 20.05 30.15 20.7 30.5 21.25 29.55 M43.5 34.75 L44.2 34.75 45.8 31.35 45.8 34.9 47 34.9 47 29.1 45.8 29.1 43.9 33.3 41.9 29.1 40.7 29.1 40.7 34.9 41.9 34.9 41.9 31.4 43.5 34.75"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M22 24 L22 41 34 41 34 37 26 37 26 24 22 24 M42 24 L38 24 35 27 35 28.95 38 28.95 38 33.85 38 33.95 38 41 42 41 42 24 M8 34 L8 32.95 8 32 8 27.5 Q8.2 19.5 13.85 13.85 19.5 8.2 27.5 8 L48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 34"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 426 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M41.5 28.4 Q42.25 29.15 41 30.45 L34 37 34 41 38.85 41 38.95 41 46 41 46 37 40 37 44.45 32.55 Q46.65 30.35 45.4 27 L44.4 25.65 44.35 25.6 Q42.75 24 40.5 24 L38.85 24 Q36.9 24.05 35.5 25.4 L35.4 25.5 Q34.35 26.6 34.1 28 L34 29 38 29 Q38 28.6 38.3 28.3 L38.85 28 38.95 28 40.5 28 Q41.1 28 41.5 28.4 M8 30 L8 16 Q8 8 16 8 L48 8 Q56 8 56 16 L56 48 Q56 56 48 56 L27.5 56 Q19.5 55.8 13.85 50.15 8.2 44.5 8 36.5 L8 32 8 31.05 8 30 M19 24 L19 41 31 41 31 37 23 37 23 24 19 24"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 649 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M22.9 22 L41.1 22 Q45.6 22 48.8 24.9 52 27.85 52 32 52 36.1 48.8 39.05 45.6 42 41.1 42 L22.9 42 Q18.4 42 15.2 39.05 12 36.1 12 32 12 27.85 15.2 24.9 18.4 22 22.9 22 M26 27 L26 29 38 29 38 27 26 27 M26 35 L26 37 38 37 38 35 26 35 M26 31 L26 33 38 33 38 31 26 31"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 442 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M43 24 L39 24 36 27 36 28.95 39 28.95 39 33.85 39 33.95 39 41 43 41 43 24 M56 34 L56 48 Q56 56 48 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8 L36.5 8 Q44.5 8.2 50.15 13.85 55.8 19.5 56 27.5 L56 32 56 32.95 56 34 M19 24 L19 41 23 41 23 36 26 36 28.5 41 32.5 41 29.45 34.9 30.2 34.25 30.25 34.2 Q32 32.45 32 30 32 27.5 30.25 25.75 28.5 24 26 24 L19 24 M26 28 Q26.8 28 27.4 28.6 28 29.2 28 30 28 30.8 27.45 31.35 L27.35 31.45 Q26.8 32 26 32 L23 32 23 28 26 28"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 631 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 30 L56 31.05 56 32 56 36.5 Q55.8 44.5 50.15 50.15 44.5 55.8 36.5 56 L16 56 Q8 56 8 48 L8 16 Q8 8 16 8 L48 8 Q56 8 56 16 L56 30 M41.5 28.4 Q42.25 29.15 41 30.45 L34 37 34 41 38.85 41 38.95 41 46 41 46 37 40 37 44.45 32.55 Q46.65 30.35 45.4 27 L44.4 25.65 44.35 25.6 Q42.75 24 40.5 24 L38.85 24 Q36.9 24.05 35.5 25.4 L35.4 25.5 Q34.35 26.6 34.1 28 L34 29 38 29 Q38 28.6 38.3 28.3 L38.85 28 38.95 28 40.5 28 Q41.1 28 41.5 28.4 M18 24 L18 41 22 41 22 36 25 36 27.5 41 31.5 41 28.45 34.9 29.2 34.25 29.25 34.2 Q31 32.45 31 30 31 27.5 29.25 25.75 27.5 24 25 24 L18 24 M25 28 Q25.8 28 26.4 28.6 27 29.2 27 30 27 30.8 26.45 31.35 L26.35 31.45 Q25.8 32 25 32 L22 32 22 28 25 28"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 854 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M29 30 L29 38 41 38 41 30 29 30 M22.9 22 L41.1 22 Q45.6 22 48.8 24.9 52 27.85 52 32 52 36.1 48.8 39.05 45.6 42 41.1 42 L22.9 42 Q18.4 42 15.2 39.05 12 36.1 12 32 12 27.85 15.2 24.9 18.4 22 22.9 22 M23 26 L23 34 27 34 27 32 25 32 25 28 35 28 35 26 23 26"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 434 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M23 25 L29 32 23 39 23 40 25.25 42 26.4 42 32 35.5 37.65 42 38.75 42 41 40 41 39 35 32 41 25 41 24 38.75 22 37.65 22 32 28.55 26.4 22 25.25 22 23 24 23 25"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 458 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M23 25 L30 32.9 30 42 34 42 34 32.9 41 25 41 24 38.75 22 37.65 22 32 28.55 26.4 22 25.25 22 23 24 23 25"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 407 B

@@ -0,0 +1,7 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M41 41 L41 52 Q41 56 37 56 L27 56 Q23 56 23 52 L23 41 23 23 23 12 Q23 8 27 8 L37 8 Q41 8 41 12 L41 23 41 41"/>
<path stroke="none" fill="#E73246" d="M41 41 L41 23 52 23 Q56 23 56 27 L56 37 Q56 41 52 41 L41 41 M23 41 L12 41 Q8 41 8 37 L8 27 Q8 23 12 23 L23 23 23 41"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 450 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M38 42 L42 42 34 22 30 22 22 42 26 42 27.6 38 36.4 38 38 42 M32 27 L34.8 34 29.2 34 32 27"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 393 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M37 28 Q37 28.85 36.45 29.4 L36.4 29.4 Q35.8 30 35 30 L29 30 29 26 35 26 Q35.8 26 36.35 26.55 L36.45 26.65 Q37 27.2 37 28 M41 36 Q41 33.7 39.5 32 41 30.3 41 28 41 25.55 39.25 23.8 L39.2 23.75 Q37.45 22 35 22 L25 22 25 42 35 42 Q37.45 42 39.2 40.25 L39.25 40.2 Q41 38.45 41 36 M37 36 Q37 36.8 36.45 37.35 L36.35 37.45 Q35.8 38 35 38 L29 38 29 34 35 34 Q35.8 34 36.4 34.6 L36.45 34.6 Q37 35.15 37 36"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 701 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 32 Q56 41.65 49.45 48.45 L48.95 48.95 Q42 56 32 56 22.05 56 15 48.95 L14.5 48.45 Q8 41.65 8 32 8 22.05 15 15 L15.95 14.1 Q22.7 8 32 8 41.35 8 48 14.1 L48.95 15 Q56 22.05 56 32 M20.6 30.55 Q20 31.1 20 31.95 L20 33.15 Q20 33.95 20.6 34.55 21.15 35.1 22 35.1 L24 35.1 24 41.05 24 41.15 Q24.05 41.95 24.6 42.5 25.15 43 26 43 L38 43 Q38.85 43 39.45 42.5 L40 41.15 40 41.05 40 35.1 42 35.1 Q42.85 35.1 43.45 34.55 44 33.95 44 33.15 L44 31.95 Q44 31.1 43.45 30.55 L33.45 20.6 Q32.85 20 32 20 31.15 20 30.6 20.6 L20.6 30.55 M29 38 L29 31.95 35 31.95 35 38 29 38"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 739 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M46 12 L48.15 12.2 Q50.95 12.65 52.4 14.45 54 16.45 54 20 L54 44 Q54 52 46 52 L18 52 Q10 52 10 44 L10 28 Q10 21.4 14.7 16.7 19.4 12 26 12 L46 12 M25 42 L39 42 39 38 29 38 29 22 25 22 25 42"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 370 B

@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M20 29 L20 35 44 35 44 29 20 29 M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 335 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M29 20 L29 29 20 29 20 35 29 35 29 44 35 44 35 35 44 35 44 29 35 29 35 20 29 20"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 383 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M24 22 L24 42 28 42 28 36 34 36 34.5 36 36 42 40 42 38.1 34.35 38.2 34.25 38.25 34.2 Q40 32.45 40 30 L40 28 Q40 25.5 38.25 23.75 L38.2 23.7 37 22.8 Q35.75 22.05 34.2 22 L24 22 M28 26 L34 26 Q34.8 26 35.4 26.6 L35.45 26.6 Q36 27.15 36 28 L36 30 Q36 30.8 35.45 31.35 L35.35 31.45 Q34.8 32 34 32 L28 32 28 26 M18 12 L38 12 Q44.6 12 49.3 16.7 54 21.4 54 28 L54 44 Q54 52 46 52 L18 52 Q10 52 10 44 L10 20 Q10 16.45 11.6 14.45 13.05 12.65 15.85 12.2 L18 12"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 632 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M23 25 L29 32 23 39 23 40 25.25 42 26.4 42 32 35.5 37.65 42 38.75 42 41 40 41 39 35 32 41 25 41 24 38.75 22 37.65 22 32 28.55 26.4 22 25.25 22 23 24 23 25"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 458 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M23 25 L30 32.9 30 42 34 42 34 32.9 41 25 41 24 38.75 22 37.65 22 32 28.55 26.4 22 25.25 22 23 24 23 25"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 407 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M39 44 L39 34 36 34 36 47 45 47 45 44 39 44 M44 10 Q52 10 52 18 L52 46 Q52 54 44 54 L20 54 Q12 54 12 46 L12 33.95 Q12 24.05 19.05 17 26.05 10 36 10 L44 10 M20 33 L29 33 20 43 20 47 33 47 33 44 24 44 33 34 33 30 20 30 20 33"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 404 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M38 41 L38 37 41 37 Q41.85 37 42.4 37.55 43 38.15 43 39 43 39.85 42.4 40.4 41.85 41 41.05 41 L38 41 M41 44 L42 43.9 42 44 43 47 46 47 44.5 42.5 Q46 41.05 46 39 46 36.95 44.5 35.45 43.05 34 41 34 L35 34 35 47 38 47 38 44 41 44 M20 10 L28 10 Q37.95 10 44.95 17 52 24.05 52 33.95 L52 46 Q52 54 44 54 L20 54 Q12 54 12 46 L12 18 Q12 10 20 10 M19 33 L28 33 19 43 19 47 32 47 32 44 23 44 32 34 32 30 19 30 19 33"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 586 B

@@ -0,0 +1,7 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M23 23 L23 12 Q23 8 27 8 L37 8 Q41 8 41 12 L41 23 41 41 41 52 Q41 56 37 56 L27 56 Q23 56 23 52 L23 41 23 23 M48 28.3 L51.15 30.4 51.9 31.35 Q52.1 32 51.9 32.6 L51.15 33.65 48 35.7 46.7 36 Q45.95 35.9 45.5 35.35 45 34.8 45 34.05 L45 29.9 Q45 29.2 45.5 28.65 45.95 28.1 46.7 28.05 47.4 27.9 48 28.3 M35.7 16 L33.6 12.85 32.65 12.1 Q32 11.9 31.4 12.1 30.75 12.35 30.35 12.85 L28.3 16 Q27.9 16.6 28 17.3 28.1 18.05 28.65 18.5 29.2 19 29.95 19 L34.1 19 Q34.8 19 35.35 18.5 35.9 18.05 35.95 17.3 36.1 16.6 35.7 16 M16 28.3 Q16.6 27.9 17.3 28.05 18.05 28.1 18.5 28.65 19 29.2 19 29.9 L19 34.05 Q19 34.8 18.5 35.35 18.05 35.9 17.3 36 16.6 36.1 16 35.7 L12.85 33.65 12.1 32.6 Q11.9 32 12.1 31.35 12.35 30.75 12.85 30.4 L16 28.3 M35.7 48 Q36.1 47.4 35.95 46.7 35.9 45.95 35.35 45.5 34.8 45 34.1 45 L29.95 45 Q29.2 45 28.65 45.5 28.1 45.95 28 46.7 27.9 47.4 28.3 48 L30.35 51.15 Q30.75 51.65 31.4 51.9 32 52.1 32.65 51.9 L33.6 51.15 35.7 48"/>
<path stroke="none" fill="#E73246" d="M41 23 L52 23 Q56 23 56 27 L56 37 Q56 41 52 41 L41 41 41 23 M23 41 L12 41 Q8 41 8 37 L8 27 Q8 23 12 23 L23 23 23 41 M48 28.3 Q47.4 27.9 46.7 28.05 45.95 28.1 45.5 28.65 45 29.2 45 29.9 L45 34.05 Q45 34.8 45.5 35.35 45.95 35.9 46.7 36 L48 35.7 51.15 33.65 51.9 32.6 Q52.1 32 51.9 31.35 L51.15 30.4 48 28.3 M16 28.3 L12.85 30.4 Q12.35 30.75 12.1 31.35 11.9 32 12.1 32.6 L12.85 33.65 16 35.7 Q16.6 36.1 17.3 36 18.05 35.9 18.5 35.35 19 34.8 19 34.05 L19 29.9 Q19 29.2 18.5 28.65 18.05 28.1 17.3 28.05 16.6 27.9 16 28.3"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#7DB700" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M38 42 L42 42 34 22 30 22 22 42 26 42 27.6 38 36.4 38 38 42 M32 27 L34.8 34 29.2 34 32 27"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 393 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#EF4E29" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M37 28 Q37 28.85 36.45 29.4 L36.4 29.4 Q35.8 30 35 30 L29 30 29 26 35 26 Q35.8 26 36.35 26.55 L36.45 26.65 Q37 27.2 37 28 M41 36 Q41 33.7 39.5 32 41 30.3 41 28 41 25.55 39.25 23.8 L39.2 23.75 Q37.45 22 35 22 L25 22 25 42 35 42 Q37.45 42 39.2 40.25 L39.25 40.2 Q41 38.45 41 36 M37 36 Q37 36.8 36.45 37.35 L36.35 37.45 Q35.8 38 35 38 L29 38 29 34 35 34 Q35.8 34 36.4 34.6 L36.45 34.6 Q37 35.15 37 36"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 701 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#009FEB" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M23 25 L29 32 23 39 23 40 25.25 42 26.4 42 32 35.5 37.65 42 38.75 42 41 40 41 39 35 32 41 25 41 24 38.75 22 37.65 22 32 28.55 26.4 22 25.25 22 23 24 23 25"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 458 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FEB504" d="M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M23 25 L30 32.9 30 42 34 42 34 32.9 41 25 41 24 38.75 22 37.65 22 32 28.55 26.4 22 25.25 22 23 24 23 25"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 407 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M21 22 L21 26 43 26 43 22 21 22 M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M21 38 L21 42 43 42 43 38 21 38 M21 30 L21 34 43 34 43 30 21 30"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 399 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M28 43 L29 44 44 44 45 43 45 30 44 29 29 29 28 30 28 43 M20 35 L21 36 26 36 26 33 23 33 23 23.95 34 23.95 34 27 37 27 37 22 36 21 21 21 20 22 20 35 M56 32 Q56 42 48.95 48.95 42 56 32 56 22.05 56 15 48.95 8 42 8 32 8 22.05 15 15 22.05 8 32 8 42 8 48.95 15 56 22.05 56 32 M42 32 L42 41 31 41 31 32 42 32"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 483 B

+7
View File
@@ -0,0 +1,7 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M41 41 L41 52 Q41 56 37 56 L27 56 Q23 56 23 52 L23 41 23 23 23 12 Q23 8 27 8 L37 8 Q41 8 41 12 L41 23 41 41"/>
<path stroke="none" fill="#E73246" d="M41 41 L41 23 52 23 Q56 23 56 27 L56 37 Q56 41 52 41 L41 41 M23 41 L12 41 Q8 41 8 37 L8 27 Q8 23 12 23 L23 23 23 41"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 450 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M51.3 45.75 Q51.65 44.05 50.6 40.7 49.55 37.45 46.45 32.2 43.3 26.95 40.05 22.85 L38.7 21.1 40.15 19.75 Q42.85 17.3 44.9 16 45.75 15.5 46.8 15.1 L48.4 14.65 Q48.7 14.65 49.7 15.7 L51.6 18 Q54.5 22.05 55.6 27.3 55.95 28.9 56 31.8 L55.7 36.35 Q55.1 39.45 53.9 42 L52.7 44.3 51.4 46.25 51.15 46.45 51.3 45.8 51.3 45.75 M29.95 13.85 Q28.5 13.1 26.45 12.4 24.45 11.65 23.15 11.45 L20.9 11.3 19.95 11.2 Q20.1 11 21.8 10.25 24.4 9 27.4 8.35 L32.05 8 36.65 8.35 Q38.6 8.75 40.65 9.5 42.65 10.25 43.9 11.1 L44.4 11.4 43.3 11.35 Q39.75 11.1 34.05 13.85 L31.95 14.8 29.95 13.85 M29.6 55.9 Q23.9 55.35 18.95 52.1 L16.3 50.05 Q15.65 49.3 15.65 48.2 15.65 46.05 17.9 42.4 20.2 38.8 24.25 34.45 26.55 32 29.2 29.65 31.8 27.35 32.1 27.4 32.8 27.6 36.9 31.55 40.95 35.5 43 38 46.25 41.95 47.65 45 49 48.05 48.25 49.5 47.7 50.6 44.8 52.35 41.9 54.1 39.3 54.9 L34.5 55.85 29.6 55.9 M12 45.2 Q10.3 42.6 9.4 39.85 8.45 37.15 8.1 33.5 L8 31.2 8.45 27.65 Q8.95 24.55 10.6 21.3 12.2 18 14.35 15.8 15.2 14.85 15.6 14.75 L17.1 15 Q19.55 15.85 23.75 19.6 L25.45 21.15 24.5 22.3 Q21.2 26.35 18.2 31.35 15.1 36.45 13.8 39.95 13.1 41.85 12.85 43.6 12.55 45.35 12.9 46.15 L12.9 46.5 12 45.2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M40 39 Q41.6 39 42.8 37.8 44 36.65 44 35 44 33.6 43.1 32.5 44 31.45 44 30 44 28.4 42.8 27.2 41.6 26 40 26 L33 26 33 39 40 39 M40 31 L36 31 36 29 40 29 Q40.45 29 40.7 29.3 L41 30 40.7 30.7 Q40.45 31 40 31 M48 16 Q56 16 56 24 L56 40 Q56 48 48 48 L16 48 Q8 48 8 40 L8 32 Q8 25.4 12.7 20.7 17.4 16 24 16 L48 16 M40 36 L36 36 36 34 40 34 Q40.45 34 40.7 34.3 L41 35 40.7 35.7 Q40.45 36 40 36 M24 36 L24 26 21 26 21 39 30 39 30 36 24 36"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 611 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M15.7 54 Q8 53.85 8 46 L8 18 Q8 10 16 10 L48 10 Q56 10 56 18 L56 31.05 Q55.65 40.3 48.95 47 42.15 53.8 32.65 54 L15.7 54 M37 36 L41 36 41 23 46 23 46 19 32 19 32 23 37 23 37 36 M18 19 L18 36 30 36 30 32 22 32 22 19 18 19"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 402 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M40 39 Q41.6 39 42.8 37.8 44 36.65 44 35 44 33.6 43.1 32.5 44 31.45 44 30 44 28.4 42.8 27.2 41.6 26 40 26 L33 26 33 39 40 39 M40 31 L36 31 36 29 40 29 Q40.45 29 40.7 29.3 L41 30 40.7 30.7 Q40.45 31 40 31 M16 16 L40 16 Q46.6 16 51.3 20.7 56 25.4 56 32 L56 40 Q56 48 48 48 L16 48 Q8 48 8 40 L8 24 Q8 16 16 16 M40 36 L36 36 36 34 40 34 Q40.45 34 40.7 34.3 L41 35 40.7 35.7 Q40.45 36 40 36 M25 36 L26 35.9 26 36 27 39 30 39 28.5 34.5 Q30 33.05 30 31 30 28.95 28.5 27.45 27.05 26 25 26 L19 26 19 39 22 39 22 36 25 36 M22 33 L22 29 25 29 Q25.85 29 26.4 29.55 27 30.15 27 31 27 31.85 26.4 32.4 25.85 33 25.05 33 L22 33"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 793 B

+6
View File
@@ -0,0 +1,6 @@
<svg width="64" height="64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs/>
<g>
<path stroke="none" fill="#FFFFFF" d="M38 36 L42 36 42 23 47 23 47 19 33 19 33 23 38 23 38 36 M48.3 54 L31.35 54 Q21.85 53.8 15.05 47 8.35 40.3 8 31.05 L8 18 Q8 10 16 10 L48 10 Q56 10 56 18 L56 46 Q56 53.85 48.3 54 M25 23 Q25.8 23 26.4 23.6 27 24.2 27 25 27 25.8 26.45 26.35 L26.35 26.45 Q25.8 27 25 27 L22 27 22 23 25 23 M18 19 L18 36 22 36 22 31 25 31 27.5 36 31.5 36 28.45 29.9 29.2 29.25 29.25 29.2 Q31 27.45 31 25 31 22.5 29.25 20.75 27.5 19 25 19 L18 19"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 603 B