mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-06-19 12:13:32 +00:00
feat(gui): added an ability to copy ``pwsp-cli action play`` command for every sound (#133)
This commit is contained in:
committed by
GitHub
parent
3576c634fd
commit
c173e602ad
@@ -412,6 +412,24 @@ impl SoundpadGui {
|
||||
actions.push(FileAction::AssignHotkey(path.clone()));
|
||||
ui.close();
|
||||
}
|
||||
|
||||
ui.separator();
|
||||
|
||||
if ui
|
||||
.button(format!(
|
||||
"{} {}",
|
||||
ICON_FILE_COPY.codepoint,
|
||||
t!("gui.context.files.copy_cli_command")
|
||||
))
|
||||
.clicked()
|
||||
{
|
||||
ui.ctx().copy_text(format!(
|
||||
"pwsp-cli action play \"{}\"",
|
||||
path.to_string_lossy()
|
||||
.replace('\\', "\\\\")
|
||||
.replace('"', "\\\"")
|
||||
));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user