├── .gitignore ├── LICENSE ├── Makefile └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.xmodmap 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Tarmak 1-4 xmodmap file generator 2 | # 3 | # Run 'make' inside this directory to create a bunch of xmodmap files based 4 | # on your current layout, along with another xmodmap file to reset 5 | # back to your current layout 6 | 7 | # File names 8 | FILE1=tarmak1.xmodmap 9 | FILE2=tarmak2.xmodmap 10 | FILE3=tarmak3.xmodmap 11 | FILE4=tarmak4.xmodmap 12 | FILER=reset.xmodmap 13 | 14 | # Keycodes for letters/symbols in the QWERTY layout 15 | E=26 16 | R=27 17 | T=28 18 | Y=29 19 | O=32 20 | P=33 21 | S=39 22 | D=40 23 | F=41 24 | G=42 25 | J=44 26 | K=45 27 | SC=47 28 | N=57 29 | 30 | # Function to swap keycode $(1) to $(2) - and save it to file $(3) 31 | swap = \ 32 | xmodmap -pke | \ 33 | grep "^keycode *$(2)" | \ 34 | sed "s/keycode *$(2)/keycode $(1)/" >> $(3); \ 35 | grep -v '^keycode *$(1)' $(FILER) > $(FILER).tmp; \ 36 | mv $(FILER).tmp $(FILER); \ 37 | xmodmap -pke | \ 38 | grep "^keycode *$(1)" >> $(FILER) 39 | 40 | all: tarmak1 tarmak2 tarmak3 tarmak4 endmsg 41 | 42 | clean: 43 | rm -f $(FILE1) 44 | rm -f $(FILE2) 45 | rm -f $(FILE3) 46 | rm -f $(FILE4) 47 | rm -f $(FILER) 48 | 49 | # Tarmak 1: E 50 | tarmak1: 51 | echo '! Tarmak 1' > $(FILE1) 52 | echo '! Reset Tarmak 1' >> $(FILER) 53 | # E => J 54 | $(call swap,$(E),$(J),$(FILE1)) 55 | # J => N 56 | $(call swap,$(J),$(N),$(FILE1)) 57 | # K => E 58 | $(call swap,$(K),$(E),$(FILE1)) 59 | # N => K 60 | $(call swap,$(N),$(K),$(FILE1)) 61 | 62 | # Tarmak 2: ET 63 | tarmak2: tarmak1 64 | grep -v '$(G)\|$(E)\|$(F)\|$(T)' $(FILE1) > $(FILE2) 65 | echo '! Tarmak 2' >> $(FILE2) 66 | echo '! Reset Tarmak 2' >> $(FILER) 67 | # G => J 68 | $(call swap,$(G),$(J),$(FILE2)) 69 | # E => F 70 | $(call swap,$(E),$(F),$(FILE2)) 71 | # F => T 72 | $(call swap,$(F),$(T),$(FILE2)) 73 | # T => G 74 | $(call swap,$(T),$(G),$(FILE2)) 75 | 76 | # Tarmak 3: ETR 77 | tarmak3: tarmak2 78 | grep -v '$(S)\|$(D)\|$(R)\|$(G)' $(FILE2) > $(FILE3) 79 | echo '! Tarmak 3' >> $(FILE3) 80 | echo '! Reset Tarmak 4' >> $(FILER) 81 | # S => R 82 | $(call swap,$(S),$(R),$(FILE3)) 83 | # D => S 84 | $(call swap,$(D),$(S),$(FILE3)) 85 | # R => J 86 | $(call swap,$(R),$(J),$(FILE3)) 87 | # G => D 88 | $(call swap,$(G),$(D),$(FILE3)) 89 | 90 | # Tarmak 4: ETRO 91 | tarmak4: tarmak3 92 | grep -v '$(O)\|$(SC)\|$(P)\|$(R)\|$(Y)' $(FILE3) > $(FILE4) 93 | echo '! Tarmak 4' >> $(FILE4) 94 | echo '! Reset Tarmak 4' >> $(FILER) 95 | # O => Y 96 | $(call swap,$(O),$(Y),$(FILE4)) 97 | # ; => O 98 | $(call swap,$(SC),$(O),$(FILE4)) 99 | # P => ; 100 | $(call swap,$(P),$(SC),$(FILE4)) 101 | # R => P 102 | $(call swap,$(R),$(P),$(FILE4)) 103 | # Y => J 104 | $(call swap,$(Y),$(J),$(FILE4)) 105 | 106 | endmsg: 107 | @echo 108 | @echo "Finished successfully!" 109 | @echo 110 | @echo "You can now switch to another layout using one of:" 111 | @echo 112 | @echo " xmodmap $(FILE1)" 113 | @echo " xmodmap $(FILE2)" 114 | @echo " xmodmap $(FILE3)" 115 | @echo " xmodmap $(FILE4)" 116 | @echo 117 | @echo "And if you want to reset back to your current (qwerty) layout," 118 | @echo "just call this:" 119 | @echo 120 | @echo " xmodmap $(FILER)" 121 | @echo 122 | @echo "When you are done with Tarmak 4, run the $(FILER) file and" 123 | @echo "switch to the Colemak layout using your DE (desktop enviroment)" 124 | @echo "settings (or run setxkbmap -variant colemak)" 125 | @echo 126 | @echo "Tip #1: Open a new terminal window in this folder and type in" 127 | @echo " "xmodmap $(FILER)" so that you can just press enter if" 128 | @echo " you get cold feet." 129 | @echo 130 | @echo "Tip #2: Do a \"ln -s $(FILE1) ~/.Xmodmap\" to run $(FILE1)" 131 | @echo " when you log in." 132 | @echo 133 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Xmodmap mappings for Tarmak 1-4 2 | This repository contains a makefile that will generate Xmodmap mappings from your current (QWERTY, maybe localized) keyboard layout to the Tarmak 1-4 layouts. 3 | 4 | ### What is Tarmak? 5 | [Tarmak](http://forum.colemak.com/viewtopic.php?id=1858) is a set of keyboard layouts that will help you transition from QWERTY to the [Colemak keyboard layout](http://colemak.com/). Tarmak consists of 4 different layouts, each changing 4-5 keys from the previous layout. 6 | 7 | Normally, you'd transition from: 8 | 9 | QWERTY --> Tarmak 1 --> Tarmak 2 --> Tarmak 3 --> Tarmak 4 --> Colemak 10 | 11 | For some people, this will be easier than switching to Colemak cold turkey - and you can still be somewhat productive throughout. 12 | 13 | ### Why Xmodmap? 14 | DreymaR, the author of Tarmak, has a [big bag of tricks](http://forum.colemak.com/viewtopic.php?id=1438) that contains XKB layout files for Tarmak 1-4. Tarmak is supposed to be a temporary layout, and i think that bag of his is way too big - I'd rather not rewrite most of my XKB layouts for something i will hopefully just need for a few weeks. 15 | 16 | Although deprecated, Xmodmap is perfect for this task. XKB still has a compatibility layer for Xmodmap - and Xmodmap makes it very easy to create and use transitional keyboard layouts like Tarmak. It will also work per-user, as xmodmap won't touch the system-wide XKB layout files. 17 | 18 | ### Cool, now how do i use this? 19 | First of all, check out this repository (`git clone https://github.com/olemartinorg/tarmak-xmodmap`) or download the Makefile to your local machine. Run `make` inside the directory containing the Makefile. Now you can start using the Tarmak 1 by calling: 20 | 21 | xmodmap tarmak1.xmodmap 22 | 23 | Good luck! 24 | 25 | #### Useful links 26 | 27 | * http://colemak.com/ 28 | * http://colemak.com/Learn 29 | * http://forum.colemak.com/ 30 | * http://www.reddit.com/r/Colemak 31 | * http://www.makeuseof.com/tag/how-i-quickly-mastered-a-superior-keyboard-layout-without-losing-productivity/ 32 | --------------------------------------------------------------------------------