Skip to content

UsingFromOtherApplicationsOrScripts

Albertas Vyšniauskas edited this page Jan 14, 2021 · 4 revisions

Using color picker from other applications or scripts

gpick -p or gpick --pick

Checks if Gpick is currently running and either starts it in notification area icon mode, or uses currently running program instance. Once Gpick is running, creates floating color picker window which follows mouse pointer until either Escape key is pressed to cancel, or primary mouse button is pressed to pick a color. The picked color is only copied to clipboard if Copy to clipboard checkbox is enabled in Floating color picker behavior section of program settings. This command returns immediately if another Gpick instance is found, or blocks until Gpick is closed if a new instance is created.

gpick -p --no-start or gpick --pick --no-start

Available in version 0.2.6

Same as above, but do not start a new Gpick instance if it is not currently running. Returns non-zero error code if running Gpick instance was not found.

gpick -s or gpick --single

Available in version 0.2.6

Starts Gpick in invisible mode and creates floating color picker window which follows mouse pointer until either Escape key is pressed to cancel, or primary mouse button is pressed to pick a color. The picked color is copied to clipboard and program is closed after a small delay to give enough time for clipboard managers to retrieve and store clipboard content.

gpick -so, gpick -s -o or gpick --single --output

Available in version 0.2.6

Starts Gpick in invisible mode and creates floating color picker window which follows mouse pointer until either Escape key is pressed to cancel, or primary mouse button is pressed to pick a color. The picked color is written to the standard output. Trailing newline can be disabled by adding additional argument --no-newline.