Skip to content

attilaolah/programmer-dvorak-compose

Repository files navigation

⌨️ Programmer Dvorak Compose

Fork of Roland Kaufmann's macOS DVP keyboard layout, with Linux-style compose key sequences.

Screenshot showcasing the icon in the menu bar


The packaged .keylayout is generated at build time from:

  • Roland Kaufmann's original Programmer Dvorak macOS package.
  • libX11's en_US.UTF-8/Compose.pre, which is the default Compose table used by X11 on Linux.

The generator keeps the original DVP key maps, promotes printable key outputs into macOS keylayout actions, and emits the representable Multi_key compose sequences from the X11 source.

The resulting compose key sequences contain all the good stuff, including:

  • Full set of German, Hungarian, Serbian (Latin) characters, including ä, ő, ű, í, đ, ž, etc.
  • Less common punctuations like —, –, ·, ←, →, ≤, ≥, ⇐, ⇒, «, », “, ”, …
  • 🖖 (LLAP), 💩 (poo) and a few other gems.

❄️ Nix: Home Manager + nix-darwin

This flake exposes:

  • packages.${system}.default: a complete Library/Keyboard Layouts/Programmer Dvorak Compose.bundle tree that can be copied into /Library or ~/Library.
  • overlays.default: adds pkgs."programmer-dvorak-compose".
  • homeManagerModules.default: installs the macOS bundle under ~/Library/Keyboard Layouts.
  • darwinModules.default: installs the macOS bundle globally under /Library/Keyboard Layouts.

The Home Manager entries are guarded with pkgs.stdenv.isDarwin and install the bundle as real directories with per-file symlinks. The nix-darwin module installs the global bundle during activation by copying the Nix store files into a real bundle. This avoids per-file symlinks, which macOS may not discover for global keyboard layouts.

Pro tip: set inputs.nixpkgs.follows to your own flake's nixpkgs input, and you'll get updates to the compose key sequences alongise your regular updates. The result is fully consistent sequences across all your Linux & macOS devices.

🏠 Example Home Manager integration

For a per-user install through Home Manager:

{
  inputs.programmer-dvorak-compose.url = "github:attilaolah/programmer-dvorak-compose";

  outputs = inputs @ {
    programmer-dvorak-compose,
    ...
  }: {
    homeConfigurations.example = home-manager.lib.homeManagerConfiguration {
      modules = [
        programmer-dvorak-compose.homeManagerModules.default
      ];
    };
  };
}

🍎 Example nix-darwin integration

For a global install through nix-darwin:

{
  inputs.programmer-dvorak-compose.url = "github:attilaolah/programmer-dvorak-compose";

  outputs = inputs @ {
    programmer-dvorak-compose,
    ...
  }: {
    darwinConfigurations.example = nix-darwin.lib.darwinSystem {
      modules = [
        programmer-dvorak-compose.darwinModules.default
      ];
    };
  };
}

About

Fork of Roland Kaufmann's macOS DVP keyboard layout, with additional compose key sequences

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors