From 1fe1faea2aba8d7f2d6aa90653b3af92939bbfb1 Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Mon, 13 Nov 2023 10:11:34 +0100 Subject: [PATCH] updates --- .config/nvim | 2 +- .config/zsh/.zprofile | 2 +- .local/bin/remaps | 21 ++++++---- .local/share/applications/file.desktop | 2 +- .local/share/applications/text.desktop | 2 +- .local/share/xkb/compiled/default | 1 + .local/share/xkb/compiled/dvorak.xkb | 2 +- .local/share/xkb/compiled/ergodox.xkb | 53 +++++++++++++------------- .local/share/xkb/keymap/dvorak | 2 +- .local/share/xkb/keymap/ergodox | 2 +- .local/share/xkb/symbols/custom | 40 +++++++++++++++---- .local/src/dwm | 2 +- .local/src/st | 2 +- 13 files changed, 82 insertions(+), 51 deletions(-) create mode 120000 .local/share/xkb/compiled/default diff --git a/.config/nvim b/.config/nvim index 30f503ce..376fa3bf 160000 --- a/.config/nvim +++ b/.config/nvim @@ -1 +1 @@ -Subproject commit 30f503cef37be5d3f46624aca120c7a859a520f3 +Subproject commit 376fa3bf0d9d14d8a1b4303875f43fee95cd3399 diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index a58abf31..c89aa96b 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -6,7 +6,7 @@ export EDITOR="nvim" export TERMINAL="st" -export BROWSER="firefox" +export BROWSER="brave-browser" # Settings export VIRTUAL_ENV_DISABLE_PROMPT=1 diff --git a/.local/bin/remaps b/.local/bin/remaps index 323ad2aa..73883d8e 100755 --- a/.local/bin/remaps +++ b/.local/bin/remaps @@ -1,13 +1,16 @@ #!/bin/sh -default="${DEFAULT_XKBMAPFILE:-dvorak.xkb}" +default="${XDG_DATA_HOME}/xkb/compiled/default" statefile="/tmp/current-keymap" -compiled_dir="${XDG_DATA_HOME}/xkb/compiled/" -default_file="${compiled_dir}${default}" [ -r $statefile ] && current=$(cat $statefile) || current="" setmap() { + if [ ! -r "$1" ]; then + notify-send -h string:x-dunst-stack-tag:"remaps" "󰌌 Failed to set keymap" "Could not find $1" + return 1 + fi + xkbcomp "$1" "$DISPLAY" if $notify; then notify-send -h string:x-dunst-stack-tag:"remaps" \ @@ -22,7 +25,7 @@ setmap() { rotatemap() { if [ "$current" = "" ]; then - setmap "$default_file" + setmap "$default" return fi currentfound=false @@ -42,13 +45,17 @@ rotatemap() { } notify=true -while getopts dq flag; do +while getopts dqQ flag; do case "$flag" in + q) notify=false ;; + Q) + notify=false + error_notify=false + ;; d) - setmap "$default_file" + setmap "$default" return ;; - q) notify=false ;; *) ;; esac done diff --git a/.local/share/applications/file.desktop b/.local/share/applications/file.desktop index b6eab343..c4b8eef7 100644 --- a/.local/share/applications/file.desktop +++ b/.local/share/applications/file.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=File Manager -Exec=kitty -e lfcd %u +Exec=st -e lfcd %u diff --git a/.local/share/applications/text.desktop b/.local/share/applications/text.desktop index 0f8c3b3d..f34b8f04 100644 --- a/.local/share/applications/text.desktop +++ b/.local/share/applications/text.desktop @@ -1,4 +1,4 @@ [Desktop Entry] Type=Application Name=Text editor -Exec=kitty -e nvim %u +Exec=st -e nvim %u diff --git a/.local/share/xkb/compiled/default b/.local/share/xkb/compiled/default new file mode 120000 index 00000000..2de97247 --- /dev/null +++ b/.local/share/xkb/compiled/default @@ -0,0 +1 @@ +ergodox.xkb \ No newline at end of file diff --git a/.local/share/xkb/compiled/dvorak.xkb b/.local/share/xkb/compiled/dvorak.xkb index 5d4628a7..3499649c 100644 --- a/.local/share/xkb/compiled/dvorak.xkb +++ b/.local/share/xkb/compiled/dvorak.xkb @@ -1184,7 +1184,7 @@ xkb_compatibility "complete" { }; }; -xkb_symbols "pc+custom(dvorak)+inet(evdev)+level3(ralt_switch)+capslock(super)" { +xkb_symbols "pc+custom(dvorak)+inet(evdev)+capslock(super)" { name[group1]="English (Dvorak, Custom)"; diff --git a/.local/share/xkb/compiled/ergodox.xkb b/.local/share/xkb/compiled/ergodox.xkb index 708c465b..2b8f465f 100644 --- a/.local/share/xkb/compiled/ergodox.xkb +++ b/.local/share/xkb/compiled/ergodox.xkb @@ -1184,9 +1184,9 @@ xkb_compatibility "complete" { }; }; -xkb_symbols "pc+us(basic)+inet(evdev)+compose(menu)" { +xkb_symbols "pc+custom(us)+inet(evdev)" { - name[group1]="English (US)"; + name[group1]="English (US, Custom)"; key { // type= "ONE_LEVEL", @@ -1197,12 +1197,12 @@ xkb_symbols "pc+us(basic)+inet(evdev)+compose(menu)" { symbols[Group1]= [ 1, exclam ] }; key { -// type= "TWO_LEVEL", - symbols[Group1]= [ 2, at ] + type= "FOUR_LEVEL", + symbols[Group1]= [ 2, at, twosuperior, NoSymbol ] }; key { -// type= "TWO_LEVEL", - symbols[Group1]= [ 3, numbersign ] + type= "FOUR_LEVEL", + symbols[Group1]= [ 3, numbersign, threesuperior, section ] }; key { // type= "TWO_LEVEL", @@ -1273,16 +1273,16 @@ xkb_symbols "pc+us(basic)+inet(evdev)+compose(menu)" { symbols[Group1]= [ y, Y ] }; key { - type= "ALPHABETIC", - symbols[Group1]= [ u, U ] + type= "FOUR_LEVEL_ALPHABETIC", + symbols[Group1]= [ u, U, udiaeresis, Udiaeresis ] }; key { type= "ALPHABETIC", symbols[Group1]= [ i, I ] }; key { - type= "ALPHABETIC", - symbols[Group1]= [ o, O ] + type= "FOUR_LEVEL_ALPHABETIC", + symbols[Group1]= [ o, O, odiaeresis, Odiaeresis ] }; key { type= "ALPHABETIC", @@ -1305,12 +1305,12 @@ xkb_symbols "pc+us(basic)+inet(evdev)+compose(menu)" { symbols[Group1]= [ Control_L ] }; key { - type= "ALPHABETIC", - symbols[Group1]= [ a, A ] + type= "FOUR_LEVEL_ALPHABETIC", + symbols[Group1]= [ a, A, adiaeresis, Adiaeresis ] }; key { - type= "ALPHABETIC", - symbols[Group1]= [ s, S ] + type= "FOUR_LEVEL_ALPHABETIC", + symbols[Group1]= [ s, S, ssharp, U1E9E ] }; key { type= "ALPHABETIC", @@ -1349,16 +1349,16 @@ xkb_symbols "pc+us(basic)+inet(evdev)+compose(menu)" { symbols[Group1]= [ apostrophe, quotedbl ] }; key { -// type= "TWO_LEVEL", - symbols[Group1]= [ grave, asciitilde ] + type= "FOUR_LEVEL", + symbols[Group1]= [ grave, asciitilde, degree, NoSymbol ] }; key { // type= "ONE_LEVEL", symbols[Group1]= [ Shift_L ] }; key { -// type= "TWO_LEVEL", - symbols[Group1]= [ backslash, bar ] + type= "FOUR_LEVEL", + symbols[Group1]= [ backslash, bar, notsign, brokenbar ] }; key { type= "ALPHABETIC", @@ -1385,16 +1385,16 @@ xkb_symbols "pc+us(basic)+inet(evdev)+compose(menu)" { symbols[Group1]= [ n, N ] }; key { - type= "ALPHABETIC", - symbols[Group1]= [ m, M ] + type= "FOUR_LEVEL_SEMIALPHABETIC", + symbols[Group1]= [ m, M, mu, NoSymbol ] }; key { // type= "TWO_LEVEL", symbols[Group1]= [ comma, less ] }; key { -// type= "TWO_LEVEL", - symbols[Group1]= [ period, greater ] + type= "FOUR_LEVEL", + symbols[Group1]= [ period, greater, EuroSign, NoSymbol ] }; key { // type= "TWO_LEVEL", @@ -1573,8 +1573,8 @@ xkb_symbols "pc+us(basic)+inet(evdev)+compose(menu)" { symbols[Group1]= [ Print, Sys_Req ] }; key { -// type= "TWO_LEVEL", - symbols[Group1]= [ Alt_R, Meta_R ] + type= "ONE_LEVEL", + symbols[Group1]= [ ISO_Level3_Shift ] }; key { // type= "ONE_LEVEL", @@ -1673,8 +1673,8 @@ xkb_symbols "pc+us(basic)+inet(evdev)+compose(menu)" { symbols[Group1]= [ Super_R ] }; key { - type= "TWO_LEVEL", - symbols[Group1]= [ Multi_key, Multi_key ] +// type= "ONE_LEVEL", + symbols[Group1]= [ Menu ] }; key { // type= "ONE_LEVEL", @@ -2112,7 +2112,6 @@ xkb_symbols "pc+us(basic)+inet(evdev)+compose(menu)" { modifier_map Mod2 { }; modifier_map Mod5 { }; modifier_map Control { }; - modifier_map Mod1 { }; modifier_map Mod4 { }; modifier_map Mod4 { }; modifier_map Mod3 { }; diff --git a/.local/share/xkb/keymap/dvorak b/.local/share/xkb/keymap/dvorak index 93cbc0ab..6c05c969 100644 --- a/.local/share/xkb/keymap/dvorak +++ b/.local/share/xkb/keymap/dvorak @@ -2,6 +2,6 @@ default xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; - xkb_symbols { include "pc+custom(dvorak)+inet(evdev)+level3(ralt_switch)+capslock(super)" }; + xkb_symbols { include "pc+custom(dvorak)+inet(evdev)+capslock(super)" }; xkb_geometry { include "pc(pc105)" }; }; diff --git a/.local/share/xkb/keymap/ergodox b/.local/share/xkb/keymap/ergodox index 260b1401..3d7ca0e6 100644 --- a/.local/share/xkb/keymap/ergodox +++ b/.local/share/xkb/keymap/ergodox @@ -2,6 +2,6 @@ default xkb_keymap { xkb_keycodes { include "evdev+aliases(qwerty)" }; xkb_types { include "complete" }; xkb_compat { include "complete" }; - xkb_symbols { include "pc+us(basic)+inet(evdev)+compose(menu)" }; + xkb_symbols { include "pc+custom(us)+inet(evdev)" }; xkb_geometry { include "pc(pc105)" }; }; diff --git a/.local/share/xkb/symbols/custom b/.local/share/xkb/symbols/custom index 7974adcc..3dc8553a 100644 --- a/.local/share/xkb/symbols/custom +++ b/.local/share/xkb/symbols/custom @@ -1,15 +1,39 @@ partial alphanumeric_keys + xkb_symbols "dvorak" { include "us(dvorak)" name[Group1] = "English (Dvorak, Custom)"; - key { [grave, asciitilde, degree ] }; - key { [4, dollar, EuroSign ] }; + key { [grave, asciitilde, degree ] }; + key { [4, dollar, EuroSign ] }; + + key { [a, A, adiaeresis, Adiaeresis ] }; + key { [o, O, odiaeresis, Odiaeresis ] }; + key { [u, U, udiaeresis, Udiaeresis ] }; + key { [s, S, ssharp ] }; + + key { [ backslash, bar, notsign, brokenbar ] }; - key { [a, A, adiaeresis, Adiaeresis ] }; - key { [o, O, odiaeresis, Odiaeresis ] }; - key { [u, U, udiaeresis, Udiaeresis ] }; - key { [s, S, ssharp ] }; - - key { [ backslash, bar, notsign, brokenbar ] }; + include "level3(ralt_switch)" +}; + +// This layout is meant for my ergodox keyboard, which remaps in firmware +xkb_symbols "us" { + include "us(basic)" + name[Group1] = "English (US, Custom)"; + + key { [grave, asciitilde, degree ] }; + + key { [2, at, twosuperior ] }; + key { [3, numbersign, threesuperior, section ] }; + key { [m, M, mu ] }; + key { [period, greater, EuroSign ] }; + key { [a, A, adiaeresis, Adiaeresis ] }; + key { [s, S, ssharp, U1E9E ] }; + key { [u, U, udiaeresis, Udiaeresis ] }; + key { [o, O, odiaeresis, Odiaeresis ] }; + + key { [ backslash, bar, notsign, brokenbar ] }; + + include "level3(ralt_switch)" }; diff --git a/.local/src/dwm b/.local/src/dwm index 90ea8452..17b6f68a 160000 --- a/.local/src/dwm +++ b/.local/src/dwm @@ -1 +1 @@ -Subproject commit 90ea84521579aa62819aaaf3584bc0d75af942a7 +Subproject commit 17b6f68ab4a701ee4a8b01596fd4e810ceea2e61 diff --git a/.local/src/st b/.local/src/st index 9e33da9a..c1c84d6f 160000 --- a/.local/src/st +++ b/.local/src/st @@ -1 +1 @@ -Subproject commit 9e33da9ac753a799a555739a7bb138f588364d57 +Subproject commit c1c84d6fa5479b82266f2f6a140e61991e509b60