mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-09-20 22:23:31 +00:00
Compare commits
22
Commits
v1.15.0
...
e2168421bb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2168421bb | ||
|
|
12e04f1403 | ||
|
|
b78ea66ece | ||
|
|
5c3f20e153 | ||
|
|
6eff8b2c6d | ||
|
|
dd13eee0df | ||
|
|
3d1bc24c21 | ||
|
|
53fabcee75 | ||
|
|
6ebe7ec211 | ||
|
|
17146d2ce6 | ||
|
|
7ad69243cc | ||
|
|
5b78cb17d7 | ||
|
|
a1184588a0 | ||
|
|
9b65384cfd | ||
|
|
59c7f25a38 | ||
|
|
2b544d2e63 | ||
|
|
b939709047 | ||
|
|
c75e073774 | ||
|
|
464baa20ce | ||
|
|
051e81d9f7 | ||
|
|
8854c401a9 | ||
|
|
c9f30e09d7 |
Generated
+400
-356
File diff suppressed because it is too large
Load Diff
+8
-8
@@ -8,7 +8,7 @@ members = [
|
|||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "1.15.0"
|
version = "1.16.2"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
authors = ["arabian"]
|
authors = ["arabian"]
|
||||||
homepage = "https://pwsp.arabianq.ru"
|
homepage = "https://pwsp.arabianq.ru"
|
||||||
@@ -38,7 +38,7 @@ clap = { version = "4.6.1", default-features = false, features = [
|
|||||||
"derive",
|
"derive",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
dirs = "6.0.0"
|
dirs = "7.0.0"
|
||||||
itertools = "0.15.0"
|
itertools = "0.15.0"
|
||||||
evdev = { version = "0.13.2", features = ["tokio"] }
|
evdev = { version = "0.13.2", features = ["tokio"] }
|
||||||
rfd = { version = "0.17.2", default-features = false, features = [
|
rfd = { version = "0.17.2", default-features = false, features = [
|
||||||
@@ -52,26 +52,26 @@ rustix = { version = "1.1.4", features = ["process"] }
|
|||||||
rust-i18n = "4.0.0"
|
rust-i18n = "4.0.0"
|
||||||
sys-locale = "0.3.2"
|
sys-locale = "0.3.2"
|
||||||
|
|
||||||
rodio = { git = "https://github.com/RustAudio/rodio.git", rev = "c5f1e94290922fe4ee963ce6f85754ea6ba36243", default-features = false, features = [
|
rodio = { git = "https://github.com/RustAudio/rodio.git", rev = "685e05765c2aff8fbb51e32cda5b18428d09ffbe", default-features = false, features = [
|
||||||
"symphonia-all",
|
"symphonia-all",
|
||||||
"symphonia-libopus",
|
"symphonia-libopus",
|
||||||
"playback",
|
"playback",
|
||||||
] }
|
] }
|
||||||
pipewire = "0.10.0"
|
pipewire = "0.10.0"
|
||||||
|
|
||||||
egui = { version = "0.35.0", default-features = false, features = [
|
egui = { version = "0.36.0", default-features = false, features = [
|
||||||
"default_fonts",
|
"default_fonts",
|
||||||
"rayon",
|
"rayon",
|
||||||
] }
|
] }
|
||||||
eframe = { version = "0.35.0", default-features = false, features = [
|
eframe = { version = "0.36.0", default-features = false, features = [
|
||||||
"default_fonts",
|
"default_fonts",
|
||||||
"glow",
|
"glow",
|
||||||
"x11",
|
"x11",
|
||||||
"wayland",
|
"wayland",
|
||||||
] }
|
] }
|
||||||
egui_extras = "0.35.0"
|
egui_extras = "0.36.0"
|
||||||
egui_material_icons = "0.7.0"
|
egui_material_icons = "0.8.0"
|
||||||
egui_dnd = "0.16.0"
|
egui_dnd = "0.17.0"
|
||||||
|
|
||||||
reqwest = { version = "0.13.4", default-features = false, features = ["native-tls"] }
|
reqwest = { version = "0.13.4", default-features = false, features = ["native-tls"] }
|
||||||
percent-encoding = "2.3.2"
|
percent-encoding = "2.3.2"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
pkgbase = pwsp-bin
|
pkgbase = pwsp-bin
|
||||||
pkgdesc = Lets you play audio files through your microphone (Pre-built binaries)
|
pkgdesc = Lets you play audio files through your microphone (Pre-built binaries)
|
||||||
pkgver = 1.15.0
|
pkgver = 1.16.2
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://github.com/arabianq/pipewire-soundpad
|
url = https://github.com/arabianq/pipewire-soundpad
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
@@ -10,11 +10,11 @@ pkgbase = pwsp-bin
|
|||||||
depends = alsa-lib
|
depends = alsa-lib
|
||||||
provides = pwsp
|
provides = pwsp
|
||||||
conflicts = pwsp
|
conflicts = pwsp
|
||||||
source = pipewire-soundpad-1.15.0.tar.gz :: https://github.com/arabianq/pipewire-soundpad/archive/refs/tags/v1.15.0.tar.gz
|
source = pipewire-soundpad-1.16.2.tar.gz :: https://github.com/arabianq/pipewire-soundpad/archive/refs/tags/v1.16.2.tar.gz
|
||||||
sha256sums = SKIP
|
sha256sums = SKIP
|
||||||
source_x86_64 = pwsp-1.15.0-x86_64.zip :: https://github.com/arabianq/pipewire-soundpad/releases/download/v1.15.0/pwsp-v1.15.0-linux-x64.zip
|
source_x86_64 = pwsp-1.16.2-x86_64.zip :: https://github.com/arabianq/pipewire-soundpad/releases/download/v1.16.2/pwsp-v1.16.2-linux-x64.zip
|
||||||
sha256sums_x86_64 = SKIP
|
sha256sums_x86_64 = SKIP
|
||||||
source_aarch64 = pwsp-1.15.0-aarch64.zip :: https://github.com/arabianq/pipewire-soundpad/releases/download/v1.15.0/pwsp-v1.15.0-linux-arm64.zip
|
source_aarch64 = pwsp-1.16.2-aarch64.zip :: https://github.com/arabianq/pipewire-soundpad/releases/download/v1.16.2/pwsp-v1.16.2-linux-arm64.zip
|
||||||
sha256sums_aarch64 = SKIP
|
sha256sums_aarch64 = SKIP
|
||||||
|
|
||||||
pkgname = pwsp-bin
|
pkgname = pwsp-bin
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Alexander Tarasov <a.tevg@ya.ru>
|
# Maintainer: Alexander Tarasov <a.tevg@ya.ru>
|
||||||
pkgname=pwsp-bin
|
pkgname=pwsp-bin
|
||||||
_pkgname=pipewire-soundpad
|
_pkgname=pipewire-soundpad
|
||||||
pkgver=1.15.0
|
pkgver=1.16.2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Lets you play audio files through your microphone (Pre-built binaries)"
|
pkgdesc="Lets you play audio files through your microphone (Pre-built binaries)"
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
pkgbase = pwsp
|
pkgbase = pwsp
|
||||||
pkgdesc = Lets you play audio files through your microphone
|
pkgdesc = Lets you play audio files through your microphone
|
||||||
pkgver = 1.15.0
|
pkgver = 1.16.2
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
url = https://github.com/arabianq/pipewire-soundpad
|
url = https://github.com/arabianq/pipewire-soundpad
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
@@ -12,7 +12,7 @@ pkgbase = pwsp
|
|||||||
makedepends = cmake
|
makedepends = cmake
|
||||||
makedepends = pipewire
|
makedepends = pipewire
|
||||||
makedepends = alsa-lib
|
makedepends = alsa-lib
|
||||||
source = https://github.com/arabianq/pipewire-soundpad/archive/refs/tags/v1.15.0.tar.gz
|
source = https://github.com/arabianq/pipewire-soundpad/archive/refs/tags/v1.16.2.tar.gz
|
||||||
sha256sums = SKIP
|
sha256sums = SKIP
|
||||||
|
|
||||||
pkgname = pwsp
|
pkgname = pwsp
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Maintainer: Alexander Tarasov <a.tevg@ya.ru>
|
# Maintainer: Alexander Tarasov <a.tevg@ya.ru>
|
||||||
pkgsubn=pwsp
|
pkgsubn=pwsp
|
||||||
pkgname=pwsp
|
pkgname=pwsp
|
||||||
pkgver=1.15.0
|
pkgver=1.16.2
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Lets you play audio files through your microphone"
|
pkgdesc="Lets you play audio files through your microphone"
|
||||||
arch=('x86_64' 'aarch64')
|
arch=('x86_64' 'aarch64')
|
||||||
|
|||||||
+767
-702
File diff suppressed because one or more lines are too long
@@ -31,7 +31,7 @@
|
|||||||
<name>arabian</name>
|
<name>arabian</name>
|
||||||
</developer>
|
</developer>
|
||||||
<releases>
|
<releases>
|
||||||
<release version="1.15.0" date="2026-07-26" />
|
<release version="1.16.2" date="2026-09-09" />
|
||||||
</releases>
|
</releases>
|
||||||
<content_rating type="oars-1.1" />
|
<content_rating type="oars-1.1" />
|
||||||
</component>
|
</component>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: pwsp
|
Name: pwsp
|
||||||
Version: 1.15.0
|
Version: 1.16.2
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
Summary: Lets you play audio files through your microphone
|
Summary: Lets you play audio files through your microphone
|
||||||
|
|
||||||
|
|||||||
+58
-36
@@ -4,6 +4,17 @@ _version = 2
|
|||||||
# Main page
|
# Main page
|
||||||
# ----------------
|
# ----------------
|
||||||
|
|
||||||
|
[gui.no_tracks_playing]
|
||||||
|
en = "No tracks playing"
|
||||||
|
ru = "Не запущено ни одного трека"
|
||||||
|
es = "No hay pistas en reproducción"
|
||||||
|
fr = "Aucune piste en cours de lecture"
|
||||||
|
zh = "没有正在播放的曲目"
|
||||||
|
ar = "لا يوجد مسارات قيد التشغيل"
|
||||||
|
kz = "Ешқандай трек ойнатылып жатқан жоқ"
|
||||||
|
he = "אין רצועות שמנוגנות"
|
||||||
|
pt-BR = "Nenhuma faixa reproduzindo"
|
||||||
|
|
||||||
[gui.play_file_button]
|
[gui.play_file_button]
|
||||||
en = "Play file"
|
en = "Play file"
|
||||||
ru = "Выбрать файл"
|
ru = "Выбрать файл"
|
||||||
@@ -27,15 +38,15 @@ he = "בחר מיקרופון"
|
|||||||
pt-BR = "Selecionar microfone"
|
pt-BR = "Selecionar microfone"
|
||||||
|
|
||||||
[gui.search_placeholder]
|
[gui.search_placeholder]
|
||||||
en = "Search files..."
|
en = "Search files... [Ctrl + F]"
|
||||||
ru = "Поиск файлов..."
|
ru = "Поиск файлов... [Ctrl + F]"
|
||||||
es = "Buscar archivos..."
|
es = "Buscar archivos... [Ctrl + F]"
|
||||||
fr = "Rechercher des fichiers..."
|
fr = "Rechercher des fichiers... [Ctrl + F]"
|
||||||
zh = "搜索文件..."
|
zh = "搜索文件... [Ctrl + F]"
|
||||||
ar = "البحث عن ملفات..."
|
ar = "البحث عن ملفات... [Ctrl + F]"
|
||||||
kz = "Файлдарды іздеу..."
|
kz = "Файлдарды іздеу... [Ctrl + F]"
|
||||||
he = "חפש קבצים..."
|
he = "חפש קבצים... [Ctrl + F]"
|
||||||
pt-BR = "Buscar arquivos..."
|
pt-BR = "Buscar arquivos... [Ctrl + F]"
|
||||||
|
|
||||||
[gui.context.dirs.open]
|
[gui.context.dirs.open]
|
||||||
en = "Open"
|
en = "Open"
|
||||||
@@ -126,37 +137,37 @@ he = "תאריך שינוי (הישן ביותר ראשון)"
|
|||||||
pt-BR = "Data de modificação (Mais antigo primeiro)"
|
pt-BR = "Data de modificação (Mais antigo primeiro)"
|
||||||
|
|
||||||
[gui.context.files.play_solo]
|
[gui.context.files.play_solo]
|
||||||
en = "Play Solo"
|
en = "Play Solo [LMB]"
|
||||||
ru = "Играть"
|
ru = "Играть [ЛКМ]"
|
||||||
es = "Reproducir solo"
|
es = "Reproducir solo [LMB]"
|
||||||
fr = "Jouer en solo"
|
fr = "Jouer en solo [LMB]"
|
||||||
zh = "单独播放"
|
zh = "单独播放 [LMB]"
|
||||||
ar = "تشغيل منفرد"
|
ar = "تشغيل منفرد [LMB]"
|
||||||
kz = "Жалғыз ойнату"
|
kz = "Жалғыз ойнату [ЛКМ]"
|
||||||
he = "נגן סולו"
|
he = "נגן סולו [LMB]"
|
||||||
pt-BR = "Reproduzir"
|
pt-BR = "Reproduzir [LMB]"
|
||||||
|
|
||||||
[gui.context.files.add_new]
|
[gui.context.files.add_new]
|
||||||
en = "Add New"
|
en = "Add New [Ctrl + LMB]"
|
||||||
ru = "Добавить"
|
ru = "Добавить [Ctrl + ЛКМ]"
|
||||||
es = "Añadir nuevo"
|
es = "Añadir nuevo [Ctrl + LMB]"
|
||||||
fr = "Ajouter un nouveau"
|
fr = "Ajouter un nouveau [Ctrl + LMB]"
|
||||||
zh = "添加新项"
|
zh = "添加新项 [Ctrl + LMB]"
|
||||||
ar = "إضافة جديد"
|
ar = "إضافة جديد [Ctrl + LMB]"
|
||||||
kz = "Жаңасын қосу"
|
kz = "Жаңасын қосу [Ctrl + ЛКМ]"
|
||||||
he = "הוסף חדש"
|
he = "הוסף חדש [Ctrl + LMB]"
|
||||||
pt-BR = "Adicionar"
|
pt-BR = "Adicionar [Ctrl + LMB]"
|
||||||
|
|
||||||
[gui.context.files.replace_last]
|
[gui.context.files.replace_last]
|
||||||
en = "Replace Last"
|
en = "Replace Last [Shift + LMB]"
|
||||||
ru = "Заменить Последний"
|
ru = "Заменить Последний [Shift + ЛКМ]"
|
||||||
es = "Reemplazar último"
|
es = "Reemplazar último [Shift + LMB]"
|
||||||
fr = "Remplacer le dernier"
|
fr = "Remplacer le dernier [Shift + LMB]"
|
||||||
zh = "替换上一个"
|
zh = "替换上一个 [Shift + LMB]"
|
||||||
ar = "استبدال الأخير"
|
ar = "استبدال الأخير [Shift + LMB]"
|
||||||
kz = "Соңғысын ауыстыру"
|
kz = "Соңғысын ауыстыру [Shift + ЛКМ]"
|
||||||
he = "החלף אחרון"
|
he = "החלף אחרון [Shift + LMB]"
|
||||||
pt-BR = "Substituir"
|
pt-BR = "Substituir [Shift + LMB]"
|
||||||
|
|
||||||
[gui.context.files.show_in_fm]
|
[gui.context.files.show_in_fm]
|
||||||
en = "Show in File Manager"
|
en = "Show in File Manager"
|
||||||
@@ -283,6 +294,17 @@ kz = "GUI нұсқасы: %{version}"
|
|||||||
he = "גרסת ממשק משתמש: %{version}"
|
he = "גרסת ממשק משתמש: %{version}"
|
||||||
pt-BR = "Versão da GUI: %{version}"
|
pt-BR = "Versão da GUI: %{version}"
|
||||||
|
|
||||||
|
[gui.settings.daemon_version]
|
||||||
|
en = "Daemon version: %{version}"
|
||||||
|
ru = "Версия демона: %{version}"
|
||||||
|
es = "Versión del demonio: %{version}"
|
||||||
|
fr = "Version du démon: %{version}"
|
||||||
|
zh = "守护进程版本: %{version}"
|
||||||
|
ar = "إصدار démon: %{version}"
|
||||||
|
kz = "Демон нұсқасы: %{version}"
|
||||||
|
he = "גרסת השרת: %{version}"
|
||||||
|
pt-BR = "Versão do daemon: %{version}"
|
||||||
|
|
||||||
[gui.settings.theme.label]
|
[gui.settings.theme.label]
|
||||||
en = "Color Scheme"
|
en = "Color Scheme"
|
||||||
ru = "Цветовая схема"
|
ru = "Цветовая схема"
|
||||||
|
|||||||
+40
-24
@@ -5,7 +5,6 @@ mod views;
|
|||||||
use anyhow::{Result, anyhow};
|
use anyhow::{Result, anyhow};
|
||||||
use eframe::{NativeOptions, icon_data::from_png_bytes, run_native};
|
use eframe::{NativeOptions, icon_data::from_png_bytes, run_native};
|
||||||
use egui::{Context, FontData, FontDefinitions, FontFamily, FontTweak, Vec2, ViewportBuilder};
|
use egui::{Context, FontData, FontDefinitions, FontFamily, FontTweak, Vec2, ViewportBuilder};
|
||||||
use itertools::Itertools;
|
|
||||||
use pwsp_lib::{
|
use pwsp_lib::{
|
||||||
types::{
|
types::{
|
||||||
audio_player::PlayerState,
|
audio_player::PlayerState,
|
||||||
@@ -24,6 +23,7 @@ use std::{
|
|||||||
collections::{HashMap, HashSet},
|
collections::{HashMap, HashSet},
|
||||||
fs,
|
fs,
|
||||||
hash::{DefaultHasher, Hash, Hasher},
|
hash::{DefaultHasher, Hash, Hasher},
|
||||||
|
io::BufReader,
|
||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
thread,
|
thread,
|
||||||
@@ -110,12 +110,17 @@ impl SoundpadGui {
|
|||||||
pub fn add_dirs(&mut self) {
|
pub fn add_dirs(&mut self) {
|
||||||
let file_dialog = FileDialog::new();
|
let file_dialog = FileDialog::new();
|
||||||
if let Some(paths) = file_dialog.pick_folders() {
|
if let Some(paths) = file_dialog.pick_folders() {
|
||||||
|
let mut changed = false;
|
||||||
for path in paths {
|
for path in paths {
|
||||||
self.app_state.dirs.push(path);
|
if !self.app_state.dirs.contains(&path) {
|
||||||
|
self.app_state.dirs.push(path);
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if changed {
|
||||||
|
self.config.dirs = self.app_state.dirs.clone();
|
||||||
|
self.config.save_to_file().ok();
|
||||||
}
|
}
|
||||||
self.app_state.dirs = self.app_state.dirs.iter().unique().cloned().collect();
|
|
||||||
self.config.dirs = self.app_state.dirs.clone();
|
|
||||||
self.config.save_to_file().ok();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,11 +176,9 @@ impl SoundpadGui {
|
|||||||
|
|
||||||
// 1. Try to load from disk cache if we don't have it in memory yet
|
// 1. Try to load from disk cache if we don't have it in memory yet
|
||||||
if !is_cached
|
if !is_cached
|
||||||
&& let Ok(data) = fs::read_to_string(&cache_file)
|
&& let Ok(file) = fs::File::open(&cache_file)
|
||||||
&& let Ok((all_files, dir_updates)) = serde_json::from_str::<(
|
&& let Ok((all_files, dir_updates)) =
|
||||||
Vec<PathBuf>,
|
serde_json::from_reader(BufReader::new(file))
|
||||||
HashMap<PathBuf, Vec<PathBuf>>,
|
|
||||||
)>(&data)
|
|
||||||
{
|
{
|
||||||
finished_scans.lock().unwrap().push((
|
finished_scans.lock().unwrap().push((
|
||||||
path_clone.clone(),
|
path_clone.clone(),
|
||||||
@@ -196,18 +199,27 @@ impl SoundpadGui {
|
|||||||
if let Ok(entries) = fs::read_dir(&dir) {
|
if let Ok(entries) = fs::read_dir(&dir) {
|
||||||
let mut children = Vec::new();
|
let mut children = Vec::new();
|
||||||
for entry in entries.filter_map(|e| e.ok()) {
|
for entry in entries.filter_map(|e| e.ok()) {
|
||||||
let p = entry.path();
|
if let Ok(file_type) = entry.file_type() {
|
||||||
if p.is_dir() {
|
if file_type.is_dir() {
|
||||||
dirs_to_visit.push(p.clone());
|
let p = entry.path();
|
||||||
children.push(p);
|
dirs_to_visit.push(p.clone());
|
||||||
} else if crate::gui::SUPPORTED_EXTENSIONS.contains(
|
children.push(p);
|
||||||
&p.extension()
|
} else {
|
||||||
.unwrap_or_default()
|
let file_name = entry.file_name();
|
||||||
.to_str()
|
let is_supported = Path::new(&file_name)
|
||||||
.unwrap_or_default(),
|
.extension()
|
||||||
) {
|
.map(|e| {
|
||||||
all_files.push(p.clone());
|
crate::gui::SUPPORTED_EXTENSIONS
|
||||||
children.push(p);
|
.contains(&e.to_str().unwrap_or_default())
|
||||||
|
})
|
||||||
|
.unwrap_or(false);
|
||||||
|
|
||||||
|
if is_supported {
|
||||||
|
let p = entry.path();
|
||||||
|
all_files.push(p.clone());
|
||||||
|
children.push(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dir_updates.insert(dir, children);
|
dir_updates.insert(dir, children);
|
||||||
@@ -389,9 +401,13 @@ fn load_system_fonts(fonts: &mut FontDefinitions) -> Result<()> {
|
|||||||
let (_, ja_sans) = find_for_locale("ja", FontStyle::Sans);
|
let (_, ja_sans) = find_for_locale("ja", FontStyle::Sans);
|
||||||
let (_, ar_sans) = find_for_locale("ar", FontStyle::Sans);
|
let (_, ar_sans) = find_for_locale("ar", FontStyle::Sans);
|
||||||
|
|
||||||
let system_fonts = [en_sans, en_serif, ja_sans, ar_sans].concat();
|
let system_fonts = en_sans
|
||||||
|
.into_iter()
|
||||||
|
.chain(en_serif)
|
||||||
|
.chain(ja_sans)
|
||||||
|
.chain(ar_sans);
|
||||||
|
|
||||||
for font in system_fonts.iter().rev() {
|
for font in system_fonts.rev() {
|
||||||
let font_bytes = match &font.source {
|
let font_bytes = match &font.source {
|
||||||
FoundFontSource::Path(path) => fs::read(path)?,
|
FoundFontSource::Path(path) => fs::read(path)?,
|
||||||
FoundFontSource::Bytes(bytes) => bytes.to_vec(),
|
FoundFontSource::Bytes(bytes) => bytes.to_vec(),
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ use egui::{Button, CollapsingHeader, FontFamily, Label, RichText, Slider, Ui};
|
|||||||
use egui_material_icons::icons::*;
|
use egui_material_icons::icons::*;
|
||||||
use pwsp_lib::types::{audio_player::TrackInfo, gui::AppState};
|
use pwsp_lib::types::{audio_player::TrackInfo, gui::AppState};
|
||||||
use pwsp_lib::utils::gui::format_time_pair;
|
use pwsp_lib::utils::gui::format_time_pair;
|
||||||
|
use rust_i18n::t;
|
||||||
|
|
||||||
pub(crate) enum TrackAction {
|
pub(crate) enum TrackAction {
|
||||||
Pause(u32),
|
Pause(u32),
|
||||||
@@ -15,7 +16,7 @@ impl SoundpadGui {
|
|||||||
pub fn draw_header(&mut self, ui: &mut Ui) {
|
pub fn draw_header(&mut self, ui: &mut Ui) {
|
||||||
ui.vertical_centered_justified(|ui| {
|
ui.vertical_centered_justified(|ui| {
|
||||||
if self.audio_player_state.tracks.is_empty() {
|
if self.audio_player_state.tracks.is_empty() {
|
||||||
ui.label("No tracks playing");
|
ui.label(t!("gui.no_tracks_playing"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,10 +120,16 @@ impl SoundpadGui {
|
|||||||
// --------------------------------
|
// --------------------------------
|
||||||
|
|
||||||
ui.with_layout(Layout::bottom_up(Align::Min), |ui| {
|
ui.with_layout(Layout::bottom_up(Align::Min), |ui| {
|
||||||
ui.label(t!(
|
ui.horizontal(|ui| {
|
||||||
"gui.settings.version",
|
ui.label(t!(
|
||||||
version = env!("CARGO_PKG_VERSION")
|
"gui.settings.version",
|
||||||
));
|
version = env!("CARGO_PKG_VERSION")
|
||||||
|
));
|
||||||
|
ui.label(t!(
|
||||||
|
"gui.settings.daemon_version",
|
||||||
|
version = self.audio_player_state.daemon_version
|
||||||
|
))
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ pub struct FullState {
|
|||||||
pub all_inputs: HashMap<String, String>,
|
pub all_inputs: HashMap<String, String>,
|
||||||
pub current_output: String,
|
pub current_output: String,
|
||||||
pub all_outputs: HashMap<String, String>,
|
pub all_outputs: HashMap<String, String>,
|
||||||
|
pub daemon_version: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Which of the two independent output paths a volume applies to.
|
/// Which of the two independent output paths a volume applies to.
|
||||||
|
|||||||
@@ -684,6 +684,7 @@ impl Executable for GetFullStateCommand {
|
|||||||
all_inputs,
|
all_inputs,
|
||||||
current_output: audio_player.output_device_name.clone().unwrap_or_default(),
|
current_output: audio_player.output_device_name.clone().unwrap_or_default(),
|
||||||
all_outputs,
|
all_outputs,
|
||||||
|
daemon_version: env!("CARGO_PKG_VERSION").into(),
|
||||||
};
|
};
|
||||||
|
|
||||||
match serde_json::to_string(&full_state) {
|
match serde_json::to_string(&full_state) {
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ pub struct AudioPlayerState {
|
|||||||
pub all_outputs_sorted: Vec<(String, String)>,
|
pub all_outputs_sorted: Vec<(String, String)>,
|
||||||
|
|
||||||
pub is_daemon_running: bool,
|
pub is_daemon_running: bool,
|
||||||
|
pub daemon_version: String,
|
||||||
|
|
||||||
pub hotkey_config: Option<HotkeyConfig>,
|
pub hotkey_config: Option<HotkeyConfig>,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ pub fn start_app_state_thread(audio_player_state_shared: Arc<Mutex<AudioPlayerSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
guard.is_daemon_running = true;
|
guard.is_daemon_running = true;
|
||||||
|
guard.daemon_version = full_state.daemon_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Poll hotkey config at a lower frequency (~every 2 seconds)
|
// Poll hotkey config at a lower frequency (~every 2 seconds)
|
||||||
|
|||||||
Reference in New Issue
Block a user