Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

period-space

Double-space to period, everywhere on Linux.

Tap Space twice after a word. Get a period. Keep typing.

hello world + Space Space  →  hello world.

GitHub stars MIT License Linux Powered by keyd

period-space brings the familiar iOS and macOS double-space shortcut to Linux. It remaps your keyboard at the device level with keyd, so the shortcut works across your entire system—not just inside one app.

Terminal, editor, browser, desktop, or raw TTY: if you can type there, period-space works there.

  • System-wide — one setup for every app
  • Desktop-agnostic — works on Wayland, X11, GNOME, KDE, niri, and more
  • Shortcut-safe — Ctrl, Alt, Super, and AltGr + Space keep their normal behavior
  • Lightweight — a small controller and one focused keyd configuration
  • Yours to tune — adjust the timing with a single config value

Install

One command. No clone required.

curl -fsSL https://hapwi.github.io/install/period-space.sh | bash

The installer downloads the latest stable GitHub Release to /usr/local/bin, verifies its checksum, creates your user config, installs keyd when needed, and enables the shortcut. It requests sudo once for the system-wide command and keyboard access.

Note

Requires Linux with Python 3, sudo, and systemd.

Supported distributions

Distribution Installation path
Fedora / RHEL family COPR via dnf
Arch / Manjaro pacman
Ubuntu / Mint / Pop!_OS apt, with the keyd PPA on older Ubuntu releases
Debian 13+ apt
openSUSE zypper

Other systemd distributions fall back to building the latest keyd release from source. If keyd is already available on your PATH, the installer leaves it alone.

Install from a local clone
git clone https://github.com/hapwi/period-space.git
cd period-space
./install.sh
NixOS and non-systemd systems

NixOS: enable keyd in configuration.nix, rebuild, then rerun the quick install command. From a clone, use python3 period-space install --enable.

OpenRC / runit: automatic service setup is not supported yet. You can install keyd manually to experiment, but period-space on currently expects systemctl.

Why period-space?

App-specific plugins only work where you install them. Desktop extensions stop at the edge of the desktop. Shell settings stop at the terminal.

period-space sits below all of them.

The keyboard event is transformed before it reaches your compositor or application. Type Write the sentence, tap Space twice, and every app receives Write the sentence. .

Command line

Command Purpose
period-space on Enable the mapping and start keyd
period-space off Remove the mapping while keeping keyd installed
period-space status Show the config, service, and feature status
period-space reload Apply changes from your user config
period-space update Check for a newer release and ask before installing it
period-space --version Print the installed version

Try it after installation: type a word, then tap Space twice. You should get word. .

Updating

period-space update

The updater reports your installed version and the latest stable release. When a newer version exists, it asks before downloading and verifying the release:

current version: 1.0.0
latest version:  1.0.1
Install period-space 1.0.1? [y/N]

For scripts and unattended upgrades, use period-space update --yes. Your personal config at ~/.config/period-space/keyd.conf is never overwritten.

Publishing a release
  1. Update VERSION in the period-space CLI.
  2. Commit the release changes.
  3. Tag that commit with the matching version, such as v1.0.1.
  4. Push the tag to GitHub.

The release workflow validates the version, generates SHA-256 checksums, and publishes the CLI, config, and installer as GitHub Release assets.

Configuration

Your config lives at:

~/.config/period-space/keyd.conf

Change the double-space window by editing oneshot_timeout, then run period-space reload:

[global]
oneshot_timeout = 400

Raise the value if you type slowly. Lower it if accidental double-spaces are becoming periods.

Exclude a mouse, headset, or gamepad

Some devices advertise a keyboard interface and may need to be excluded. First, find the device ID:

keyd monitor

Then add it to your config:

[ids]
*
-1532:007d

Apply the change with period-space reload.

How it works

period-space manages the setup; keyd handles the always-on remapping.

  1. The first Space is emitted normally and opens a short timing window.
  2. A second Space inside that window becomes Backspace, ., Space.
  3. The window closes. A third Space behaves normally.

Because the transformation happens at the input-device level, every desktop, compositor, terminal, and TTY receives the same finished . .

Tip

If your keyboard ever becomes unresponsive, hold Backspace + Escape + Enter to stop keyd.

Uninstall

period-space off
sudo rm -f /usr/local/bin/period-space
sudo rm -rf /usr/local/share/period-space

keyd stays installed in case you use it for other remappings.

Contributing

Bug reports and suggestions are welcome. Pull requests are currently limited to trusted contributors; see CONTRIBUTING.md for details.

License

Released under the MIT License.

About

macOS-style double-space period on Linux. Works everywhere: terminals, TTY, Wayland, X11, editors, browsers.

Topics

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages