{"id":13418471,"url":"https://github.com/astrand/xclip","last_synced_at":"2025-05-14T06:11:43.097Z","repository":{"id":37579957,"uuid":"50902935","full_name":"astrand/xclip","owner":"astrand","description":"Command line interface to the X11 clipboard","archived":false,"fork":false,"pushed_at":"2025-01-09T22:05:21.000Z","size":469,"stargazers_count":1145,"open_issues_count":85,"forks_count":73,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-04-11T00:48:31.003Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/astrand.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-02-02T07:35:47.000Z","updated_at":"2025-04-09T14:38:32.000Z","dependencies_parsed_at":"2024-06-18T14:06:32.924Z","dependency_job_id":"60772fac-7d37-44bd-a262-7b109c8eb8a9","html_url":"https://github.com/astrand/xclip","commit_stats":{"total_commits":156,"total_committers":13,"mean_commits":12.0,"dds":0.4487179487179487,"last_synced_commit":"b372f73579d30f9ba998ffd0a73694e7abe2c313"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrand%2Fxclip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrand%2Fxclip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrand%2Fxclip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/astrand%2Fxclip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/astrand","download_url":"https://codeload.github.com/astrand/xclip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254080033,"owners_count":22011310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:02.681Z","updated_at":"2025-05-14T06:11:43.029Z","avatar_url":"https://github.com/astrand.png","language":"C","readme":"WHAT IS XCLIP?\n==============\n\nxclip is a command line utility that is designed to run on any system with an\nX11 implementation. It provides an interface to X selections (\"the clipboard\")\nfrom the command line. It can read data from standard in or a file and place it\nin an X selection for pasting into other X applications. xclip can also print\nan X selection to standard out, which can then be redirected to a file or\nanother program.\n\nUSING XCLIP\n===========\n\nHere are some ideas for things you can do with xclip:\n\n\tCopy your uptime into the selection for pasting:\n\tuptime | xclip\n\n\tCopy your password file for pasting:\n\txclip /etc/passwd\n\n\tSave some text you have Edit | Copied in a web browser:\n\txclip -o -sel clip \u003e webpage.txt\n\n\tOpen a URL selected in an email client\n\tmozilla `xclip -o`\n\n\tCopy XA_PRIMARY to XA_CLIPBOARD\n\txclip -o | xclip -sel clip\n\n\tIn command mode in vim, select some lines of text, then press shift-:\n\tfor an ex prompt, and use this command to copy the selected lines of\n\ttext to the primary X selection:\n\t!xclip -f\n\n\nUSING XCLIP FOR MOVING FILES\n============================\n\nThe programs xclip-copyfile, xclip-pastefile, and xclip-cutfile can be\nused for copying and moving files between different directories and\neven machines, assuming that you have a working X11 connection. Here\nare some examples:\n\n# Copying a file to a remote host\n[maggie.lkpg.cendio.se ~]$ echo \"A file created on ${HOSTNAME}\" \u003e file1\n[maggie.lkpg.cendio.se ~]$ xclip-copyfile file1\n[sofie.homeip.net ~/doc]$ xclip-pastefile\nfile1\n[sofie.homeip.net ~/doc]$ cat file1\nA file created on maggie.lkpg.cendio.se\n\n\n# Copying an entire tree structure\n[sofie.homeip.net ~]$ xclip-copyfile doc\n[maggie.lkpg.cendio.se ~/tmp]$ xclip-pastefile\ndoc/\ndoc/letter-mom-april.txt\ndoc/file1\ndoc/letter-dad-march.txt\n\n\n# Copying files with preserved path information\n[maggie.lkpg.cendio.se ~]$ xclip-copyfile -p /etc/sysconfig/grub\ntar: Removing leading `/' from member names\n[sofie.homeip.net ~/tmp]$ xclip-pastefile\netc/sysconfig/grub\n[sofie.homeip.net ~/tmp]$ ls etc/sysconfig/grub\netc/sysconfig/grub\n\n\n# Moving files\n[sofie.homeip.net ~]$ ls letter-brother-may.txt\nletter-brother-may.txt\n[sofie.homeip.net ~]$ xclip-cutfile letter-brother-may.txt\n[sofie.homeip.net ~]$ ls letter-brother-may.txt\nls: cannot access letter-brother-may.txt: No such file or directory\n[sofie.homeip.net ~]$ cd doc\n[sofie.homeip.net ~/doc]$ xclip-pastefile\nletter-brother-may.txt\n\n\nFEATURES\n========\n\n* Reads data piped to standard in or files given as arguments\n* Prints contents of selection to standard out\n* Accesses the XA_PRIMARY, XA_SECONDARY or XA_CLIPBOARD selection\n* Accesses the cut-buffers\n* Supports the INCR mechanism for large transfers\n* Connects to the X display in $DISPLAY, or specified with -display host:0\n* Waits for selection requests in the background\n\nSELECTIONS\n==========\n\nFor a good overview of what selections are about, have a look at\n\u003chttps://specifications.freedesktop.org/clipboards-spec/clipboards-latest.txt\u003e. Short version:\n\n* XA_PRIMARY contains the last text you highlighted\n* Middle click pastes XA_PRIMARY\n* XA_CLIPBOARD contains text explicitly copied with Edit | Copy, Ctrl-C etc.\n* Edit | Paste pastes XA_CLIPBOARD\n* xclip uses XA_PRIMARY unless you specify otherwise with -selection\n\nCAN I HELP?\n===========\n\nGlad you asked! At this stage, I'm pretty happy with the features and\nimplementation, so if you have anything at all that should be done, I want to\nhear about it. Doesn't matter how small, compiler warnings, segfaults, spelling\nmistakes, whatever, I want to get it sorted out. xclip is not a big project,\nI'd like to get all these things sorted out and then declare it \"complete\".\n\nLICENSE\n=======\n\nGNU GPL, see the COPYING file for details.\n\nCONTACT\n=======\n\nWeb:\nhttps://github.com/astrand/xclip\n\nEmail:\nastrand@lysator.liu.se\n\nPlease email me about problems, experiences, patches, fixes, etc.\n","funding_links":[],"categories":["Installation","C","Uncategorized","others","Utilities"],"sub_categories":["1) Get all the dependencies","Program List","Uncategorized","2) Install the dependencies","Copy file contents to clipboard"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrand%2Fxclip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrand%2Fxclip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrand%2Fxclip/lists"}