new: Added tmp-clipboard and get-remote-tmp-clipboard

This commit is contained in:
Sayantan Santra 2024-09-27 15:09:52 -05:00
parent 78f0643183
commit 8563d1c423
Signed by: SinTan1729
GPG Key ID: 0538DD402EA50898
3 changed files with 15 additions and 1 deletions

View File

@ -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.

7
get-remote-tmp-clipboard Normal file
View File

@ -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

7
tmp-clipboard Normal file
View File

@ -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