Created
February 13, 2024 20:11
-
-
Save THOUSAND-SKY/6435375f6bd15db456e30b88374ee98e to your computer and use it in GitHub Desktop.
Copy a file from CLI on X11, and paste it into other GUI apps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: ezdrop myfile.png | |
# ^ ctrl+v into browser (discord/slack/whatever) | |
f="$(realpath "$@")" | |
echo -n "file://$f" | xclip -se c -t 'text/uri-list' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment