{"id":13418137,"url":"https://github.com/mortie/swaylock-effects","last_synced_at":"2025-10-21T13:04:36.066Z","repository":{"id":43272815,"uuid":"193592497","full_name":"mortie/swaylock-effects","owner":"mortie","description":"Swaylock, with fancy effects","archived":false,"fork":true,"pushed_at":"2023-11-28T20:49:18.000Z","size":3105,"stargazers_count":698,"open_issues_count":60,"forks_count":44,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-07-31T22:41:18.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"swaywm/swaylock","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mortie.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}},"created_at":"2019-06-24T22:59:55.000Z","updated_at":"2024-07-29T04:47:21.000Z","dependencies_parsed_at":"2023-02-10T10:45:28.760Z","dependency_job_id":null,"html_url":"https://github.com/mortie/swaylock-effects","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortie%2Fswaylock-effects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortie%2Fswaylock-effects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortie%2Fswaylock-effects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mortie%2Fswaylock-effects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mortie","download_url":"https://codeload.github.com/mortie/swaylock-effects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243675185,"owners_count":20329222,"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:00:58.866Z","updated_at":"2025-10-21T13:04:35.677Z","avatar_url":"https://github.com/mortie.png","language":"C","funding_links":[],"categories":["C","Tools","Screen Lock","Screen Locking","Linux"],"sub_categories":["Locking, Idle, Clipboard and Login","Utilities","Other"],"readme":"# swaylock-effects\n\nSwaylock-effects is a fork of [swaylock](https://github.com/swaywm/swaylock)\nwhich adds built-in screenshots and image manipulation effects like blurring.\nIt's inspired by [i3lock-color](https://github.com/PandorasFox/i3lock-color),\nalthough the feature sets aren't perfectly overlapping.\n\n![Screenshot](https://raw.githubusercontent.com/mortie/swaylock-effects/master/screenshot.png)\n\n## Example Command\n\n\tswaylock \\\n\t\t--screenshots \\\n\t\t--clock \\\n\t\t--indicator \\\n\t\t--indicator-radius 100 \\\n\t\t--indicator-thickness 7 \\\n\t\t--effect-blur 7x5 \\\n\t\t--effect-vignette 0.5:0.5 \\\n\t\t--ring-color bb00cc \\\n\t\t--key-hl-color 880033 \\\n\t\t--line-color 00000000 \\\n\t\t--inside-color 00000088 \\\n\t\t--separator-color 00000000 \\\n\t\t--grace 2 \\\n\t\t--fade-in 0.2\n\n## New Features\n\nThe main new features compared to upstream swaylock are:\n\n* `--screenshots` to use screenshots instead of an image on disk or a color\n* `--clock` to show date/time in the indicator\n\t* Use `--indicator` to make the indicator always active\n\t* Use `--timestr` and `--datestr` to set the date/time formats\n\t  (using strftime-style formatting)\n* `--submit-on-touch` to use your touchscreen to submit a password.\n  If you can unlock your device with anything else than your password,\n  this might come helpful to trigger PAM's authentication process.\n* `--grace \u003cseconds\u003e` to set a password grace period, so that the password\n  isn't required to unlock until some number of seconds have passed.\n\t* Used together with `--indicator`, the indicator is always shown,\n\t  even in the grace period.\n\t* Used together with `--indicator-idle-visible`, the indicator is only\n\t  visible after the grace period.\n\t* By default, a key press, a mouse event or a touch event will unlock\n\t  during the grace period. Use `--grace-no-mouse` to not unlock as a response\n\t  to a mouse event, and `--grace-no-touch` to not unlock as a response to\n\t  a touch event.\n* `--fade-in \u003cseconds\u003e` to make the lock screen fade in.\n* Various effects which can be applied to the background image\n\t* `--effect-blur \u003cradius\u003ex\u003ctimes\u003e`: Blur the image (thanks to yvbbrjdr's\n\t  fast box blur algorithm in\n\t  [i3lock-fancy-rapid](https://github.com/yvbbrjdr/i3lock-fancy-rapid))\n\t* `--effect-pixelate \u003cfactor\u003e`: Pixelate the image.\n\t* `--effect-scale \u003cscale\u003e`: Scale the image by a factor. This can be used\n\t  to make other effects faster if you don't need the full resolution.\n\t* `--effect-greyscale`: Make the image greyscale.\n\t* `--effect-vignette \u003cbase\u003e:\u003cfactor\u003e`: Apply a vignette effect (range is 0-1).\n\t* `--effect-compose \u003cposition\u003e;\u003csize\u003e;\u003cgravity\u003e;\u003cpath\u003e`: Overlay another image.\n\t* `--effect-custom \u003cpath\u003e`: Load a custom effect from a C file or shared object.\n\nNew feature ideas are welcome as issues (though I may never get around to\nimplement them), new feature implementations are welcome as pull requests :)\n\n## Installation\n\n### From Packages\n\n* Alpine Linux: [swaylock-effects](https://pkgs.alpinelinux.org/packages?name=swaylock-effects)\n* Arch Linux (AUR): [swaylock-effects-git](https://aur.archlinux.org/packages/swaylock-effects-git/)\n* Fedora (Copr): [swaylock-effects](https://copr.fedorainfracloud.org/coprs/eddsalkield/swaylock-effects/)\n  (originally by Edd Salkield, now looking for a new maintainer)\n* FreeBSD: [swaylock-effects](https://www.freshports.org/x11/swaylock-effects/)\n* Gentoo (GURU overlay): [swaylock-effects](https://gpo.zugaina.org/Overlays/guru/gui-apps/swaylock-effects)\n* T2 SDE: [swaylock-effects](https://t2sde.org/packages/swaylock-effects)\n\n### Compiling from Source\n\nInstall dependencies:\n\n* meson \\*\n* wayland\n* wayland-protocols \\*\n* libxkbcommon\n* cairo\n* gdk-pixbuf2 \\*\\*\n* pam (optional)\n* [scdoc](https://git.sr.ht/~sircmpwn/scdoc) (optional: man pages) \\*\n* git \\*\n* openmp (if using a compiler other than GCC)\n\n_\\*Compile-time dep_\n\n_\\*\\*Optional: required for background images other than PNG_\n\nRun these commands:\n\n\tmeson build\n\tninja -C build\n\tsudo ninja -C build install\n\nOn systems without PAM, you need to suid the swaylock binary:\n\n\tsudo chmod a+s /usr/local/bin/swaylock\n\nSwaylock will drop root permissions shortly after startup.\n\n## Effects\n\n### Blur\n\n`--effect-blur \u003cradius\u003ex\u003ctimes\u003e`: Blur the image.\n\n`\u003cradius\u003e` is a number specifying how big\nthe blur is, `\u003ctimes\u003e` is a number which specifies essentially how high quality the blur is\n(i.e how closely the effect will resemble a true gaussian blur).\n\n### Pixelate\n\n`--effect-pixelate \u003cfactor\u003e`: Pixelate the image.\n\n`\u003cfactor\u003e` is the amount of pixelation; a value of 10 will make each 10x10 square of pixels\nthe same color.\n\n### Scale\n\n`--effect-scale \u003cscale\u003e`: Scale the image by a factor.\n\nThis effect scales the internal buffer. This has a few uses:\n\n* Use `--effect-scale` in combination with `--scaling` to create a zoom effect:\n  `--effect-scale 1.1 --scaling center`\n* Speed up other effects by making the resolution smaller: with\n  `--effect-scale 0.5 --effect-blur 7x5 --effect-scale 2`, swaylock-effect needs to blur\n  only 1/4 as many pixels.\n\n### Greyscale\n\n`--effect-greyscale`: Make the displayed image greyscale.\n\n### Vignette\n\n`--effect-vignette \u003cbase\u003e:\u003cfactor\u003e`: Apply a vignette effect.\nBase and factor should be between 0 and 1.\n\n### Compose\n\n`--effect-compose \"\u003cposition\u003e;\u003csize\u003e;\u003cgravity\u003e;\u003cpath\u003e\"`: Overlay another image to your lock screen.\n\n* `\u003cposition\u003e`: Optional. The position on the screen to put the image, as `\u003cx\u003e,\u003cy\u003e`.\n\t* Can be a percentage (`10%,10%`), a number of pixels (`20,20`), or a mix (`30%,40`).\n\t* A negative number indicates that number of pixels away from the right/bottom instead of\n\t  from the top/left; `-1,-1` would be the bottom right pixel.\n\t* Default: `50%,50%`.\n* `\u003csize\u003e`: Optional. The size of the image on the screen, as `\u003cw\u003ex\u003ch\u003e`.\n\t* Can be a percentage (`10%x10%`), a number of pixels (`20x20`), or a mix (`30%x40`).\n\t* If the width is `-1`, the width is figured out based on the height and aspect ratio.\n\t* If the height is `-1`, the height is figured out based on the width and aspect ratio.\n\t* Default: The size of the image file.\n* `\u003cgravity\u003e`: Optional. Determine which point of the image is placed at `\u003cposition\u003e`.\n\t* Possible values: `center`, `north`, `south`, `west`, `east`,\n\t  `northwest`, `northeast`, southwest`, `southeast`.\n\t* With a `\u003cgravity\u003e` of `northwest`, `\u003cposition\u003e` gives the location of the top/left\n\t  corner of the image; with `southeast`, `\u003cposition\u003e` controls the bottom/right corner,\n\t  `center` controls the middle of the image, etc.\n\t* Default: `center` if no `\u003cposition\u003e` is given; otherwise, intelligently decide a gravity\n\t  based on position (`10,10` -\u003e northwest, `-10,10` -\u003e northeast, etc).\n* `\u003cpath\u003e`: The path to an image file.\n\nThis command requires swaylock-effects to be compiled with gdk-pixbuf2.\nIt supports all image formats gdk-pixbuf2 supports; on my system, that's\npng, jpeg, gif, svg, bmp, ico, tiff, wmf, ani, icns, pnm, qtif, tga, xbm and xpm.\n\n### Custom\n\n`--effect-custom \u003cpath\u003e`: Load a custom effect from a shared object.\n\nThe .so must export a function `void swaylock_effect(uint32_t *data, int width, int height)`\nor a function `uint32_t swaylock_pixel(uint32_t pix, int x, int y, int width, int height)`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmortie%2Fswaylock-effects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmortie%2Fswaylock-effects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmortie%2Fswaylock-effects/lists"}