{"id":16803105,"url":"https://github.com/n-r-k/sxcs","last_synced_at":"2025-10-08T19:53:42.654Z","repository":{"id":38397706,"uuid":"482727160","full_name":"N-R-K/sxcs","owner":"N-R-K","description":"Minimal X11 Color Picker and Magnifier. [MIRROR OF https://codeberg.org/NRK/sxcs]","archived":false,"fork":false,"pushed_at":"2024-06-06T16:36:49.000Z","size":7382,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T02:34:29.741Z","etag":null,"topics":["color-picker","magnifier","x11","zoomer"],"latest_commit_sha":null,"homepage":"https://codeberg.org/NRK/sxcs","language":"C","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/N-R-K.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-04-18T05:36:22.000Z","updated_at":"2024-12-18T04:34:59.000Z","dependencies_parsed_at":"2024-10-28T12:20:46.645Z","dependency_job_id":"f500138f-93c4-4a65-a93e-a5e050d1ea30","html_url":"https://github.com/N-R-K/sxcs","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/N-R-K/sxcs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N-R-K%2Fsxcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N-R-K%2Fsxcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N-R-K%2Fsxcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N-R-K%2Fsxcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/N-R-K","download_url":"https://codeload.github.com/N-R-K/sxcs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/N-R-K%2Fsxcs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263343284,"owners_count":23452146,"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":["color-picker","magnifier","x11","zoomer"],"created_at":"2024-10-13T09:41:34.759Z","updated_at":"2025-10-08T19:53:42.526Z","avatar_url":"https://github.com/N-R-K.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sxcs - Simple X Color Sniper\n\n[![CodeBerg](https://img.shields.io/badge/Hosted_at-Codeberg-%232185D0?style=flat-square\u0026logo=CodeBerg)](https://codeberg.org/NRK/sxcs)\n\nColor picker and magnifier for X11.\n\n![preview](https://images2.imgbox.com/4c/d0/LC6pYmrB_o.gif)\n\n## Usage\n\n\u003ckbd\u003eButton1\u003c/kbd\u003e will select and print the color to `stdout`, the output is\nTAB separated `hex`, `rgb`, and `hsl`.\n\u003ckbd\u003eScroll Up/Down\u003c/kbd\u003e will zoom in and out.\nAny other mouse button will quit sxcs.\n\nOutput format can be chosen via cli argument.\nZoom/magnification can be disabled via `--mag-none`.\n\n```console\n$ sxcs --rgb --mag-none\nrgb:\t22 158 111\n```\n\nCopying the hex output to clipboard (using `xclip`):\n\n```console\n$ sxcs -o --hex | cut -f 2 | xclip -in -selection clipboard\n```\n\nColor output can be disabled via `--color-none`, which more or less turns\n`sxcs` into a magnifier.\n\nThe magnifying window can be customized via using `--mag-filters \u003cfilter-list\u003e`,\nwhere `filter-list` is a comma separated list of filters to apply. The\nfilter-list will be applied in order, as given by the user.\n\nThe default filter list is the following:\n\n```console\n$ sxcs --mag-filters \"grid,circle,xhair\"\n```\n\nFollowing are a couple more examples:\n\n```console\n$ sxcs --mag-filters \"square,xhair\"\n```\n\n\u003cimg width=\"256\" height=\"256\" src=\"https://images2.imgbox.com/a4/ff/yUOGtRnn_o.png\"/\u003e\n\n```console\n$ sxcs --mag-filters \"grid,xhair\"\n```\n\n\u003cimg width=\"256\" height=\"256\" src=\"https://images2.imgbox.com/73/f6/ScP4MQT2_o.png\"/\u003e\n\nConsult the manpage to see a list of all available cli arguments and filters:\n\n```console\n$ man sxcs\n```\n\n## Dependencies\n\n- Build Dependencies:\n  * C89 compiler\n  * Necessary library headers (on some distros you need to install `*-dev`\n    packages to get header files)\n\n- Runtime Dependencies:\n  * Xlib\n  * Xcursor\n  * POSIX 2001 C standard library\n\n## Building\n\n* Simple build:\n\n```console\n$ cc -o sxcs sxcs.c -O3 -s -l X11 -l Xcursor\n```\n\nThe above command should also work with `gcc`, `clang` or any other C compiler\nthat has a POSIX compatible cli interface.\n\n* Debug build with `gcc` (also works with `clang`):\n\n```console\n$ gcc -o sxcs sxcs.c -std=c89 -Wall -Wextra -Wpedantic \\\n    -g3 -D DEBUG -O0 -fsanitize=address,undefined -l X11 -l Xcursor\n```\n\n* If you're editing the code, you may optionally run some static analysis:\n\n```console\n$ make -f etc/analyze.mk\n```\n\n## Installing\n\nJust copy the executable and the man-page to the appropriate location:\n\n```console\n# cp sxcs /usr/local/bin\n# cp sxcs.1 /usr/local/share/man/man1\n```\n\nOr using the `install` utility:\n\n```console\n# install -Dm755 sxcs /usr/local/bin/sxcs\n# install -Dm644 sxcs.1 /usr/local/share/man/man1/sxcs.1\n```\n\nA zsh completion script is also available for zsh users under\n[etc/zsh-completion](./etc/zsh-completion/).\n\n## Limitation\n\nCursor size bigger than 255x255 causes visual glitches, it seems to be a\nX11/Xcursor limitation.\n\nOne alternative would be using XComposite and using an `override_redirect`\nwindow. Which is what was being done (incorrectly) before commit\n[33490dd](https://codeberg.org/NRK/sxcs/commit/33490ddf9164655bf6decafa6f85082e413fa333).\nI suspect doing this correctly would require way too much code, probably above\nmy self imposed limit of ~800 SLoC for this project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-r-k%2Fsxcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fn-r-k%2Fsxcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fn-r-k%2Fsxcs/lists"}