From b33849761d68397b0faeb0351e3728bbb16d5604 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sat, 3 Dec 2022 14:56:03 +0200 Subject: [xkb] Added a custom bulgarian layout and updated on-wm-session command --- .a/sys/on-wm-session.sh | 2 +- .b/usr/share/X11/xkb/rules/evdev-excerpt.xml | 11 ++++ .b/usr/share/X11/xkb/symbols/bg-custom | 83 ++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 .b/usr/share/X11/xkb/rules/evdev-excerpt.xml create mode 100644 .b/usr/share/X11/xkb/symbols/bg-custom diff --git a/.a/sys/on-wm-session.sh b/.a/sys/on-wm-session.sh index 1173b93..3075c0d 100755 --- a/.a/sys/on-wm-session.sh +++ b/.a/sys/on-wm-session.sh @@ -13,7 +13,7 @@ lxpolkit & xautolock -detectsleep -secure -time 15 -locker ~/.a/sys/lock.sh & # auto lock screen tint2 & # taskbar picom & # compositor -setxkbmap -layout "us,bg" -variant ",phonetic" -option "grp:alt_shift_toggle" & # keyboard switching +setxkbmap -layout "us,bg-custom" -option "grp:alt_shift_toggle,lv3:win_switch" & # keyboard switching if [[ $device == "desktop" ]]; then xset m 1 1 # disable mouse acceleration (not a very proper way to do it, I know) diff --git a/.b/usr/share/X11/xkb/rules/evdev-excerpt.xml b/.b/usr/share/X11/xkb/rules/evdev-excerpt.xml new file mode 100644 index 0000000..0711b8c --- /dev/null +++ b/.b/usr/share/X11/xkb/rules/evdev-excerpt.xml @@ -0,0 +1,11 @@ + + + bg-custom + bg custom + Bulgarian (Phonetic Traditional, Nonstandard) + + bul + + + + diff --git a/.b/usr/share/X11/xkb/symbols/bg-custom b/.b/usr/share/X11/xkb/symbols/bg-custom new file mode 100644 index 0000000..3bf82d6 --- /dev/null +++ b/.b/usr/share/X11/xkb/symbols/bg-custom @@ -0,0 +1,83 @@ +////////////////////////////////////////////////////////////////////////// +// Copyright (C) 1999, 2000, 2007, 2009 by Anton Zinoviev +// +// This software may be used, modified, copied, distributed, and sold, +// both in source and binary form provided that the above copyright +// notice and these terms are retained. The name of the author may not +// be used to endorse or promote products derived from this software +// without prior permission. THIS SOFTWARE IS PROVIDED "AS IS" AND +// ANY EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED. IN NO EVENT +// SHALL THE AUTHOR BE LIABLE FOR ANY DAMAGES ARISING IN ANY WAY OUT +// OF THE USE OF THIS SOFTWARE. +// +////////////////////////////////////////////////////////////////////////// +// Modifications by Kamen Mladenov + +// This is a non-standard variant of the traditional Bulgarian phonetic +// keyboard, where most capital character on number row are replaced with +// those, found in the normal English layout (only Tilde is left as-is). +// Also, Level 3 characters for square and curly brackets are those from +// English layout. +////////////////////////////////////////////////////////////////////////// + +default partial alphanumeric_keys +xkb_symbols "phonetic-nonstandard" { + name[Group1]= "Bulgarian (traditional phonetic, nonstandard)"; + + key {[ Cyrillic_che, Cyrillic_CHE ]}; + key {[ 1, exclam ]}; + key {[ 2, at ]}; + key {[ 3, numbersign ]}; + key {[ 4, dollar, EuroSign, EuroSign ]}; + key {[ 5, percent ]}; + key {[ 6, asciicircum ]}; + key {[ 7, ampersand ]}; + key {[ 8, asterisk ]}; + key {[ 9, parenleft, bracketleft, U2329 ]}; + key {[ 0, parenright, bracketright, U232A ]}; + key {[ minus, underscore, U2011, U2011 ]}; + key {[ equal, plus, emdash, dagger ]}; + + key {[ Cyrillic_ya, Cyrillic_YA, U0463, U0462 ]}; + key {[ Cyrillic_ve, Cyrillic_VE ]}; + key {[ Cyrillic_ie, Cyrillic_IE, Cyrillic_e, Cyrillic_E ]}; + key {[ Cyrillic_er, Cyrillic_ER, registered, registered ]}; + key {[ Cyrillic_te, Cyrillic_TE, trademark, trademark ]}; + key {[ Cyrillic_hardsign, Cyrillic_HARDSIGN, U046B, U046A ]}; + key {[ Cyrillic_u, Cyrillic_U ]}; + key {[ Cyrillic_i, Cyrillic_I, U045D, U040D ]}; + key {[ Cyrillic_o, Cyrillic_O ]}; + key {[ Cyrillic_pe, Cyrillic_PE ]}; + key {[ Cyrillic_sha, Cyrillic_SHA, bracketleft, braceleft ]}; + key {[ Cyrillic_shcha, Cyrillic_SHCHA, bracketright, braceright ]}; + + key {[ Cyrillic_a, Cyrillic_A ]}; + key {[ Cyrillic_es, Cyrillic_ES, copyright, copyright ]}; + key {[ Cyrillic_de, Cyrillic_DE ]}; + key {[ Cyrillic_ef, Cyrillic_EF ]}; + key {[ Cyrillic_ghe, Cyrillic_GHE ]}; + key {[ Cyrillic_ha, Cyrillic_HA ]}; + key {[ Cyrillic_shorti, Cyrillic_SHORTI, U046D, U046C ]}; + key {[ Cyrillic_ka, Cyrillic_KA ]}; + key {[ Cyrillic_el, Cyrillic_EL ]}; + key {[ semicolon, colon, ellipsis, ellipsis ]}; + key {[ apostrophe, quotedbl, rightsinglequotemark, leftsinglequotemark ]}; + key {[ Cyrillic_yu, Cyrillic_YU ]}; + + key {[ U045D, U040D ]}; + key {[ Cyrillic_ze, Cyrillic_ZE ]}; + key {[ Cyrillic_softsign, U045D, Cyrillic_yeru, Cyrillic_YERU ]}; + key {[ Cyrillic_tse, Cyrillic_TSE, copyright, copyright ]}; + key {[ Cyrillic_zhe, Cyrillic_ZHE ]}; + key {[ Cyrillic_be, Cyrillic_BE ]}; + key {[ Cyrillic_en, Cyrillic_EN ]}; + key {[ Cyrillic_em, Cyrillic_EM ]}; + key {[ comma, doublelowquotemark, guillemotleft, guillemotleft ]}; + key {[ period, leftdoublequotemark, guillemotright, guillemotright ]}; + key {[ slash, question, U0300, U0301 ]}; + + key {[ space, space, nobreakspace, nobreakspace ]}; + + key { type[Group1] = "KEYPAD", [ KP_Delete, KP_Separator ]}; +}; + -- cgit v1.2.3