From 137ebf29a997211f7c5e1f39e0937a4b9e2d2276 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Fri, 12 Aug 2022 14:34:44 +0200 Subject: [PATCH] Configure alacritty - add config file ~/.config/alacritty/alacritty.yml (not synced by mackup) - make Gnome's t shortcut start a new alacritty instance - fix minor mouse issue interacting with vim --- .config/alacritty/alacritty.yml | 88 +++++++++++++++++++++++++ .config/gnome-settings/key-bindings.ini | 4 +- .mackup.cfg | 1 + .vim/vimrc | 5 ++ 4 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 .config/alacritty/alacritty.yml diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..dd1ea23 --- /dev/null +++ b/.config/alacritty/alacritty.yml @@ -0,0 +1,88 @@ +# Source: https://github.com/alacritty/alacritty/blob/master/alacritty.yml + + +window: + + # Blank space added around the window in pixels + padding: + x: 10 + y: 10 + + # Spread additional padding evenly around the terminal content + dynamic_padding: true + + # Neither borders nor title bar + decorations: none + + # Background opacity (0.0 -> completely transparent; 1.0 -> opaque) + opacity: 0.95 + + + +scrolling: + + # Number of lines in the scrollback buffer (0 -> disable scrolling) + history: 9999 + + # Scrolling distance multiplier + multiplier: 10 + + + +font: + + normal: + family: FiraCode Nerd Font + style: Regular + + bold: + family: FiraCode Nerd Font + style: Bold + + italic: + family: FiraCode Nerd Font + style: Light + + bold_italic: + family: FiraCode Nerd Font + style: Semibold + + size: 12.0 + + offset: + x: 0 # letter spacing + y: 0 # line spacing + + + +draw_bold_text_with_bright_colors: true + + + +cursor: + + style: + # ▇ (Block) vs. _ (Underline) vs. | (Beam) + shape: Block + blinking: On + + blink_interval: 500 # in ms + + unfocused_hollow: true # when window not focused + + thickness: 0.1 # between 0.0 and 1.0 + + + +shell: + + program: /usr/bin/zsh + args: + - -l # --login + + + +key_bindings: + + # Open a new terminal in the same folder + - { key: Return, mods: Control|Shift, action: SpawnNewInstance } diff --git a/.config/gnome-settings/key-bindings.ini b/.config/gnome-settings/key-bindings.ini index f2f58b6..d8589b0 100644 --- a/.config/gnome-settings/key-bindings.ini +++ b/.config/gnome-settings/key-bindings.ini @@ -97,13 +97,13 @@ name='Google Chrome' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom5] # Mimic i3wm's default way to open terminals binding='Return' -command='gnome-terminal' +command='alacritty' name='Terminal (1)' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom6] # Faster than the default t binding='t' -command='gnome-terminal' +command='alacritty' name='Terminal (2)' [org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom7] diff --git a/.mackup.cfg b/.mackup.cfg index 5ef296a..a71e896 100644 --- a/.mackup.cfg +++ b/.mackup.cfg @@ -7,6 +7,7 @@ directory = mackup # Do not sync configuration files managed by # https://gitlab.webartifex.biz/alexander/dotfiles +alacritty bash bat git diff --git a/.vim/vimrc b/.vim/vimrc index d880af5..30464dd 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -130,6 +130,11 @@ nmap Q cnoremap w!! w !sudo tee % >/dev/null +" Fix mouse issues with Alacritty terminal +" Source: https://wiki.archlinux.org/title/Alacritty#Mouse_not_working_properly_in_Vim +set ttymouse=sgr + + " Enable the mouse for selections, including a toggle for this mode set mouse=a let g:mouse_enabled=1