eigan / xmodmapswitch

Switch fast between your .Xmodmap files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xmodmapswitch

Keep your xmodmaps in ~/.Xmodmaps/ and this utility will find the next map file and replace your ~/.Xmodmap.

How it works

  1. Looks for files in ~/.Xmodmaps/
  2. Finds the next .Xmodmap file
  3. Creates a diff between current and new
  4. Executes xmodmap
  5. Copies the content for the next Xmodmap file into ~/.Xmodmap

Why create a diff

Using xmodmap on only changed keycodes is a lot faster.

Todo

  • Better error handling
  • Replace PHP code with Rust

Setup

mkdir ~/.Xmodmaps
cp ~/.Xmodmap ~/.Xmodmaps/
git clone https://github.com/eigan/xmodmapswitch.git

i3

bindcode <keycode> exec php <path/to/project>/xmodmapswitch.php

About

Switch fast between your .Xmodmap files


Languages

Language:PHP 100.0%