Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/veggiedefender/open-and-shut
Type in Morse code by repeatedly slamming your laptop shut
https://github.com/veggiedefender/open-and-shut
Last synced: 7 days ago
JSON representation
Type in Morse code by repeatedly slamming your laptop shut
- Host: GitHub
- URL: https://github.com/veggiedefender/open-and-shut
- Owner: veggiedefender
- License: mit
- Created: 2020-03-29T16:41:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-28T23:56:53.000Z (over 4 years ago)
- Last Synced: 2024-12-07T17:49:16.436Z (14 days ago)
- Language: Shell
- Homepage:
- Size: 15.6 KB
- Stars: 2,338
- Watchers: 11
- Forks: 20
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- starred - veggiedefender/open-and-shut - Type in Morse code by repeatedly slamming your laptop shut (Shell)
README
# Open and Shut
Type in Morse code by repeatedly slamming your laptop shut
[![output](https://user-images.githubusercontent.com/8890878/78181506-882c1a80-7432-11ea-89c0-bee00e9d183f.gif)](https://youtu.be/UAQ60P61vYw)
## Features
* Use a battle-tested encoding trusted by pilots, submariners, and amateur radio nerds
* Type at 100+ words per ~~minute~~ hour
* Innovative [SIGTERM-based concurrency control](https://github.com/veggiedefender/open-and-shut/blob/master/morse_code_close.sh#L8). Semaphores *who??*
* Closing your laptop now types the letter E instead of locking## Setup
Note: For wayland support, check out the [`wayland` branch](https://github.com/veggiedefender/open-and-shut/tree/wayland).
### Dependencies
* [xdotool](http://manpages.ubuntu.com/manpages/trusty/man1/xdotool.1.html)
* [acpid](https://wiki.archlinux.org/index.php/Acpid)### Installation
Clone this repository and copy files into `/etc/acpi`
```
git clone [email protected]:veggiedefender/open-and-shut.git
sudo cp morse_code_close.sh morse_code_open.sh morse_code_acpi.sh /etc/acpi/
```### Configure acpid
Acpid needs to know how and when to run our scripts. Create a file `/etc/acpi/events/lm_lid` with the following contents:
```
event=button/lid.*
action=/etc/acpi/morse_code_acpi.sh
```### Disable screen lock
**Temporarily:** Run `systemd-inhibit --what=handle-lid-switch cat` and press Ctrl+C when you're done.**Permanently:** Add `HandleLidSwitch=ignore` to `/etc/systemd/logind.conf` and either run `sudo systemctl restart systemd-logind.service` (this will log you out), or reboot your computer.