Skip to content

veggiedefender/open-and-shut

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open and Shut

Type in Morse code by repeatedly slamming your laptop shut

output

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. Semaphores who??
  • Closing your laptop now types the letter E instead of locking

Setup

Dependencies

Choosing your keyboard

Use evemu-describe to find the correct path for your keyboard device and replace KEYBOARD_DEV in morse_code_open.sh with it.

Installation

Clone this repository and copy files into /etc/acpi

git clone git@github.com: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.

About

Type in Morse code by repeatedly slamming your laptop shut

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  翻译: