From 8563d1c42344f4093969c62619b8fc83f64e0b05 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Fri, 27 Sep 2024 15:09:52 -0500 Subject: [PATCH] new: Added tmp-clipboard and get-remote-tmp-clipboard --- README.md | 2 +- get-remote-tmp-clipboard | 7 +++++++ tmp-clipboard | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 get-remote-tmp-clipboard create mode 100644 tmp-clipboard diff --git a/README.md b/README.md index a23717d..6789085 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![Number of scripts](https://img.shields.io/badge/number_of_scripts-40-blue) +![Number of scripts](https://img.shields.io/badge/number_of_scripts-43-blue) # Random Scripts This repository is for random scripts I wrote mostly for personal use. diff --git a/get-remote-tmp-clipboard b/get-remote-tmp-clipboard new file mode 100644 index 0000000..6c210dc --- /dev/null +++ b/get-remote-tmp-clipboard @@ -0,0 +1,7 @@ +#!/bin/bash + +# This script should be used in conjunction with tmp-clipboard +# You need to pass a hostname to this script as an argument, and the script +# will pull the text saved by the remote machine's tmp-clipboard script + +ssh $* 'cat /tmp/.tmp-clipboard; >$_' | wl-copy diff --git a/tmp-clipboard b/tmp-clipboard new file mode 100644 index 0000000..c16f7ed --- /dev/null +++ b/tmp-clipboard @@ -0,0 +1,7 @@ +#!/bin/bash + +# This script just puts the piped text to a temp file +# Using the get-remote-tmp-clipboard script, we can retrieve it from another machine. + +cat >/tmp/.tmp-clipboard +