From 61168285be2ed340261139f75485f66a3b961690 Mon Sep 17 00:00:00 2001 From: Omar Besbes <86571415+omar-besbes@users.noreply.github.com> Date: Sat, 8 Feb 2025 23:17:02 +0100 Subject: [PATCH 1/4] style: lint project --- .dockerignore | 2 +- .editorconfig | 5 + scripts/load_topics.sh | 3 +- scripts/setup_topics.sh | 5 +- scripts/sync_files.sh | 17 +- src/browser/brave/setup.sh | 4 +- src/browser/chromium/setup.sh | 2 +- src/browser/opera/setup.sh | 6 +- src/browser/setup.sh | 1 - src/docker/setup.sh | 11 +- src/fonts/setup.sh | 5 +- src/git/gitconfig | 1 + src/git/setup.sh | 5 +- src/helm/setup.sh | 4 +- src/kubectl/setup.sh | 12 +- src/shell/bash_completion/init.sh | 2 - src/shell/bashrc | 7 +- src/shell/core/default.sh | 18 +- src/shell/core/env.sh | 17 +- src/shell/core/functions.sh | 1 - src/shell/core/init.sh | 1 - src/shell/core/options.sh | 1 - src/shell/inputrc | 1 - src/shell/ls-colors/init.sh | 1 - src/shell/prompt/init.sh | 1 - src/terminal-emulator/alacritty/alacritty.yml | 704 +++++++++--------- src/terminal-emulator/setup.sh | 1 - src/text-editor/vscode/setup.sh | 2 +- src/text-editor/vscodium/setup.sh | 29 +- test/docker-compose.yaml | 5 +- test/test.sh | 1 - 31 files changed, 431 insertions(+), 444 deletions(-) create mode 100644 .editorconfig diff --git a/.dockerignore b/.dockerignore index dc6267c..eecc13e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,4 +5,4 @@ .env /src/neovim/nvim /test -!/test/test.sh \ No newline at end of file +!/test/test.sh diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..eade30e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,5 @@ +[*.sh] +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/scripts/load_topics.sh b/scripts/load_topics.sh index 2c7f182..cfb11e6 100755 --- a/scripts/load_topics.sh +++ b/scripts/load_topics.sh @@ -3,7 +3,7 @@ [ ! -v TOPIC_INIT_FILE ] && declare -r TOPIC_INIT_FILE="init.sh" load_topics() { - + local -r SOURCE_DIR=$1 local -a TOPICS_TO_LOAD=$(find $SOURCE_DIR -mindepth 2 -maxdepth 2 -type f -name $TOPIC_INIT_FILE -exec dirname {} \; 2>/dev/null) @@ -14,4 +14,3 @@ load_topics() { done } - diff --git a/scripts/setup_topics.sh b/scripts/setup_topics.sh index 82a0e52..45bd5d8 100755 --- a/scripts/setup_topics.sh +++ b/scripts/setup_topics.sh @@ -1,9 +1,9 @@ #!/bin/bash -[ ! -v TOPIC_SETUP_FILE ] && declare -r TOPIC_SETUP_FILE="setup.sh" +[ ! -v TOPIC_SETUP_FILE ] && declare -r TOPIC_SETUP_FILE="setup.sh" setup_topics() { - + local -r SOURCE_DIR=$1 local -a TOPICS_TO_SETUP=$(find $SOURCE_DIR -mindepth 2 -maxdepth 2 -type f -name $TOPIC_SETUP_FILE -exec dirname {} \; 2>/dev/null) @@ -14,4 +14,3 @@ setup_topics() { done } - diff --git a/scripts/sync_files.sh b/scripts/sync_files.sh index f9cbcff..14b014e 100755 --- a/scripts/sync_files.sh +++ b/scripts/sync_files.sh @@ -1,7 +1,7 @@ #!/bin/bash -[ ! -v DOTFILES_ROOT_DIR ] && declare -r DOTFILES_ROOT_DIR="$HOME/.dotfiles" -[ ! -v DOTFILES_GITHUB_ORIGIN ] && declare -r DOTFILES_GITHUB_ORIGIN="https://github.com/omar-besbes/.dotfiles" +[ ! -v DOTFILES_ROOT_DIR ] && declare -r DOTFILES_ROOT_DIR="$HOME/.dotfiles" +[ ! -v DOTFILES_GITHUB_ORIGIN ] && declare -r DOTFILES_GITHUB_ORIGIN="https://github.com/omar-besbes/.dotfiles" print_info() { echo -e "\e[34m$1\e[0m" @@ -9,7 +9,7 @@ print_info() { sync_dotfiles() { - if ! git rev-parse --is-inside-work-tree &> /dev/null; then + if ! git rev-parse --is-inside-work-tree &>/dev/null; then # ======================================= # # case: FIRST TIME INSTALL # # ======================================= # @@ -17,13 +17,13 @@ sync_dotfiles() { print_info " [ℹ️] No DOTFILES where detected, beginning a remote install ..." # if directory contains anything, move it to /backups/.dotfiles except /backups, of course - [ ! -z $(ls -A "$DOTFILES_ROOT_DIR") ] && \ - mkdir "$DOTFILES_ROOT_DIR/backups/.dotfiles" && \ + [ ! -z $(ls -A "$DOTFILES_ROOT_DIR") ] && + mkdir "$DOTFILES_ROOT_DIR/backups/.dotfiles" && find "$DOTFILES_ROOT_DIR" -maxdepth 1 -mindepth 1 -not -name "backups" - find "$DOTFILES_ROOT_DIR" -maxdepth 1 -mindepth 1 -not -name "backups" -exec mv -t "$ROOT_DIR/backups/.dotfiles" {} + - + find "$DOTFILES_ROOT_DIR" -maxdepth 1 -mindepth 1 -not -name "backups" -exec mv -t "$ROOT_DIR/backups/.dotfiles" {} + + # clone repository recursively - git clone -b main "$DOTFILES_GITHUB_ORIGIN" "$DOTFILES_ROOT_DIR" + git clone -b main "$DOTFILES_GITHUB_ORIGIN" "$DOTFILES_ROOT_DIR" git submodule sync --recursive git submodule update --init --recursive else @@ -41,4 +41,3 @@ sync_dotfiles() { fi } - diff --git a/src/browser/brave/setup.sh b/src/browser/brave/setup.sh index 1be0f26..68c6416 100644 --- a/src/browser/brave/setup.sh +++ b/src/browser/brave/setup.sh @@ -25,8 +25,8 @@ install_dependencies() { # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] \ - https://brave-browser-apt-release.s3.brave.com/ stable main" | \ - sudo tee /etc/apt/sources.list.d/brave-browser-release.list > /dev/null + https://brave-browser-apt-release.s3.brave.com/ stable main" | + sudo tee /etc/apt/sources.list.d/brave-browser-release.list >/dev/null sudo apt-get update # Install package diff --git a/src/browser/chromium/setup.sh b/src/browser/chromium/setup.sh index 5ea3801..35a3d08 100644 --- a/src/browser/chromium/setup.sh +++ b/src/browser/chromium/setup.sh @@ -19,7 +19,7 @@ source "$DOTFILES_SCRIPTS_DIR/symlink_files.sh" install_dependencies() { sudo apt-get update - sudo apt-get install -y chromium + sudo apt-get install -y chromium } diff --git a/src/browser/opera/setup.sh b/src/browser/opera/setup.sh index 125f826..2ade8a4 100644 --- a/src/browser/opera/setup.sh +++ b/src/browser/opera/setup.sh @@ -20,14 +20,14 @@ install_dependencies() { # Add Opera's official GPG key: sudo install -m 0755 -d /etc/apt/keyrings - sudo curl -fsSL https://deb.opera.com/archive.key | \ + sudo curl -fsSL https://deb.opera.com/archive.key | gpg --dearmor -o /usr/share/keyrings/opera-browser.gpg # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/opera-browser.gpg] \ - http://deb.opera.com/opera/ stable non-free" | \ - sudo tee /etc/apt/sources.list.d/opera-archive.list > /dev/null + http://deb.opera.com/opera/ stable non-free" | + sudo tee /etc/apt/sources.list.d/opera-archive.list >/dev/null sudo apt-get update # Install package diff --git a/src/browser/setup.sh b/src/browser/setup.sh index 9e7ef52..32758a1 100644 --- a/src/browser/setup.sh +++ b/src/browser/setup.sh @@ -27,4 +27,3 @@ choose_browser() { main() { choose_browser } - diff --git a/src/docker/setup.sh b/src/docker/setup.sh index 0e72b80..99cf9b3 100755 --- a/src/docker/setup.sh +++ b/src/docker/setup.sh @@ -16,8 +16,8 @@ source "$ROOT_DIR/scripts/utils.sh" # ---------------------------------------------------------------------- install_dependencies() { - - cmd_exists docker && return; + + cmd_exists docker && return local -r codename="$(. /etc/os-release && echo "$VERSION_CODENAME")" local -r id="$(. /etc/os-release && echo "$ID")" @@ -31,8 +31,8 @@ install_dependencies() { # Add the repository to Apt sources: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] \ - https://download.docker.com/linux/$id $codename stable" | \ - sudo tee /etc/apt/sources.list.d/docker.list > /dev/null + https://download.docker.com/linux/$id $codename stable" | + sudo tee /etc/apt/sources.list.d/docker.list sudo apt-get update # Install packages @@ -54,10 +54,9 @@ install_dependencies() { # ---------------------------------------------------------------------- main() { - + ask_for_sudo install_dependencies } - diff --git a/src/fonts/setup.sh b/src/fonts/setup.sh index 70c988a..320b822 100755 --- a/src/fonts/setup.sh +++ b/src/fonts/setup.sh @@ -16,11 +16,11 @@ source "$ROOT_DIR/scripts/utils.sh" # ---------------------------------------------------------------------- install_nerd_fonts() { - + local -r FONT_DIR="$HOME/.local/share/fonts/truetype" local -r NERD_FONTS_GITHUB_ORIGIN="https://github.com/ryanoasis/nerd-fonts" local -a FONTS_TO_INSTALL=("Hack" "JetBrainsMono" "RobotoMono" "NerdFontsSymbolsOnly") - + # Ensure the font directory exists mkdir -p "$FONT_DIR" @@ -51,4 +51,3 @@ install_nerd_fonts() { main() { install_nerd_fonts } - diff --git a/src/git/gitconfig b/src/git/gitconfig index 6e910a1..1a5b6b6 100644 --- a/src/git/gitconfig +++ b/src/git/gitconfig @@ -26,6 +26,7 @@ cm = commit -m unstage = restore --staged uncommit = reset --soft HEAD~ + unstash = stash pop root = rev-parse --show-toplevel last = log -1 amend = commit --amend diff --git a/src/git/setup.sh b/src/git/setup.sh index 2a5caa0..3a1db68 100755 --- a/src/git/setup.sh +++ b/src/git/setup.sh @@ -18,9 +18,9 @@ source "$DOTFILES_SCRIPTS_DIR/symlink_files.sh" create_symlinks() { - local -a FILES_TO_SYMLINK=("$TOPIC_DIR/gitconfig") + local -a FILES_TO_SYMLINK=("$TOPIC_DIR/gitconfig") local -r TARGET_PATHS=("$HOME/.gitconfig") - symlink_files FILES_TO_SYMLINK[@] TARGET_PATHS[@] + symlink_files FILES_TO_SYMLINK[@] TARGET_PATHS[@] } @@ -35,4 +35,3 @@ main() { create_symlinks } - diff --git a/src/helm/setup.sh b/src/helm/setup.sh index 9c12ed4..c1950bf 100755 --- a/src/helm/setup.sh +++ b/src/helm/setup.sh @@ -21,12 +21,12 @@ install_dependencies() { # Add kubectl's official GPG key: curl https://baltocdn.com/helm/signing.asc | - sudo gpg --dearmor -o /usr/share/keyrings/helm.gpg + sudo gpg --dearmor -o /etc/apt/keyrings/helm.gpg sudo apt-get install apt-transport-https --yes # Add the repository to Apt sources: echo \ - "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/helm.gpg] \ https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list sudo apt-get update diff --git a/src/kubectl/setup.sh b/src/kubectl/setup.sh index 40cf77e..f76da83 100755 --- a/src/kubectl/setup.sh +++ b/src/kubectl/setup.sh @@ -16,19 +16,20 @@ source "$ROOT_DIR/scripts/utils.sh" # ---------------------------------------------------------------------- install_dependencies() { - - cmd_exists kubectl && return; + + cmd_exists kubectl && return # Add kubectl's official GPG key: sudo apt-get update sudo install -m 0755 -d /etc/apt/keyrings - curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | \ + local -r VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt | cat | cut -f 1-2 -d '.') + curl -fsSL "https://pkgs.k8s.io/core:/stable:/$VERSION/deb/Release.key" | sudo gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg # Add the repository to Apt sources: echo \ "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] \ - https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /" | \ + https://pkgs.k8s.io/core:/stable:/$VERSION/deb/ /" | sudo tee /etc/apt/sources.list.d/kubernetes.list sudo apt-get update @@ -42,10 +43,9 @@ install_dependencies() { # ---------------------------------------------------------------------- main() { - + ask_for_sudo install_dependencies } - diff --git a/src/shell/bash_completion/init.sh b/src/shell/bash_completion/init.sh index 1ec7104..ac8cdb5 100755 --- a/src/shell/bash_completion/init.sh +++ b/src/shell/bash_completion/init.sh @@ -14,5 +14,3 @@ declare -r COMPLETION_FILES=$(find $DOTFILES_BASH_COMPLETIONS_DIR -type f) for i in ${COMPLETION_FILES[@]}; do source $i done - - diff --git a/src/shell/bashrc b/src/shell/bashrc index 1b62679..62f30df 100755 --- a/src/shell/bashrc +++ b/src/shell/bashrc @@ -10,8 +10,8 @@ # If not running interactively, don't do anything case $- in - *i*) ;; - *) return;; +*i*) ;; +*) return ;; esac DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" @@ -27,8 +27,7 @@ TOPIC_DIR="$DOTFILES_SOURCE_DIR/$TOPIC_NAME" # ---------------------------------------------------------------------- main() { - load_topics $TOPIC_DIR + load_topics $TOPIC_DIR } main - diff --git a/src/shell/core/default.sh b/src/shell/core/default.sh index 4fb7947..b29dbbd 100755 --- a/src/shell/core/default.sh +++ b/src/shell/core/default.sh @@ -5,7 +5,7 @@ # set a fancy prompt (non-color, unless we know we "want" color) case "$TERM" in - xterm-color|*-256color) color_prompt=yes;; +xterm-color | *-256color) color_prompt=yes ;; esac # uncomment for a colored prompt, if the terminal has the capability; turned @@ -14,14 +14,14 @@ esac #force_color_prompt=yes if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi fi # colored GCC warnings and errors diff --git a/src/shell/core/env.sh b/src/shell/core/env.sh index 03fd31f..7ee15bc 100755 --- a/src/shell/core/env.sh +++ b/src/shell/core/env.sh @@ -1,17 +1,17 @@ #!/bin/bash # Set PATH so it includes user's private bin if it exists -if [ -d "$HOME/bin" ] ; then - PATH="$HOME/bin:$PATH" +if [ -d "$HOME/bin" ]; then + PATH="$HOME/bin:$PATH" fi -if [ -d "$HOME/.local/bin" ] ; then - PATH="$HOME/.local/bin:$PATH" +if [ -d "$HOME/.local/bin" ]; then + PATH="$HOME/.local/bin:$PATH" fi # nvm export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm +[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion # cargo source "$HOME/.cargo/env" @@ -19,10 +19,9 @@ source "$HOME/.cargo/env" # pnpm export PNPM_HOME="/home/omar/.local/share/pnpm" case ":$PATH:" in - *":$PNPM_HOME:"*) ;; - *) export PATH="$PNPM_HOME:$PATH" ;; +*":$PNPM_HOME:"*) ;; +*) export PATH="$PNPM_HOME:$PATH" ;; esac # deno source "$HOME/.deno/env" - diff --git a/src/shell/core/functions.sh b/src/shell/core/functions.sh index 79a8a56..a8e1670 100755 --- a/src/shell/core/functions.sh +++ b/src/shell/core/functions.sh @@ -6,4 +6,3 @@ for theme in $(vivid themes); do tree .dotfiles echo done - diff --git a/src/shell/core/init.sh b/src/shell/core/init.sh index b78bec7..a8a266e 100755 --- a/src/shell/core/init.sh +++ b/src/shell/core/init.sh @@ -14,4 +14,3 @@ source "$TOPIC_DIR/aliases.sh" source "$TOPIC_DIR/default.sh" source "$TOPIC_DIR/env.sh" source "$TOPIC_DIR/options.sh" - diff --git a/src/shell/core/options.sh b/src/shell/core/options.sh index a0372cb..2807f8d 100755 --- a/src/shell/core/options.sh +++ b/src/shell/core/options.sh @@ -55,4 +55,3 @@ CDPATH="." # Automatically trim long paths in the prompt (requires Bash 4.x) PROMPT_DIRTRIM=2 - diff --git a/src/shell/inputrc b/src/shell/inputrc index f8a701a..e0f1357 100644 --- a/src/shell/inputrc +++ b/src/shell/inputrc @@ -59,4 +59,3 @@ TAB: menu-complete "\e[B": history-search-forward "\e[C": forward-char "\e[D": backward-char - diff --git a/src/shell/ls-colors/init.sh b/src/shell/ls-colors/init.sh index 7c75b36..4bb2820 100755 --- a/src/shell/ls-colors/init.sh +++ b/src/shell/ls-colors/init.sh @@ -2,4 +2,3 @@ # LS_COLORS customization using vivid export LS_COLORS="$(vivid generate catppuccin-macchiato)" - diff --git a/src/shell/prompt/init.sh b/src/shell/prompt/init.sh index b152451..b4eb5d5 100755 --- a/src/shell/prompt/init.sh +++ b/src/shell/prompt/init.sh @@ -2,4 +2,3 @@ # Init starship. eval "$(starship init bash)" - diff --git a/src/terminal-emulator/alacritty/alacritty.yml b/src/terminal-emulator/alacritty/alacritty.yml index 62690da..76f075b 100644 --- a/src/terminal-emulator/alacritty/alacritty.yml +++ b/src/terminal-emulator/alacritty/alacritty.yml @@ -15,13 +15,13 @@ import: # environment variables. Some entries may override variables # set by alacritty itself. #env: - # TERM variable - # - # This value is used to set the `$TERM` environment variable for - # each instance of Alacritty. If it is not present, alacritty will - # check the local terminfo database and use `alacritty` if it is - # available, otherwise `xterm-256color` is used. - #TERM: alacritty +# TERM variable +# +# This value is used to set the `$TERM` environment variable for +# each instance of Alacritty. If it is not present, alacritty will +# check the local terminfo database and use `alacritty` if it is +# available, otherwise `xterm-256color` is used. +#TERM: alacritty window: # Window dimensions (changes require restart) @@ -89,10 +89,10 @@ window: # Window class (Linux/BSD only): #class: - # Application instance name - #instance: Alacritty - # General application class - #general: Alacritty + # Application instance name + #instance: Alacritty + # General application class + #general: Alacritty # Decorations theme variant # @@ -114,12 +114,12 @@ window: #option_as_alt: None #scrolling: - # Maximum number of lines in the scrollback buffer. - # Specifying '0' will disable scrolling. - #history: 10000 +# Maximum number of lines in the scrollback buffer. +# Specifying '0' will disable scrolling. +#history: 10000 - # Scrolling distance multiplier. - #multiplier: 3 +# Scrolling distance multiplier. +#multiplier: 3 # Font configuration font: @@ -198,201 +198,201 @@ font: # Colors (Tomorrow Night) #colors: - # Default colors - #primary: - # background: '#1d1f21' - # foreground: '#c5c8c6' - - # Bright and dim foreground colors - # - # The dimmed foreground color is calculated automatically if it is not - # present. If the bright foreground color is not set, or - # `draw_bold_text_with_bright_colors` is `false`, the normal foreground - # color will be used. - #dim_foreground: '#828482' - #bright_foreground: '#eaeaea' - - # Cursor colors - # - # Colors which should be used to draw the terminal cursor. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #cursor: - # text: CellBackground - # cursor: CellForeground - - # Vi mode cursor colors - # - # Colors for the cursor when the vi mode is active. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #vi_mode_cursor: - # text: CellBackground - # cursor: CellForeground - - # Search colors - # - # Colors used for the search bar and match highlighting. - #search: - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #matches: - # foreground: '#000000' - # background: '#ffffff' - #focused_match: - # foreground: '#ffffff' - # background: '#000000' - - # Keyboard hints - #hints: - # First character in the hint label - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #start: - # foreground: '#1d1f21' - # background: '#e9ff5e' - - # All characters after the first one in the hint label - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #end: - # foreground: '#e9ff5e' - # background: '#1d1f21' +# Default colors +#primary: +# background: '#1d1f21' +# foreground: '#c5c8c6' + +# Bright and dim foreground colors +# +# The dimmed foreground color is calculated automatically if it is not +# present. If the bright foreground color is not set, or +# `draw_bold_text_with_bright_colors` is `false`, the normal foreground +# color will be used. +#dim_foreground: '#828482' +#bright_foreground: '#eaeaea' + +# Cursor colors +# +# Colors which should be used to draw the terminal cursor. +# +# Allowed values are CellForeground/CellBackground, which reference the +# affected cell, or hexadecimal colors like #ff00ff. +#cursor: +# text: CellBackground +# cursor: CellForeground + +# Vi mode cursor colors +# +# Colors for the cursor when the vi mode is active. +# +# Allowed values are CellForeground/CellBackground, which reference the +# affected cell, or hexadecimal colors like #ff00ff. +#vi_mode_cursor: +# text: CellBackground +# cursor: CellForeground + +# Search colors +# +# Colors used for the search bar and match highlighting. +#search: +# Allowed values are CellForeground/CellBackground, which reference the +# affected cell, or hexadecimal colors like #ff00ff. +#matches: +# foreground: '#000000' +# background: '#ffffff' +#focused_match: +# foreground: '#ffffff' +# background: '#000000' + +# Keyboard hints +#hints: +# First character in the hint label +# +# Allowed values are CellForeground/CellBackground, which reference the +# affected cell, or hexadecimal colors like #ff00ff. +#start: +# foreground: '#1d1f21' +# background: '#e9ff5e' - # Line indicator - # - # Color used for the indicator displaying the position in history during - # search and vi mode. - # - # By default, these will use the opposing primary color. - #line_indicator: - # foreground: None - # background: None +# All characters after the first one in the hint label +# +# Allowed values are CellForeground/CellBackground, which reference the +# affected cell, or hexadecimal colors like #ff00ff. +#end: +# foreground: '#e9ff5e' +# background: '#1d1f21' - # Footer bar - # - # Color used for the footer bar on the bottom, used by search regex input, - # hyperlink URI preview, etc. - # - #footer_bar: - # background: '#c5c8c6' - # foreground: '#1d1f21' +# Line indicator +# +# Color used for the indicator displaying the position in history during +# search and vi mode. +# +# By default, these will use the opposing primary color. +#line_indicator: +# foreground: None +# background: None - # Selection colors - # - # Colors which should be used to draw the selection area. - # - # Allowed values are CellForeground/CellBackground, which reference the - # affected cell, or hexadecimal colors like #ff00ff. - #selection: - # text: CellBackground - # background: CellForeground - - # Normal colors - #normal: - # black: '#1d1f21' - # red: '#cc6666' - # green: '#b5bd68' - # yellow: '#f0c674' - # blue: '#81a2be' - # magenta: '#b294bb' - # cyan: '#8abeb7' - # white: '#c5c8c6' - - # Bright colors - #bright: - # black: '#666666' - # red: '#d54e53' - # green: '#b9ca4a' - # yellow: '#e7c547' - # blue: '#7aa6da' - # magenta: '#c397d8' - # cyan: '#70c0b1' - # white: '#eaeaea' - - # Dim colors - # - # If the dim colors are not set, they will be calculated automatically based - # on the `normal` colors. - #dim: - # black: '#131415' - # red: '#864343' - # green: '#777c44' - # yellow: '#9e824c' - # blue: '#556a7d' - # magenta: '#75617b' - # cyan: '#5b7d78' - # white: '#828482' - - # Indexed Colors - # - # The indexed colors include all colors from 16 to 256. - # When these are not set, they're filled with sensible defaults. - # - # Example: - # `- { index: 16, color: '#ff00ff' }` - # - #indexed_colors: [] +# Footer bar +# +# Color used for the footer bar on the bottom, used by search regex input, +# hyperlink URI preview, etc. +# +#footer_bar: +# background: '#c5c8c6' +# foreground: '#1d1f21' - # Transparent cell backgrounds - # - # Whether or not `window.opacity` applies to all cell backgrounds or only to - # the default background. When set to `true` all cells will be transparent - # regardless of their background color. - #transparent_background_colors: false +# Selection colors +# +# Colors which should be used to draw the selection area. +# +# Allowed values are CellForeground/CellBackground, which reference the +# affected cell, or hexadecimal colors like #ff00ff. +#selection: +# text: CellBackground +# background: CellForeground + +# Normal colors +#normal: +# black: '#1d1f21' +# red: '#cc6666' +# green: '#b5bd68' +# yellow: '#f0c674' +# blue: '#81a2be' +# magenta: '#b294bb' +# cyan: '#8abeb7' +# white: '#c5c8c6' + +# Bright colors +#bright: +# black: '#666666' +# red: '#d54e53' +# green: '#b9ca4a' +# yellow: '#e7c547' +# blue: '#7aa6da' +# magenta: '#c397d8' +# cyan: '#70c0b1' +# white: '#eaeaea' + +# Dim colors +# +# If the dim colors are not set, they will be calculated automatically based +# on the `normal` colors. +#dim: +# black: '#131415' +# red: '#864343' +# green: '#777c44' +# yellow: '#9e824c' +# blue: '#556a7d' +# magenta: '#75617b' +# cyan: '#5b7d78' +# white: '#828482' + +# Indexed Colors +# +# The indexed colors include all colors from 16 to 256. +# When these are not set, they're filled with sensible defaults. +# +# Example: +# `- { index: 16, color: '#ff00ff' }` +# +#indexed_colors: [] + +# Transparent cell backgrounds +# +# Whether or not `window.opacity` applies to all cell backgrounds or only to +# the default background. When set to `true` all cells will be transparent +# regardless of their background color. +#transparent_background_colors: false # Bell # # The bell is rung every time the BEL control character is received. #bell: - # Visual Bell Animation - # - # Animation effect for flashing the screen when the visual bell is rung. - # - # Values for `animation`: - # - Ease - # - EaseOut - # - EaseOutSine - # - EaseOutQuad - # - EaseOutCubic - # - EaseOutQuart - # - EaseOutQuint - # - EaseOutExpo - # - EaseOutCirc - # - Linear - #animation: EaseOutExpo - - # Duration of the visual bell flash in milliseconds. A `duration` of `0` will - # disable the visual bell animation. - #duration: 0 - - # Visual bell animation color. - #color: '#ffffff' - - # Bell Command - # - # This program is executed whenever the bell is rung. - # - # When set to `command: None`, no command will be executed. - # - # Example: - # command: - # program: notify-send - # args: ["Hello, World!"] - # - #command: None +# Visual Bell Animation +# +# Animation effect for flashing the screen when the visual bell is rung. +# +# Values for `animation`: +# - Ease +# - EaseOut +# - EaseOutSine +# - EaseOutQuad +# - EaseOutCubic +# - EaseOutQuart +# - EaseOutQuint +# - EaseOutExpo +# - EaseOutCirc +# - Linear +#animation: EaseOutExpo + +# Duration of the visual bell flash in milliseconds. A `duration` of `0` will +# disable the visual bell animation. +#duration: 0 + +# Visual bell animation color. +#color: '#ffffff' + +# Bell Command +# +# This program is executed whenever the bell is rung. +# +# When set to `command: None`, no command will be executed. +# +# Example: +# command: +# program: notify-send +# args: ["Hello, World!"] +# +#command: None #selection: - # This string contains all characters that are used as separators for - # "semantic words" in Alacritty. - #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" +# This string contains all characters that are used as separators for +# "semantic words" in Alacritty. +#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" - # When set to `true`, selected text will be copied to the primary clipboard. - #save_to_clipboard: false +# When set to `true`, selected text will be copied to the primary clipboard. +#save_to_clipboard: false cursor: # Cursor style @@ -481,50 +481,50 @@ mouse: # Terminal hints can be used to find text or hyperlink in the visible part of # the terminal and pipe it to other applications. #hints: - # Keys used for the hint labels. - #alphabet: "jfkdls;ahgurieowpq" +# Keys used for the hint labels. +#alphabet: "jfkdls;ahgurieowpq" - # List with all available hints - # - # Each hint must have any of `regex` or `hyperlinks` field and either an - # `action` or a `command` field. The fields `mouse`, `binding` and - # `post_processing` are optional. - # - # The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be - # highlighted. - # - # The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and - # `mouse.mods` accept the same values as they do in the `key_bindings` section. - # - # The `mouse.enabled` field controls if the hint should be underlined while - # the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. - # - # If the `post_processing` field is set to `true`, heuristics will be used to - # shorten the match if there are characters likely not to be part of the hint - # (e.g. a trailing `.`). This is most useful for URIs and applies only to - # `regex` matches. - # - # Values for `action`: - # - Copy - # Copy the hint's text to the clipboard. - # - Paste - # Paste the hint's text to the terminal or search. - # - Select - # Select the hint's text. - # - MoveViModeCursor - # Move the vi mode cursor to the beginning of the hint. - #enabled: - # - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ - # [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" - # hyperlinks: true - # command: xdg-open - # post_processing: true - # mouse: - # enabled: true - # mods: None - # binding: - # key: U - # mods: Control|Shift +# List with all available hints +# +# Each hint must have any of `regex` or `hyperlinks` field and either an +# `action` or a `command` field. The fields `mouse`, `binding` and +# `post_processing` are optional. +# +# The `hyperlinks` option will cause OSC 8 escape sequence hyperlinks to be +# highlighted. +# +# The fields `command`, `binding.key`, `binding.mods`, `binding.mode` and +# `mouse.mods` accept the same values as they do in the `key_bindings` section. +# +# The `mouse.enabled` field controls if the hint should be underlined while +# the mouse with all `mouse.mods` keys held or the vi mode cursor is above it. +# +# If the `post_processing` field is set to `true`, heuristics will be used to +# shorten the match if there are characters likely not to be part of the hint +# (e.g. a trailing `.`). This is most useful for URIs and applies only to +# `regex` matches. +# +# Values for `action`: +# - Copy +# Copy the hint's text to the clipboard. +# - Paste +# Paste the hint's text to the terminal or search. +# - Select +# Select the hint's text. +# - MoveViModeCursor +# Move the vi mode cursor to the beginning of the hint. +#enabled: +# - regex: "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)\ +# [^\u0000-\u001F\u007F-\u009F<>\"\\s{-}\\^⟨⟩`]+" +# hyperlinks: true +# command: xdg-open +# post_processing: true +# mouse: +# enabled: true +# mods: None +# binding: +# key: U +# mods: Control|Shift # Mouse bindings # @@ -769,116 +769,116 @@ mouse: # If the same trigger is assigned to multiple actions, all of them are executed # in the order they were defined in. #key_bindings: - #- { key: Paste, action: Paste } - #- { key: Copy, action: Copy } - #- { key: L, mods: Control, action: ClearLogNotice } - #- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" } - #- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp } - #- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } - #- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop } - #- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } - - # Vi Mode - #- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } - #- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } - #- { key: Escape, mode: Vi|~Search, action: ClearSelection } - #- { key: I, mode: Vi|~Search, action: ToggleViMode } - #- { key: I, mode: Vi|~Search, action: ScrollToBottom } - #- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } - #- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } - #- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } - #- { key: G, mode: Vi|~Search, action: ScrollToTop } - #- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom } - #- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp } - #- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown } - #- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } - #- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } - #- { key: Y, mode: Vi|~Search, action: Copy } - #- { key: Y, mode: Vi|~Search, action: ClearSelection } - #- { key: Copy, mode: Vi|~Search, action: ClearSelection } - #- { key: V, mode: Vi|~Search, action: ToggleNormalSelection } - #- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection } - #- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection } - #- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection } - #- { key: Return, mode: Vi|~Search, action: Open } - #- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor } - #- { key: K, mode: Vi|~Search, action: Up } - #- { key: J, mode: Vi|~Search, action: Down } - #- { key: H, mode: Vi|~Search, action: Left } - #- { key: L, mode: Vi|~Search, action: Right } - #- { key: Up, mode: Vi|~Search, action: Up } - #- { key: Down, mode: Vi|~Search, action: Down } - #- { key: Left, mode: Vi|~Search, action: Left } - #- { key: Right, mode: Vi|~Search, action: Right } - #- { key: Key0, mode: Vi|~Search, action: First } - #- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last } - #- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied } - #- { key: H, mods: Shift, mode: Vi|~Search, action: High } - #- { key: M, mods: Shift, mode: Vi|~Search, action: Middle } - #- { key: L, mods: Shift, mode: Vi|~Search, action: Low } - #- { key: B, mode: Vi|~Search, action: SemanticLeft } - #- { key: W, mode: Vi|~Search, action: SemanticRight } - #- { key: E, mode: Vi|~Search, action: SemanticRightEnd } - #- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft } - #- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight } - #- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd } - #- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket } - #- { key: Slash, mode: Vi|~Search, action: SearchForward } - #- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward } - #- { key: N, mode: Vi|~Search, action: SearchNext } - #- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious } - - # Search Mode - #- { key: Return, mode: Search|Vi, action: SearchConfirm } - #- { key: Escape, mode: Search, action: SearchCancel } - #- { key: C, mods: Control, mode: Search, action: SearchCancel } - #- { key: U, mods: Control, mode: Search, action: SearchClear } - #- { key: W, mods: Control, mode: Search, action: SearchDeleteWord } - #- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious } - #- { key: N, mods: Control, mode: Search, action: SearchHistoryNext } - #- { key: Up, mode: Search, action: SearchHistoryPrevious } - #- { key: Down, mode: Search, action: SearchHistoryNext } - #- { key: Return, mode: Search|~Vi, action: SearchFocusNext } - #- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } - - # (Windows, Linux, and BSD only) - #- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } - #- { key: C, mods: Control|Shift, action: Copy } - #- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } - #- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } - #- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } - #- { key: Insert, mods: Shift, action: PasteSelection } - #- { key: Key0, mods: Control, action: ResetFontSize } - #- { key: Equals, mods: Control, action: IncreaseFontSize } - #- { key: Plus, mods: Control, action: IncreaseFontSize } - #- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } - #- { key: Minus, mods: Control, action: DecreaseFontSize } - #- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } - - # (Windows only) - #- { key: Return, mods: Alt, action: ToggleFullscreen } - - # (macOS only) - #- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } - #- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } - #- { key: Key0, mods: Command, action: ResetFontSize } - #- { key: Equals, mods: Command, action: IncreaseFontSize } - #- { key: Plus, mods: Command, action: IncreaseFontSize } - #- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } - #- { key: Minus, mods: Command, action: DecreaseFontSize } - #- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } - #- { key: V, mods: Command, action: Paste } - #- { key: C, mods: Command, action: Copy } - #- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } - #- { key: H, mods: Command, action: Hide } - #- { key: H, mods: Command|Alt, action: HideOtherApplications } - #- { key: M, mods: Command, action: Minimize } - #- { key: Q, mods: Command, action: Quit } - #- { key: W, mods: Command, action: Quit } - #- { key: N, mods: Command, action: CreateNewWindow } - #- { key: F, mods: Command|Control, action: ToggleFullscreen } - #- { key: F, mods: Command, mode: ~Search, action: SearchForward } - #- { key: B, mods: Command, mode: ~Search, action: SearchBackward } +#- { key: Paste, action: Paste } +#- { key: Copy, action: Copy } +#- { key: L, mods: Control, action: ClearLogNotice } +#- { key: L, mods: Control, mode: ~Vi|~Search, chars: "\x0c" } +#- { key: PageUp, mods: Shift, mode: ~Alt, action: ScrollPageUp } +#- { key: PageDown, mods: Shift, mode: ~Alt, action: ScrollPageDown } +#- { key: Home, mods: Shift, mode: ~Alt, action: ScrollToTop } +#- { key: End, mods: Shift, mode: ~Alt, action: ScrollToBottom } + +# Vi Mode +#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode } +#- { key: Space, mods: Shift|Control, mode: Vi|~Search, action: ScrollToBottom } +#- { key: Escape, mode: Vi|~Search, action: ClearSelection } +#- { key: I, mode: Vi|~Search, action: ToggleViMode } +#- { key: I, mode: Vi|~Search, action: ScrollToBottom } +#- { key: C, mods: Control, mode: Vi|~Search, action: ToggleViMode } +#- { key: Y, mods: Control, mode: Vi|~Search, action: ScrollLineUp } +#- { key: E, mods: Control, mode: Vi|~Search, action: ScrollLineDown } +#- { key: G, mode: Vi|~Search, action: ScrollToTop } +#- { key: G, mods: Shift, mode: Vi|~Search, action: ScrollToBottom } +#- { key: B, mods: Control, mode: Vi|~Search, action: ScrollPageUp } +#- { key: F, mods: Control, mode: Vi|~Search, action: ScrollPageDown } +#- { key: U, mods: Control, mode: Vi|~Search, action: ScrollHalfPageUp } +#- { key: D, mods: Control, mode: Vi|~Search, action: ScrollHalfPageDown } +#- { key: Y, mode: Vi|~Search, action: Copy } +#- { key: Y, mode: Vi|~Search, action: ClearSelection } +#- { key: Copy, mode: Vi|~Search, action: ClearSelection } +#- { key: V, mode: Vi|~Search, action: ToggleNormalSelection } +#- { key: V, mods: Shift, mode: Vi|~Search, action: ToggleLineSelection } +#- { key: V, mods: Control, mode: Vi|~Search, action: ToggleBlockSelection } +#- { key: V, mods: Alt, mode: Vi|~Search, action: ToggleSemanticSelection } +#- { key: Return, mode: Vi|~Search, action: Open } +#- { key: Z, mode: Vi|~Search, action: CenterAroundViCursor } +#- { key: K, mode: Vi|~Search, action: Up } +#- { key: J, mode: Vi|~Search, action: Down } +#- { key: H, mode: Vi|~Search, action: Left } +#- { key: L, mode: Vi|~Search, action: Right } +#- { key: Up, mode: Vi|~Search, action: Up } +#- { key: Down, mode: Vi|~Search, action: Down } +#- { key: Left, mode: Vi|~Search, action: Left } +#- { key: Right, mode: Vi|~Search, action: Right } +#- { key: Key0, mode: Vi|~Search, action: First } +#- { key: Key4, mods: Shift, mode: Vi|~Search, action: Last } +#- { key: Key6, mods: Shift, mode: Vi|~Search, action: FirstOccupied } +#- { key: H, mods: Shift, mode: Vi|~Search, action: High } +#- { key: M, mods: Shift, mode: Vi|~Search, action: Middle } +#- { key: L, mods: Shift, mode: Vi|~Search, action: Low } +#- { key: B, mode: Vi|~Search, action: SemanticLeft } +#- { key: W, mode: Vi|~Search, action: SemanticRight } +#- { key: E, mode: Vi|~Search, action: SemanticRightEnd } +#- { key: B, mods: Shift, mode: Vi|~Search, action: WordLeft } +#- { key: W, mods: Shift, mode: Vi|~Search, action: WordRight } +#- { key: E, mods: Shift, mode: Vi|~Search, action: WordRightEnd } +#- { key: Key5, mods: Shift, mode: Vi|~Search, action: Bracket } +#- { key: Slash, mode: Vi|~Search, action: SearchForward } +#- { key: Slash, mods: Shift, mode: Vi|~Search, action: SearchBackward } +#- { key: N, mode: Vi|~Search, action: SearchNext } +#- { key: N, mods: Shift, mode: Vi|~Search, action: SearchPrevious } + +# Search Mode +#- { key: Return, mode: Search|Vi, action: SearchConfirm } +#- { key: Escape, mode: Search, action: SearchCancel } +#- { key: C, mods: Control, mode: Search, action: SearchCancel } +#- { key: U, mods: Control, mode: Search, action: SearchClear } +#- { key: W, mods: Control, mode: Search, action: SearchDeleteWord } +#- { key: P, mods: Control, mode: Search, action: SearchHistoryPrevious } +#- { key: N, mods: Control, mode: Search, action: SearchHistoryNext } +#- { key: Up, mode: Search, action: SearchHistoryPrevious } +#- { key: Down, mode: Search, action: SearchHistoryNext } +#- { key: Return, mode: Search|~Vi, action: SearchFocusNext } +#- { key: Return, mods: Shift, mode: Search|~Vi, action: SearchFocusPrevious } + +# (Windows, Linux, and BSD only) +#- { key: V, mods: Control|Shift, mode: ~Vi, action: Paste } +#- { key: C, mods: Control|Shift, action: Copy } +#- { key: F, mods: Control|Shift, mode: ~Search, action: SearchForward } +#- { key: B, mods: Control|Shift, mode: ~Search, action: SearchBackward } +#- { key: C, mods: Control|Shift, mode: Vi|~Search, action: ClearSelection } +#- { key: Insert, mods: Shift, action: PasteSelection } +#- { key: Key0, mods: Control, action: ResetFontSize } +#- { key: Equals, mods: Control, action: IncreaseFontSize } +#- { key: Plus, mods: Control, action: IncreaseFontSize } +#- { key: NumpadAdd, mods: Control, action: IncreaseFontSize } +#- { key: Minus, mods: Control, action: DecreaseFontSize } +#- { key: NumpadSubtract, mods: Control, action: DecreaseFontSize } + +# (Windows only) +#- { key: Return, mods: Alt, action: ToggleFullscreen } + +# (macOS only) +#- { key: K, mods: Command, mode: ~Vi|~Search, chars: "\x0c" } +#- { key: K, mods: Command, mode: ~Vi|~Search, action: ClearHistory } +#- { key: Key0, mods: Command, action: ResetFontSize } +#- { key: Equals, mods: Command, action: IncreaseFontSize } +#- { key: Plus, mods: Command, action: IncreaseFontSize } +#- { key: NumpadAdd, mods: Command, action: IncreaseFontSize } +#- { key: Minus, mods: Command, action: DecreaseFontSize } +#- { key: NumpadSubtract, mods: Command, action: DecreaseFontSize } +#- { key: V, mods: Command, action: Paste } +#- { key: C, mods: Command, action: Copy } +#- { key: C, mods: Command, mode: Vi|~Search, action: ClearSelection } +#- { key: H, mods: Command, action: Hide } +#- { key: H, mods: Command|Alt, action: HideOtherApplications } +#- { key: M, mods: Command, action: Minimize } +#- { key: Q, mods: Command, action: Quit } +#- { key: W, mods: Command, action: Quit } +#- { key: N, mods: Command, action: CreateNewWindow } +#- { key: F, mods: Command|Control, action: ToggleFullscreen } +#- { key: F, mods: Command, mode: ~Search, action: SearchForward } +#- { key: B, mods: Command, mode: ~Search, action: SearchBackward } debug: # Display the time it takes to redraw each frame. diff --git a/src/terminal-emulator/setup.sh b/src/terminal-emulator/setup.sh index 919a166..f8cdc91 100755 --- a/src/terminal-emulator/setup.sh +++ b/src/terminal-emulator/setup.sh @@ -27,4 +27,3 @@ choose_emulator() { main() { choose_emulator } - diff --git a/src/text-editor/vscode/setup.sh b/src/text-editor/vscode/setup.sh index 9e5009a..fd609bf 100755 --- a/src/text-editor/vscode/setup.sh +++ b/src/text-editor/vscode/setup.sh @@ -25,7 +25,7 @@ install_dependencies() { sudo apt-get update sudo install -m 0755 -d /etc/apt/keyrings curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | - sudo gpg --dearmor -o /etc/apt/keyrings/packages.microsoft.gpg + sudo gpg --dearmor -o /etc/apt/keyrings/packages.microsoft.gpg # Add the repository to Apt sources: echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] \ diff --git a/src/text-editor/vscodium/setup.sh b/src/text-editor/vscodium/setup.sh index 5c6b9a9..c00b00f 100755 --- a/src/text-editor/vscodium/setup.sh +++ b/src/text-editor/vscodium/setup.sh @@ -18,21 +18,22 @@ source "$DOTFILES_SCRIPTS_DIR/symlink_files.sh" install_dependencies() { - # only begin installation if one of the dependencies are not met - cmd_exists codium && return + # only begin installation if one of the dependencies are not met + cmd_exists codium && return - # Add VSCodium's official GPG key: - curl -sS https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | - sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg + # Add VSCodium's official GPG key: + curl -sS https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg | + sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg - # Add the repository to Apt sources: - echo "deb [ signed-by=/etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg ] \ - https://download.vscodium.com/debs vscodium main" | \ - sudo tee /etc/apt/sources.list.d/vscodium.list - sudo apt-get update + # Add the repository to Apt sources: + echo \ + "deb [ signed-by=/etc/apt/trusted.gpg.d/vscodium-archive-keyring.gpg ] \ + https://download.vscodium.com/debs vscodium main" | + sudo tee /etc/apt/sources.list.d/vscodium.list + sudo apt-get update - # Install packages - sudo apt-get install -y codium + # Install packages + sudo apt-get install -y codium } @@ -42,9 +43,9 @@ install_dependencies() { main() { - ask_for_sudo + ask_for_sudo - install_dependencies + install_dependencies } diff --git a/test/docker-compose.yaml b/test/docker-compose.yaml index f221639..ac49bb5 100644 --- a/test/docker-compose.yaml +++ b/test/docker-compose.yaml @@ -1,4 +1,4 @@ -version: '3.8' +version: "3.8" services: local: @@ -28,11 +28,10 @@ services: && ./test/test.sh " environment: - RAW_CONTENT_URL: ${RAW_CONTENT_URL} + RAW_CONTENT_URL: ${RAW_CONTENT_URL} cap_add: - SYS_ADMIN devices: - /dev/fuse:/dev/fuse security_opt: - apparmor:unconfined - diff --git a/test/test.sh b/test/test.sh index 7375e41..537cbb6 100755 --- a/test/test.sh +++ b/test/test.sh @@ -53,4 +53,3 @@ main() { } main - From 87e1d16c4f34d5a097c86ab304a4ae4c439fe23b Mon Sep 17 00:00:00 2001 From: Omar Besbes <86571415+omar-besbes@users.noreply.github.com> Date: Sat, 8 Feb 2025 23:46:09 +0100 Subject: [PATCH 2/4] fix: install extraction/compression tools early on --- bootstrap.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 109fb50..246352c 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -47,6 +47,9 @@ install_dependencies() { # install curl execute "sudo apt-get install -y curl" "Installing curl ..." + # isntall necessary compression and extraction tools + execute "sudo apt-get install -y bzip2 gzip zip xz-utils tar" "Installing extraction/compression tools ..." + # install rustup & cargo if ! cmd_exists rustup; then execute "curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs | sh -s -- --no-modify-path -y" "Installing rustup ..." @@ -71,9 +74,6 @@ install_dependencies() { # install xclip execute "sudo apt-get install -y xclip" "Installing xclip ..." - # isntall necessary compression and extraction tools - execute "sudo apt-get install -y bzip2 gzip zip xz-utils tar" "Installing extraction/compression tools ..." - # install gcc, g++ & some other tools execute "sudo apt-get install -y ca-certificates fontconfig build-essential software-properties-common" "Installing essential tools ..." From d5f23bcf37223f55df8dae197f17bf42953715b3 Mon Sep 17 00:00:00 2001 From: Omar Besbes <86571415+omar-besbes@users.noreply.github.com> Date: Sun, 9 Feb 2025 00:38:55 +0100 Subject: [PATCH 3/4] fix: create the bash completions directory after sourcing utils.sh --- bootstrap.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap.sh b/bootstrap.sh index 246352c..11d515a 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -20,7 +20,6 @@ [ ! -v DOTFILES_ROOT_DIR ] && declare -r DOTFILES_ROOT_DIR="$HOME/.dotfiles" mkdir -p "$DOTFILES_ROOT_DIR" -mkdir -p "$DOTFILES_BASH_COMPLETIONS_DIR" cd "$DOTFILES_ROOT_DIR" || exit 1 [ ! -v CURRENT_BRANCH ] && @@ -35,6 +34,8 @@ source "$DOTFILES_ROOT_DIR/scripts/setup_topics.sh" &>/dev/null || source "$DOTFILES_ROOT_DIR/scripts/sync_files.sh" &>/dev/null || source <(curl -fsSL "$DOTFILES_GITHUB_RAW_CONTENT_ORIGIN/scripts/sync_files.sh") +mkdir -p "$DOTFILES_BASH_COMPLETIONS_DIR" + # ---------------------------------------------------------------------- # | Global Dependencies | # ---------------------------------------------------------------------- From 14a855be0992f6a4495a0ddb22c0c7ce807b755e Mon Sep 17 00:00:00 2001 From: Omar Besbes <86571415+omar-besbes@users.noreply.github.com> Date: Sun, 9 Feb 2025 00:39:26 +0100 Subject: [PATCH 4/4] test: VSCode --- test/test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test.sh b/test/test.sh index 537cbb6..0844305 100755 --- a/test/test.sh +++ b/test/test.sh @@ -22,6 +22,7 @@ declare -a COMMANDS_TO_VERIFY=( "docker" "kubectl" "chromium" + "code" ) check_commands_existence() {