diff --git a/.alacritty.toml b/.alacritty.toml new file mode 100644 index 0000000..3c7cbec --- /dev/null +++ b/.alacritty.toml @@ -0,0 +1,63 @@ +[colors] +draw_bold_text_with_bright_colors = false + +[[colors.indexed_colors]] +color = "0xffa066" +index = 16 + +[[colors.indexed_colors]] +color = "0xff5d62" +index = 17 + +[colors.bright] +black = "0x727169" +blue = "0x7fb4ca" +cyan = "0x7aa89f" +green = "0x98bb6c" +magenta = "0x938aa9" +red = "0xe82424" +white = "0xdcd7ba" +yellow = "0xe6c384" + +[colors.normal] +black = "0x090618" +blue = "0x7e9cd8" +cyan = "0x6a9589" +green = "0x76946a" +magenta = "0x957fb8" +red = "0xc34043" +white = "0xc8c093" +yellow = "0xc0a36e" + +[colors.primary] +background = "0x1f1f28" +foreground = "0xdcd7ba" + +[colors.selection] +background = "0x2d4f67" +foreground = "0xc8c093" + +[font] +size = 14.0 + +[font.bold] +family = "FiraCode Nerd Font" +style = "Regular" +# style = "Medium" + +[font.normal] +family = "FiraCode Nerd Font" +style = "Regular" + +[scrolling] +history = 10000 + +[window] +decorations = "buttonless" +dynamic_padding = true +dynamic_title = true +opacity = 0.95 + +[window.padding] +x = 0 +y = 0 diff --git a/.alacritty.yml b/.alacritty.yml index d7cc35f..dc0a0b7 100644 --- a/.alacritty.yml +++ b/.alacritty.yml @@ -46,11 +46,12 @@ window: # Blank space added around the window in pixels. This padding is scaled # by DPI and the specified value is always added at both opposing sides. padding: - x: 5 - y: 5 + x: 0 + y: 0 # Spread additional padding evenly around the terminal content. - #dynamic_padding: false + # dynamic_padding: false + dynamic_padding: true # Window decorations # @@ -63,13 +64,15 @@ window: # - buttonless: Title bar, transparent background and no title bar buttons #decorations: full decorations: buttonless + # decorations: none # Background opacity # # Window opacity as a floating point number from `0.0` to `1.0`. # The value `0.0` is completely transparent and `1.0` is opaque. #opacity: 1.0 - opacity: 0.985 + # opacity: 0.985 + opacity: 0.95 # Startup Mode (changes require restart) # @@ -903,51 +906,88 @@ draw_bold_text_with_bright_colors: false # +# colors: +# primary: +# background: '#2e3440' +# foreground: '#d8dee9' +# dim_foreground: '#a5abb6' +# cursor: +# text: '#2e3440' +# cursor: '#d8dee9' +# vi_mode_cursor: +# text: '#2e3440' +# cursor: '#d8dee9' +# selection: +# text: CellForeground +# background: '#4c566a' +# search: +# matches: +# foreground: CellBackground +# background: '#88c0d0' +# # bar: +# # background: '#434c5e' +# # foreground: '#d8dee9' +# normal: +# black: '#3b4252' +# red: '#bf616a' +# green: '#a3be8c' +# yellow: '#ebcb8b' +# blue: '#81a1c1' +# magenta: '#b48ead' +# cyan: '#88c0d0' +# white: '#e5e9f0' +# bright: +# black: '#4c566a' +# red: '#bf616a' +# green: '#a3be8c' +# yellow: '#ebcb8b' +# blue: '#81a1c1' +# magenta: '#b48ead' +# cyan: '#8fbcbb' +# white: '#eceff4' +# dim: +# black: '#373e4d' +# red: '#94545d' +# green: '#809575' +# yellow: '#b29e75' +# blue: '#68809a' +# magenta: '#8c738c' +# cyan: '#6d96a5' +# white: '#aeb3bb' + + +# +# Kanagawa Alacritty Colors +# colors: primary: - background: '#2e3440' - foreground: '#d8dee9' - dim_foreground: '#a5abb6' - cursor: - text: '#2e3440' - cursor: '#d8dee9' - vi_mode_cursor: - text: '#2e3440' - cursor: '#d8dee9' - selection: - text: CellForeground - background: '#4c566a' - search: - matches: - foreground: CellBackground - background: '#88c0d0' - # bar: - # background: '#434c5e' - # foreground: '#d8dee9' + background: '0x1f1f28' + foreground: '0xdcd7ba' + normal: - black: '#3b4252' - red: '#bf616a' - green: '#a3be8c' - yellow: '#ebcb8b' - blue: '#81a1c1' - magenta: '#b48ead' - cyan: '#88c0d0' - white: '#e5e9f0' + black: '0x090618' + red: '0xc34043' + green: '0x76946a' + yellow: '0xc0a36e' + blue: '0x7e9cd8' + magenta: '0x957fb8' + cyan: '0x6a9589' + white: '0xc8c093' + bright: - black: '#4c566a' - red: '#bf616a' - green: '#a3be8c' - yellow: '#ebcb8b' - blue: '#81a1c1' - magenta: '#b48ead' - cyan: '#8fbcbb' - white: '#eceff4' - dim: - black: '#373e4d' - red: '#94545d' - green: '#809575' - yellow: '#b29e75' - blue: '#68809a' - magenta: '#8c738c' - cyan: '#6d96a5' - white: '#aeb3bb' + black: '0x727169' + red: '0xe82424' + green: '0x98bb6c' + yellow: '0xe6c384' + blue: '0x7fb4ca' + magenta: '0x938aa9' + cyan: '0x7aa89f' + white: '0xdcd7ba' + + selection: + background: '0x2d4f67' + foreground: '0xc8c093' + + indexed_colors: + - { index: 16, color: '0xffa066' } + - { index: 17, color: '0xff5d62' } diff --git a/.config/bat/config b/.config/bat/config new file mode 100644 index 0000000..7e38281 --- /dev/null +++ b/.config/bat/config @@ -0,0 +1,2 @@ +# Set the theme to "gruvbox-dark" +--theme="gruvbox-dark" diff --git a/.config/nvim/lua/plugins/toggleterm.lua b/.config/nvim/lua/plugins/toggleterm.lua index 90fe10f..f400be6 100644 --- a/.config/nvim/lua/plugins/toggleterm.lua +++ b/.config/nvim/lua/plugins/toggleterm.lua @@ -3,8 +3,14 @@ return { { "akinsho/toggleterm.nvim", version = "*", - opts = { - open_mapping = [[]], - }, + config = function() + require("toggleterm").setup({ + open_mapping = [[]], + direction = "float", + float_opts = { + border = "single", -- 'curved' + }, + }) + end, }, } diff --git a/.p10k.zsh b/.p10k.zsh new file mode 100644 index 0000000..3311bca --- /dev/null +++ b/.p10k.zsh @@ -0,0 +1,198 @@ +# Generated by Powerlevel10k configuration wizard on 2022-06-05 at 19:44 CEST. +# Based on romkatv/powerlevel10k/config/p10k-pure.zsh, checksum 13301. +# Wizard options: nerdfont-complete + powerline, large icons, pure, original, 1 line, +# compact, instant_prompt=verbose. +# Type `p10k configure` to generate another config. +# +# Config file for Powerlevel10k with the style of Pure (https://github.com/sindresorhus/pure). +# +# Differences from Pure: +# +# - Git: +# - `@c4d3ec2c` instead of something like `v1.4.0~11` when in detached HEAD state. +# - No automatic `git fetch` (the same as in Pure with `PURE_GIT_PULL=0`). +# +# Apart from the differences listed above, the replication of Pure prompt is exact. This includes +# even the questionable parts. For example, just like in Pure, there is no indication of Git status +# being stale; prompt symbol is the same in command, visual and overwrite vi modes; when prompt +# doesn't fit on one line, it wraps around with no attempt to shorten it. +# +# If you like the general style of Pure but not particularly attached to all its quirks, type +# `p10k configure` and pick "Lean" style. This will give you slick minimalist prompt while taking +# advantage of Powerlevel10k features that aren't present in Pure. + +# Temporarily change options. +'builtin' 'local' '-a' 'p10k_config_opts' +[[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') +[[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') +[[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') +'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' + +() { + emulate -L zsh -o extended_glob + + # Unset all configuration options. + unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' + + # Zsh >= 5.1 is required. + autoload -Uz is-at-least && is-at-least 5.1 || return + + # Prompt colors. + local grey='242' + local red='1' + local yellow='3' + local blue='4' + local magenta='5' + local cyan='6' + local white='7' + + # Left prompt segments. + typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=( + context # user@host + dir # current directory + vcs # git status + # command_execution_time # previous command duration + virtualenv # python virtual environment + prompt_char # prompt symbol + ) + + # Right prompt segments. + typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=( + # command_execution_time # previous command duration + # virtualenv # python virtual environment + # context # user@host + # time # current time + ) + + # Basic style options that define the overall prompt look. + typeset -g POWERLEVEL9K_BACKGROUND= # transparent background + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_{LEFT,RIGHT}_WHITESPACE= # no surrounding whitespace + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SUBSEGMENT_SEPARATOR=' ' # separate segments with a space + typeset -g POWERLEVEL9K_{LEFT,RIGHT}_SEGMENT_SEPARATOR= # no end-of-line symbol + typeset -g POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION= # no segment icons + + # Add an empty line before each prompt except the first. This doesn't emulate the bug + # in Pure that makes prompt drift down whenever you use the Alt-C binding from fzf or similar. + typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=false + + # Magenta prompt symbol if the last command succeeded. + # typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=$magenta + typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS}_FOREGROUND=014 + # Red prompt symbol if the last command failed. + typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS}_FOREGROUND=009 + # Default prompt symbol. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='❯' + # Prompt symbol in command vi mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='❮' + # Prompt symbol in visual vi mode is the same as in command mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIVIS_CONTENT_EXPANSION='❮' + # Prompt symbol in overwrite vi mode is the same as in command mode. + typeset -g POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE=false + + # Show only the last segment of the current directory. + typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_last + + # Grey Python Virtual Environment. + typeset -g POWERLEVEL9K_VIRTUALENV_FOREGROUND=$grey + # Don't show Python version. + typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION=false + typeset -g POWERLEVEL9K_VIRTUALENV_{LEFT,RIGHT}_DELIMITER= + + # Blue current directory. + ## typeset -g POWERLEVEL9K_DIR_FOREGROUND=$blue + typeset -g POWERLEVEL9K_DIR_FOREGROUND=003 + + # Context format when root: user@host. The first part white, the rest grey. + typeset -g POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE="%F{$white}%n%f%F{$grey}@%m%f" + # Context format when not root: user@host. The whole thing grey. + typeset -g POWERLEVEL9K_CONTEXT_TEMPLATE="%F{$grey}%n@%m%f" + # Don't show context unless root or in SSH. + typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_CONTENT_EXPANSION= + + # Show previous command duration only if it's >= 5s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=5 + # Don't show fractional seconds. Thus, 7s rather than 7.3s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION=0 + # Duration format: 1d 2h 3m 4s. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT='d h m s' + # Yellow previous command duration. + typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=$yellow + + # Grey Git prompt. This makes stale prompts indistinguishable from up-to-date ones. + typeset -g POWERLEVEL9K_VCS_FOREGROUND=$grey + + # Disable async loading indicator to make directories that aren't Git repositories + # indistinguishable from large Git repositories without known state. + typeset -g POWERLEVEL9K_VCS_LOADING_TEXT= + + # Don't wait for Git status even for a millisecond, so that prompt always updates + # asynchronously when Git state changes. + typeset -g POWERLEVEL9K_VCS_MAX_SYNC_LATENCY_SECONDS=0 + + # Cyan ahead/behind arrows. + typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=$cyan + # Don't show remote branch, current tag or stashes. + typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind) + # Don't show the branch icon. + typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= + # When in detached HEAD state, show @commit where branch normally goes. + typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@' + # Don't show staged, unstaged, untracked indicators. + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON= + # Show '*' when there are staged, unstaged or untracked files. + typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*' + # Show '⇣' if local branch is behind remote. + typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON=':⇣' + # Show '⇡' if local branch is ahead of remote. + typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON=':⇡' + # Don't show the number of commits next to the ahead/behind arrows. + typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1 + # Remove space between '⇣' and '⇡' and all trailing spaces. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${${P9K_CONTENT/⇣* :⇡/⇣⇡}// }//:/ }' + + # Grey current time. + typeset -g POWERLEVEL9K_TIME_FOREGROUND=$grey + # Format for the current time: 09:51:02. See `man 3 strftime`. + typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M:%S}' + # If set to true, time will update when you hit enter. This way prompts for the past + # commands will contain the start times of their commands rather than the end times of + # their preceding commands. + typeset -g POWERLEVEL9K_TIME_UPDATE_ON_COMMAND=false + + # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt + # when accepting a command line. Supported values: + # + # - off: Don't change prompt when accepting a command line. + # - always: Trim down prompt when accepting a command line. + # - same-dir: Trim down prompt when accepting a command line unless this is the first command + # typed after changing current working directory. + typeset -g POWERLEVEL9K_TRANSIENT_PROMPT=off + + # Instant prompt mode. + # + # - off: Disable instant prompt. Choose this if you've tried instant prompt and found + # it incompatible with your zsh configuration files. + # - quiet: Enable instant prompt and don't print warnings when detecting console output + # during zsh initialization. Choose this if you've read and understood + # https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt. + # - verbose: Enable instant prompt and print a warning when detecting console output during + # zsh initialization. Choose this if you've never tried instant prompt, haven't + # seen the warning, or if you are unsure what this all means. + typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose + + # Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized. + # For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload + # can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you + # really need it. + typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true + + # If p10k is already loaded, reload configuration. + # This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true. + (( ! $+functions[p10k] )) || p10k reload +} + +# Tell `p10k configure` which file it should overwrite. +typeset -g POWERLEVEL9K_CONFIG_FILE=${${(%):-%x}:a} + +(( ${#p10k_config_opts} )) && setopt ${p10k_config_opts[@]} +'builtin' 'unset' 'p10k_config_opts' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea1af51..b847519 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: - id: detect-secrets - repo: https://github.com/JohnnyMorganz/StyLua - rev: v0.19.1 + rev: v0.20.0 hooks: - id: stylua-system # or stylua-system / stylua-github diff --git a/go.sh b/go.sh index 88d1cb4..5f874a4 100755 --- a/go.sh +++ b/go.sh @@ -4,3 +4,4 @@ go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest go install golang.org/x/tools/cmd/stringer@latest go install github.com/mgechev/revive@latest go install golang.org/x/tools/cmd/goimports@latest +go install mvdan.cc/gofumpt@latest diff --git a/manual.md b/manual.md index 8503090..fa3035b 100644 --- a/manual.md +++ b/manual.md @@ -40,6 +40,13 @@ vagrant plugin license vagrant-vmware-desktop ~/license.lic * run `run sudo chmod -R 755 target_directory` * OR `compaudit | xargs chmod g-w,o-w` +* PowerLevel 10K + * `git clone https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k` + +* Zsh Syntax Highlighting + * `git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting` + + ## TinkerTool * (https://www.bresink.com/osx/0TinkerTool/download.php)