{"id":23071522,"url":"https://github.com/lloydlobo/keystoke-statusbar","last_synced_at":"2025-04-03T10:41:35.194Z","repository":{"id":172435626,"uuid":"649196185","full_name":"lloydlobo/keystoke-statusbar","owner":"lloydlobo","description":"Print your keyboard keystrokes to stdout or display them in your status bar.","archived":false,"fork":false,"pushed_at":"2023-10-22T05:20:07.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-09T00:14:35.902Z","etag":null,"topics":["keyboard","keyboard-events","keylogger","keylogging","keystrokes-mod","python","script","status-bar-indicator"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lloydlobo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-04T05:04:19.000Z","updated_at":"2024-12-30T22:28:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"0ed2946f-6abe-4a48-9705-4a7b6129e328","html_url":"https://github.com/lloydlobo/keystoke-statusbar","commit_stats":null,"previous_names":["lloydlobo/keystrokes","lloydlobo/keylogger","lloydlobo/keystoke-statusbar"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydlobo%2Fkeystoke-statusbar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydlobo%2Fkeystoke-statusbar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydlobo%2Fkeystoke-statusbar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lloydlobo%2Fkeystoke-statusbar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lloydlobo","download_url":"https://codeload.github.com/lloydlobo/keystoke-statusbar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246989489,"owners_count":20865304,"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":["keyboard","keyboard-events","keylogger","keylogging","keystrokes-mod","python","script","status-bar-indicator"],"created_at":"2024-12-16T07:15:37.096Z","updated_at":"2025-04-03T10:41:35.178Z","avatar_url":"https://github.com/lloydlobo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Keylogger\n\nThe `keylogger` project allows you to print your keyboard's \"keydown\" \nevents to `stdout` or display them in your status bar. \nThis can be useful for monitoring or showing your keylogs in real-time.\n\n## Usage\n\n\u003e **Note:** Make sure you have Python and pip installed locally.\n\u003e Install `python3-pip` or a similar package using your package manager.\n\n### Installation\n\nTo install the required dependencies, clone the repository and run\nthe following command:\n\n```shell\ncd keylogger\npip install -r requirements.txt\n```\n\n### Running the Script\n\nTo run the `keylogger` script, follow the instructions below:\n\n#### Emulate 1D terminal game\n\n1. Open a terminal and navigate to the `keylogger` directory.\n2. Run the following command:\n\n   ```shell\n   python -u src/app.py \u003e game.log \u0026\n   ```\n\n   This command emulates a 1D terminal game and redirects the output to a log file named `game.log`. The `-u` flag is used to enable unbuffered output, ensuring that the log file is updated in real-time as the game progresses. The `\u0026` at the end runs the process in the background.\n\n3. In a separate terminal instance or the same if `\u0026` was used, run the following command:\n\n   ```shell\n   watch -n 0.033 \"tail -n 1 game.log\"\n   ```\n\n   This command continuously monitors the `game.log` file and displays the latest line every 0.033 seconds, creating a live gameplay experience. The interval of 0.033 seconds corresponds to a frame rate of approximately 30 frames per second (fps), providing smooth gameplay.\n\n#### For raw live output\n\n1. Open a terminal and navigate to the `keylogger` directory.\n2. Run the following command:\n\n   ```shell\n   python src/app.py\n   ```\n\n   This command runs the script and provides raw live output without any logging.\n\nMake sure you have Python installed and the necessary dependencies are installed before running the script.\n\n### Keybindings\n\nThe following keybindings are available:\n\n- Press the `Escape` key to toggle listening to key events.\n  - This can be useful when you don't want to display sensitive information,\n    such as passwords, in your status bar.\n  - **Note:** Even when the event listener is toggled off, it continues running\n    silently in the background. If you want complete silence, you can stop\n    the script and resume it later.\n\n## Integration with Polybar\n\nTo integrate `keylogger` with Polybar, you can use the following configuration:\n\n```ini\nmodules-center = keylogger\n\n[module/keylogger]\ntype = custom/script\nexec = \"/usr/bin/python3 -u $HOME/keylogger/src/app.py\"\ntail = true\n```\n\nThis configuration adds the `keylogger` module to the center section of\nyour Polybar. It executes the `keylogger` script using Python and\ndisplays the output in the status bar. The `tail = true` option ensures\nthat the output is continuously updated in the status bar.\n\n## Many Thanks to\n\n- [@petternett](https://github.com/petternett/railway-statusbar)\n  for providing inspiration for this project.\n\nFeel free to modify the configuration and adapt it to your specific setup\nor requirements.\n\nIf you have any questions or need further assistance, please let us know.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flloydlobo%2Fkeystoke-statusbar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flloydlobo%2Fkeystoke-statusbar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flloydlobo%2Fkeystoke-statusbar/lists"}