mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-06-19 12:13:32 +00:00
small refactor
This commit is contained in:
+1
-1
@@ -38,6 +38,7 @@ rfd = { version = "0.17.2", default-features = false, features = [
|
|||||||
opener = { version = "0.8.4", features = ["reveal"] }
|
opener = { version = "0.8.4", features = ["reveal"] }
|
||||||
system-fonts = "0.1.0"
|
system-fonts = "0.1.0"
|
||||||
anyhow = "1.0.102"
|
anyhow = "1.0.102"
|
||||||
|
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"
|
||||||
@@ -62,7 +63,6 @@ eframe = { version = "0.34.2", default-features = false, features = [
|
|||||||
egui_extras = "0.34.1"
|
egui_extras = "0.34.1"
|
||||||
egui_material_icons = "0.6.0"
|
egui_material_icons = "0.6.0"
|
||||||
egui_dnd = "0.15.0"
|
egui_dnd = "0.15.0"
|
||||||
rustix = { version = "1.1.4", features = ["process"] }
|
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "pwsp-daemon"
|
name = "pwsp-daemon"
|
||||||
|
|||||||
+2
-2
@@ -7,7 +7,7 @@ use crate::types::{
|
|||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use std::os::unix::fs::{DirBuilderExt, MetadataExt, PermissionsExt};
|
use std::os::unix::fs::{DirBuilderExt, MetadataExt, PermissionsExt};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::{error::Error, fs};
|
use std::{env, error::Error, fs};
|
||||||
use tokio::{
|
use tokio::{
|
||||||
io::{AsyncReadExt, AsyncWriteExt},
|
io::{AsyncReadExt, AsyncWriteExt},
|
||||||
net::UnixStream,
|
net::UnixStream,
|
||||||
@@ -44,7 +44,7 @@ fn get_current_uid() -> u32 {
|
|||||||
pub fn get_runtime_dir() -> PathBuf {
|
pub fn get_runtime_dir() -> PathBuf {
|
||||||
dirs::runtime_dir().unwrap_or_else(|| {
|
dirs::runtime_dir().unwrap_or_else(|| {
|
||||||
let uid = get_current_uid();
|
let uid = get_current_uid();
|
||||||
std::env::temp_dir().join(format!("pwsp-{}", uid))
|
env::temp_dir().join(format!("pwsp-{}", uid))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user