mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-13 06:23:47 +00:00
stash: add multicall support for stash-copy and stash-paste
We can finally tell the users that they can uninstall `wl-copy` and `wl-paste` on their systems. Stash now somewhat supports being invoked under the names `stash-copy` and `stash-paste` to fully reimplement the functionality of `wl-copy` and `wl-paste` respectively. A build wrapper has been added generate symlinks for `stash-copy`, `stash-paste`, `wl-copy`, and `wl-paste`. `wl-copy` and `wl-paste` links are provided only for backwards compatibility, but they will not go away anytime soon. Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a6964463b35427cb720fbab68b252944cc90c
This commit is contained in:
parent
f8440926b1
commit
6496d3963d
4 changed files with 353 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ use inquire::Confirm;
|
|||
|
||||
mod commands;
|
||||
mod db;
|
||||
mod multicall;
|
||||
#[cfg(feature = "use-toplevel")] mod wayland;
|
||||
|
||||
use crate::commands::{
|
||||
|
|
@ -129,6 +130,13 @@ fn report_error<T>(
|
|||
|
||||
#[allow(clippy::too_many_lines)] // whatever
|
||||
fn main() {
|
||||
// Multicall dispatch: stash-copy, stash-paste, wl-copy, wl-paste
|
||||
if crate::multicall::multicall_dispatch() {
|
||||
// If handled, exit immediately
|
||||
std::process::exit(0);
|
||||
}
|
||||
|
||||
// If not multicall, proceed with normal CLI handling
|
||||
smol::block_on(async {
|
||||
let cli = Cli::parse();
|
||||
env_logger::Builder::new()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue