• Stars
    star
    273
  • Rank 150,780 (Top 3 %)
  • Language
    C
  • License
    Other
  • Created about 14 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A command-line program for getting and setting the contents of the X selection
XSel -- manipulate the X selection.

Copyright (C) 2001 Conrad Parker <[email protected]>

For updates see http://www.vergenet.net/~conrad/software/xsel/


INTRODUCTION
============

XSel is a command-line program for getting and setting the contents of the
X selection. Normally this is only accessible by manually highlighting
information and pasting it with the middle mouse button.


To read a file into the X selection:
------------------------------------

        xsel < file

after which you can paste the file's contents into any X application with
the middle mouse button, as though you had highlighted its text. XSel will
read in the file contents exactly, whereas manual highlighting invariably
breaks lines and transforms tabs into spaces. This is especially handy for
copying in large files.


To write the X selection to a file:
-----------------------------------

        xsel > file

after which file will contain exactly the contents of the X selection,
without trailing newlines and spaces and crap.


XSel is more than just cat for the X selection.


Append to the X selection:
--------------------------

        xsel --append < file


To follow a growing file:
-------------------------

        xsel --follow < file

to make the X selection follow standard input as it grows (like tail -f).


ADVANCED FEATURES
=================

XSel also lets you access some of the more esoteric features of the
X selection:


Delete the contents of the selection
------------------------------------

        xsel --delete

Will cause the program in which text is selected to delete that text. This
really works, you can try it on xedit to remotely delete text in the editor
window.


Manipulate the secondary selection
----------------------------------

The X Window System maintains two selections, the usual primary selection
and a secondary, which isn't used much ... XSel lets you use the secondary
selection, for example:

        To get and set the secondary selection:
        ---------------------------------------

        xsel --secondary < file
        xsel --secondary > file

        To swap the primary and secondary selections:
        ---------------------------------------------
        xsel --exchange

So for example you can store useful text in the secondary selection and
retrieve it later.


Manipulate the clipboard selection
----------------------------------

Similarly, X has a clipboard selection. You can use the standard xclipboard
program to manage a history of selected text, and you can use xsel to
actually get text into that clipboard:

        xsel --clipboard < file


Make the selection contents persist in memory
---------------------------------------------

Normally the X selection only exists as long as the program it was selected
in is running. Further, some buggy applications tend to forget their
selection text after a little while. If you run:

        xsel --keep

after selecting some important text, xsel will copy the text into its own
memory so you can paste it elsewhere even if the original program exits or crashes.


Further information
===================

Naturally all these options have single character equivalents, and

        xsel --help

provides usage information. For complete details, see the xsel(1x) man page.


DOWNLOAD
========

New versions of XSel are distributed in source form from:

        http://www.vergenet.net/~conrad/software/xsel/


STANDARDS
=========

X11 ICCCM2
----------

XSel conforms to the X Window System Inter-Client Communication Conventions
Manual Version 2.0 (ICCCM2), including correct handling of TARGETS,
MULTIPLE, TIMESTAMP, and DELETE targets, INCR properties and large data
transfers.

My thoughts on ICCCM are available at:

        https://web.archive.org/web/20110720132303/https://lists.slug.org.au/archives/slug-chat/2001/July/msg00054.html

(Warning: explicit language).


LICENSE
=======

Copyright (C) 2001 Conrad Parker <[email protected]>

Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation. No
representations are made about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.


CONTACT
=======

Please direct any queries, bug reports etc. about XSel to the author,
Conrad Parker [email protected] .

More Repositories

1

elm-shadertoy

Shadertoy for Elm
Elm
33
star
2

raft

Raft distributed consensus protocol (Haskell library)
Haskell
27
star
3

sweep

Sound wave editor
C
23
star
4

sighttpd

A stream ingress HTTP server
C
20
star
5

liboggz

A library and tools for working with Ogg encapsulation, with support for seeking, chopping and validation.
C
19
star
6

remix

A library for audio sequencing and mixing.
C
17
star
7

zoom-cache

A streamable, seekable, zoomable cache file format; Haskell library and tools.
Haskell
17
star
8

const-math-ghc-plugin

GHC plugin for constant math elimination
Haskell
14
star
9

libfishsound

A simple programming interface for decoding and encoding audio data using Xiph.org codecs (FLAC, Speex and Vorbis)
C
13
star
10

tractorgen

Generates ASCII tractors.
C
13
star
11

dreambuggy

Drive on mountains, snow and sand. Fly dreambird.
Elm
8
star
12

ght

Trivial routines for inspecting git repositories
Haskell
8
star
13

ui-command

A Haskell framework for friendly commandline programs
Haskell
7
star
14

vacuum

A Haskell library for extracting graph representations of values from the GHC heap
Haskell
6
star
15

libshcodecs

A library for controlling SH-Mobile hardware codecs
C
5
star
16

omxil-sh

A collection of OpenMAX IL components for SH-Mobile
Shell
5
star
17

scope

An interactive renderer for plotting time-series data
Haskell
5
star
18

cairo-appbase

Haskell template for an application using GTK, Glade and Cairo graphics
Haskell
5
star
19

iteratee-diagrams

Dia shapes for iteratees
4
star
20

gst-shrtsp

SH-Mobile RTSP server
Python
4
star
21

hogg

Haskell library and tools to manipulate the Ogg container format
Haskell
4
star
22

libuiomux

A conflict manager for system resources, including UIO devices
C
3
star
23

quaternion

Quaternions library for Elm
Elm
3
star
24

aube

A system for sound generation and processing.
C
3
star
25

scope-pcm

Plotting of zoom-cache-pcm data
Haskell
2
star
26

libshveu

A library for controlling SH-Mobile VEU
C
2
star
27

scope-cairo

A Cairo rendering backend for scope
Haskell
2
star
28

zoom-cache-sndfile

Tools for generating zoom-cache-pcm files
Haskell
2
star
29

zoom-cache-pcm

Library and tools for zoom-cache PCM audio codecs
Haskell
2
star
30

fastphoto

A high performance JPEG rescaler: C library, tool and CGI
C
2
star
31

elm-gamepad-tester

Displays info about connected gamepads, as elm-gamepad values
Elm
2
star
32

guest-builder

Tools to build a guest filesystem
2
star
33

blossom

A web log generator: C library, commandline tool and CGI
Shell
2
star
34

flashback

Elm
1
star
35

elm-pointerlock

Pointer Lock in Elm
JavaScript
1
star
36

histogram

A Haskell library for generating histograms
Haskell
1
star
37

manpages

Haskell library to generate manpages and help text
Haskell
1
star
38

texture-synthesis

Texture synthesis
Haskell
1
star
39

heapscope-cairo

Heapscope (GTK+/Cairo UI)
Haskell
1
star
40

heapscope

A tool for inspecting Haskell heap profiles
Haskell
1
star
41

glsl-pasta

Combine GLSL shaders for use with Elm WebGL
Elm
1
star