From 194c795aae04fe5590eafbf97fc1427a370d4fd3 Mon Sep 17 00:00:00 2001 From: thek4n Date: Thu, 13 Aug 2026 01:13:08 +0300 Subject: [PATCH] change mappings colemak-like --- configs/.config/rofi/config.rasi | 5 +++-- configs/.config/sway/bindings.conf | 30 +++++++++++++++--------------- configs/.config/yazi/keymap.toml | 17 ++++++++++++++++- configs/.config/zsh/functions | 10 +++++++++- configs/.lesskey | 4 ++-- 5 files changed, 45 insertions(+), 21 deletions(-) diff --git a/configs/.config/rofi/config.rasi b/configs/.config/rofi/config.rasi index 3df55a7..25305ec 100644 --- a/configs/.config/rofi/config.rasi +++ b/configs/.config/rofi/config.rasi @@ -3,8 +3,9 @@ configuration { terminal: "alacritty"; font: "xft:FiraCode 12"; kb-accept-entry: "Ctrl+m,Return"; - kb-row-up: "Ctrl+k"; - kb-row-down: "Ctrl+j"; + kb-row-up: "Ctrl+e,Up"; + kb-row-down: "Ctrl+n,Down"; + kb-move-end: "Control+j" kb-remove-to-eol: ""; } @theme "Arc-Dark" diff --git a/configs/.config/sway/bindings.conf b/configs/.config/sway/bindings.conf index 30bc6d9..164ee15 100644 --- a/configs/.config/sway/bindings.conf +++ b/configs/.config/sway/bindings.conf @@ -42,9 +42,9 @@ bindsym $mod+o exec --no-startup-id slm_rofi # Change focus bindsym --to-code $mod+h focus left -bindsym --to-code $mod+j focus down -bindsym --to-code $mod+k focus up -bindsym --to-code $mod+l focus right +bindsym --to-code $mod+n focus down +bindsym --to-code $mod+e focus up +bindsym --to-code $mod+i focus right bindsym --to-code $mod+Left focus left bindsym --to-code $mod+Down focus down bindsym --to-code $mod+Up focus up @@ -52,9 +52,9 @@ bindsym --to-code $mod+Right focus right # Move focused window bindsym --to-code $mod+Shift+h move left -bindsym --to-code $mod+Shift+j move down -bindsym --to-code $mod+Shift+k move up -bindsym --to-code $mod+Shift+l move right +bindsym --to-code $mod+Shift+n move down +bindsym --to-code $mod+Shift+e move up +bindsym --to-code $mod+Shift+i move right bindsym --to-code $mod+Shift+Left move left bindsym --to-code $mod+Shift+Down move down bindsym --to-code $mod+Shift+Up move up @@ -62,9 +62,9 @@ bindsym --to-code $mod+Shift+Right move right bindsym --to-code $mod+Ctrl+Shift+l move workspace to output right -bindsym --to-code $mod+Ctrl+Shift+h move workspace to output left -bindsym --to-code $mod+Ctrl+Shift+k move workspace to output up -bindsym --to-code $mod+Ctrl+Shift+j move workspace to output down +bindsym --to-code $mod+Ctrl+Shift+n move workspace to output left +bindsym --to-code $mod+Ctrl+Shift+e move workspace to output up +bindsym --to-code $mod+Ctrl+Shift+i move workspace to output down bindsym --to-code $mod+f fullscreen toggle @@ -146,9 +146,9 @@ bindsym --to-code $mod+Tab workspace back_and_forth set $resizemode "Resize: toggle [p]recize" mode $resizemode { bindsym --to-code h resize shrink width 10 px or 10 ppt - bindsym --to-code j resize grow height 10 px or 10 ppt - bindsym --to-code k resize shrink height 10 px or 10 ppt - bindsym --to-code l resize grow width 10 px or 10 ppt + bindsym --to-code n resize grow height 10 px or 10 ppt + bindsym --to-code e resize shrink height 10 px or 10 ppt + bindsym --to-code i resize grow width 10 px or 10 ppt bindsym --to-code $mod+r mode "default" bindsym --to-code p mode $presizemode @@ -159,9 +159,9 @@ mode $resizemode { set $presizemode "Precise resize: toggle [p]resize" mode $presizemode { bindsym --to-code h resize shrink width 1 px or 1 ppt - bindsym --to-code j resize grow height 1 px or 1 ppt - bindsym --to-code k resize shrink height 1 px or 1 ppt - bindsym --to-code l resize grow width 1 px or 1 ppt + bindsym --to-code n resize grow height 1 px or 1 ppt + bindsym --to-code i resize shrink height 1 px or 1 ppt + bindsym --to-code i resize grow width 1 px or 1 ppt bindsym --to-code $mod+r mode "default" bindsym --to-code p mode $resizemode diff --git a/configs/.config/yazi/keymap.toml b/configs/.config/yazi/keymap.toml index 1870605..b05e29d 100644 --- a/configs/.config/yazi/keymap.toml +++ b/configs/.config/yazi/keymap.toml @@ -1,3 +1,18 @@ +[[mgr.prepend_keymap]] +on = "h" +run = "leave" +desc = "Назад (вверх по иерархии)" + +[[mgr.prepend_keymap]] +on = "n" +run = "arrow next" +desc = "Вниз" + +[[mgr.prepend_keymap]] +on = "e" +run = "arrow prev" +desc = "Вверх" + [[mgr.append_keymap]] on = [ "c", "e" ] run = "shell -- flipbit x %h" @@ -13,7 +28,7 @@ run = "plugin jump-to-char" desc = "Jump to char" [[mgr.prepend_keymap]] -on = "l" +on = "i" run = "plugin smart-enter" desc = "Enter the child directory, or open the file" diff --git a/configs/.config/zsh/functions b/configs/.config/zsh/functions index de3c359..8b044fe 100644 --- a/configs/.config/zsh/functions +++ b/configs/.config/zsh/functions @@ -1,11 +1,19 @@ # vim: ft=zsh +__read_single_char() { + local char + stty -echo -icanon min 1 time 0 2>/dev/null + char=$(dd bs=1 count=1 2>/dev/null) + stty echo icanon 2>/dev/null + printf "%s" "${char}" +} + __ask_user() { local answer local question="${1}" local default_value="${2}" printf '%s' "${question} (default=${default_value}): " >&2 - read -r answer + answer="$(__read_single_char)" if [ -z "${answer}" ]; then answer="${default_value}" diff --git a/configs/.lesskey b/configs/.lesskey index f7171b8..096d1b6 100644 --- a/configs/.lesskey +++ b/configs/.lesskey @@ -1,5 +1,5 @@ #command h left-scroll -l right-scroll +i right-scroll ^N next-file -^P prev-file \ No newline at end of file +^P prev-file