{"id":19897926,"url":"https://github.com/jirutka/swaylock-effects","last_synced_at":"2025-10-21T13:07:46.216Z","repository":{"id":40752743,"uuid":"403156906","full_name":"jirutka/swaylock-effects","owner":"jirutka","description":"Swaylock, with fancy effects","archived":false,"fork":true,"pushed_at":"2024-03-08T19:02:24.000Z","size":3167,"stargazers_count":169,"open_issues_count":21,"forks_count":17,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-06-12T06:18:43.557Z","etag":null,"topics":["screen-locker","sway","swaylock","wayland"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"mortie/swaylock-effects","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jirutka.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":"2021-09-04T21:11:59.000Z","updated_at":"2024-06-10T21:13:23.000Z","dependencies_parsed_at":"2023-02-11T21:30:17.878Z","dependency_job_id":null,"html_url":"https://github.com/jirutka/swaylock-effects","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fswaylock-effects","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fswaylock-effects/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fswaylock-effects/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fswaylock-effects/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jirutka","download_url":"https://codeload.github.com/jirutka/swaylock-effects/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252108550,"owners_count":21696092,"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":["screen-locker","sway","swaylock","wayland"],"created_at":"2024-11-12T19:00:59.571Z","updated_at":"2025-10-21T13:07:40.876Z","avatar_url":"https://github.com/jirutka.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"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\nThis repository ([jirutka/swaylock-effects](https://github.com/jirutka/swaylock-effects))\nis a fork of [mortie/swaylock-effects](https://github.com/mortie/swaylock-effects)\nwhich is no longer maintained.\n\n![Screenshot](https://raw.githubusercontent.com/jirutka/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* `--indicator-image \u003cpath\u003e` to display an image inside the indicator.\n* `--text-clear \u003cstring\u003e`, `--text-caps-lock \u003cstring\u003e`, `--text-ver \u003cstring\u003e`,\n  and `--text-wrong \u003cstring\u003e` to change the texts displayed inside the indicator.\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## Versions\n\nswaylock-effects continuously incorporates changes from the original [swaylock](https://github.com/swaywm/swaylock).\nThe following table shows the relation between the swaylock-effect and swaylock versions.\n\n| swaylock-effects | swaylock (original)                                                                                 |\n| ---------------- | --------------------------------------------------------------------------------------------------- |\n| 1.6-0            | [1.5](https://github.com/swaywm/swaylock/tree/1.5)                                                  |\n| 1.6-1            | 1.5-7-g[a99afe6a](https://github.com/swaywm/swaylock/tree/a99afe6a7075c962da72b140f02e18318052d833) |\n| 1.6-2            | 1.5-9-g[235b925d](https://github.com/swaywm/swaylock/tree/235b925df7e1bb82d98f1ac8c02e8f85d0a54ee9) |\n| 1.6-3            | 1.5-9-g[235b925d](https://github.com/swaywm/swaylock/tree/235b925df7e1bb82d98f1ac8c02e8f85d0a54ee9) |\n| 1.6.10           | [1.6](https://github.com/swaywm/swaylock/tree/1.6)                                                  |\n| 1.6.11           | [1.6](https://github.com/swaywm/swaylock/tree/1.6)                                                  |\n| 1.7.0.0          | 1.7-8-g[b4e3a2b](https://github.com/swaywm/swaylock/tree/10ab8b274020a9323413d093c45f13490929fb81)  |\n\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](https://aur.archlinux.org/packages/swaylock-effects/) / [swaylock-effects-git](https://aur.archlinux.org/packages/swaylock-effects-git/)\n* Fedora (Copr): [swaylock-effects](https://copr.fedorainfracloud.org/coprs/trs-sod/swaylock-effects)\n* FreeBSD: [swaylock-effects](https://www.freshports.org/x11/swaylock-effects/)\n* Guix: [swaylock-effects](https://packages.guix.gnu.org/packages/swaylock-effects)\n* Nix: [swaylock-effects](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/window-managers/sway/lock-effects.nix)\n\nThe original [mortie/swaylock-effects](https://github.com/mortie/swaylock-effects) (now unmaintained)\nhas been packaged for:\n\n* Fedora (Copr): [swaylock-effects](https://copr.fedorainfracloud.org/coprs/eddsalkield/swaylock-effects/)\n  (thanks to Edd Salkield)\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  `--efect-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%2Fjirutka%2Fswaylock-effects","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjirutka%2Fswaylock-effects","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjirutka%2Fswaylock-effects/lists"}