diff options
| -rw-r--r-- | .config/keyd/default.conf | 21 | ||||
| -rw-r--r-- | .config/kxkbrc | 3 | ||||
| -rwxr-xr-x | .local/bin/dotfiles | 18 |
3 files changed, 41 insertions, 1 deletions
diff --git a/.config/keyd/default.conf b/.config/keyd/default.conf new file mode 100644 index 0000000..3c841d9 --- /dev/null +++ b/.config/keyd/default.conf @@ -0,0 +1,21 @@ +# Apply config to all keyboards +[ids] +* + +# Tap CapsLock for Escape, hold it for Control. +# +# Right control is mapped to the compose key: +# - leftcontrol is bound to emit altgr (rightalt) +# - rightalt is bound to the compose key (in KDE shortcuts) +# This works well since I don't use altgr/rightalt +[main] +capslock = overload(control, esc) +leftcontrol = layer(altgr) + +# CTRL+M Enter +# CTRL+; Delete +# CTRL+H Backspace +[control] +m = enter +; = delete +h = backspace diff --git a/.config/kxkbrc b/.config/kxkbrc new file mode 100644 index 0000000..c83ebbd --- /dev/null +++ b/.config/kxkbrc @@ -0,0 +1,3 @@ +[Layout] +Options=compose:ralt +ResetOldOptions=true diff --git a/.local/bin/dotfiles b/.local/bin/dotfiles index 9e6bff3..1868358 100755 --- a/.local/bin/dotfiles +++ b/.local/bin/dotfiles @@ -5,7 +5,7 @@ declare NVIM_SRC_DIR="$HOME/.local/share/dotfiles/deps/neovim" declare NVIM_BUILD_DIR="$HOME/.local/share/nvim" declare -a PACKAGES_YAY=(7zip atool base-devel bash bash-completion bash-language-server bat browserpass browserpass-firefox bzip2 cmake cpio - ctags docker docker-buildx fd firefox foot fzf git glib2 gzip lhasa + ctags docker docker-buildx fd firefox foot fzf git glib2 gzip keyd lhasa lua-language-server lzop marksman ninja pass pigz python-black ranger ripgrep shfmt stylua tar texinfo tig tk tmux tree-sitter-cli unrar unzip vim-language-server wl-clipboard xz yay zip) @@ -180,6 +180,20 @@ _sync_vpn() { } ################################################################################ +# keyd ######################################################################### +################################################################################ + +_install_keyd() { + local src="$HOME/.config/keyd/default.conf" dst=/etc/keyd/default.conf + if [[ ! -f "$dst" ]] || ! cmp --quiet "$src" "$dst"; then + sudo install -D --mode 644 "$src" "$dst" + sudo keyd check + systemctl is-active --quiet keyd && sudo keyd reload + fi + systemctl is-active --quiet keyd || sudo systemctl enable --now keyd +} + +################################################################################ # main() ####################################################################### ################################################################################ @@ -211,6 +225,8 @@ _sync_all() { _sync_nvim echo "Syncing Proton VPN…" _sync_vpn + echo "Installing keyd…" + _install_keyd } main() { |
