diff options
author | Eric Gebhart <e.a.gebhart@gmail.com> | 2022-11-12 00:09:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-11 23:09:41 +0000 |
commit | 050472a4d07d07c1d9ae17d2fd26d44e9d95d950 (patch) | |
tree | 8c326011ec8cac395a92839ec4b420bf12652fa1 /users/ericgebhart/switch-kbd | |
parent | 49a78b81145213e2883e6c3beab6d9c136c10085 (diff) |
Eric Gebhart user space and keymaps (#17487)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Diffstat (limited to 'users/ericgebhart/switch-kbd')
-rwxr-xr-x | users/ericgebhart/switch-kbd | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/users/ericgebhart/switch-kbd b/users/ericgebhart/switch-kbd deleted file mode 100755 index 4401967a0f..0000000000 --- a/users/ericgebhart/switch-kbd +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env zsh - -# Switch the keyboard to en-us by default, bepo, or en-dvorak. - -help(){ - print 'switch-kbd - helper for setxkbmap' - print ' ' - print 'Change the keyboard to en-us, fr-bepo, or en-dvorak.' - print 'Uses setxkbmap, so the change only affects the current' - print 'session. This mainly to avoid using a toggle key.' - print ' ' - print ' -b Bepo' - print ' -d Dvorak' - print ' -n do not execute' - print ' -h help text.' - print ' ' - print ' The default is to set the keyboard to en-us.' - exit -} - -layout="-layout us" -variant="" -let "execute = 1" -let "verose = 0" - -# $opt will hold the current option -local opt -while getopts bdnvh opt; do - # loop continues till options finished - # see which pattern $opt matches... - case $opt in - (b) - layout="-layout fr" - variant="-variant bepo" - ;; - - (d) - layout="-layout en" - variant="-variant dvorak" - ;; - (n) - let "execute = 0" - ;; - (v) - let "verbose = 1" - ;; - (h) - help - ;; - # matches a question mark - # (and nothing else, see text) - (\?) - print "Bad option:" $* - print " " - help - return 1 - ;; - esac -done -(( OPTIND > 1 )) && shift $(( OPTIND - 1 )) -##print Remaining arguments are: $* - -mycommand='setxkbmap '${layout}' '${variant} - -if [[ ( $verbose -ne 0 ) ]]; then; - print "setxkbmap Command:" $mycommand -fi - -if [[ ( $execute -ne 0 ) ]] -then; - eval $mycommand -else; - print "did not execute" -fi |