2016-06-20 23:36:03 +01:00
|
|
|
# xsel
|
|
|
|
|
|
|
|
> Selection manipulation tool.
|
|
|
|
> For example, xsel can copy STDIN to clipboard, or print clipboard to STDOUT.
|
|
|
|
|
|
|
|
- Clipboard selection:
|
|
|
|
|
|
|
|
`-b or --clipboard`
|
|
|
|
|
|
|
|
- Primary selection:
|
|
|
|
|
|
|
|
`-p or --primary`
|
|
|
|
|
2016-06-20 23:39:56 +01:00
|
|
|
- Secondary selection:
|
2016-06-20 23:36:03 +01:00
|
|
|
|
|
|
|
`-s or --secondary`
|
|
|
|
|
|
|
|
- Copy output of a command into the clipboard:
|
|
|
|
|
2016-06-20 23:39:21 +01:00
|
|
|
`echo 123 | xsel -bi`
|
2016-06-20 23:36:03 +01:00
|
|
|
|
|
|
|
- Copy contents of a file into the clipboard:
|
|
|
|
|
2016-06-20 23:39:21 +01:00
|
|
|
`cat {{file}} | xsel -bi`
|
2016-06-20 23:36:03 +01:00
|
|
|
|
|
|
|
- Print the clipboard to STDOUT:
|
|
|
|
|
|
|
|
`xsel -bo`
|
|
|
|
|
|
|
|
- Print the clipboard into a file:
|
|
|
|
|
|
|
|
`xsel -bo > {{file}}`
|
|
|
|
|
|
|
|
- Clear the clipboard:
|
|
|
|
|
|
|
|
`xsel -bc`
|