diff --git a/README.md b/README.md index f782a82..760abe2 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ DreymaR's Big Bag of Keyboard Tricks ### For Linux (updated to XKB-data v2.17.1ub1, 2016-06) * New "Colemak[eD]" AltGr mappings (lv3-4) putting dead keys on AltGr+symbol keys and reworking most other mappings -* An "Extend" layer using Caps Lock as a modifier (lv5-8) for navigation/editing from the home position and more * Angle/Wide ergo modifications to improve wrist angles, hand spacing and right pinky stretch/load effort * Curl(DH) ergo modifications to encourage natural finger curvature +* An "Extend" layer using Caps Lock as a modifier (lv5-8) for navigation/editing from the home position and more * For several locales, a 'Unified Symbols' layout with only a few necessary changes from the standard Colemak[eD]; Also, a layout to 'Keep Local Symbols' like their default (QWERTY-type) counterparts for that locale * Intuitive phonetic layouts for Cyrillic, Greek and Hebrew scripts diff --git a/install-dreymar-xmod.sh b/install-dreymar-xmod.sh index 547a692..5753552 100644 --- a/install-dreymar-xmod.sh +++ b/install-dreymar-xmod.sh @@ -8,20 +8,20 @@ HeadStr="DreymaR's Big Bag Of Tricks install script (by GadOE, 2016-06)" DescStr=\ "\e[1mShell script to apply DreymaR's changes to the X keyboard files:\e[0m\n"\ -" - CurlAngleWide Ergonomic keyboard models for pc104/pc105 keyboards,\n"\ +" - The Colemak [edition DreymaR] layout, using my own lv3-4 mappings,\n"\ +" - Curl/Angle/Wide Ergonomic keyboard models for pc104/pc105 keyboards,\n"\ " - Extend mappings as a Misc option and CapsLock as a chooser (using lv5-8),\n"\ -" - the Colemak [edition DreymaR] layout, using my own lv3-4 mappings,\n"\ " - locale variants of Colemak[eD] with 'keep local' or 'unified' symbol keys,\n"\ " - phonetic variants of Colemak for other scripts such as Greek,\n"\ -" - mirrored Colemak[eD] for one-handed typing, (if I ever break an arm...)\n"\ -" - and the Tarmak(1-4) transitional (step-by-step) Colemak learning layouts.\n"\ +" - mirrored Colemak[eD] for one-handed typing (if I ever break an arm...),\n"\ +" - and the Tarmak(1-4) transitional step-by-step Colemak learning layouts.\n"\ "\n"\ "- By default, this script creates a backup of the X11 files if none exist.\n"\ "- With '-o', overwrite the system X11 files (makes the mod GUI accessible).\n"\ -"- With '-s ', specify a model/layout to activate immediately.\n"\ -" (Shortstr format: -s '[4|5][n|a|b|v][w|f] loc [ks|us]'; 'loc'(ale) is 2-letter.\n"\ -" Some model shortstr examples: '4n' is pc104, '5aw' is pc105AngleWide etc.\n"\ -" E.g.: -s '5n fr us' is normal pc105 model, French Colemak[eD]'USym'.)\n"\ +"- With a ShortStr at the end, specify a model/layout to activate immediately.\n"\ +" - ShortStr format: '[4|5][n|a|c][w|f] loc [ks|us]'; 'loc'(ale) is 2-letter.\n"\ +" - E.g., '5n fr us' is normal pc105 model, French Cmk[eD]-'UniSym'.\n"\ +" - See setxkb.sh help for more info on ShortStr syntax.\n"\ "- With '-?', list further instructions and default values.\n"\ "- See http://forum.colemak.com/viewtopic.php?id=1438 for more info\n" # @@ -67,10 +67,10 @@ DoBackup='ifnone' # (-n/b) Default backup behavior is "if no backups are found" SubDirs='all' # (-m) Directory/-ies inside X11 to modify (e.g., 'xkb locale', 'all') InstGTK='no' # (-g) Whether to install the GTK 2.0/3.0 config (if not present) SetXMap='no' # (-x) Whether to run the setxkb script after installing -SetXStr='5cw us us' # (-s) Shortcut string for setxkb - 'mmm ll vv' (model layout eD-variant) +SetXStr='5cw us us' # (--) Shortcut string for setxkb - 'kbd loc sym' (model layout eD-variant) ## NOTE: '# (-a)' means that the value can be set by option argument '-a ' -HelpStr="\e[1mUsage: bash ${MyNAME} [optional args]\e[0m\n"\ +HelpStr="\e[1mUsage: bash ${MyNAME} [optional args] [ [ ]]\e[0m\n"\ " Run this from the directory containing the x-mod dir\n"\ "===========================================================\n"\ "[-#] Functionality - 'default' \n"\ @@ -83,10 +83,9 @@ HelpStr="\e[1mUsage: bash ${MyNAME} [optional args]\e[0m\n"\ "[-d] - ${DModDir}\n"\ "[-m] - ${SubDirs}\n"\ "[-t] - ${DModTag}\n"\ -"[-g] Install GTK 2.0/3.0 edit config - ${InstGTK}\n"\ -"[-x] Run the setxkbmap script, yes/no - ${SetXMap}\n"\ -"[-s] Setxkb ShortStr 'mdl loc sym' - ${SetXStr}\n"\ -" (See setxkb help for more info on ShortStr)\n" +"[-g] Install GTK 2.0/3.0 edit config? - ${InstGTK}\n"\ +"[-x] Run the setxkbmap script? - ${SetXMap}\n"\ +"[--] [Setxkb ShortStr ] - ${SetXStr}\n" #~ "( - : Default settings)\n" ##-------------- functions and line parser --------------------- @@ -139,15 +138,13 @@ MyError() #~ } #~ if [ "$#" == 0 ]; then PrintHelpAndExit 2; fi # No args -while getopts "obngxs:m:i:d:t:r:h?" cmdarg; do +while getopts "obngxm:i:d:t:r:h?" cmdarg; do case $cmdarg in o) WriteSys='yes' ;; b) DoBackup='yes' ;; n) DoBackup='no' ;; g) InstGTK='yes' ;; x) SetXMap='yes' ;; - s) SetXStr="$OPTARG" - SetXMap='yes' ;; m) SubDirs="$OPTARG" ;; i) InstDir="$OPTARG" ;; d) DModDir="$OPTARG" ;; @@ -156,9 +153,13 @@ while getopts "obngxs:m:i:d:t:r:h?" cmdarg; do h) PrintHelpAndExit 0 ;; \?) PrintHelpAndExit 0 ;; :) PrintHelpAndExit 1 ;; +# s) SetXStr="$OPTARG" +# SetXMap='yes' ;; esac done -#~ pos_arg=${@:$OPTIND:1} # Get the remaining (positional) arg +#~ pos_arg=${@:$OPTIND:1} # Get the remaining positional arg (old way) +shift $(( $OPTIND - 1 )) # Remove already processed args +[[ "$@" == "" ]] || SetXStr=$@ # Don't split the ShortString here! ##-------------- main ------------------------------------------ @@ -257,7 +258,7 @@ fi if [ "${SetXMap}" != 'yes' ]; then MyMsg "XKBmap activation skipped" "" '1;33;40' else - bash ./setxkb.sh -d "${XKBDir}" -s "${SetXStr}" || MyError "setxkb.sh failed!" + bash ./setxkb.sh -d "${XKBDir}" ${SetXStr} || MyError "setxkb.sh failed!" fi MyMsg "${MyNAME} finished!" "\n" @@ -265,5 +266,5 @@ exit 0 ##-------------- misc ------------------------------------------ -#~ MyError "Debug - run halted!" # debug +#~ MyWarning "'${MyNAME}' debug - exiting!"; exit 0 #~ echo "$1 $2 $3 $4 $5"; exit 0 # debug diff --git a/setxkb.sh b/setxkb.sh index 9790c59..dba88f1 100644 --- a/setxkb.sh +++ b/setxkb.sh @@ -9,7 +9,7 @@ HeadStr="DreymaR's setxkbmap script (by GadOE, 2015-01)" DescStr=\ "\e[1mShell script to change X.org keyboard setup\e[0m\n"\ " using the 'setxkbmap' command.\n"\ -" To override system settings after logon,\n"\ +" To make settings logon persistent,\n"\ " source it, e.g., in your ~/.bashrc file,\n"\ " or use -a to write the setxkbmap command to a file.\n" FootStr="Happy xkb-hacking! ~ Øystein Bech 'DreymaR' Gadmar" @@ -18,9 +18,9 @@ FootStr="Happy xkb-hacking! ~ Øystein Bech 'DreymaR' Gadmar" # By default, setxkbmap checks ./rules first! # Need a full xkb dir then (not just the xkb-mod files) -## NOTE: I made a handy shorthand for activating simple cmk_ed model/layout combos. -# See the help text of this script for more info on the model-layout-variant syntax. -# Example: -s '5w no us' activates model pc105aw-sl, layout no(cmk_ed_us) +## NOTE: I made a handy shorthand for activating simple Cmk[eD] model/layout combos. +# See the help text of this script for more info on the model-locale-symbols syntax. +# Example: '5w no us' activates model pc105aw-sl, layout no(cmk_ed_us) # Models: 4n 4a(pc104angle-z) 4w(pc104wide-qu) 4aw(pc104aw-zqu) 4f(pc104awing) # 5n 5a(pc105angle) 5w/5aw(pc105aw-sl) # - Curl(DH) models add a 'c', like this: 4c, 5cw etc @@ -47,32 +47,33 @@ XKBdir="${X11DIR}/xkb" # (-d) The xkb-type dir to run setxkbmap from AddCmd='no' # (-a) Add setxkbmap cmd to file? AddDefault="${HOME}/.bashrc" AddCmdTo=${AddDefault} # (-f) File (such as '~/.bashrc') to add setxkbmap cmd to -SetXStr='' #'5cw no us' # (-s) Shortcut string for setxkb - 'model locale eD-variant(sym)' +SetXStr='' #'5cw no us' # (--) Shortcut string for setxkb (model locale eD-variant) ## NOTE: '# (-a)' means that the value can be set by option argument '-a ' -HelpStr="\e[1mUsage: bash ${MyNAME} [optional args]\e[0m\n"\ +HelpStr="\e[1mUsage: bash ${MyNAME} [optional args] [ [ ]]\e[0m\n"\ "===========================================================\n"\ "[-#] Functionality - 'default' \n"\ "===========================================================\n"\ "[-m] - '${XKBmodel}'\n"\ -"[-l] - '${XKBlayout}'\n"\ -"[-o]