feat(zsh): added zsh config
This commit is contained in:
13
.fzf.zsh
Normal file
13
.fzf.zsh
Normal file
@@ -0,0 +1,13 @@
|
||||
# Setup fzf
|
||||
# ---------
|
||||
if [[ ! "$PATH" == */home/sublet/.fzf/bin* ]]; then
|
||||
PATH="${PATH:+${PATH}:}/home/sublet/.fzf/bin"
|
||||
fi
|
||||
|
||||
# Auto-completion
|
||||
# ---------------
|
||||
source "/home/sublet/.fzf/shell/completion.zsh"
|
||||
|
||||
# Key bindings
|
||||
# ------------
|
||||
# source "/home/sublet/.fzf/shell/key-bindings.zsh"
|
||||
194
.zshrc
Normal file
194
.zshrc
Normal file
@@ -0,0 +1,194 @@
|
||||
# Fig pre block. Keep at the top of this file.
|
||||
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# If you come from bash you might have to change your $PATH.
|
||||
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||
export DENO_INSTALL="/home/sublet/.deno"
|
||||
export GO_INSTALL="/usr/local/go"
|
||||
|
||||
export PATH="$GO_INSTALL/bin:$DENO_INSTALL/bin:$PATH"
|
||||
|
||||
# Path to your oh-my-zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# Set list of themes to pick from when loading at random
|
||||
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||
# a theme from this variable instead of looking in $ZSH/themes/
|
||||
# If set to an empty array, this variable will have no effect.
|
||||
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
# Uncomment the following line to use hyphen-insensitive completion.
|
||||
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
||||
# HYPHEN_INSENSITIVE="true"
|
||||
|
||||
# Uncomment one of the following lines to change the auto-update behavior
|
||||
# zstyle ':omz:update' mode disabled # disable automatic updates
|
||||
# zstyle ':omz:update' mode auto # update automatically without asking
|
||||
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||
|
||||
# Uncomment the following line to change how often to auto-update (in days).
|
||||
# zstyle ':omz:update' frequency 13
|
||||
|
||||
zstyle ':omz:plugins:nvm' autoload yes
|
||||
|
||||
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
||||
zstyle ':completion:*:descriptions' format '[%d]'
|
||||
# zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1 --color=always $realpath' # remember to use single quote here!!!
|
||||
|
||||
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||
|
||||
# Uncomment the following line to disable colors in ls.
|
||||
# DISABLE_LS_COLORS="true"
|
||||
|
||||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
# You can also set it to another string to have that shown instead of the default red dots.
|
||||
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
||||
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
|
||||
# Uncomment the following line if you want to disable marking untracked files
|
||||
# under VCS as dirty. This makes repository status check for large repositories
|
||||
# much, much faster.
|
||||
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||
|
||||
# Uncomment the following line if you want to change the command execution time
|
||||
# stamp shown in the history command output.
|
||||
# You can set one of the optional three formats:
|
||||
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||
# or set a custom format using the strftime function format specifications,
|
||||
# see 'man strftime' for details.
|
||||
# HIST_STAMPS="mm/dd/yyyy"
|
||||
|
||||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||
|
||||
# Which plugins would you like to load?
|
||||
# Standard plugins can be found in $ZSH/plugins/
|
||||
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||
# Add wisely, as too many plugins slow down shell startup.
|
||||
plugins=(
|
||||
npm
|
||||
nvm
|
||||
sudo
|
||||
zoxide
|
||||
command-not-found
|
||||
fzf
|
||||
fzf-tab
|
||||
zsh-autosuggestions
|
||||
# zsh-autocomplete
|
||||
zsh-syntax-highlighting
|
||||
)
|
||||
|
||||
export ZDOTDIR=$ZSH/cache
|
||||
|
||||
source $HOME/.config/contour/contour.zsh
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
# User configuration
|
||||
|
||||
[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path zsh)"
|
||||
|
||||
# export MANPATH="/usr/local/man:$MANPATH"
|
||||
|
||||
# You may need to manually set your language environment
|
||||
# export LANG=en_US.UTF-8
|
||||
|
||||
# Preferred editor
|
||||
export EDITOR='nano'
|
||||
|
||||
# Compilation flags
|
||||
# export ARCHFLAGS="-arch x86_64"
|
||||
|
||||
prompt_context() {}
|
||||
# export PYTHONPATH=/usr/bin/python2
|
||||
export PYTHONPATH=/usr/bin/python3
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
|
||||
|
||||
[[ ! -f "${ZSH}/custom/scripts/n.zsh" ]] || source $ZSH/custom/scripts/n.zsh # nnn config
|
||||
# [[ ! -f "${HOME}/.fzf.zsh" ]] || source $HOME/.fzf.zsh # nnn config
|
||||
|
||||
# nvm
|
||||
# zstyle ':omz:plugins:nvm' autoload yes
|
||||
|
||||
# zoxide (already loaded with plugin)
|
||||
# eval "$(zoxide init zsh)"
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
alias dc="docker compose"
|
||||
alias "docker-compose"="docker compose"
|
||||
alias nnn="n"
|
||||
|
||||
alias explorer="xdg-open"
|
||||
|
||||
alias cd="z"
|
||||
alias ls="exa --icons"
|
||||
alias tree="exa --icons -T"
|
||||
#alias cat="batcat --paging=never"
|
||||
alias less="batcat"
|
||||
alias curl="curlie"
|
||||
# alias ssh="kssh"
|
||||
alias df="duf"
|
||||
alias grep="ugrep"
|
||||
alias ping="prettyping"
|
||||
alias man="npx tldr --"
|
||||
alias find="fzf"
|
||||
|
||||
# Set personal aliases with autocomplete
|
||||
# kssh() {
|
||||
# kitty +kitten ssh $@
|
||||
# }
|
||||
# compdef _ssh kssh=ssh
|
||||
|
||||
# ZSH options
|
||||
unsetopt completeinword
|
||||
|
||||
# ZSH History
|
||||
HISTFILE=$HOME/.zsh_history
|
||||
HISTSIZE=50000
|
||||
SAVEHIST=50000
|
||||
setopt INC_APPEND_HISTORY # Immediately append to history file:
|
||||
setopt EXTENDED_HISTORY # Record timestamp in history:
|
||||
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history:
|
||||
setopt HIST_IGNORE_DUPS # Dont record an entry that was just recorded again:
|
||||
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate:
|
||||
setopt HIST_FIND_NO_DUPS # Do not display a line previously found:
|
||||
setopt HIST_IGNORE_SPACE # Dont record an entry starting with a space:
|
||||
setopt HIST_SAVE_NO_DUPS # Dont write duplicate entries in the history file:
|
||||
setopt SHARE_HISTORY # Share history between all sessions:
|
||||
unsetopt HIST_VERIFY # Execute commands using history (e.g.: using !$) immediatel:
|
||||
|
||||
# Fig post block. Keep at the bottom of this file.
|
||||
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
|
||||
751
contour/contour.yml
Normal file
751
contour/contour.yml
Normal file
@@ -0,0 +1,751 @@
|
||||
# Default Contour Configuration File.
|
||||
|
||||
# Overrides the auto-detected platform plugin to be loaded.
|
||||
#
|
||||
# Possible (incomplete list of) values are:
|
||||
# - auto The platform will be auto-detected.
|
||||
# - xcb Uses XCB plugin (for X11 environment).
|
||||
# - cocoa Used to be run on Mac OS/X.
|
||||
# - direct2d Windows platform plugin using Direct2D.
|
||||
# - winrt Windows platform plugin using WinRT.
|
||||
#
|
||||
# Default: auto
|
||||
platform_plugin: auto
|
||||
|
||||
# VT Renderer configuration.
|
||||
# ADVANCED! Do not touch unless you know what you are doing.
|
||||
renderer:
|
||||
# Backend to use for rendering the terminal onto the screen
|
||||
#
|
||||
# Possible values are:
|
||||
# - default Uses the default rendering option as decided by the terminal.
|
||||
# - software Uses software-based rendering.
|
||||
# - OpenGL Use (possibly) hardware accelerated OpenGL
|
||||
backend: OpenGL
|
||||
|
||||
# Number of hashtable slots to map to the texture tiles.
|
||||
# Larger values may increase performance, but too large may also decrease.
|
||||
# This value is rounded up to a value equal to the power of two.
|
||||
#
|
||||
# Default: 4096
|
||||
tile_hashtable_slots: 4096
|
||||
|
||||
# Number of tiles that must fit at lest into the texture atlas.
|
||||
#
|
||||
# This does not include direct mapped tiles (US-ASCII glyphs,
|
||||
# cursor shapes and decorations), if tile_direct_mapping is set to true).
|
||||
#
|
||||
# Value must be at least as large as grid cells available in the terminal view.
|
||||
# This value is automatically adjusted if too small.
|
||||
#
|
||||
# Default: 4000
|
||||
tile_cache_count: 4000
|
||||
|
||||
# Enables/disables the use of direct-mapped texture atlas tiles for
|
||||
# the most often used ones (US-ASCII, cursor shapes, underline styles)
|
||||
# You most likely do not want to touch this.
|
||||
#
|
||||
# Default: true
|
||||
tile_direct_mapping: true
|
||||
|
||||
# Word delimiters when selecting word-wise.
|
||||
word_delimiters: " /\\()\"'-.,:;<>~!@#$%^&*+=[]{}~?|│"
|
||||
|
||||
# Default PTY read buffer size.
|
||||
#
|
||||
# This is an advance option. Use with care!
|
||||
# Default: 16384
|
||||
read_buffer_size: 16384
|
||||
|
||||
# Size in bytes per PTY Buffer Object.
|
||||
#
|
||||
# This is an advanced option of an internal storage. Only change with care!
|
||||
pty_buffer_size: 1048576
|
||||
|
||||
default_profile: main
|
||||
|
||||
# Flag to determine whether to spawn new process or not when creating new terminal
|
||||
# Default: false
|
||||
spawn_new_process: false
|
||||
|
||||
# Whether or not to reflow the lines on terminal resize events.
|
||||
# Default: true
|
||||
reflow_on_resize: true
|
||||
|
||||
# Section of experimental features.
|
||||
# All experimental features are disabled by default and must be explicitly enabled here.
|
||||
# NOTE: Contour currently has no experimental features behind this configuration wall.
|
||||
# experimental:
|
||||
# # Enables experimental support for feature X/Y/Z
|
||||
# feature_xyz: true
|
||||
|
||||
# This keyboard modifier can be used to bypass the terminal's mouse protocol,
|
||||
# which can be used to select screen content even if the an application
|
||||
# mouse protocol has been activated (Default: Shift).
|
||||
#
|
||||
# The same modifier values apply as with input modifiers (see below).
|
||||
bypass_mouse_protocol_modifier: Shift
|
||||
|
||||
# Modifier to be pressed in order to initiate block-selection
|
||||
# using the left mouse button.
|
||||
#
|
||||
# This is usually the Control modifier, but on OS/X that is not possible,
|
||||
# so Alt or Meta would be recommended instead.
|
||||
#
|
||||
# Supported modifiers:
|
||||
# - Alt
|
||||
# - Control
|
||||
# - Shift
|
||||
# - Meta
|
||||
#
|
||||
# Default: Control
|
||||
mouse_block_selection_modifier: Control
|
||||
|
||||
# Selects an action to perform when a text selection has been made.
|
||||
#
|
||||
# Possible values are:
|
||||
#
|
||||
# - None Does nothing
|
||||
# - CopyToClipboard Copies the selection to the primary clipboard.
|
||||
# - CopyToSelectionClipboard Copies the selection to the selection clipboard.
|
||||
# This is not supported on all platforms.
|
||||
#
|
||||
# Default: CopyToSelectionClipboard
|
||||
on_mouse_select: CopyToSelectionClipboard
|
||||
|
||||
# Determines whether the instance is reloading the configuration files whenever it is changing or not.
|
||||
#
|
||||
# Default: false
|
||||
live_config: false
|
||||
|
||||
# Inline image related default configuration and limits
|
||||
# -----------------------------------------------------
|
||||
images:
|
||||
# Enable or disable sixel scrolling (SM/RM ?80 default)
|
||||
sixel_scrolling: true
|
||||
# Configures the maximum number of color registers available when rendering Sixel graphics.
|
||||
sixel_register_count: 4096
|
||||
# maximum width in pixels of an image to be accepted (0 defaults to system screen pixel width)
|
||||
max_width: 0
|
||||
# maximum height in pixels of an image to be accepted (0 defaults to system screen pixel height)
|
||||
max_height: 0
|
||||
|
||||
# Terminal Profiles
|
||||
# -----------------
|
||||
#
|
||||
# Dominates how your terminal visually looks like. You will need at least one terminal profile.
|
||||
profiles:
|
||||
main:
|
||||
# You can override the process to be started inside the terminal.
|
||||
# If nothing is specified, the users' default login shell will be used.
|
||||
# But you may as well log in to a remote host.
|
||||
# shell: "ssh ubuntu-vm"
|
||||
# shell: "/bin/bash"
|
||||
# arguments: ["some", "optional", "arguments", "for", "the", "shell"]
|
||||
|
||||
# If this terminal is being executed from within Flatpak, enforces sandboxing
|
||||
# then this boolean indicates whether or not that sandbox should be escaped or not.
|
||||
#
|
||||
# Default value is true.
|
||||
#
|
||||
# It only makes sense to set this value to false if you really know what you are doing.
|
||||
escape_sandbox: true
|
||||
|
||||
# Advanced value that is useful when CopyPreviousMarkRange is used
|
||||
# with multiline-prompts. This offset value is being added to the
|
||||
# current cursor's line number minus 1 (i.e. the line above the current cursor).
|
||||
#
|
||||
# Default value is 0.
|
||||
copy_last_mark_range_offset: 0
|
||||
|
||||
# Sets initial working directory when spawning a new terminal.
|
||||
# A leading ~ is expanded to the user's home directory.
|
||||
# Default value is the user's home directory.
|
||||
initial_working_directory: "~"
|
||||
|
||||
# When this profile is *activated*, this flag decides
|
||||
# whether or not the title bar will be shown
|
||||
show_title_bar: true
|
||||
# When this profile is being *activated*, this flag decides
|
||||
# whether or not to put the terminal's screen into fullscreen mode.
|
||||
#
|
||||
# It is activated during startup as well as when switching from another profile to this one.
|
||||
fullscreen: false
|
||||
|
||||
# When this profile is *activated*, this flag decides
|
||||
# whether or not to put the window into maximized mode.
|
||||
maximized: false
|
||||
|
||||
# Defines the class part of the WM_CLASS property of the window.
|
||||
wm_class: "contour"
|
||||
|
||||
# Environment variables to be passed to the shell.
|
||||
# environment:
|
||||
# TERM: contour
|
||||
# COLORTERM: truecolor
|
||||
|
||||
# Determines the terminal type that is being advertised.
|
||||
# Possible values are:
|
||||
# - VT100
|
||||
# - VT220
|
||||
# - VT240
|
||||
# - VT330
|
||||
# - VT340
|
||||
# - VT320
|
||||
# - VT420
|
||||
# - VT510
|
||||
# - VT520
|
||||
# - VT525
|
||||
# Default: VT525
|
||||
terminal_id: VT525
|
||||
|
||||
# Determines the initial terminal size in characters.
|
||||
terminal_size:
|
||||
columns: 80
|
||||
lines: 25
|
||||
|
||||
history:
|
||||
# Number of lines to preserve (-1 for infinite).
|
||||
limit: 1000
|
||||
# Boolean indicating whether or not to scroll down to the bottom on screen updates.
|
||||
auto_scroll_on_update: true
|
||||
# Number of lines to scroll on ScrollUp & ScrollDown events.
|
||||
# Default: 3
|
||||
scroll_multiplier: 3
|
||||
|
||||
# visual scrollbar support
|
||||
scrollbar:
|
||||
# scroll bar position: Left, Right, Hidden (ignore-case)
|
||||
position: Hidden
|
||||
# whether or not to hide the scrollbar when in alt-screen.
|
||||
hide_in_alt_screen: true
|
||||
|
||||
# mouse setting
|
||||
mouse:
|
||||
# whether or not to hide mouse when typing
|
||||
#
|
||||
# Default value: true
|
||||
hide_while_typing: true
|
||||
|
||||
# Some VT sequences should need access permissions.
|
||||
#
|
||||
# These can be to:
|
||||
# - allow Allows the given functionality
|
||||
# - deny Denies the given functionality
|
||||
# - ask Asks the user interactively via popup dialog for permission of the given action.
|
||||
#
|
||||
# Default for all of these entries should be: "ask".
|
||||
permissions:
|
||||
# Allows changing the font via `OSC 50 ; Pt ST`.
|
||||
change_font: ask
|
||||
# Allows capturing the screen buffer via `CSI > Pm ; Ps ; Pc ST`.
|
||||
# The response can be read from stdin as sequence `OSC 314 ; <screen capture> ST`
|
||||
capture_buffer: ask
|
||||
# Allows displaying the "Host Writable Statusline" programmatically using `DECSSDT 2`.
|
||||
display_host_writable_statusline: ask
|
||||
|
||||
# If enabled, and you double-click on a word in the primary screen,
|
||||
# all other words matching this word will be highlighted as well.
|
||||
# So the double-clicked word will be selected as well as highlighted, along with
|
||||
# all other words being simply highlighted.
|
||||
#
|
||||
# This is currently implemented by initiating a search on the double-clicked word.
|
||||
# Therefore one can even use FocusNextSearchMatch and FocusPreviousSearchMatch to
|
||||
# jump to the next/previous same word, also outside of the current viewport.
|
||||
#
|
||||
# Default: true
|
||||
highlight_word_and_matches_on_double_click: true
|
||||
|
||||
# Font related configuration (font face, styles, size, rendering mode).
|
||||
font:
|
||||
# Initial font size in pixels.
|
||||
size: 11
|
||||
|
||||
# DPI scaling factor applied on top of the system configured on (default: 1.0).
|
||||
dpi_scale: 1.0
|
||||
|
||||
# Font Locator API
|
||||
# Selects an engine to use for locating font files on the system.
|
||||
# This is implicitly also responsible for font fallback
|
||||
# Possible values are:
|
||||
# - native : automatically choose the best available on the current platform
|
||||
# - fontconfig : uses fontconfig to select fonts
|
||||
# - CoreText : uses OS/X CoreText to select fonts.
|
||||
# - DirectWrite : selects DirectWrite engine (Windows only)
|
||||
locator: native
|
||||
|
||||
# Text shaping related settings
|
||||
text_shaping:
|
||||
# Selects which text shaping and font rendering engine to use.
|
||||
# Supported values are:
|
||||
# - native : automatically choose the best available on the current platform.
|
||||
# - DirectWrite : selects DirectWrite engine (Windows only)
|
||||
# - CoreText : selects CoreText engine (Mac OS/X only) (currently not implemented)
|
||||
# - OpenShaper : selects OpenShaper (harfbuzz/freetype/fontconfig, available on all
|
||||
# platforms)
|
||||
engine: native
|
||||
|
||||
# Uses builtin textures for pixel-perfect box drawing.
|
||||
# If disabled, the font's provided box drawing characters
|
||||
# will be used (Default: true).
|
||||
builtin_box_drawing: true
|
||||
|
||||
# Font render modes tell the font rasterizer engine what rendering technique to use.
|
||||
#
|
||||
# Modes available are:
|
||||
# - lcd Uses a subpixel rendering technique optimized for LCD displays.
|
||||
# - light Uses a subpixel rendering technique in gray-scale.
|
||||
# - gray Uses standard gray-scaled anti-aliasing.
|
||||
# - monochrome Uses pixel-perfect bitmap rendering.
|
||||
render_mode: gray
|
||||
|
||||
# Indicates whether or not to include *only* monospace fonts in the font and
|
||||
# font-fallback list (Default: true).
|
||||
strict_spacing: true
|
||||
|
||||
# Font family to use for displaying text.
|
||||
#
|
||||
# A font can be either described in detail as below or as a
|
||||
# simple string value (e.g. "monospace" with the appropriate
|
||||
# weight/slant applied automatically).
|
||||
regular:
|
||||
# Font family defines the font family name, such as:
|
||||
# Fira Code", "Courier New", or "monospace" (default).
|
||||
family: "FiraCode Nerd Font Mono"
|
||||
|
||||
# Font weight can be one of:
|
||||
# thin, extra_light, light, demilight, book, normal,
|
||||
# medium, demibold, bold, extra_bold, black, extra_black.
|
||||
weight: regular
|
||||
|
||||
# Font slant can be one of: normal, italic, oblique.
|
||||
slant: normal
|
||||
|
||||
# Set of optional font features to be enabled. This
|
||||
# is usually a 4-letter code, such as ss01 or ss02 etc.
|
||||
#
|
||||
# Please see your font's documentation to find out what it
|
||||
# supports.
|
||||
#
|
||||
# Default: []
|
||||
features: []
|
||||
|
||||
# If bold/italic/bold_italic are not explicitly specified, the regular font with
|
||||
# the respective weight and slant will be used.
|
||||
#bold: "Hack"
|
||||
#italic: "Hack"
|
||||
#bold_italic: "Hack"
|
||||
|
||||
# This is a special font to be used for displaying unicode symbols
|
||||
# that are to be rendered in emoji presentation.
|
||||
# Defaults to "emoji".
|
||||
emoji: "emoji"
|
||||
|
||||
# Indicates whether or not bold text should be rendered in bright colors,
|
||||
# for indexed colors.
|
||||
#
|
||||
# If disabled, normal color will be used instead.
|
||||
#
|
||||
# Default: false
|
||||
draw_bold_text_with_bright_colors: false
|
||||
|
||||
# Terminal cursor display configuration
|
||||
cursor:
|
||||
# Supported shapes are:
|
||||
#
|
||||
# - block a filled rectangle
|
||||
# - rectangle just the outline of a block
|
||||
# - underscore a line under the text
|
||||
# - bar: the well known i-Beam
|
||||
shape: "bar"
|
||||
# Determines whether or not the cursor will be blinking over time.
|
||||
blinking: false
|
||||
# Blinking interval (in milliseconds) to use when cursor is blinking.
|
||||
blinking_interval: 500
|
||||
|
||||
# vi-like normal-mode specific settings.
|
||||
# Note, currently only the cursor can be customized.
|
||||
normal_mode:
|
||||
cursor:
|
||||
shape: block
|
||||
blinking: false
|
||||
blinking_interval: 500
|
||||
|
||||
# vi-like visual/visual-line/visual-block mode specific settings.
|
||||
# Note, currently only the cursor can be customized.
|
||||
visual_mode:
|
||||
cursor:
|
||||
shape: block
|
||||
blinking: false
|
||||
blinking_interval: 500
|
||||
|
||||
# Time duration in milliseconds for which yank highlight is shown.
|
||||
vi_mode_highlight_timeout: 300
|
||||
|
||||
# Configures a `scrolloff` for cursor movements in normal and visual (block) modes.
|
||||
#
|
||||
# Default: 8
|
||||
vi_mode_scrolloff: 8
|
||||
|
||||
status_line:
|
||||
# Either none or indicator.
|
||||
# This only reflects the initial state of the status line, as it can
|
||||
# be changed at any time during runtime by the user or by an application.
|
||||
display: none
|
||||
|
||||
# Position to place the status line to, if it is to be shown.
|
||||
# This can be either value `top` or value `bottom`.
|
||||
# Default: bottom
|
||||
position: bottom
|
||||
|
||||
# Synchronize the window title with the Host Writable status_line if
|
||||
# and only if the host writable status line was denied to be shown.
|
||||
# Default: false
|
||||
sync_to_window_title: false
|
||||
|
||||
# Background configuration
|
||||
background:
|
||||
# Background opacity to use. A value of 1.0 means fully opaque whereas 0.0 means fully
|
||||
# transparent. Only values between 0.0 and 1.0 are allowed.
|
||||
opacity: 0.75
|
||||
# Some platforms can blur the transparent background (currently only Windows 10 is supported).
|
||||
blur: true
|
||||
|
||||
# Specifies a colorscheme to use (alternatively the colors can be inlined).
|
||||
colors: "default"
|
||||
|
||||
# Hyperlinks (via OSC-8) can be stylized and colorized on hover.
|
||||
hyperlink_decoration:
|
||||
normal: dotted
|
||||
hover: underline
|
||||
|
||||
# Color Profiles
|
||||
# --------------
|
||||
#
|
||||
# Here you can configure your color profiles, whereas a color can be expressed in standard web format,
|
||||
# with a leading # followed by red/green/blue values, 7 characters in total.
|
||||
# You may alternatively use 0x as prefix instead of #.
|
||||
# For example 0x102030 is equal to '#102030'.
|
||||
color_schemes:
|
||||
default:
|
||||
# Default colors
|
||||
default:
|
||||
# Default background color (this can be made transparent, see above).
|
||||
background: '#000000'
|
||||
# Default foreground text color.
|
||||
foreground: '#d0d0d0'
|
||||
|
||||
# Background image support.
|
||||
background_image:
|
||||
# Full path to the image to use as background.
|
||||
#
|
||||
# Default: empty string (disabled)
|
||||
# path: '/Users/trapni/Pictures/bg.png'
|
||||
|
||||
# Image opacity to be applied to make the image not look to intense
|
||||
# and not get too distracted by the background image.
|
||||
# Default: 0.5
|
||||
opacity: 0.5
|
||||
|
||||
# Optionally blurs background image to make it less distracting
|
||||
# and keep the focus on the actual terminal contents.
|
||||
#
|
||||
# Default: false
|
||||
blur: false
|
||||
|
||||
# Mandates the color of the cursor and potentially overridden text.
|
||||
#
|
||||
# The color can be specified in RGB as usual, plus
|
||||
# - CellForeground: Selects the cell's foreground color.
|
||||
# - CellBackground: Selects the cell's background color.
|
||||
cursor:
|
||||
# Specifies the color to be used for the actual cursor shape.
|
||||
#
|
||||
# Default: CellForeground
|
||||
default: CellForeground
|
||||
# Specifies the color to be used for the characters that would
|
||||
# be covered otherwise.
|
||||
#
|
||||
# Default: CellBackground
|
||||
text: CellBackground
|
||||
|
||||
# color to pick for hyperlinks decoration, when hovering
|
||||
hyperlink_decoration:
|
||||
normal: '#f0f000'
|
||||
hover: '#ff0000'
|
||||
|
||||
# Color to pick for vi_mode highlights.
|
||||
# The value format is equivalent to how selection colors and alpha contribution is defined.
|
||||
vi_mode_highlight:
|
||||
foreground: CellForeground
|
||||
foreground_alpha: 1.0
|
||||
background: '#ffa500'
|
||||
background_alpha: 0.5
|
||||
|
||||
# Color override for the current cursor's line when in vi_mode:
|
||||
# The value format is equivalent to how selection colors and alpha contribution is defined.
|
||||
# To disable cursorline in vi_mode, set foreground to CellForeground and background to CellBackground.
|
||||
vi_mode_cursorline:
|
||||
foreground: '#ffffff'
|
||||
foreground_alpha: 0.2
|
||||
background: '#808080'
|
||||
background_alpha: 0.4
|
||||
|
||||
# The text selection color can be customized here.
|
||||
# Leaving a value empty will default to the inverse of the content's color values.
|
||||
#
|
||||
# The color can be specified in RGB as usual, plus
|
||||
# - CellForeground: Selects the cell's foreground color.
|
||||
# - CellBackground: Selects the cell's background color.
|
||||
selection:
|
||||
# Specifies the color to be used for the selected text.
|
||||
#
|
||||
# Default: CellBackground
|
||||
foreground: CellForeground
|
||||
# Specifies the alpha value (between 0.0 and 1.0) the configured foreground color
|
||||
# will contribute to the original color.
|
||||
#
|
||||
# A value of 1.0 will paint over, whereas a value of 0.5 will give
|
||||
# a look of a half-transparently painted grid cell.
|
||||
foreground_alpha: 1.0
|
||||
# Specifies the color to be used for the selected background.
|
||||
#
|
||||
# Default: CellForeground
|
||||
background: '#4040f0'
|
||||
# Specifies the alpha value (between 0.0 and 1.0) the configured background color
|
||||
# will contribute to the original color.
|
||||
#
|
||||
# A value of 1.0 will paint over, whereas a value of 0.5 will give
|
||||
# a look of a half-transparently painted grid cell.
|
||||
background_alpha: 0.5
|
||||
|
||||
# Search match highlighting. Similar to selection highlighting.
|
||||
search_highlight:
|
||||
foreground: CellBackground
|
||||
background: CellForeground
|
||||
foreground_alpha: 1.0
|
||||
background_alpha: 1.0
|
||||
|
||||
# Search match highlighting (focused term). Similar to selection highlighting.
|
||||
search_highlight_focused:
|
||||
foreground: CellBackground
|
||||
background: CellForeground
|
||||
foreground_alpha: 1.0
|
||||
background_alpha: 1.0
|
||||
|
||||
# Coloring for the word that is highlighted due to double-clicking it.
|
||||
#
|
||||
# The format is similar to selection highlighting.
|
||||
word_highlight_current:
|
||||
foreground: CellForeground
|
||||
background: '#909090'
|
||||
foreground_alpha: 1.0
|
||||
background_alpha: 0.5
|
||||
|
||||
# Coloring for the word that is highlighted due to double-clicking
|
||||
# another word that matches this word.
|
||||
#
|
||||
# The format is similar to selection highlighting.
|
||||
word_highlight_other:
|
||||
foreground: CellForeground
|
||||
background: '#909090'
|
||||
foreground_alpha: 1.0
|
||||
background_alpha: 0.5
|
||||
|
||||
# Defines the colors to be used for the Indicator status line.
|
||||
# Values must be in RGB form.
|
||||
indicator_statusline:
|
||||
# Default: default background
|
||||
foreground: '#808080'
|
||||
# Default: default foreground
|
||||
background: '#000000'
|
||||
|
||||
# Alternate colors to be used for the indicator status line when
|
||||
# this terminal is currently not in focus.
|
||||
indicator_statusline_inactive:
|
||||
# Default: default background
|
||||
foreground: '#808080'
|
||||
# Default: default foreground
|
||||
background: '#000000'
|
||||
|
||||
# Colors for the IME (Input Method Editor) area.
|
||||
input_method_editor:
|
||||
# Default: default #FFFFFF
|
||||
foreground: '#FFFFFF'
|
||||
# Default: default #FF0000
|
||||
background: '#FF0000'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: "#000000"
|
||||
red: "#cd3131"
|
||||
green: "#0dbc79"
|
||||
yellow: "#e5e510"
|
||||
blue: "#2472c8"
|
||||
magenta: "#bc3fbc"
|
||||
cyan: "#11a8cd"
|
||||
white: "#e5e5e5"
|
||||
# Bright colors
|
||||
bright:
|
||||
black: "#666666"
|
||||
red: "#f14c4c"
|
||||
green: "#23d18b"
|
||||
yellow: "#f5f543"
|
||||
blue: "#3b8eea"
|
||||
magenta: "#d670d6"
|
||||
cyan: "#29b8db"
|
||||
white: "#e5e5e5"
|
||||
# Dim (faint) colors, if not set, they're automatically computed based on normal colors.
|
||||
# dim:
|
||||
# black: '#1d1f21'
|
||||
# red: '#cc342b'
|
||||
# green: '#198844'
|
||||
# yellow: '#fba922'
|
||||
# blue: '#3971ed'
|
||||
# magenta: '#a36ac7'
|
||||
# cyan: '#3971ed'
|
||||
# white: '#c5c8c6'
|
||||
|
||||
# Key Bindings
|
||||
# ------------
|
||||
#
|
||||
# In this section you can customize key bindings.
|
||||
# Each array element in `input_mapping` represents one key binding,
|
||||
# whereas `mods` represents an array of keyboard modifiers that must be pressed - as well as
|
||||
# the `key` or `mouse` - in order to activate the corresponding action,
|
||||
#
|
||||
# Additionally one can filter input mappings based on special terminal modes using the `modes` option:
|
||||
# - Alt : The terminal is currently in alternate screen buffer, otherwise it is in primary screen buffer.
|
||||
# - AppCursor : The application key cursor mode is enabled (otherwise it's normal cursor mode).
|
||||
# - AppKeypad : The application keypad mode is enabled (otherwise it's the numeric keypad mode).
|
||||
# - Select : The terminal has currently an active grid cell selection (such as selected text).
|
||||
# - Insert : The Insert input mode is active, that is the default and one way to test
|
||||
# that the input mode is not in normal mode or any of the visual select modes.
|
||||
# - Search : There is a search term currently being edited or already present.
|
||||
# - Trace : The terminal is currently in trace-mode, i.e., each VT sequence can be interactively
|
||||
# single-step executed using custom actions. See TraceEnter/TraceStep/TraceLeave actions.
|
||||
#
|
||||
# You can combine these modes by concatenating them via | and negate a single one
|
||||
# by prefixing with ~.
|
||||
#
|
||||
# The `modes` option defaults to not filter at all (the input mappings always
|
||||
# match based on modifier and key press / mouse event).
|
||||
#
|
||||
# `key` represents keys on your keyboard, and `mouse` represents buttons
|
||||
# as well as the scroll wheel.
|
||||
#
|
||||
# Modifiers:
|
||||
# - Alt
|
||||
# - Control
|
||||
# - Shift
|
||||
# - Meta (this is the Windows key on Windows OS, and the Command key on OS/X, and Meta on anything else)
|
||||
#
|
||||
# Keys can be expressed case-insensitively symbolic:
|
||||
# APOSTROPHE, ADD, BACKSLASH, COMMA, DECIMAL, DIVIDE, EQUAL, LEFT_BRACKET,
|
||||
# MINUS, MULTIPLY, PERIOD, RIGHT_BRACKET, SEMICOLON, SLASH, SUBTRACT, SPACE
|
||||
# Enter, Backspace, Tab, Escape, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
|
||||
# DownArrow, LeftArrow, RightArrow, UpArrow, Insert, Delete, Home, End, PageUp, PageDown,
|
||||
# Numpad_NumLock, Numpad_Divide, Numpad_Multiply, Numpad_Subtract, Numpad_CapsLock,
|
||||
# Numpad_Add, Numpad_Decimal, Numpad_Enter, Numpad_Equal,
|
||||
# Numpad_0, Numpad_1, Numpad_2, Numpad_3, Numpad_4,
|
||||
# Numpad_5, Numpad_6, Numpad_7, Numpad_8, Numpad_9
|
||||
# or in case of standard characters, just the character.
|
||||
#
|
||||
# Mouse buttons can be one of the following self-explanatory ones:
|
||||
# Left, Middle, Right, WheelUp, WheelDown
|
||||
#
|
||||
# Actions:
|
||||
# - CancelSelection Cancels currently active selection, if any.
|
||||
# - ChangeProfile Changes the profile to the given profile `name`.
|
||||
# - ClearHistoryAndReset Clears the history, performs a terminal hard reset and attempts to force a redraw of the currently running application.
|
||||
# - CopyPreviousMarkRange Copies the most recent range that is delimited by vertical line marks into clipboard.
|
||||
# - CopySelection Copies the current selection into the clipboard buffer.
|
||||
# - DecreaseFontSize Decreases the font size by 1 pixel.
|
||||
# - DecreaseOpacity Decreases the default-background opacity by 5%.
|
||||
# - FocusNextSearchMatch Focuses the next search match (if any).
|
||||
# - FocusPreviousSearchMatch Focuses the next previous match (if any).
|
||||
# - FollowHyperlink Follows the hyperlink that is exposed via OSC 8 under the current cursor position.
|
||||
# - IncreaseFontSize Increases the font size by 1 pixel.
|
||||
# - IncreaseOpacity Increases the default-background opacity by 5%.
|
||||
# - NewTerminal Spawns a new terminal at the current terminals current working directory.
|
||||
# - NoSearchHighlight Disables current search highlighting, if anything is still highlighted due to a prior search.
|
||||
# - OpenConfiguration Opens the configuration file.
|
||||
# - OpenFileManager Opens the current working directory in a system file manager.
|
||||
# - PasteClipboard Pastes clipboard to standard input. Pass boolean parameter 'strip' to indicate whether or not to strip repetitive whitespaces down to one and newlines to whitespaces.
|
||||
# - PasteSelection Pastes current selection to standard input.
|
||||
# - Quit Quits the application.
|
||||
# - ReloadConfig Forces a configuration reload.
|
||||
# - ResetConfig Overwrites current configuration with builtin default configuration and loads it. Attention, all your current configuration will be lost due to overwrite!
|
||||
# - ResetFontSize Resets font size to what is configured in the config file.
|
||||
# - ScreenshotVT Takes a screenshot in form of VT escape sequences.
|
||||
# - ScrollDown Scrolls down by the multiplier factor.
|
||||
# - ScrollMarkDown Scrolls one mark down (if none present, bottom of the screen)
|
||||
# - ScrollMarkUp Scrolls one mark up
|
||||
# - ScrollOneDown Scrolls down by exactly one line.
|
||||
# - ScrollOneUp Scrolls up by exactly one line.
|
||||
# - ScrollPageDown Scrolls a page down.
|
||||
# - ScrollPageUp Scrolls a page up.
|
||||
# - ScrollToBottom Scrolls to the bottom of the screen buffer.
|
||||
# - ScrollToTop Scrolls to the top of the screen buffer.
|
||||
# - ScrollUp Scrolls up by the multiplier factor.
|
||||
# - SearchReverse Initiates search mode (starting to search at current cursor position, moving upwards).
|
||||
# - SendChars Writes given characters in `chars` member to the applications input.
|
||||
# - ToggleAllKeyMaps Disables/enables responding to all keybinds (this keybind will be preserved when disabling all others).
|
||||
# - ToggleFullScreen Enables/disables full screen mode.
|
||||
# - ToggleInputProtection Enables/disables terminal input protection.
|
||||
# - ToggleStatusLine Shows/hides the VT320 compatible Indicator status line.
|
||||
# - ToggleTitleBar Shows/Hides titlebar
|
||||
# - TraceBreakAtEmptyQueue Executes any pending VT sequence from the VT sequence buffer in trace mode, then waits.
|
||||
# - TraceEnter Enables trace mode, suspending execution until explicitly requested to continue (See TraceLeave and TraceStep).
|
||||
# - TraceLeave Disables trace mode. Any pending VT sequence will be flushed out and normal execution will be resumed.
|
||||
# - TraceStep Executes a single VT sequence that is to be executed next.
|
||||
# - ViNormalMode Enters/Leaves Vi-like normal mode. The cursor can then be moved via h/j/k/l movements in normal mode and text can be selected via v, yanked via y, and clipboard pasted via p.
|
||||
# - WriteScreen Writes VT sequence in `chars` member to the screen (bypassing the application).
|
||||
|
||||
input_mapping:
|
||||
- { mods: [Control], mouse: Left, action: FollowHyperlink }
|
||||
- { mods: [], mouse: Middle, action: PasteSelection }
|
||||
- { mods: [], mouse: WheelDown, action: ScrollDown }
|
||||
- { mods: [], mouse: WheelUp, action: ScrollUp }
|
||||
- { mods: [Alt], key: Enter, action: ToggleFullscreen }
|
||||
- { mods: [Alt], mouse: WheelDown, action: DecreaseOpacity }
|
||||
- { mods: [Alt], mouse: WheelUp, action: IncreaseOpacity }
|
||||
- { mods: [Control, Alt], key: S, action: ScreenshotVT }
|
||||
- { mods: [Control, Shift], key: Plus, action: IncreaseFontSize }
|
||||
- { mods: [Control], key: '0', action: ResetFontSize }
|
||||
- { mods: [Control, Shift], key: Minus, action: DecreaseFontSize }
|
||||
- { mods: [Control, Shift], key: '_', action: DecreaseFontSize }
|
||||
- { mods: [Control, Shift], key: N, action: NewTerminal }
|
||||
- { mods: [Control, Shift], key: V, action: PasteClipboard, strip: false }
|
||||
- { mods: [Control, Alt], key: V, action: PasteClipboard, strip: true }
|
||||
- { mods: [Control], key: C, action: CopySelection, mode: 'Select|Insert' }
|
||||
- { mods: [Control], key: C, action: CancelSelection, mode: 'Select|Insert' }
|
||||
- { mods: [Control], key: V, action: PasteClipboard, strip: false, mode: 'Select|Insert' }
|
||||
- { mods: [Control], key: V, action: CancelSelection, mode: 'Select|Insert' }
|
||||
- { mods: [], key: Escape, action: CancelSelection, mode: 'Select|Insert' }
|
||||
- { mods: [Control, Shift], key: Space, action: ViNormalMode, mode: 'Insert' }
|
||||
- { mods: [Control, Shift], key: Comma, action: OpenConfiguration }
|
||||
- { mods: [Control, Shift], key: Q, action: Quit }
|
||||
- { mods: [Control], mouse: WheelDown, action: DecreaseFontSize }
|
||||
- { mods: [Control], mouse: WheelUp, action: IncreaseFontSize }
|
||||
- { mods: [Shift], key: DownArrow, action: ScrollOneDown }
|
||||
- { mods: [Shift], key: End, action: ScrollToBottom }
|
||||
- { mods: [Shift], key: Home, action: ScrollToTop }
|
||||
- { mods: [Shift], key: PageDown, action: ScrollPageDown }
|
||||
- { mods: [Shift], key: PageUp, action: ScrollPageUp }
|
||||
- { mods: [Shift], key: UpArrow, action: ScrollOneUp }
|
||||
- { mods: [Control, Alt], key: K, action: ScrollMarkUp, mode: "~Alt"}
|
||||
- { mods: [Control, Alt], key: J, action: ScrollMarkDown, mode: "~Alt"}
|
||||
- { mods: [Shift], mouse: WheelDown, action: ScrollPageDown }
|
||||
- { mods: [Shift], mouse: WheelUp, action: ScrollPageUp }
|
||||
- { mods: [Control, Alt], key: O, action: OpenFileManager }
|
||||
- { mods: [Control, Alt], key: '.', action: ToggleStatusLine }
|
||||
- { mods: [Control, Shift], key: 'F', action: SearchReverse }
|
||||
- { mods: [Control, Shift], key: 'H', action: NoSearchHighlight }
|
||||
- { mods: [], key: 'F3', action: FocusNextSearchMatch }
|
||||
- { mods: [Shift], key: 'F3', action: FocusPreviousSearchMatch }
|
||||
|
||||
# - { mods: [Control, Meta], key: 'E', action: TraceEnter, mode: "~Trace" }
|
||||
# - { mods: [Control, Meta], key: 'E', action: TraceLeave, mode: "Trace" }
|
||||
# - { mods: [Control, Meta], key: 'N', action: TraceStep, mode: "Trace" }
|
||||
# - { mods: [Control, Meta], key: 'F', action: TraceBreakAtEmptyQueue, mode: "Trace" }
|
||||
51
contour/contour.zsh
Normal file
51
contour/contour.zsh
Normal file
@@ -0,0 +1,51 @@
|
||||
# vim:et:ts=4:sw=4
|
||||
#
|
||||
#/**
|
||||
# * This file is part of the "contour" project
|
||||
# * Copyright (c) 2019-2021 Christian Parpart <christian@parpart.family>
|
||||
# *
|
||||
# * Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# * you may not use this file except in compliance with the License.
|
||||
# *
|
||||
# * Unless required by applicable law or agreed to in writing, software
|
||||
# * distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# * See the License for the specific language governing permissions and
|
||||
# * limitations under the License.
|
||||
# */
|
||||
|
||||
# Example hook to change profile based on directory.
|
||||
# update_profile()
|
||||
# {
|
||||
# case "$PWD" in
|
||||
# "$HOME"/work*) contour set profile to work ;;
|
||||
# "$HOME"/projects*) contour set profile to main ;;
|
||||
# *) contour set profile to mobile ;;
|
||||
# esac
|
||||
# }
|
||||
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
precmd_hook_contour()
|
||||
{
|
||||
# Disable text reflow for the command prompt (and below).
|
||||
print -n '\e[?2028l' >$TTY
|
||||
|
||||
# Marks the current line (command prompt) so that you can jump to it via key bindings.
|
||||
echo -n '\e[>M' >$TTY
|
||||
|
||||
# Informs contour terminal about the current working directory, so that e.g. OpenFileManager works.
|
||||
echo -ne '\e]7;'$(pwd)'\e\\' >$TTY
|
||||
|
||||
# Example hook to update configuration profile based on base directory.
|
||||
# update_profile >$TTY
|
||||
}
|
||||
|
||||
preexec_hook_contour()
|
||||
{
|
||||
# Enables text reflow for the main page area again, so that a window resize will reflow again.
|
||||
print -n "\e[?2028h" >$TTY
|
||||
}
|
||||
|
||||
add-zsh-hook precmd precmd_hook_contour
|
||||
add-zsh-hook preexec preexec_hook_contour
|
||||
33
oh-my-zsh/custom/scripts/n.zsh
Normal file
33
oh-my-zsh/custom/scripts/n.zsh
Normal file
@@ -0,0 +1,33 @@
|
||||
n ()
|
||||
{
|
||||
# Block nesting of nnn in subshells
|
||||
if [[ "${NNNLVL:-0}" -ge 1 ]]; then
|
||||
echo "nnn is already running"
|
||||
return
|
||||
fi
|
||||
|
||||
export KITTY_LISTEN_ON="$TMPDIR/kitty"
|
||||
export NNN_FIFO=/tmp/nnn.fifo
|
||||
export NNN_PLUG='p:preview-tui'
|
||||
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
|
||||
# see. To cd on quit only on ^G, remove the "export" and make sure not to
|
||||
# use a custom path, i.e. set NNN_TMPFILE *exactly* as follows:
|
||||
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
||||
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
|
||||
|
||||
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||||
# stty start undef
|
||||
# stty stop undef
|
||||
# stty lwrap undef
|
||||
# stty lnext undef
|
||||
|
||||
# The backslash allows one to alias n to nnn if desired without making an
|
||||
# infinitely recursive alias
|
||||
\nnn "$@"
|
||||
|
||||
if [ -f "$NNN_TMPFILE" ]; then
|
||||
. "$NNN_TMPFILE"
|
||||
rm -f "$NNN_TMPFILE" > /dev/null
|
||||
fi
|
||||
}
|
||||
53
setup.sh
53
setup.sh
@@ -1,26 +1,35 @@
|
||||
BASEDIR=$(pwd)
|
||||
|
||||
# zsh
|
||||
ln -s "${BASEDIR}/.fzf.zsh" "${HOME}"
|
||||
ln -s "${BASEDIR}/.p10k.zsh" "${HOME}"
|
||||
ln -s "${BASEDIR}/oh-my-zsh/custom/scripts" "${HOME}/.oh-my-zsh/custom/scripts"
|
||||
ln -s "${BASEDIR}/contour" "${HOME}/.config/contour"
|
||||
ln -s "${BASEDIR}/.zshrc" "${HOME}"
|
||||
ln -s "${BASEDIR}/.zshrc" "${HOME}/.oh-my-zsh/cache"
|
||||
echo "💻 zsh configured\n"
|
||||
|
||||
# dunst
|
||||
ln -s "${BASEDIR}/dunst/dunstrc" "$HOME/.config/dunst"
|
||||
ln -s "${BASEDIR}/dunst/start.sh" "$HOME/.config/dunst"
|
||||
chmod +x "$HOME/.config/dunst/start.sh"
|
||||
ln -s "${BASEDIR}/dunst/dunstrc" "${HOME}/.config/dunst"
|
||||
ln -s "${BASEDIR}/dunst/start.sh" "${HOME}/.config/dunst"
|
||||
chmod +x "${HOME}/.config/dunst/start.sh"
|
||||
echo "🔔 dunst configured\n"
|
||||
|
||||
# lazydocker
|
||||
ln -s "${BASEDIR}/lazydocker/config.yml" "$HOME/.config/lazydocker/config.yml"
|
||||
ln -s "${BASEDIR}/lazydocker/config.yml" "${HOME}/.config/lazydocker/config.yml"
|
||||
echo "📈 lazydocker configured\n"
|
||||
|
||||
# polybar
|
||||
git clone https://www.github.com/bacara/powerline-for-polybar "$HOME/.config/polybar/powerline-for-polybar"
|
||||
ln -s "${BASEDIR}/polybar/scripts" "$HOME/.config/polybar"
|
||||
ln -s "${BASEDIR}/polybar/config" "$HOME/.config/polybar"
|
||||
ln -s "${BASEDIR}/polybar/launch.sh" "$HOME/.config/polybar"
|
||||
chmod +x "$HOME/.config/polybar/launch.sh"
|
||||
git clone https://www.github.com/bacara/powerline-for-polybar "${HOME}/.config/polybar/powerline-for-polybar"
|
||||
ln -s "${BASEDIR}/polybar/scripts" "${HOME}/.config/polybar"
|
||||
ln -s "${BASEDIR}/polybar/config" "${HOME}/.config/polybar"
|
||||
ln -s "${BASEDIR}/polybar/launch.sh" "${HOME}/.config/polybar"
|
||||
chmod +x "${HOME}/.config/polybar/launch.sh"
|
||||
echo "📈 polybar configured\n"
|
||||
|
||||
# remove custom from rofi
|
||||
rm "$HOME/.config/rofi/powermenu/type-2/powermenu.sh"
|
||||
rm "$HOME/.config/rofi/launchers/type-1/launcher.sh"
|
||||
rm "${HOME}/.config/rofi/powermenu/type-2/powermenu.sh"
|
||||
rm "${HOME}/.config/rofi/launchers/type-1/launcher.sh"
|
||||
|
||||
# rofi from adi1090x
|
||||
mkdir -p tmp
|
||||
@@ -28,21 +37,23 @@ git clone --depth=1 https://github.com/adi1090x/rofi.git tmp/rofi
|
||||
cd "${BASEDIR}/tmp/rofi"
|
||||
chmod +x setup.sh
|
||||
./setup.sh
|
||||
cd "${BASEDIR}"
|
||||
|
||||
# patch rofi of adi1090x
|
||||
rm "$HOME/.config/rofi/powermenu/type-2/powermenu.sh"
|
||||
ln -s "${BASEDIR}/rofi/powermenu/type-2/powermenu.sh" "$HOME/.config/rofi/powermenu/type-2"
|
||||
rm "$HOME/.config/rofi/launchers/type-1/launcher.sh"
|
||||
ln -s "${BASEDIR}/rofi/launchers/type-1/launcher.sh" "$HOME/.config/rofi/launchers/type-1"
|
||||
rm "${HOME}/.config/rofi/powermenu/type-2/powermenu.sh"
|
||||
ln -s "${BASEDIR}/rofi/powermenu/type-2/powermenu.sh" "${HOME}/.config/rofi/powermenu/type-2"
|
||||
rm "${HOME}/.config/rofi/launchers/type-1/launcher.sh"
|
||||
ln -s "${BASEDIR}/rofi/launchers/type-1/launcher.sh" "${HOME}/.config/rofi/launchers/type-1"
|
||||
|
||||
# rofi
|
||||
ln -s "${BASEDIR}/rofi.custom" "$HOME/.config"
|
||||
ln -s "${BASEDIR}/rofi.custom" "${HOME}/.config"
|
||||
rm -rf "${BASEDIR}/tmp/rofi"
|
||||
echo "📄 rofi configured\n"
|
||||
|
||||
# regolith
|
||||
mkdir -p "$HOME/.config/regolith3/i3/conf.d"
|
||||
ln -s "${BASEDIR}/regolith3/i3/conf.d/99_startup-config" "$HOME/.config/regolith3/i3/conf.d"
|
||||
mkdir -p "$HOME/.config/regolith3/picom"
|
||||
ln -s "${BASEDIR}/regolith3/picom/config" "$HOME/.config/regolith3/picom"
|
||||
ln -s "${BASEDIR}/regolith3/Xresources" "$HOME/.config/regolith3"
|
||||
mkdir -p "${HOME}/.config/regolith3/i3/conf.d"
|
||||
ln -s "${BASEDIR}/regolith3/i3/conf.d/99_startup-config" "${HOME}/.config/regolith3/i3/conf.d"
|
||||
mkdir -p "${HOME}/.config/regolith3/picom"
|
||||
ln -s "${BASEDIR}/regolith3/picom/config" "${HOME}/.config/regolith3/picom"
|
||||
ln -s "${BASEDIR}/regolith3/Xresources" "${HOME}/.config/regolith3"
|
||||
echo "💻 regolith configured"
|
||||
|
||||
Reference in New Issue
Block a user