Skip to content
Discussion options

You must be logged in to vote

xsel has a timeout flag:

-t ms, --selectionTimeout ms

    Specify the timeout in milliseconds within which the selection must be retrieved.
    A value of 0 (zero) specifies no timeout (default).

And we could use this when checking for xsel:

} else if env_var_is_set("DISPLAY") && exists("xsel") && is_exit_success("xsel", &["-o", "-b"])
{
// FIXME: check performance of is_exit_success
command_provider! {
paste => "xsel", "-o", "-b";
copy => "xsel", "-i", "-b";
primary_paste => "xsel", "-o";
primary_copy => "xsel", "-i";
}

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@christianfosli
Comment options

@sudormrfbin
Comment options

@christianfosli
Comment options

Answer selected by christianfosli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants