Skip to content

Clipboard

Shows recent clipboard items, allowing you to switch between them to re-copy previous values. Clicking the icon button opens the popup containing all functionality.

Supports plain text and images.

Screenshot of clipboard popup open, with two textual values and an image copied. Several other unrelated widgets are visible on the bar.

Example

{
end = [ {
type = "clipboard"
max_items = 3
truncate.mode = "end"
truncate.length = 50
} ]
}

Configuration

Type: clipboard

The icon to show on the bar widget button. Supports image icons.

Type: string
Default: 󰨸

The size to render the icon at. Note this only applies to image-type icons.

Type: integer
Default: 32

The maximum height to render copied images at.

Type: number
Default: 64

The maximum width to render copied images at.

Type: number
Default: 256

The justification (alignment) of the widget text shown on the bar.

Type: 'left' | 'right' | 'center' | 'fill'
Default: 'left'

The maximum number of items to keep in the history, and to show in the popup.

Type: integer
Default: 10

The orientation to display the widget contents. Setting to vertical will rotate text 90 degrees.

Type: 'horizontal' | 'vertical'
Default: 'horizontal'

See truncate options.

Default: None

Do not truncate content.

Setting this option may cause excessively long content to overflow other widgets, shifting them off-screen.

{ truncate = "off" }

Auto mode lets GTK decide when to ellipsize.

To use this mode, set the truncate option to a string declaring the location to truncate text from and place the ellipsis.

{ truncate = "start" }

Length mode defines a fixed point at which to ellipsize.

Generally you will want to set only one of length or max_length, but you can set both if required.

{
truncate.mode = "start"
truncate.length = 50
truncate.max_length = 70
}
Object keys

The fixed width (in characters) of the widget.

The widget will be expanded to this width if it would have otherwise been smaller.

Leave unset to let GTK automatically handle.

Type: integer
Default: None

The maximum number of characters to show before truncating.

Leave unset to let GTK automatically handle.

Type: integer
Default: None

The location to truncate text from and place the ellipsis.

Type: 'none' | 'start' | 'middle' | 'end'
Default: None

Styling

SelectorDescription
.clipboardClipboard widget.
.clipboard .btnClipboard widget button.
.clipboard .btn .iconClipboard widget button icon (any type).
.clipboard .btn .text-iconClipboard widget button icon (textual only).
.clipboard .btn .imageClipboard widget button icon (image only).
.popup-clipboardClipboard popup box.
.popup-clipboard .itemClipboard row item inside the popup.
.popup-clipboard .item .btnClipboard row item radio button.
.popup-clipboard .item .btn.textClipboard row item radio button (text values only).
.popup-clipboard .item .btn.imageClipboard row item radio button (image values only).
.popup-clipboard .item .btn-removeClipboard row item remove button.

For more information on styling, please see the styling guide.