{"id":14968065,"url":"https://github.com/unclechu/place-cursor-at","last_synced_at":"2025-06-22T07:32:38.372Z","repository":{"id":53706136,"uuid":"94041089","full_name":"unclechu/place-cursor-at","owner":"unclechu","description":"A utility for X11 that moves the mouse cursor using the keyboard","archived":false,"fork":false,"pushed_at":"2023-06-04T00:28:35.000Z","size":484,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-19T23:44:07.362Z","etag":null,"topics":["cursor","gui","haskell","haskell-stack","i3","i3wm","keyboard","linux","mouse","nix","stack","tiling-window-manager","utility","x11","xlib","xmonad"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"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/unclechu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-06-12T00:45:44.000Z","updated_at":"2025-02-18T03:48:51.000Z","dependencies_parsed_at":"2024-09-02T18:07:09.868Z","dependency_job_id":"1450bd1f-4ec3-482e-bd78-a779d745937c","html_url":"https://github.com/unclechu/place-cursor-at","commit_stats":{"total_commits":69,"total_committers":3,"mean_commits":23.0,"dds":0.05797101449275366,"last_synced_commit":"500718f8aac606cbccdb3fd944b62a92337e0bfc"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/unclechu/place-cursor-at","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fplace-cursor-at","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fplace-cursor-at/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fplace-cursor-at/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fplace-cursor-at/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unclechu","download_url":"https://codeload.github.com/unclechu/place-cursor-at/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fplace-cursor-at/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261055601,"owners_count":23103247,"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":["cursor","gui","haskell","haskell-stack","i3","i3wm","keyboard","linux","mouse","nix","stack","tiling-window-manager","utility","x11","xlib","xmonad"],"created_at":"2024-09-24T13:39:11.464Z","updated_at":"2025-06-22T07:32:33.358Z","avatar_url":"https://github.com/unclechu.png","language":"Haskell","readme":"![place-cursor-at](artwork/logo/horizontal.svg)\n\nA utility for X11 that moves the mouse cursor using the keyboard.\nWritten in Haskell.\n\nThis utility only gives you an ability to quickly move your mouse cursor to one\nof 9 common spots of the screen. It’s intended to reduce the use of the mouse,\nbut not to replace it completely. It doesn’t provide you accurate aiming, only\napproximate.\n\nYou bind a hotkey (in your WM configuration or by using [xbindkeys]) to run\n`place-cursor-at` (say `Super+M`) and when you press it you see 9 windows on\ncurrent screen with letters shown on them. When you press a letter on your\nkeyboard that is associated with one of those windows your mouse cursor appear\nat the center of that window and the application closes. Thus you can quickly\nmove your mouse cursor to one of 9 different spots by two-step combo.\n\nOther key bindings:\n\n1. Press `Escape` to close the application\n   (when one of the *letter* windows is focused)\n\n2. Move focus to a *letter* window where you want your mouse cursor to be and\n   press `Enter` (this is the same as pressing that *letter* on your keyboard)\n\nI originally created this tool it for myself to use it with\n[xmonad](https://github.com/unclechu/xmonadrc)\nand [i3](https://github.com/unclechu/i3rc).\n\n![Screenshot](artwork/screenshot.png)\n\n## Requirements\n\nEither one:\n\n1. [Nix Package Manager]\n\n2. [The Haskell Tool Stack] and:\n\n   1. `libX11` development files\n   2. `libXinerama` development files\n\n## How to use\n\n### With Nix\n\nSee [Nix Package Manager].\n\nYou can run this application like this:\n\n``` sh\nnix-shell --run place-cursor-at\n```\n\nSee also [shell.nix]’s arguments for available options.\nFor instance if you want to enter a `nix-shell` with `cabal` available:\n\n``` sh\nnix-shell --arg withCabal true\n```\n\n#### NixOS\n\nYou can add this application into your NixOS `configuration.nix` like this:\n\n``` nix\n{ pkgs, ... }:\nlet\n  place-cursor-at-src = pkgs.fetchFromGitHub {\n    owner = \"unclechu\";\n    repo = \"place-cursor-at\";\n    rev = \"ffffffffffffffffffffffffffffffffffffffff\"; # Git commit hash\n    sha256 = \"0000000000000000000000000000000000000000000000000000\";\n  };\n\n  place-cursor-at = pkgs.callPackage place-cursor-at-src {};\nin\n{\n  environment.systemPackages = [ place-cursor-at ];\n}\n```\n\n### With Stack\n\nSee [The Haskell Tool Stack].\n\n``` sh\nstack build\nstack exec place-cursor-at\n```\n\nYou could install `place-cursor-at` binary to `~/.local/bin` directory\n(make sure you have this directory in your `PATH` environment variable):\n\n``` sh\nstack install\n```\n\n#### NixOS note\n\nIf you need to work with Stack under NixOS for whatever reason you would have to\nuse `--system-ghc` in order to make it work. You can manually add `--system-ghc`\nto each call of `stack` or define this alias for your convenience:\n\n``` sh\nalias stack='stack --system-ghc'\n```\n\n## Using it as script\n\nYou also can run this application as a script\n(`nix-shell` script, so you have to\n[install Nix Package Manager](https://nixos.org/nix/manual/#chap-installation)\nfirst):\n\n``` sh\nsrc/place-cursor-at.hs\n```\n\nBut this application is intended to be used very often (to be run again and\nagain many times) and to be very responsive, so it’s better to precompile it to\nreduce startup time.\n\n## Xinerama note\n\nBy default it appears and do its stuff on display where your mouse cursor is.\nBut you can specify which display where it should appear on:\n\n``` sh\nplace-cursor-at 1\n```\n\nOr on third display:\n\n``` sh\nplace-cursor-at 3\n```\n\n## Jump to specific position without GUI\n\nYou can immediately jump to specific position of a screen without showing any\nGUI, like this:\n\n``` sh\nplace-cursor-at LT\n```\n\nIt’s case-insensitive, this also would work:\n\n``` sh\nplace-cursor-at lt\n```\n\nAnd you also can specify a display you want to jump to:\n\n``` sh\nplace-cursor-at lt 1\n```\n\nIn any order of the arguments:\n\n``` sh\nplace-cursor-at 1 lt\n```\n\n### Codes of available positions\n\n| Code | Deciphering           |\n| -    | -                     |\n| `LT` | **L**eft-**T**op      |\n| `LC` | **L**eft-**C**enter   |\n| `LB` | **L**eft-**B**ottom   |\n| `CT` | **C**enter-**T**op    |\n| `CC` | **C**enter-**C**enter |\n| `CB` | **C**enter-**B**ottom |\n| `RT` | **R**ight-**T**op     |\n| `RC` | **R**ight-**C**enter  |\n| `RB` | **R**ight-**B**ottom  |\n\n## Author\n\n[Viacheslav Lotsmanov]\n\n## Contributors\n\nThe [logo] is created by [psikoz] and\nsome technical adjustments are made by [Viacheslav Lotsmanov].\n\n## Licenses\n\n1. **place-cursor-at** — [GNU/GPLv3](LICENSE)\n\n2. The logo —\n   [Creative Commons — Attribution 4.0 International (CC BY 4.0)][CC BY 4.0]\n\n   These files in [artwork/logo][logo] directory in particular:\n\n   - [artwork/logo/horizontal.svg](artwork/logo/horizontal.svg)\n   - [artwork/logo/horizontal.png](artwork/logo/horizontal.png)\n   - [artwork/logo/vertical.svg](artwork/logo/vertical.svg)\n   - [artwork/logo/vertical.png](artwork/logo/vertical.png)\n   - [artwork/logo/icon.svg](artwork/logo/icon.svg)\n   - [artwork/logo/icon.png](artwork/logo/icon.png)\n\n[The Haskell Tool Stack]: https://docs.haskellstack.org/en/stable/README/\n[Nix Package Manager]: https://nixos.org/manual/nix/stable/#ch-about-nix\n[xbindkeys]: https://linux.die.net/man/1/xbindkeys\n\n[shell.nix]: shell.nix\n[logo]: artwork/logo\n\n[CC BY 4.0]: https://creativecommons.org/licenses/by/4.0/\n\n[Viacheslav Lotsmanov]: https://github.com/unclechu\n[psikoz]: https://github.com/psikoz\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclechu%2Fplace-cursor-at","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funclechu%2Fplace-cursor-at","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclechu%2Fplace-cursor-at/lists"}