Move to Chezmoi
This commit is contained in:
parent
f216c4ff2c
commit
e3498e73b5
59 changed files with 499 additions and 2240 deletions
chezmoi
bin
dot_icons/default
dot_local/bin
dot_xinitrcdot_zprofiledot_zshenvdot_zshrcdot_zshrc.d
executable_aliases.zshexecutable_asdf.zshexecutable_autojump.zshexecutable_aws.zshexecutable_camera.zshexecutable_chezmoi.zshexecutable_clipboard.zshexecutable_colors.zshexecutable_fup.shexecutable_fzf.zshexecutable_git.zshexecutable_golang-helpers.zshexecutable_ip-int-convert.shexecutable_notes.shexecutable_pdf_join.zshexecutable_ssh.zshexecutable_sshtmux.shexecutable_tag.zshexecutable_upgrade_system.sh
private_dot_config
17
chezmoi/bin/executable_i3lock
Normal file
17
chezmoi/bin/executable_i3lock
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
revert() {
|
||||
# disable DPMS
|
||||
xset dpms 0 0 0
|
||||
}
|
||||
|
||||
# revert DPMS on script exit
|
||||
trap revert EXIT
|
||||
|
||||
# turn off screen after 5 seconds
|
||||
xset +dpms dpms 5 5 5
|
||||
|
||||
i3lock --nofork -c 000000
|
||||
|
||||
revert
|
2
chezmoi/dot_icons/default/index.theme
Normal file
2
chezmoi/dot_icons/default/index.theme
Normal file
|
@ -0,0 +1,2 @@
|
|||
[icon theme]
|
||||
Inherits=Adwaita
|
154
chezmoi/dot_local/bin/executable_grimshot
Normal file
154
chezmoi/dot_local/bin/executable_grimshot
Normal file
|
@ -0,0 +1,154 @@
|
|||
#!/bin/sh
|
||||
|
||||
## Grimshot: a helper for screenshots within sway
|
||||
## Requirements:
|
||||
## - `grim`: screenshot utility for wayland
|
||||
## - `slurp`: to select an area
|
||||
## - `swaymsg`: to read properties of current window
|
||||
## - `wl-copy`: clipboard utility
|
||||
## - `jq`: json utility to parse swaymsg output
|
||||
## - `notify-send`: to show notifications
|
||||
## Those are needed to be installed, if unsure, run `grimshot check`
|
||||
##
|
||||
## See `man 1 grimshot` or `grimshot usage` for further details.
|
||||
|
||||
getTargetDirectory() {
|
||||
test -f ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs && \
|
||||
. ${XDG_CONFIG_HOME:-~/.config}/user-dirs.dirs
|
||||
|
||||
echo ${XDG_SCREENSHOTS_DIR:-${XDG_PICTURES_DIR:-$HOME}}
|
||||
}
|
||||
|
||||
if [ "$1" = "--notify" ]; then
|
||||
NOTIFY=yes
|
||||
shift 1
|
||||
else
|
||||
NOTIFY=no
|
||||
fi
|
||||
|
||||
ACTION=${1:-usage}
|
||||
SUBJECT=${2:-screen}
|
||||
FILE=${3:-$(getTargetDirectory)/$(date +"%Y-%m-%d-%H:%M:%S").png}
|
||||
|
||||
if [ "$ACTION" != "save" ] && [ "$ACTION" != "copy" ] && [ "$ACTION" != "check" ]; then
|
||||
echo "Usage:"
|
||||
echo " grimshot [--notify] (copy|save) [active|screen|output|area|window] [FILE|-]"
|
||||
echo " grimshot check"
|
||||
echo " grimshot usage"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " copy: Copy the screenshot data into the clipboard."
|
||||
echo " save: Save the screenshot to a regular file or '-' to pipe to STDOUT."
|
||||
echo " check: Verify if required tools are installed and exit."
|
||||
echo " usage: Show this message and exit."
|
||||
echo ""
|
||||
echo "Targets:"
|
||||
echo " active: Currently active window."
|
||||
echo " screen: All visible outputs."
|
||||
echo " output: Currently active output."
|
||||
echo " area: Manually select a region."
|
||||
echo " window: Manually select a window."
|
||||
exit
|
||||
fi
|
||||
|
||||
notify() {
|
||||
notify-send -t 3000 -a grimshot "$@"
|
||||
}
|
||||
notifyOk() {
|
||||
[ "$NOTIFY" = "no" ] && return
|
||||
|
||||
TITLE=${2:-"Screenshot"}
|
||||
MESSAGE=${1:-"OK"}
|
||||
notify "$TITLE" "$MESSAGE"
|
||||
}
|
||||
notifyError() {
|
||||
if [ $NOTIFY = "yes" ]; then
|
||||
TITLE=${2:-"Screenshot"}
|
||||
MESSAGE=${1:-"Error taking screenshot with grim"}
|
||||
notify -u critical "$TITLE" "$MESSAGE"
|
||||
else
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
|
||||
die() {
|
||||
MSG=${1:-Bye}
|
||||
notifyError "Error: $MSG"
|
||||
exit 2
|
||||
}
|
||||
|
||||
check() {
|
||||
COMMAND=$1
|
||||
if command -v "$COMMAND" > /dev/null 2>&1; then
|
||||
RESULT="OK"
|
||||
else
|
||||
RESULT="NOT FOUND"
|
||||
fi
|
||||
echo " $COMMAND: $RESULT"
|
||||
}
|
||||
|
||||
takeScreenshot() {
|
||||
FILE=$1
|
||||
GEOM=$2
|
||||
OUTPUT=$3
|
||||
if [ ! -z "$OUTPUT" ]; then
|
||||
grim -o "$OUTPUT" "$FILE" || die "Unable to invoke grim"
|
||||
elif [ -z "$GEOM" ]; then
|
||||
grim "$FILE" || die "Unable to invoke grim"
|
||||
else
|
||||
grim -g "$GEOM" "$FILE" || die "Unable to invoke grim"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ "$ACTION" = "check" ] ; then
|
||||
echo "Checking if required tools are installed. If something is missing, install it to your system and make it available in PATH..."
|
||||
check grim
|
||||
check slurp
|
||||
check swaymsg
|
||||
check wl-copy
|
||||
check jq
|
||||
check notify-send
|
||||
exit
|
||||
elif [ "$SUBJECT" = "area" ] ; then
|
||||
GEOM=$(slurp -d)
|
||||
# Check if user exited slurp without selecting the area
|
||||
if [ -z "$GEOM" ]; then
|
||||
exit 1
|
||||
fi
|
||||
WHAT="Area"
|
||||
elif [ "$SUBJECT" = "active" ] ; then
|
||||
FOCUSED=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?, .floating_nodes[]?) | select(.focused)')
|
||||
GEOM=$(echo "$FOCUSED" | jq -r '.rect | "\(.x),\(.y) \(.width)x\(.height)"')
|
||||
APP_ID=$(echo "$FOCUSED" | jq -r '.app_id')
|
||||
WHAT="$APP_ID window"
|
||||
elif [ "$SUBJECT" = "screen" ] ; then
|
||||
GEOM=""
|
||||
WHAT="Screen"
|
||||
elif [ "$SUBJECT" = "output" ] ; then
|
||||
GEOM=""
|
||||
OUTPUT=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused)' | jq -r '.name')
|
||||
WHAT="$OUTPUT"
|
||||
elif [ "$SUBJECT" = "window" ] ; then
|
||||
GEOM=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)
|
||||
# Check if user exited slurp without selecting the area
|
||||
if [ -z "$GEOM" ]; then
|
||||
exit 1
|
||||
fi
|
||||
WHAT="Window"
|
||||
else
|
||||
die "Unknown subject to take a screen shot from" "$SUBJECT"
|
||||
fi
|
||||
|
||||
if [ "$ACTION" = "copy" ] ; then
|
||||
takeScreenshot - "$GEOM" "$OUTPUT" | wl-copy --type image/png || die "Clipboard error"
|
||||
notifyOk "$WHAT copied to buffer"
|
||||
else
|
||||
if takeScreenshot "$FILE" "$GEOM" "$OUTPUT"; then
|
||||
TITLE="Screenshot of $SUBJECT"
|
||||
MESSAGE=$(basename "$FILE")
|
||||
notifyOk "$MESSAGE" "$TITLE"
|
||||
echo $FILE
|
||||
else
|
||||
notifyError "Error taking screenshot with grim"
|
||||
fi
|
||||
fi
|
15
chezmoi/dot_xinitrc
Normal file
15
chezmoi/dot_xinitrc
Normal file
|
@ -0,0 +1,15 @@
|
|||
systemctl --user import-environment DISPLAY XAUTHORITY
|
||||
|
||||
if which dbus-update-activation-environment >/dev/null 2>&1; then
|
||||
dbus-update-activation-environment DISPLAY XAUTHORITY
|
||||
fi
|
||||
|
||||
xinput --set-prop 'DELL0A20:00 06CB:CE65 Touchpad' 'libinput Tapping Enabled' 1
|
||||
xinput --set-prop 'DELL0A20:00 06CB:CE65 Touchpad' 'libinput Tapping Drag Enabled' 1
|
||||
xinput --set-prop 'DELL0A20:00 06CB:CE65 Touchpad' 'libinput Tapping Drag Lock Enabled' 0
|
||||
xinput --set-prop 'DELL0A20:00 06CB:CE65 Touchpad' 'libinput Natural Scrolling Enabled' 1
|
||||
xinput --set-prop 'DELL0A20:00 06CB:CE65 Touchpad' 'libinput Disable While Typing Enabled' 1
|
||||
xinput --set-prop 'DELL0A20:00 06CB:CE65 Touchpad' 'libinput Horizontal Scroll Enabled' 1
|
||||
|
||||
xrdb ~/.Xresources
|
||||
exec dbus-launch i3
|
5
chezmoi/dot_zprofile
Normal file
5
chezmoi/dot_zprofile
Normal file
|
@ -0,0 +1,5 @@
|
|||
source "${HOME}/.zshrc.d/cbi.sh" 2>/dev/null
|
||||
if [ "$TTY" = '/dev/tty1' ]; then
|
||||
startx
|
||||
exit
|
||||
fi
|
49
chezmoi/dot_zshenv
Normal file
49
chezmoi/dot_zshenv
Normal file
|
@ -0,0 +1,49 @@
|
|||
export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:${PATH}"
|
||||
export LANG='en_US.UTF-8'
|
||||
|
||||
for editor in nvim vim nano; do
|
||||
if command -v "$editor" &> /dev/null; then
|
||||
export EDITOR="$editor"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# if we're in vs code's terminal, set the editor to vs code
|
||||
if [ "${TERM_PROGRAM:-noop}" = "vscode" ]; then
|
||||
export EDITOR='code'
|
||||
export TAG_CMD_FMT_STRING="code --goto {{.Filename}}:{{.LineNumber}}:{{.ColumnNumber}}"
|
||||
fi
|
||||
|
||||
export VISUAL="${EDITOR}"
|
||||
|
||||
if [ -d "${HOME}/bin" ]; then
|
||||
export PATH="${HOME}/bin:${PATH}"
|
||||
fi
|
||||
|
||||
if [ -d "${HOME}/.local/bin" ]; then
|
||||
export PATH="${HOME}/.local/bin:$PATH"
|
||||
fi
|
||||
|
||||
. "$HOME/.cargo/env" 2>/dev/null
|
||||
|
||||
if command -v go &> /dev/null; then
|
||||
GOPATH="$(go env GOPATH)"
|
||||
if [ -d "${GOPATH}" ]; then
|
||||
export GOPATH
|
||||
export PATH="${GOPATH}/bin:${PATH}"
|
||||
else
|
||||
unset GOPATH
|
||||
fi
|
||||
fi
|
||||
|
||||
. /etc/profile.d/flatpak.sh 2>/dev/null
|
||||
|
||||
# if rootless docker has a unix domain socket, use it!
|
||||
if [ -e "${XDG_RUNTIME_DIR}/docker.sock" ]; then
|
||||
export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/docker.sock"
|
||||
fi
|
||||
|
||||
if command -v fzf &> /dev/null && command -v ag &> /dev/null; then
|
||||
export FZF_DEFAULT_COMMAND='ag --skip-vcs-ignores --nocolor -g "" -l'
|
||||
export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
|
||||
fi
|
122
chezmoi/dot_zshrc
Normal file
122
chezmoi/dot_zshrc
Normal file
|
@ -0,0 +1,122 @@
|
|||
#!/usr/bin/zsh
|
||||
|
||||
zmodload zsh/datetime
|
||||
|
||||
autoload -Uz \
|
||||
colors \
|
||||
compinit \
|
||||
vcs_info
|
||||
|
||||
|
||||
compinit
|
||||
colors
|
||||
|
||||
autoload -Uz bashcompinit
|
||||
bashcompinit
|
||||
|
||||
setopt \
|
||||
ALWAYS_TO_END \
|
||||
INC_APPEND_HISTORY \
|
||||
AUTO_CD \
|
||||
AUTO_PUSHD \
|
||||
BEEP \
|
||||
COMPLETE_IN_WORD \
|
||||
EXTENDED_GLOB \
|
||||
EXTENDED_HISTORY \
|
||||
HIST_IGNORE_DUPS \
|
||||
HIST_IGNORE_SPACE \
|
||||
HIST_REDUCE_BLANKS \
|
||||
HIST_VERIFY \
|
||||
INTERACTIVE_COMMENTS \
|
||||
LONG_LIST_JOBS \
|
||||
NOMATCH \
|
||||
NOTIFY \
|
||||
PROMPT_SUBST \
|
||||
PUSHD_IGNORE_DUPS \
|
||||
PUSHD_MINUS \
|
||||
SHARE_HISTORY
|
||||
|
||||
NEWLINE=$'\n'
|
||||
PS_SEPARATOR=" > "
|
||||
|
||||
function precmd() {
|
||||
vcs_info
|
||||
vcs_info_hookadd set-message vcs_test_hook
|
||||
}
|
||||
|
||||
VCS_ROOT_DIR=''
|
||||
function +vi-git-vcs-set-message-hook() {
|
||||
VCS_ROOT_DIR="${hook_com[base]}"
|
||||
|
||||
if [ -z "$VCS_ROOT_DIR" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "${VCS_ROOT_DIR:0:${#HOME}}" = "${HOME}" ]]; then
|
||||
VCS_ROOT_DIR="~${VCS_ROOT_DIR:${#HOME}}"
|
||||
fi
|
||||
|
||||
hook_com[misc]="$(2> /dev/null git status --short | awk '{counts[$1]++} END {
|
||||
printed = "";
|
||||
for (count_type in counts) {
|
||||
printf "%s%%B%s%%b%d", printed, substr(count_type, 1, 1), counts[count_type];
|
||||
printed = " ";
|
||||
}
|
||||
}')"
|
||||
}
|
||||
|
||||
zstyle ':vcs_info:git*' formats "%F{green}%b%f %m${PS_SEPARATOR}"
|
||||
zstyle ':vcs_info:git*' actionformats "%F{green}%b%f %K{red}%F{white}(%a)%f%k %B%m%%b${PS_SEPARATOR}"
|
||||
zstyle ':vcs_info:git*+set-message:*' hooks git-vcs-set-message-hook
|
||||
|
||||
function pretty_pwd() {
|
||||
local CURRENT_DIRECTORY="$PWD"
|
||||
if [[ "${CURRENT_DIRECTORY:0:${#HOME}}" = "${HOME}" ]]; then
|
||||
CURRENT_DIRECTORY="~${CURRENT_DIRECTORY:${#HOME}}"
|
||||
fi
|
||||
|
||||
if [ -n "$VCS_ROOT_DIR" ] && [[ "${CURRENT_DIRECTORY:0:${#VCS_ROOT_DIR}}" = "${VCS_ROOT_DIR}" ]]; then
|
||||
local VCS_ROOT_DIR_BASENAME="${VCS_ROOT_DIR##*/}"
|
||||
local VCS_ROOT_DIR_BASENAME_COLORIZED='%B${VCS_ROOT_DIR_BASENAME}%b'
|
||||
local COLORIZED_VCS_ROOT_DIR="${VCS_ROOT_DIR/%${VCS_ROOT_DIR_BASENAME}/${VCS_ROOT_DIR_BASENAME_COLORIZED}}"
|
||||
CURRENT_DIRECTORY="${COLORIZED_VCS_ROOT_DIR}${CURRENT_DIRECTORY:${#VCS_ROOT_DIR}}"
|
||||
fi
|
||||
|
||||
print -P "%F{blue}${CURRENT_DIRECTORY}%f"
|
||||
}
|
||||
|
||||
function ps1_ssh() {
|
||||
if [ -z "$SSH_CONNECTION" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "SSH from ${SSH_CONNECTION%% *}${PS_SEPARATOR}"
|
||||
}
|
||||
|
||||
export PS1="%(?..%K{red}%F{white}%?%f%k${PS_SEPARATOR})\$(pretty_pwd)${PS_SEPARATOR}\${vcs_info_msg_0_}%F{${color[grey]:-white}}%*%f${NEWLINE}%(!.%F{red}#.%F{yellow}\$)%f "
|
||||
export RPS1="%F{${color[grey]:-white}}\$(ps1_ssh)%n@%m%f"
|
||||
|
||||
HISTFILE="${HOME}/.histfile"
|
||||
HISTSIZE=10485760
|
||||
SAVEHIST=10485760
|
||||
bindkey '^R' history-incremental-search-backward
|
||||
bindkey -e
|
||||
zstyle ':completion:*' menu select
|
||||
bindkey '^[[Z' reverse-menu-complete
|
||||
|
||||
export TERM='xterm-256color'
|
||||
ZSH_COMPLETIONS_DIR="${HOME}/.zcompletions"
|
||||
mkdir -p "$ZSH_COMPLETIONS_DIR"
|
||||
fpath=("$ZSH_COMPLETIONS_DIR" $fpath)
|
||||
|
||||
# load any file that ends with .zsh or .sh and is executable
|
||||
for SCRIPT in "${HOME}/.zshrc.d"/**/(.|?)*(.zsh|.sh); do
|
||||
if ! [ -x "${SCRIPT}" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
source "${SCRIPT}"
|
||||
done
|
||||
|
||||
compinit
|
||||
bashcompinit
|
35
chezmoi/dot_zshrc.d/executable_aliases.zsh
Normal file
35
chezmoi/dot_zshrc.d/executable_aliases.zsh
Normal file
|
@ -0,0 +1,35 @@
|
|||
if [ "$EDITOR" = 'nvim' ]; then
|
||||
alias vi='nvim'
|
||||
alias vim='nvim'
|
||||
alias vimdiff="nvim -d"
|
||||
alias view="nvim -R"
|
||||
fi
|
||||
|
||||
# use reflink cp if supported (yay CoW)
|
||||
if 2>&1 cp --help | grep -qF -- --reflink; then
|
||||
alias cp='cp -i --reflink=auto'
|
||||
else
|
||||
alias cp='cp -i'
|
||||
fi
|
||||
|
||||
alias mv='mv -i'
|
||||
|
||||
if command -v docker-compose &> /dev/null; then
|
||||
alias dco='docker-compose'
|
||||
fi
|
||||
|
||||
case "$OSTYPE" in
|
||||
darwin*)
|
||||
if command -v gtar &> /dev/null; then
|
||||
alias tar='gtar'
|
||||
fi
|
||||
|
||||
if command -v gsed &> /dev/null; then
|
||||
alias sed='gsed'
|
||||
fi
|
||||
;;
|
||||
|
||||
linux*)
|
||||
alias open='xdg-open'
|
||||
;;
|
||||
esac
|
5
chezmoi/dot_zshrc.d/executable_asdf.zsh
Normal file
5
chezmoi/dot_zshrc.d/executable_asdf.zsh
Normal file
|
@ -0,0 +1,5 @@
|
|||
if [ -r ~/.asdf/asdf.sh ]; then
|
||||
. ~/.asdf/asdf.sh
|
||||
# append completions to fpath
|
||||
fpath=(${ASDF_DIR}/completions $fpath)
|
||||
fi
|
3
chezmoi/dot_zshrc.d/executable_autojump.zsh
Normal file
3
chezmoi/dot_zshrc.d/executable_autojump.zsh
Normal file
|
@ -0,0 +1,3 @@
|
|||
if [ -r /usr/share/autojump/autojump.sh ]; then
|
||||
source /usr/share/autojump/autojump.sh
|
||||
fi
|
3
chezmoi/dot_zshrc.d/executable_aws.zsh
Normal file
3
chezmoi/dot_zshrc.d/executable_aws.zsh
Normal file
|
@ -0,0 +1,3 @@
|
|||
if command -v aws_completer &> /dev/null; then
|
||||
complete -C "$(command -v aws_completer)" aws
|
||||
fi
|
17
chezmoi/dot_zshrc.d/executable_camera.zsh
Normal file
17
chezmoi/dot_zshrc.d/executable_camera.zsh
Normal file
|
@ -0,0 +1,17 @@
|
|||
if command -v mpv &> /dev/null && command -v fzf &> /dev/null; then
|
||||
if [[ "$OSTYPE" = linux* ]]; then
|
||||
function camera() {
|
||||
(
|
||||
set -euo pipefail
|
||||
|
||||
printf "%s\0" /dev/video* |
|
||||
fzf --print0 --read0 -m -1 --height="$((LINES/4))" |
|
||||
xargs -0 -P 0 -I {} mpv \
|
||||
-vf=hflip \
|
||||
--demuxer-lavf-format=video4linux2 \
|
||||
--demuxer-lavf-o-set=input_format=mjpeg \
|
||||
av://v4l2:{}
|
||||
)
|
||||
}
|
||||
fi
|
||||
fi
|
18
chezmoi/dot_zshrc.d/executable_chezmoi.zsh
Normal file
18
chezmoi/dot_zshrc.d/executable_chezmoi.zsh
Normal file
|
@ -0,0 +1,18 @@
|
|||
(
|
||||
set -euo pipefail
|
||||
|
||||
CHEZMOI_PATH="$(command -v chezmoi 2> /dev/null)"
|
||||
|
||||
COMPLETION_FILE="${ZSH_COMPLETIONS_DIR}/_chezmoi"
|
||||
if [ -r "$COMPLETION_FILE" ]; then
|
||||
COMPLETION_FILE_CTIME="$(stat -c %Z "$COMPLETION_FILE")"
|
||||
CHEZMOI_FILE_CTIME="$(stat -c %Z "${CHEZMOI_PATH}")"
|
||||
|
||||
if [ "$COMPLETION_FILE_CTIME" -ge "$CHEZMOI_FILE_CTIME" ]; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
chezmoi completion zsh > "$COMPLETION_FILE"
|
||||
chmod +x "$COMPLETION_FILE"
|
||||
)
|
129
chezmoi/dot_zshrc.d/executable_clipboard.zsh
Normal file
129
chezmoi/dot_zshrc.d/executable_clipboard.zsh
Normal file
|
@ -0,0 +1,129 @@
|
|||
# MIT License
|
||||
|
||||
# Copyright (c) 2009-2022 Robby Russell and contributors (https://github.com/ohmyzsh/ohmyzsh/contributors)
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
# System clipboard integration
|
||||
#
|
||||
# This file has support for doing system clipboard copy and paste operations
|
||||
# from the command line in a generic cross-platform fashion.
|
||||
#
|
||||
# This is uses essentially the same heuristic as neovim, with the additional
|
||||
# special support for Cygwin.
|
||||
# See: https://github.com/neovim/neovim/blob/e682d799fa3cf2e80a02d00c6ea874599d58f0e7/runtime/autoload/provider/clipboard.vim#L55-L121
|
||||
#
|
||||
# - pbcopy, pbpaste (macOS)
|
||||
# - cygwin (Windows running Cygwin)
|
||||
# - wl-copy, wl-paste (if $WAYLAND_DISPLAY is set)
|
||||
# - xclip (if $DISPLAY is set)
|
||||
# - xsel (if $DISPLAY is set)
|
||||
# - lemonade (for SSH) https://github.com/pocke/lemonade
|
||||
# - doitclient (for SSH) http://www.chiark.greenend.org.uk/~sgtatham/doit/
|
||||
# - win32yank (Windows)
|
||||
# - tmux (if $TMUX is set)
|
||||
#
|
||||
# Defines two functions, clipcopy and clippaste, based on the detected platform.
|
||||
##
|
||||
#
|
||||
# clipcopy - Copy data to clipboard
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# <command> | clipcopy - copies stdin to clipboard
|
||||
#
|
||||
# clipcopy <file> - copies a file's contents to clipboard
|
||||
#
|
||||
##
|
||||
#
|
||||
# clippaste - "Paste" data from clipboard to stdout
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# clippaste - writes clipboard's contents to stdout
|
||||
#
|
||||
# clippaste | <command> - pastes contents and pipes it to another process
|
||||
#
|
||||
# clippaste > <file> - paste contents to a file
|
||||
#
|
||||
# Examples:
|
||||
#
|
||||
# # Pipe to another process
|
||||
# clippaste | grep foo
|
||||
#
|
||||
# # Paste to a file
|
||||
# clippaste > file.txt
|
||||
#
|
||||
function detect-clipboard() {
|
||||
emulate -L zsh
|
||||
|
||||
if [[ "${OSTYPE}" == darwin* ]] && (( ${+commands[pbcopy]} )) && (( ${+commands[pbpaste]} )); then
|
||||
function clipcopy() { pbcopy < "${1:-/dev/stdin}"; }
|
||||
function clippaste() { pbpaste; }
|
||||
elif [[ "${OSTYPE}" == (cygwin|msys)* ]]; then
|
||||
function clipcopy() { cat "${1:-/dev/stdin}" > /dev/clipboard; }
|
||||
function clippaste() { cat /dev/clipboard; }
|
||||
elif [ -n "${WAYLAND_DISPLAY:-}" ] && (( ${+commands[wl-copy]} )) && (( ${+commands[wl-paste]} )); then
|
||||
function clipcopy() { wl-copy < "${1:-/dev/stdin}"; }
|
||||
function clippaste() { wl-paste; }
|
||||
elif [ -n "${DISPLAY:-}" ] && (( ${+commands[xclip]} )); then
|
||||
function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
|
||||
function clippaste() { xclip -out -selection clipboard; }
|
||||
elif [ -n "${DISPLAY:-}" ] && (( ${+commands[xsel]} )); then
|
||||
function clipcopy() { xsel --clipboard --input < "${1:-/dev/stdin}"; }
|
||||
function clippaste() { xsel --clipboard --output; }
|
||||
elif (( ${+commands[lemonade]} )); then
|
||||
function clipcopy() { lemonade copy < "${1:-/dev/stdin}"; }
|
||||
function clippaste() { lemonade paste; }
|
||||
elif (( ${+commands[doitclient]} )); then
|
||||
function clipcopy() { doitclient wclip < "${1:-/dev/stdin}"; }
|
||||
function clippaste() { doitclient wclip -r; }
|
||||
elif (( ${+commands[win32yank]} )); then
|
||||
function clipcopy() { win32yank -i < "${1:-/dev/stdin}"; }
|
||||
function clippaste() { win32yank -o; }
|
||||
elif [[ $OSTYPE == linux-android* ]] && (( $+commands[termux-clipboard-set] )); then
|
||||
function clipcopy() { termux-clipboard-set < "${1:-/dev/stdin}"; }
|
||||
function clippaste() { termux-clipboard-get; }
|
||||
elif [ -n "${TMUX:-}" ] && (( ${+commands[tmux]} )); then
|
||||
function clipcopy() { tmux load-buffer "${1:--}"; }
|
||||
function clippaste() { tmux save-buffer -; }
|
||||
elif [[ $(uname -r) = *icrosoft* ]]; then
|
||||
function clipcopy() { clip.exe < "${1:-/dev/stdin}"; }
|
||||
function clippaste() { powershell.exe -noprofile -command Get-Clipboard; }
|
||||
else
|
||||
function _retry_clipboard_detection_or_fail() {
|
||||
local clipcmd="${1}"; shift
|
||||
if detect-clipboard; then
|
||||
"${clipcmd}" "$@"
|
||||
else
|
||||
print "${clipcmd}: Platform $OSTYPE not supported or xclip/xsel not installed" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
function clipcopy() { _retry_clipboard_detection_or_fail clipcopy "$@"; }
|
||||
function clippaste() { _retry_clipboard_detection_or_fail clippaste "$@"; }
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Detect at startup. A non-zero exit here indicates that the dummy clipboards were set,
|
||||
# which is not really an error. If the user calls them, they will attempt to redetect
|
||||
# (for example, perhaps the user has now installed xclip) and then either print an error
|
||||
# or proceed successfully.
|
||||
detect-clipboard || true
|
16
chezmoi/dot_zshrc.d/executable_colors.zsh
Normal file
16
chezmoi/dot_zshrc.d/executable_colors.zsh
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/zsh
|
||||
|
||||
if command -v dircolors &> /dev/null; then
|
||||
if test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)"; then
|
||||
:
|
||||
else
|
||||
eval "$(dircolors -b)"
|
||||
fi
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
alias dir='dir --color=auto'
|
||||
alias vdir='vdir --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
37
chezmoi/dot_zshrc.d/executable_fup.sh
Normal file
37
chezmoi/dot_zshrc.d/executable_fup.sh
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
# fup uploads a given file to file.io
|
||||
fup() {
|
||||
local -r FILE_PATH="${1}"
|
||||
local -r EXPIRATION="${2}"
|
||||
if ! [ -f "${FILE_PATH}" ]; then
|
||||
echo 'provide a valid file path'
|
||||
return 1
|
||||
fi
|
||||
|
||||
local URL='https://file.io/'
|
||||
|
||||
if [ -n "${EXPIRATION}" ]; then
|
||||
URL="${URL}?expires=${EXPIRATION}"
|
||||
fi
|
||||
|
||||
local JSON_RETURN
|
||||
if ! JSON_RETURN="$(curl -SsfLF "file=@${FILE_PATH}" "${URL}")"; then
|
||||
echo 'Curl failed'
|
||||
return 1
|
||||
fi
|
||||
|
||||
if echo "${JSON_RETURN}" | grep -q '"success":false'; then
|
||||
echo "${JSON_RETURN}"
|
||||
return 2
|
||||
fi
|
||||
|
||||
echo "https://file.io/$(echo "${JSON_RETURN}" | sed 's/.*key":"//' | sed 's/".*//')"
|
||||
|
||||
if echo "${JSON_RETURN}" | grep -q '"expiry":'; then
|
||||
echo "Expires in $(echo "${JSON_RETURN}" | sed 's/.*expiry":"//' | sed 's/".*//')"
|
||||
else
|
||||
echo 'Expires in 14 days'
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
3
chezmoi/dot_zshrc.d/executable_fzf.zsh
Normal file
3
chezmoi/dot_zshrc.d/executable_fzf.zsh
Normal file
|
@ -0,0 +1,3 @@
|
|||
2>/dev/null for FZF_FILE in /usr/share/doc/fzf/examples/*.zsh; do
|
||||
source "$FZF_FILE"
|
||||
done
|
17
chezmoi/dot_zshrc.d/executable_git.zsh
Normal file
17
chezmoi/dot_zshrc.d/executable_git.zsh
Normal file
|
@ -0,0 +1,17 @@
|
|||
alias g='git'
|
||||
alias ga='git add'
|
||||
alias gb='git branch'
|
||||
alias gc='git commit -v'
|
||||
alias gcl='git clone --recurse-submodules'
|
||||
alias gco='git checkout'
|
||||
alias gcor='git checkout --recurse-submodules'
|
||||
alias gcp='git cherry-pick'
|
||||
alias gd='git diff'
|
||||
alias gf='git fetch'
|
||||
alias gfo='git fetch origin'
|
||||
alias gpsup='git push --set-upstream origin $(git_current_branch)'
|
||||
alias gl='git pull'
|
||||
alias gm='git merge'
|
||||
alias gp='git push'
|
||||
alias gst='git status'
|
||||
alias gsu='git submodule update'
|
11
chezmoi/dot_zshrc.d/executable_golang-helpers.zsh
Normal file
11
chezmoi/dot_zshrc.d/executable_golang-helpers.zsh
Normal file
|
@ -0,0 +1,11 @@
|
|||
if command -v go &> /dev/null; then
|
||||
go_coverage() {
|
||||
(
|
||||
set -eo pipefail
|
||||
local -r COVERAGE_OUT="$(mktemp)"
|
||||
go test -cover -coverprofile="${COVERAGE_OUT}" ./...
|
||||
go tool cover -func="${COVERAGE_OUT}"
|
||||
rm -f "${COVERAGE_OUT}"
|
||||
)
|
||||
}
|
||||
fi
|
22
chezmoi/dot_zshrc.d/executable_ip-int-convert.sh
Normal file
22
chezmoi/dot_zshrc.d/executable_ip-int-convert.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
# convert integer to IP
|
||||
int2ip () {
|
||||
local ip dec=("$@")
|
||||
for e in {3..0}
|
||||
do
|
||||
((octet = dec / (256 ** e) ))
|
||||
((dec -= octet * 256 ** e))
|
||||
ip+=$delim$octet
|
||||
delim=.
|
||||
done
|
||||
printf '%s\n' "$ip"
|
||||
unset delim
|
||||
}
|
||||
|
||||
# convert IP to integer
|
||||
ip2int () {
|
||||
local a b c d ip
|
||||
ip=("$@")
|
||||
IFS=. read -r a b c d <<< "${ip[*]}"
|
||||
printf '%d\n' "$((a * 256 ** 3 + b * 256 ** 2 + c * 256 + d))"
|
||||
}
|
93
chezmoi/dot_zshrc.d/executable_notes.sh
Normal file
93
chezmoi/dot_zshrc.d/executable_notes.sh
Normal file
|
@ -0,0 +1,93 @@
|
|||
#!/bin/bash
|
||||
|
||||
notes() {
|
||||
local NOTES_DIR="${NOTES_DIR:-${HOME}/notes}"
|
||||
local -r EDITOR="${EDITOR:-vim}"
|
||||
local EDITOR_OPTIONS=()
|
||||
|
||||
if [[ "${EDITOR}" =~ 'vim$' ]]; then
|
||||
EDITOR_OPTIONS=(
|
||||
'-c'
|
||||
'set spell'
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
for ARG in "$@"; do
|
||||
(
|
||||
set -euo pipefail
|
||||
mkdir -p "$NOTES_DIR"
|
||||
cd "$NOTES_DIR"
|
||||
|
||||
case "${ARG}" in
|
||||
'category')
|
||||
shift
|
||||
export NOTES_DIR="$NOTES_DIR/$1"
|
||||
shift
|
||||
|
||||
notes "$@"
|
||||
exit 255
|
||||
;;
|
||||
|
||||
'fzf')
|
||||
"${EDITOR}" "${EDITOR_OPTIONS[@]}" "$(notes ls | fzf)"
|
||||
;;
|
||||
|
||||
'ls')
|
||||
ag -g '' -l "${NOTES_DIR}" | sort -hr
|
||||
;;
|
||||
|
||||
'status')
|
||||
git status
|
||||
;;
|
||||
|
||||
'commit')
|
||||
git add .
|
||||
git commit -m "notes commit $(date)"
|
||||
;;
|
||||
|
||||
'push')
|
||||
git push
|
||||
;;
|
||||
|
||||
'pull')
|
||||
git pull
|
||||
;;
|
||||
|
||||
*)
|
||||
>&2 echo "invalid argument ${ARG}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
)
|
||||
|
||||
local EXIT_CODE=$?
|
||||
if [ $EXIT_CODE != 0 ]; then
|
||||
if [ $EXIT_CODE = 255 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
return $EXIT_CODE
|
||||
fi
|
||||
done
|
||||
|
||||
# return if the above loop didn't return a bad code
|
||||
if [ -n "$*" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
(
|
||||
set -euo pipefail
|
||||
|
||||
readonly NOW="$(date +%s)"
|
||||
|
||||
readonly FILE_PATH="${NOTES_DIR}/$(date -d "@${NOW}" +'%Y/%m/%Y-%m-%d').md"
|
||||
|
||||
mkdir -p "$(dirname "${FILE_PATH}")"
|
||||
if ! [ -e "${FILE_PATH}" ]; then
|
||||
echo -e "# $(date -d "@${NOW}" +'%a %d %b %Y')\n\n## todo\n\n" > "${FILE_PATH}"
|
||||
fi
|
||||
|
||||
"${EDITOR}" "${EDITOR_OPTIONS[@]}" "${FILE_PATH}"
|
||||
)
|
||||
}
|
13
chezmoi/dot_zshrc.d/executable_pdf_join.zsh
Normal file
13
chezmoi/dot_zshrc.d/executable_pdf_join.zsh
Normal file
|
@ -0,0 +1,13 @@
|
|||
if [[ "$OSTYPE" = darwin* ]]; then
|
||||
pdf_join() {
|
||||
(
|
||||
set -euo pipefail
|
||||
|
||||
read -r "output_file?Name of output file: "
|
||||
"/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" \
|
||||
-o "$output_file" "$@"
|
||||
|
||||
open "$output_file"
|
||||
)
|
||||
}
|
||||
fi
|
43
chezmoi/dot_zshrc.d/executable_ssh.zsh
Normal file
43
chezmoi/dot_zshrc.d/executable_ssh.zsh
Normal file
|
@ -0,0 +1,43 @@
|
|||
SSH_ENV_CACHE="$HOME/.ssh/environment-$SHORT_HOST"
|
||||
|
||||
function _start_agent() {
|
||||
if _check_ssh_agent_connectivity; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ -r "$SSH_ENV_CACHE" ]]; then
|
||||
. $SSH_ENV_CACHE &> /dev/null
|
||||
if _check_ssh_agent_connectivity; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
echo -n >! "$SSH_ENV_CACHE"
|
||||
chmod 600 "$SSH_ENV_CACHE"
|
||||
ssh-agent -s > "$SSH_ENV_CACHE"
|
||||
. "$SSH_ENV_CACHE" > /dev/null
|
||||
}
|
||||
|
||||
function _check_ssh_agent_connectivity() {
|
||||
ssh-add -l &> /dev/null
|
||||
if [[ $? -eq 2 ]]; then
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function add_ssh_keys() {
|
||||
declare -a NEW_IDENTITIES
|
||||
|
||||
SSH_AGENT_IDENTITIES="$(ssh-add -l || true)"
|
||||
2>/dev/null for IDENTITY_FILE in ~/.ssh/id_*~*.pub; do
|
||||
if [[ "$SSH_AGENT_IDENTITIES" != *"$(ssh-keygen -lf "$IDENTITY_FILE")"* ]]; then
|
||||
NEW_IDENTITIES+=("$IDENTITY_FILE")
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${#NEW_IDENTITIES} -gt 0 ]]; then
|
||||
ssh-add ${^NEW_IDENTITIES}
|
||||
fi
|
||||
}
|
||||
|
||||
_start_agent && add_ssh_keys
|
21
chezmoi/dot_zshrc.d/executable_sshtmux.sh
Normal file
21
chezmoi/dot_zshrc.d/executable_sshtmux.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
# create splits in a tmux session for each ssh host
|
||||
sshtmux() {
|
||||
if [ -z "${TMUX}" ]; then
|
||||
echo "This must be executed inside of a tmux session"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "${1}" ]; then
|
||||
echo "Please provide of list of hosts separated by spaces"
|
||||
return 1
|
||||
fi
|
||||
|
||||
tmux new-window "ssh"
|
||||
for i in "${@}"; do
|
||||
tmux split-window -h "ssh -o StrictHostKeyChecking=no $i"
|
||||
tmux select-layout tiled > /dev/null
|
||||
sleep .1s
|
||||
done
|
||||
|
||||
tmux select-pane -t 0
|
||||
}
|
5
chezmoi/dot_zshrc.d/executable_tag.zsh
Normal file
5
chezmoi/dot_zshrc.d/executable_tag.zsh
Normal file
|
@ -0,0 +1,5 @@
|
|||
if command -v tag &> /dev/null; then
|
||||
export TAG_SEARCH_PROG=ag # replace with rg for ripgrep
|
||||
tag() { command tag "$@"; source ${TAG_ALIAS_FILE:-/tmp/tag_aliases} 2>/dev/null }
|
||||
alias ag=tag # replace with rg for ripgrep
|
||||
fi
|
67
chezmoi/dot_zshrc.d/executable_upgrade_system.sh
Normal file
67
chezmoi/dot_zshrc.d/executable_upgrade_system.sh
Normal file
|
@ -0,0 +1,67 @@
|
|||
#!/bin/bash
|
||||
|
||||
upgrade_system() {
|
||||
(
|
||||
set -euo pipefail
|
||||
|
||||
case "$(uname | tr '[:upper:]' '[:lower:]')" in
|
||||
'darwin')
|
||||
if command -v brew &> /dev/null; then
|
||||
brew update
|
||||
brew upgrade
|
||||
fi
|
||||
;;
|
||||
|
||||
'linux')
|
||||
# Flatpak (could be just about any distro)
|
||||
if command -v flatpak &> /dev/null; then
|
||||
flatpak update
|
||||
fi
|
||||
|
||||
# Debian/Ubuntu
|
||||
if command -v apt &> /dev/null; then
|
||||
sudo sh -c 'apt update && apt upgrade'
|
||||
fi
|
||||
|
||||
# Fedora
|
||||
if command -v dnf &> /dev/null; then
|
||||
sudo dnf upgrade
|
||||
fi
|
||||
|
||||
# Arch
|
||||
if command -v yay &> /dev/null; then
|
||||
yay -Syu --devel --timeupdate
|
||||
elif command -v pacman &> /dev/null; then
|
||||
sudo pacman -Syu
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
if command -v nvim &> /dev/null; then
|
||||
nvim -c 'PaqSync' -c 'sleep 5' -c 'TSUpdateSync' -c 'sleep 5' -c 'qa'
|
||||
fi
|
||||
|
||||
(
|
||||
for DIR in "$ZSH"/custom/{themes,plugins}/*/; do
|
||||
(
|
||||
cd "${DIR}"
|
||||
[ -d .git ] || exit 0
|
||||
git pull
|
||||
)
|
||||
done
|
||||
)
|
||||
|
||||
(
|
||||
cd "${HOME}/.tmux"
|
||||
git pull
|
||||
if [ -n "${TMUX:-}" ]; then
|
||||
tmux source-file "${HOME}/.tmux.conf"
|
||||
fi
|
||||
)
|
||||
|
||||
if command -v fwupdmgr &> /dev/null; then
|
||||
fwupdmgr refresh
|
||||
fwupdmgr upgrade
|
||||
fi
|
||||
)
|
||||
}
|
812
chezmoi/private_dot_config/alacritty/alacritty.yml
Normal file
812
chezmoi/private_dot_config/alacritty/alacritty.yml
Normal file
|
@ -0,0 +1,812 @@
|
|||
# Configuration for Alacritty, the GPU enhanced terminal emulator.
|
||||
|
||||
# Import additional configuration files
|
||||
#
|
||||
# Imports are loaded in order, skipping all missing files, with the importing
|
||||
# file being loaded last. If a field is already present in a previous import, it
|
||||
# will be replaced.
|
||||
#
|
||||
# All imports must either be absolute paths starting with `/`, or paths relative
|
||||
# to the user's home directory starting with `~/`.
|
||||
import:
|
||||
- ./gruvbox.yml
|
||||
|
||||
# Any items in the `env` entry below will be added as
|
||||
# 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: xterm-256color
|
||||
|
||||
#window:
|
||||
# Window dimensions (changes require restart)
|
||||
#
|
||||
# Number of lines/columns (not pixels) in the terminal. The number of columns
|
||||
# must be at least `2`, while using a value of `0` for columns and lines will
|
||||
# fall back to the window manager's recommended size.
|
||||
#dimensions:
|
||||
# columns: 0
|
||||
# lines: 0
|
||||
|
||||
# Window position (changes require restart)
|
||||
#
|
||||
# Specified in number of pixels.
|
||||
# If the position is not set, the window manager will handle the placement.
|
||||
#position:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Window padding (changes require restart)
|
||||
#
|
||||
# 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: 0
|
||||
# y: 0
|
||||
|
||||
# Spread additional padding evenly around the terminal content.
|
||||
#dynamic_padding: false
|
||||
|
||||
# Window decorations
|
||||
#
|
||||
# Values for `decorations`:
|
||||
# - full: Borders and title bar
|
||||
# - none: Neither borders nor title bar
|
||||
#
|
||||
# Values for `decorations` (macOS only):
|
||||
# - transparent: Title bar, transparent background and title bar buttons
|
||||
# - buttonless: Title bar, transparent background and no title bar buttons
|
||||
#decorations: full
|
||||
|
||||
# Startup Mode (changes require restart)
|
||||
#
|
||||
# Values for `startup_mode`:
|
||||
# - Windowed
|
||||
# - Maximized
|
||||
# - Fullscreen
|
||||
#
|
||||
# Values for `startup_mode` (macOS only):
|
||||
# - SimpleFullscreen
|
||||
#startup_mode: Windowed
|
||||
|
||||
# Window title
|
||||
#title: Alacritty
|
||||
|
||||
# Allow terminal applications to change Alacritty's window title.
|
||||
#dynamic_title: true
|
||||
|
||||
# Window class (Linux/BSD only):
|
||||
#class:
|
||||
# Application instance name
|
||||
#instance: Alacritty
|
||||
# General application class
|
||||
#general: Alacritty
|
||||
|
||||
# GTK theme variant (Linux/BSD only)
|
||||
#
|
||||
# Override the variant of the GTK theme. Commonly supported values are `dark`
|
||||
# and `light`. Set this to `None` to use the default theme variant.
|
||||
#gtk_theme_variant: None
|
||||
|
||||
#scrolling:
|
||||
# Maximum number of lines in the scrollback buffer.
|
||||
# Specifying '0' will disable scrolling.
|
||||
#history: 10000
|
||||
|
||||
# Scrolling distance multiplier.
|
||||
#multiplier: 3
|
||||
|
||||
# Font configuration
|
||||
font:
|
||||
# Normal (roman) font face
|
||||
normal:
|
||||
# Font family
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) Menlo
|
||||
# - (Linux/BSD) monospace
|
||||
# - (Windows) Consolas
|
||||
family: SauceCodePro Nerd Font Mono
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Regular
|
||||
|
||||
# Bold font face
|
||||
#bold:
|
||||
# Font family
|
||||
#
|
||||
# If the bold family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Bold
|
||||
|
||||
# Italic font face
|
||||
#italic:
|
||||
# Font family
|
||||
#
|
||||
# If the italic family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Italic
|
||||
|
||||
# Bold italic font face
|
||||
#bold_italic:
|
||||
# Font family
|
||||
#
|
||||
# If the bold italic family is not specified, it will fall back to the
|
||||
# value specified for the normal font.
|
||||
#family: monospace
|
||||
|
||||
# The `style` can be specified to pick a specific face.
|
||||
#style: Bold Italic
|
||||
|
||||
# Point size
|
||||
size: 9.0
|
||||
|
||||
# Offset is the extra space around each character. `offset.y` can be thought
|
||||
# of as modifying the line spacing, and `offset.x` as modifying the letter
|
||||
# spacing.
|
||||
#offset:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Glyph offset determines the locations of the glyphs within their cells with
|
||||
# the default being at the bottom. Increasing `x` moves the glyph to the
|
||||
# right, increasing `y` moves the glyph upward.
|
||||
#glyph_offset:
|
||||
# x: 0
|
||||
# y: 0
|
||||
|
||||
# Thin stroke font rendering (macOS only)
|
||||
#
|
||||
# Thin strokes are suitable for retina displays, but for non-retina screens
|
||||
# it is recommended to set `use_thin_strokes` to `false`.
|
||||
#use_thin_strokes: true
|
||||
|
||||
# If `true`, bold text is drawn using the bright color variants.
|
||||
#draw_bold_text_with_bright_colors: false
|
||||
|
||||
# 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 and 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 and 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 and CellBackground, which reference the
|
||||
# affected cell, or hexadecimal colors like #ff00ff.
|
||||
#matches:
|
||||
# foreground: '#000000'
|
||||
# background: '#ffffff'
|
||||
#focused_match:
|
||||
# foreground: CellBackground
|
||||
# background: CellForeground
|
||||
|
||||
#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 and 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: []
|
||||
|
||||
# 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
|
||||
|
||||
# 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.
|
||||
#background_opacity: 1.0
|
||||
|
||||
#selection:
|
||||
# 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
|
||||
|
||||
#cursor:
|
||||
# Cursor style
|
||||
#style:
|
||||
# Cursor shape
|
||||
#
|
||||
# Values for `shape`:
|
||||
# - ▇ Block
|
||||
# - _ Underline
|
||||
# - | Beam
|
||||
#shape: Block
|
||||
|
||||
# Cursor blinking state
|
||||
#
|
||||
# Values for `blinking`:
|
||||
# - Never: Prevent the cursor from ever blinking
|
||||
# - Off: Disable blinking by default
|
||||
# - On: Enable blinking by default
|
||||
# - Always: Force the cursor to always blink
|
||||
#blinking: Off
|
||||
|
||||
# Vi mode cursor style
|
||||
#
|
||||
# If the vi mode cursor style is `None` or not specified, it will fall back to
|
||||
# the style of the active value of the normal cursor.
|
||||
#
|
||||
# See `cursor.style` for available options.
|
||||
#vi_mode_style: None
|
||||
|
||||
# Cursor blinking interval in milliseconds.
|
||||
#blink_interval: 750
|
||||
|
||||
# If this is `true`, the cursor will be rendered as a hollow box when the
|
||||
# window is not focused.
|
||||
#unfocused_hollow: true
|
||||
|
||||
# Thickness of the cursor relative to the cell width as floating point number
|
||||
# from `0.0` to `1.0`.
|
||||
#thickness: 0.15
|
||||
|
||||
# Live config reload (changes require restart)
|
||||
live_config_reload: true
|
||||
|
||||
# Shell
|
||||
#
|
||||
# You can set `shell.program` to the path of your favorite shell, e.g.
|
||||
# `/bin/fish`. Entries in `shell.args` are passed unmodified as arguments to the
|
||||
# shell.
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) /bin/bash --login
|
||||
# - (Linux/BSD) user login shell
|
||||
# - (Windows) powershell
|
||||
#shell:
|
||||
# program: /bin/bash
|
||||
# args:
|
||||
# - --login
|
||||
|
||||
# Startup directory
|
||||
#
|
||||
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||
# directory of the parent process will be used.
|
||||
#working_directory: None
|
||||
|
||||
# Send ESC (\x1b) before characters when alt is pressed.
|
||||
#alt_send_esc: true
|
||||
|
||||
#mouse:
|
||||
# Click settings
|
||||
#
|
||||
# The `double_click` and `triple_click` settings control the time
|
||||
# alacritty should wait for accepting multiple clicks as one double
|
||||
# or triple click.
|
||||
#double_click: { threshold: 300 }
|
||||
#triple_click: { threshold: 300 }
|
||||
|
||||
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||
#hide_when_typing: false
|
||||
|
||||
#url:
|
||||
# URL launcher
|
||||
#
|
||||
# This program is executed when clicking on a text which is recognized as a
|
||||
# URL. The URL is always added to the command as the last parameter.
|
||||
#
|
||||
# When set to `launcher: None`, URL launching will be disabled completely.
|
||||
#
|
||||
# Default:
|
||||
# - (macOS) open
|
||||
# - (Linux/BSD) xdg-open
|
||||
# - (Windows) explorer
|
||||
#launcher:
|
||||
# program: xdg-open
|
||||
# args: []
|
||||
|
||||
# URL modifiers
|
||||
#
|
||||
# These are the modifiers that need to be held down for opening URLs when
|
||||
# clicking on them. The available modifiers are documented in the key
|
||||
# binding section.
|
||||
#modifiers: None
|
||||
|
||||
# Mouse bindings
|
||||
#
|
||||
# Mouse bindings are specified as a list of objects, much like the key
|
||||
# bindings further below.
|
||||
#
|
||||
# To trigger mouse bindings when an application running within Alacritty
|
||||
# captures the mouse, the `Shift` modifier is automatically added as a
|
||||
# requirement.
|
||||
#
|
||||
# Each mouse binding will specify a:
|
||||
#
|
||||
# - `mouse`:
|
||||
#
|
||||
# - Middle
|
||||
# - Left
|
||||
# - Right
|
||||
# - Numeric identifier such as `5`
|
||||
#
|
||||
# - `action` (see key bindings)
|
||||
#
|
||||
# And optionally:
|
||||
#
|
||||
# - `mods` (see key bindings)
|
||||
#mouse_bindings:
|
||||
# - { mouse: Middle, action: PasteSelection }
|
||||
|
||||
# Key bindings
|
||||
#
|
||||
# Key bindings are specified as a list of objects. For example, this is the
|
||||
# default paste binding:
|
||||
#
|
||||
# `- { key: V, mods: Control|Shift, action: Paste }`
|
||||
#
|
||||
# Each key binding will specify a:
|
||||
#
|
||||
# - `key`: Identifier of the key pressed
|
||||
#
|
||||
# - A-Z
|
||||
# - F1-F24
|
||||
# - Key0-Key9
|
||||
#
|
||||
# A full list with available key codes can be found here:
|
||||
# https://docs.rs/glutin/*/glutin/event/enum.VirtualKeyCode.html#variants
|
||||
#
|
||||
# Instead of using the name of the keys, the `key` field also supports using
|
||||
# the scancode of the desired key. Scancodes have to be specified as a
|
||||
# decimal number. This command will allow you to display the hex scancodes
|
||||
# for certain keys:
|
||||
#
|
||||
# `showkey --scancodes`.
|
||||
#
|
||||
# Then exactly one of:
|
||||
#
|
||||
# - `chars`: Send a byte sequence to the running application
|
||||
#
|
||||
# The `chars` field writes the specified string to the terminal. This makes
|
||||
# it possible to pass escape sequences. To find escape codes for bindings
|
||||
# like `PageUp` (`"\x1b[5~"`), you can run the command `showkey -a` outside
|
||||
# of tmux. Note that applications use terminfo to map escape sequences back
|
||||
# to keys. It is therefore required to update the terminfo when changing an
|
||||
# escape sequence.
|
||||
#
|
||||
# - `action`: Execute a predefined action
|
||||
#
|
||||
# - ToggleViMode
|
||||
# - SearchForward
|
||||
# Start searching toward the right of the search origin.
|
||||
# - SearchBackward
|
||||
# Start searching toward the left of the search origin.
|
||||
# - Copy
|
||||
# - Paste
|
||||
# - IncreaseFontSize
|
||||
# - DecreaseFontSize
|
||||
# - ResetFontSize
|
||||
# - ScrollPageUp
|
||||
# - ScrollPageDown
|
||||
# - ScrollHalfPageUp
|
||||
# - ScrollHalfPageDown
|
||||
# - ScrollLineUp
|
||||
# - ScrollLineDown
|
||||
# - ScrollToTop
|
||||
# - ScrollToBottom
|
||||
# - ClearHistory
|
||||
# Remove the terminal's scrollback history.
|
||||
# - Hide
|
||||
# Hide the Alacritty window.
|
||||
# - Minimize
|
||||
# Minimize the Alacritty window.
|
||||
# - Quit
|
||||
# Quit Alacritty.
|
||||
# - ToggleFullscreen
|
||||
# - SpawnNewInstance
|
||||
# Spawn a new instance of Alacritty.
|
||||
# - ClearLogNotice
|
||||
# Clear Alacritty's UI warning and error notice.
|
||||
# - ClearSelection
|
||||
# Remove the active selection.
|
||||
# - ReceiveChar
|
||||
# - None
|
||||
#
|
||||
# - Vi mode exclusive actions:
|
||||
#
|
||||
# - Open
|
||||
# Open URLs at the cursor location with the launcher configured in
|
||||
# `url.launcher`.
|
||||
# - ToggleNormalSelection
|
||||
# - ToggleLineSelection
|
||||
# - ToggleBlockSelection
|
||||
# - ToggleSemanticSelection
|
||||
# Toggle semantic selection based on `selection.semantic_escape_chars`.
|
||||
#
|
||||
# - Vi mode exclusive cursor motion actions:
|
||||
#
|
||||
# - Up
|
||||
# One line up.
|
||||
# - Down
|
||||
# One line down.
|
||||
# - Left
|
||||
# One character left.
|
||||
# - Right
|
||||
# One character right.
|
||||
# - First
|
||||
# First column, or beginning of the line when already at the first column.
|
||||
# - Last
|
||||
# Last column, or beginning of the line when already at the last column.
|
||||
# - FirstOccupied
|
||||
# First non-empty cell in this terminal row, or first non-empty cell of
|
||||
# the line when already at the first cell of the row.
|
||||
# - High
|
||||
# Top of the screen.
|
||||
# - Middle
|
||||
# Center of the screen.
|
||||
# - Low
|
||||
# Bottom of the screen.
|
||||
# - SemanticLeft
|
||||
# Start of the previous semantically separated word.
|
||||
# - SemanticRight
|
||||
# Start of the next semantically separated word.
|
||||
# - SemanticLeftEnd
|
||||
# End of the previous semantically separated word.
|
||||
# - SemanticRightEnd
|
||||
# End of the next semantically separated word.
|
||||
# - WordLeft
|
||||
# Start of the previous whitespace separated word.
|
||||
# - WordRight
|
||||
# Start of the next whitespace separated word.
|
||||
# - WordLeftEnd
|
||||
# End of the previous whitespace separated word.
|
||||
# - WordRightEnd
|
||||
# End of the next whitespace separated word.
|
||||
# - Bracket
|
||||
# Character matching the bracket at the cursor's location.
|
||||
# - SearchNext
|
||||
# Beginning of the next match.
|
||||
# - SearchPrevious
|
||||
# Beginning of the previous match.
|
||||
# - SearchStart
|
||||
# Start of the match to the left of the vi mode cursor.
|
||||
# - SearchEnd
|
||||
# End of the match to the right of the vi mode cursor.
|
||||
#
|
||||
# - Search mode exclusive actions:
|
||||
# - SearchFocusNext
|
||||
# Move the focus to the next search match.
|
||||
# - SearchFocusPrevious
|
||||
# Move the focus to the previous search match.
|
||||
# - SearchConfirm
|
||||
# - SearchCancel
|
||||
# - SearchClear
|
||||
# Reset the search regex.
|
||||
# - SearchDeleteWord
|
||||
# Delete the last word in the search regex.
|
||||
# - SearchHistoryPrevious
|
||||
# Go to the previous regex in the search history.
|
||||
# - SearchHistoryNext
|
||||
# Go to the next regex in the search history.
|
||||
#
|
||||
# - macOS exclusive actions:
|
||||
# - ToggleSimpleFullscreen
|
||||
# Enter fullscreen without occupying another space.
|
||||
#
|
||||
# - Linux/BSD exclusive actions:
|
||||
#
|
||||
# - CopySelection
|
||||
# Copy from the selection buffer.
|
||||
# - PasteSelection
|
||||
# Paste from the selection buffer.
|
||||
#
|
||||
# - `command`: Fork and execute a specified command plus arguments
|
||||
#
|
||||
# The `command` field must be a map containing a `program` string and an
|
||||
# `args` array of command line parameter strings. For example:
|
||||
# `{ program: "alacritty", args: ["-e", "vttest"] }`
|
||||
#
|
||||
# And optionally:
|
||||
#
|
||||
# - `mods`: Key modifiers to filter binding actions
|
||||
#
|
||||
# - Command
|
||||
# - Control
|
||||
# - Option
|
||||
# - Super
|
||||
# - Shift
|
||||
# - Alt
|
||||
#
|
||||
# Multiple `mods` can be combined using `|` like this:
|
||||
# `mods: Control|Shift`.
|
||||
# Whitespace and capitalization are relevant and must match the example.
|
||||
#
|
||||
# - `mode`: Indicate a binding for only specific terminal reported modes
|
||||
#
|
||||
# This is mainly used to send applications the correct escape sequences
|
||||
# when in different modes.
|
||||
#
|
||||
# - AppCursor
|
||||
# - AppKeypad
|
||||
# - Search
|
||||
# - Alt
|
||||
# - Vi
|
||||
#
|
||||
# A `~` operator can be used before a mode to apply the binding whenever
|
||||
# the mode is *not* active, e.g. `~Alt`.
|
||||
#
|
||||
# Bindings are always filled by default, but will be replaced when a new
|
||||
# binding with the same triggers is defined. To unset a default binding, it can
|
||||
# be mapped to the `ReceiveChar` action. Alternatively, you can use `None` for
|
||||
# a no-op if you do not wish to receive input characters for that binding.
|
||||
#
|
||||
# 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: Vi|~Search, action: ScrollToBottom }
|
||||
#- { key: Space, mods: Shift|Control, mode: ~Search, action: ToggleViMode }
|
||||
#- { key: Escape, mode: Vi|~Search, action: ClearSelection }
|
||||
#- { key: I, mode: Vi|~Search, action: ScrollToBottom }
|
||||
#- { key: I, mode: Vi|~Search, action: ToggleViMode }
|
||||
#- { 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: 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: M, mods: Command, action: Minimize }
|
||||
#- { key: Q, mods: Command, action: Quit }
|
||||
#- { key: W, mods: Command, action: Quit }
|
||||
#- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
#- { 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.
|
||||
#render_timer: false
|
||||
|
||||
# Keep the log file after quitting Alacritty.
|
||||
#persistent_logging: false
|
||||
|
||||
# Log level
|
||||
#
|
||||
# Values for `log_level`:
|
||||
# - Off
|
||||
# - Error
|
||||
# - Warn
|
||||
# - Info
|
||||
# - Debug
|
||||
# - Trace
|
||||
#log_level: Warn
|
||||
|
||||
# Print all received window events.
|
||||
#print_events: false
|
59
chezmoi/private_dot_config/alacritty/gruvbox.yml
Normal file
59
chezmoi/private_dot_config/alacritty/gruvbox.yml
Normal file
|
@ -0,0 +1,59 @@
|
|||
# Colors (Gruvbox dark)
|
||||
colors:
|
||||
primary:
|
||||
# hard contrast background - '#1d2021'
|
||||
background: &gruvbox_dark_bg '#282828'
|
||||
# soft contrast background - '#32302f'
|
||||
foreground: '#fbf1c7'
|
||||
bright_foreground: '#f9f5d7'
|
||||
dim_foreground: '#f2e5bc'
|
||||
cursor:
|
||||
text: CellBackground
|
||||
cursor: CellForeground
|
||||
vi_mode_cursor:
|
||||
text: CellBackground
|
||||
cursor: CellForeground
|
||||
# search:
|
||||
# matches:
|
||||
# foreground: '#000000'
|
||||
# background: '#ffffff'
|
||||
# focused_match:
|
||||
# foreground: CellBackground
|
||||
# background: CellForeground
|
||||
# bar:
|
||||
# background: ''
|
||||
# foreground: ''
|
||||
# line_indicator:
|
||||
# foreground: None
|
||||
# background: None
|
||||
selection:
|
||||
text: CellBackground
|
||||
background: CellForeground
|
||||
bright:
|
||||
black: '#928374'
|
||||
red: '#fb4934'
|
||||
green: '#b8bb26'
|
||||
yellow: '#fabd2f'
|
||||
blue: '#83a598'
|
||||
magenta: '#d3869b'
|
||||
cyan: '#8ec07c'
|
||||
white: '#ebdbb2'
|
||||
normal:
|
||||
black: *gruvbox_dark_bg
|
||||
red: '#cc241d'
|
||||
green: '#98971a'
|
||||
yellow: '#d79921'
|
||||
blue: '#458588'
|
||||
magenta: '#b16286'
|
||||
cyan: '#689d6a'
|
||||
white: '#a89984'
|
||||
dim:
|
||||
black: '#32302f'
|
||||
red: '#9d0006'
|
||||
green: '#79740e'
|
||||
yellow: '#b57614'
|
||||
blue: '#076678'
|
||||
magenta: '#8f3f71'
|
||||
cyan: '#427b58'
|
||||
white: '#928374'
|
||||
# indexed_colors: []
|
414
chezmoi/private_dot_config/dunst/dunstrc
Normal file
414
chezmoi/private_dot_config/dunst/dunstrc
Normal file
|
@ -0,0 +1,414 @@
|
|||
[global]
|
||||
### Display ###
|
||||
|
||||
# Which monitor should the notifications be displayed on.
|
||||
monitor = 0
|
||||
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a window manager that exports the
|
||||
# _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern window managers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option
|
||||
# will be ignored.
|
||||
follow = mouse
|
||||
|
||||
# The geometry of the window:
|
||||
# [{width}]x{height}[+/-{x}+/-{y}]
|
||||
# The geometry of the message window.
|
||||
# The height is measured in number of notifications everything else
|
||||
# in pixels. If the width is omitted but the height is given
|
||||
# ("-geometry x2"), the message window expands over the whole screen
|
||||
# (dmenu-like). If width is 0, the window expands to the longest
|
||||
# message displayed. A positive x is measured from the left, a
|
||||
# negative from the right side of the screen. Y is measured from
|
||||
# the top and down respectively.
|
||||
# The width can be negative. In this case the actual width is the
|
||||
# screen width minus the width defined in within the geometry option.
|
||||
geometry = "300x5-30+20"
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = yes
|
||||
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = no
|
||||
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing window manager is
|
||||
# present (e.g. xcompmgr, compiz, etc.).
|
||||
transparency = 0
|
||||
|
||||
# The height of the entire notification. If the height is smaller
|
||||
# than the font height and padding combined, it will be raised
|
||||
# to the font height and padding.
|
||||
notification_height = 0
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 2
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 8
|
||||
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 8
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 3
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#aaaaaa"
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = frame
|
||||
|
||||
# Sort messages by urgency.
|
||||
sort = yes
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
# Set to 0 to disable.
|
||||
# A client can set the 'transient' hint to bypass this. See the rules
|
||||
# section for how to disable this if necessary
|
||||
idle_threshold = 120
|
||||
|
||||
### Text ###
|
||||
|
||||
font = Monospace 8
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
line_height = 0
|
||||
|
||||
# Possible values are:
|
||||
# full: Allow a small subset of html markup in notifications:
|
||||
# <b>bold</b>
|
||||
# <i>italic</i>
|
||||
# <s>strikethrough</s>
|
||||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
|
||||
#
|
||||
# strip: This setting is provided for compatibility with some broken
|
||||
# clients that send markup even though it's not enabled on the
|
||||
# server. Dunst will try to strip the markup but the parsing is
|
||||
# simplistic so using this option outside of matching rules for
|
||||
# specific applications *IS GREATLY DISCOURAGED*.
|
||||
#
|
||||
# no: Disable markup parsing, incoming notifications will be treated as
|
||||
# plain text. Dunst will not advertise that it has the body-markup
|
||||
# capability if this is set as a global setting.
|
||||
#
|
||||
# It's important to note that markup inside the format option will be parsed
|
||||
# regardless of what this is set to.
|
||||
markup = full
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# %n progress value if set without any extra characters
|
||||
# %% Literal %
|
||||
# Markup is allowed
|
||||
format = "<b>%s</b>\n%b"
|
||||
|
||||
# Alignment of message text.
|
||||
# Possible values are "left", "center" and "right".
|
||||
alignment = left
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = 60
|
||||
|
||||
# Split notifications into multiple lines if they don't fit into
|
||||
# geometry.
|
||||
word_wrap = yes
|
||||
|
||||
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = middle
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = no
|
||||
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = true
|
||||
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = false
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = yes
|
||||
|
||||
### Icons ###
|
||||
|
||||
# Align icons left/right/off
|
||||
icon_position = off
|
||||
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 32
|
||||
|
||||
# Paths to default icons.
|
||||
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||
|
||||
### History ###
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = yes
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 20
|
||||
|
||||
### Misc/Advanced ###
|
||||
|
||||
# dmenu path.
|
||||
dmenu = /usr/bin/dmenu -p dunst:
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = /usr/bin/sensible-browser
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true
|
||||
|
||||
# Define the title of the windows spawned by dunst
|
||||
title = Dunst
|
||||
|
||||
# Define the class of the windows spawned by dunst
|
||||
class = Dunst
|
||||
|
||||
# Print a notification on startup.
|
||||
# This is mainly for error detection, since dbus (re-)starts dunst
|
||||
# automatically after a crash.
|
||||
startup_notification = false
|
||||
|
||||
# Manage dunst's desire for talking
|
||||
# Can be one of the following values:
|
||||
# crit: Critical features. Dunst aborts
|
||||
# warn: Only non-fatal warnings
|
||||
# mesg: Important Messages
|
||||
# info: all unimportant stuff
|
||||
# debug: all less than unimportant stuff
|
||||
verbosity = mesg
|
||||
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
# The radius will be automatically lowered if it exceeds half of the
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 0
|
||||
|
||||
### Legacy
|
||||
|
||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
# This setting is provided for compatibility with older nVidia drivers that
|
||||
# do not support RandR and using it on systems that support RandR is highly
|
||||
# discouraged.
|
||||
#
|
||||
# By enabling this setting dunst will not be able to detect when a monitor
|
||||
# is connected or disconnected which might break follow mode if the screen
|
||||
# layout changes.
|
||||
force_xinerama = false
|
||||
|
||||
### mouse
|
||||
|
||||
# Defines action of mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: If the notification has exactly one action, or one is marked as default,
|
||||
# invoke it. If there are multiple and no default, open the context menu.
|
||||
# * close_current: Close current notification.
|
||||
# * close_all: Close all notifications.
|
||||
mouse_left_click = close_current
|
||||
mouse_middle_click = do_action
|
||||
mouse_right_click = close_all
|
||||
|
||||
# Experimental features that may or may not work correctly. Do not expect them
|
||||
# to have a consistent behaviour across releases.
|
||||
[experimental]
|
||||
# Calculate the dpi to use on a per-monitor basis.
|
||||
# If this setting is enabled the Xft.dpi value will be ignored and instead
|
||||
# dunst will attempt to calculate an appropriate dpi value for each monitor
|
||||
# using the resolution and physical size. This might be useful in setups
|
||||
# where there are multiple screens with very different dpi values.
|
||||
per_monitor_dpi = false
|
||||
|
||||
[shortcuts]
|
||||
|
||||
# Shortcuts are specified as [modifier+][modifier+]...key
|
||||
# Available modifiers are "ctrl", "mod1" (the alt-key), "mod2",
|
||||
# "mod3" and "mod4" (windows-key).
|
||||
# Xev might be helpful to find names for keys.
|
||||
|
||||
# Close notification.
|
||||
#close = ctrl+space
|
||||
|
||||
# Close all notifications.
|
||||
#close_all = ctrl+shift+space
|
||||
|
||||
# Redisplay last message(s).
|
||||
# On the US keyboard layout "grave" is normally above TAB and left
|
||||
# of "1". Make sure this key actually exists on your keyboard layout,
|
||||
# e.g. check output of 'xmodmap -pke'
|
||||
#history = ctrl+grave
|
||||
|
||||
# Context menu.
|
||||
#context = ctrl+shift+period
|
||||
|
||||
[urgency_low]
|
||||
# IMPORTANT: colors have to be defined in quotation marks.
|
||||
# Otherwise the "#" and following would be interpreted as a comment.
|
||||
background = "#222222"
|
||||
foreground = "#888888"
|
||||
timeout = 10
|
||||
# Icon for notifications with low urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
[urgency_normal]
|
||||
background = "#285577"
|
||||
foreground = "#ffffff"
|
||||
timeout = 10
|
||||
# Icon for notifications with normal urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
[urgency_critical]
|
||||
background = "#900000"
|
||||
foreground = "#ffffff"
|
||||
frame_color = "#ff0000"
|
||||
timeout = 0
|
||||
# Icon for notifications with critical urgency, uncomment to enable
|
||||
#icon = /path/to/icon
|
||||
|
||||
# Every section that isn't one of the above is interpreted as a rules to
|
||||
# override settings for certain messages.
|
||||
#
|
||||
# Messages can be matched by
|
||||
# appname (discouraged, see desktop_entry)
|
||||
# body
|
||||
# category
|
||||
# desktop_entry
|
||||
# icon
|
||||
# match_transient
|
||||
# msg_urgency
|
||||
# stack_tag
|
||||
# summary
|
||||
#
|
||||
# and you can override the
|
||||
# background
|
||||
# foreground
|
||||
# format
|
||||
# frame_color
|
||||
# fullscreen
|
||||
# new_icon
|
||||
# set_stack_tag
|
||||
# set_transient
|
||||
# timeout
|
||||
# urgency
|
||||
#
|
||||
# Shell-like globbing will get expanded.
|
||||
#
|
||||
# Instead of the appname filter, it's recommended to use the desktop_entry filter.
|
||||
# GLib based applications export their desktop-entry name. In comparison to the appname,
|
||||
# the desktop-entry won't get localized.
|
||||
#
|
||||
# SCRIPTING
|
||||
# You can specify a script that gets run when the rule matches by
|
||||
# setting the "script" option.
|
||||
# The script will be called as follows:
|
||||
# script appname summary body icon urgency
|
||||
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
|
||||
#
|
||||
# NOTE: if you don't want a notification to be displayed, set the format
|
||||
# to "".
|
||||
# NOTE: It might be helpful to run dunst -print in a terminal in order
|
||||
# to find fitting options for rules.
|
||||
|
||||
# Disable the transient hint so that idle_threshold cannot be bypassed from the
|
||||
# client
|
||||
#[transient_disable]
|
||||
# match_transient = yes
|
||||
# set_transient = no
|
||||
#
|
||||
# Make the handling of transient notifications more strict by making them not
|
||||
# be placed in history.
|
||||
#[transient_history_ignore]
|
||||
# match_transient = yes
|
||||
# history_ignore = yes
|
||||
|
||||
# fullscreen values
|
||||
# show: show the notifications, regardless if there is a fullscreen window opened
|
||||
# delay: displays the new notification, if there is no fullscreen window active
|
||||
# If the notification is already drawn, it won't get undrawn.
|
||||
# pushback: same as delay, but when switching into fullscreen, the notification will get
|
||||
# withdrawn from screen again and will get delayed like a new notification
|
||||
#[fullscreen_delay_everything]
|
||||
# fullscreen = delay
|
||||
#[fullscreen_show_critical]
|
||||
# msg_urgency = critical
|
||||
# fullscreen = show
|
||||
|
||||
#[espeak]
|
||||
# summary = "*"
|
||||
# script = dunst_espeak.sh
|
||||
|
||||
#[script-test]
|
||||
# summary = "*script*"
|
||||
# script = dunst_test.sh
|
||||
|
||||
#[ignore]
|
||||
# # This notification will not be displayed
|
||||
# summary = "foobar"
|
||||
# format = ""
|
||||
|
||||
#[history-ignore]
|
||||
# # This notification will not be saved in history
|
||||
# summary = "foobar"
|
||||
# history_ignore = yes
|
||||
|
||||
#[skip-display]
|
||||
# # This notification will not be displayed, but will be included in the history
|
||||
# summary = "foobar"
|
||||
# skip_display = yes
|
||||
|
||||
#[signed_on]
|
||||
# appname = Pidgin
|
||||
# summary = "*signed on*"
|
||||
# urgency = low
|
||||
#
|
||||
#[signed_off]
|
||||
# appname = Pidgin
|
||||
# summary = *signed off*
|
||||
# urgency = low
|
||||
#
|
||||
#[says]
|
||||
# appname = Pidgin
|
||||
# summary = *says*
|
||||
# urgency = critical
|
||||
#
|
||||
#[twitter]
|
||||
# appname = Pidgin
|
||||
# summary = *twitter.com*
|
||||
# urgency = normal
|
||||
#
|
||||
#[stack-volumes]
|
||||
# appname = "some_volume_notifiers"
|
||||
# set_stack_tag = "volume"
|
||||
#
|
||||
# vim: ft=cfg
|
186
chezmoi/private_dot_config/i3/config
Normal file
186
chezmoi/private_dot_config/i3/config
Normal file
|
@ -0,0 +1,186 @@
|
|||
# i3 config file (v4)
|
||||
#
|
||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||
#
|
||||
### Startup
|
||||
exec_always --no-startup-id autotiling
|
||||
exec --no-startup-id bash -c 'while sleep 1; do flock ~/.polybar.lock polybar mybar; done'
|
||||
exec --no-startup-id bash -c 'while sleep 15; do autorandr --change; done'
|
||||
exec --no-startup-id dunst
|
||||
exec --no-startup-id nm-applet
|
||||
exec --no-startup-id blueman-applet
|
||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||
exec --no-startup-id xss-lock --transfer-sleep-lock -- ~/bin/i3lock
|
||||
# background
|
||||
exec --no-startup-id ~/.fehbg
|
||||
|
||||
set $mod Mod4
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:Source Code Pro 11px
|
||||
|
||||
### Window display
|
||||
# don't show the title bar on the window
|
||||
default_border none
|
||||
|
||||
### Screenshots
|
||||
bindsym --release Print exec scrot ~/'Pictures/%Y-%m-%d-%H:%M:%S.png'
|
||||
bindsym --release Ctrl+Print exec scrot -e 'xclip -selection clipboard -in -t image/png $f' /tmp/scrot-tmp.png
|
||||
bindsym --release Shift+Print exec scrot -s ~/'Pictures/%Y-%m-%d-%H:%M:%S.png'
|
||||
bindsym --release Ctrl+Shift+Print exec scrot -s -e 'xclip -selection clipboard -in -t image/png $f' /tmp/scrot-tmp.png
|
||||
|
||||
|
||||
# Use pactl to adjust volume in PulseAudio.
|
||||
set $refresh_i3status killall -SIGUSR1 i3status
|
||||
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
bindsym XF86Display exec arandr
|
||||
bindsym $mod+Escape exec loginctl list-sessions | awk -v UID=$UID '$2 == UID{print $1}' | xargs loginctl lock-session
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# start a terminal
|
||||
bindsym $mod+Return exec alacritty
|
||||
|
||||
# kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# start dmenu (a program launcher)
|
||||
#bindsym $mod+d exec --no-startup-id dmenu_run
|
||||
bindsym $mod+d exec --no-startup-id rofi -show combi -run-shell-command 'alacritty -e zsh -ic "{cmd} && read"'
|
||||
# A more modern dmenu replacement is rofi:
|
||||
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
|
||||
# There also is i3-dmenu-desktop which only displays applications shipping a
|
||||
# .desktop file. It is a wrapper around dmenu, so you need that installed.
|
||||
# bindcode $mod+40 exec --no-startup-id i3-dmenu-desktop
|
||||
|
||||
# change focus
|
||||
bindsym $mod+h focus left
|
||||
bindsym $mod+j focus down
|
||||
bindsym $mod+k focus up
|
||||
bindsym $mod+l focus right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# move focused window
|
||||
bindsym $mod+Shift+h move left
|
||||
bindsym $mod+Shift+j move down
|
||||
bindsym $mod+Shift+k move up
|
||||
bindsym $mod+Shift+l move right
|
||||
|
||||
# alternatively, you can use the cursor keys:
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
|
||||
# split in horizontal orientation
|
||||
bindsym $mod+b split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+v split v
|
||||
|
||||
# enter fullscreen mode for the focused container
|
||||
bindsym $mod+f fullscreen toggle
|
||||
|
||||
# change container layout (stacked, tabbed, toggle split)
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# toggle tiling / floating
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# change focus between tiling / floating windows
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# focus the parent container
|
||||
bindsym $mod+a focus parent
|
||||
|
||||
# focus the child container
|
||||
#bindsym $mod+d focus child
|
||||
|
||||
# Define names for default workspaces for which we configure key bindings later on.
|
||||
# We use variables to avoid repeating the names in multiple places.
|
||||
set $ws1 "1"
|
||||
set $ws2 "2"
|
||||
set $ws3 "3"
|
||||
set $ws4 "4"
|
||||
set $ws5 "5"
|
||||
set $ws6 "6"
|
||||
set $ws7 "7"
|
||||
set $ws8 "8"
|
||||
set $ws9 "9"
|
||||
set $ws10 "10"
|
||||
|
||||
# switch to workspace
|
||||
bindsym $mod+1 workspace number $ws1
|
||||
bindsym $mod+2 workspace number $ws2
|
||||
bindsym $mod+3 workspace number $ws3
|
||||
bindsym $mod+4 workspace number $ws4
|
||||
bindsym $mod+5 workspace number $ws5
|
||||
bindsym $mod+6 workspace number $ws6
|
||||
bindsym $mod+7 workspace number $ws7
|
||||
bindsym $mod+8 workspace number $ws8
|
||||
bindsym $mod+9 workspace number $ws9
|
||||
bindsym $mod+0 workspace number $ws10
|
||||
|
||||
# move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number $ws1
|
||||
bindsym $mod+Shift+2 move container to workspace number $ws2
|
||||
bindsym $mod+Shift+3 move container to workspace number $ws3
|
||||
bindsym $mod+Shift+4 move container to workspace number $ws4
|
||||
bindsym $mod+Shift+5 move container to workspace number $ws5
|
||||
bindsym $mod+Shift+6 move container to workspace number $ws6
|
||||
bindsym $mod+Shift+7 move container to workspace number $ws7
|
||||
bindsym $mod+Shift+8 move container to workspace number $ws8
|
||||
bindsym $mod+Shift+9 move container to workspace number $ws9
|
||||
bindsym $mod+Shift+0 move container to workspace number $ws10
|
||||
|
||||
# reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
||||
bindsym $mod+Shift+r restart
|
||||
# exit i3 (logs you out of your X session)
|
||||
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
|
||||
|
||||
# resize window (you can also use the mouse for that)
|
||||
mode "resize" {
|
||||
# These bindings trigger as soon as you enter the resize mode
|
||||
|
||||
# Pressing left will shrink the window’s width.
|
||||
# Pressing right will grow the window’s width.
|
||||
# Pressing up will shrink the window’s height.
|
||||
# Pressing down will grow the window’s height.
|
||||
bindsym h resize shrink width 10 px or 10 ppt
|
||||
bindsym j resize grow height 10 px or 10 ppt
|
||||
bindsym k resize shrink height 10 px or 10 ppt
|
||||
bindsym l resize grow width 10 px or 10 ppt
|
||||
|
||||
# same bindings, but for the arrow keys
|
||||
bindsym Left resize shrink width 10 px or 10 ppt
|
||||
bindsym Down resize grow height 10 px or 10 ppt
|
||||
bindsym Up resize shrink height 10 px or 10 ppt
|
||||
bindsym Right resize grow width 10 px or 10 ppt
|
||||
|
||||
# back to normal: Enter or Escape or $mod+r
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
bindsym $mod+r mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+r mode "resize"
|
12
chezmoi/private_dot_config/nvim/dot_netrwhist
Normal file
12
chezmoi/private_dot_config/nvim/dot_netrwhist
Normal file
|
@ -0,0 +1,12 @@
|
|||
let g:netrw_dirhistmax =10
|
||||
let g:netrw_dirhistcnt =2
|
||||
let g:netrw_dirhist_2='/home/tony.blyler/repos/table-data-indexing-job/docker'
|
||||
let g:netrw_dirhist_1='/home/tony.blyler/.zshrc.d'
|
||||
let g:netrw_dirhist_0='/home/tony.blyler/go/bin'
|
||||
let g:netrw_dirhist_9='/home/tony.blyler/repos/user-v2-service'
|
||||
let g:netrw_dirhist_8='/home/tony.blyler/.config/i3'
|
||||
let g:netrw_dirhist_7='/home/tony.blyler/.config/sway'
|
||||
let g:netrw_dirhist_6='/home/tony.blyler/.zshrc.d'
|
||||
let g:netrw_dirhist_5='/dev/shm'
|
||||
let g:netrw_dirhist_4='/home/tony.blyler/repos/cbi-site/src'
|
||||
let g:netrw_dirhist_3='/home/tony.blyler/.config/alacritty'
|
4
chezmoi/private_dot_config/nvim/init.lua
Normal file
4
chezmoi/private_dot_config/nvim/init.lua
Normal file
|
@ -0,0 +1,4 @@
|
|||
require('settings')
|
||||
require('plugins')
|
||||
require('mappings')
|
||||
require('autocmd')
|
7
chezmoi/private_dot_config/nvim/lua/autocmd.lua
Normal file
7
chezmoi/private_dot_config/nvim/lua/autocmd.lua
Normal file
|
@ -0,0 +1,7 @@
|
|||
local api = vim.api
|
||||
|
||||
-- set the theme to gruvbox
|
||||
api.nvim_command("autocmd vimenter * ++nested colorscheme gruvbox")
|
||||
|
||||
-- run nvim-lightbulb for all files
|
||||
vim.cmd [[autocmd CursorHold,CursorHoldI * lua require'nvim-lightbulb'.update_lightbulb()]]
|
26
chezmoi/private_dot_config/nvim/lua/mappings.lua
Normal file
26
chezmoi/private_dot_config/nvim/lua/mappings.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
local api = vim.api
|
||||
|
||||
local M = {}
|
||||
function M.map(mode, keydef, command, opts)
|
||||
local options = {noremap = true}
|
||||
if opts then options = vim.tbl_extend("force", options, opts) end
|
||||
api.nvim_set_keymap(mode, keydef, command, options)
|
||||
end
|
||||
|
||||
-- fzf searching
|
||||
M.map("", "<leader>ff", "<cmd>lua require('telescope.builtin').find_files()<cr>")
|
||||
M.map("", "<leader>fg", "<cmd>lua require('telescope.builtin').live_grep()<cr>")
|
||||
M.map("", "<leader>fb", "<cmd>lua require('telescope.builtin').buffers()<cr>")
|
||||
M.map("", "<leader>fh", "<cmd>lua require('telescope.builtin').help_tags()<cr>")
|
||||
M.map("", "<leader>fb", "<cmd>lua require('telescope.builtin').file_browser()<cr>")
|
||||
|
||||
-- easymotion
|
||||
M.map("", "<leader><leader>j", "<cmd>lua require('hop').hint_lines({direction = require('hop.hint').HintDirection.AFTER_CURSOR})<cr>")
|
||||
M.map("", "<leader><leader>k", "<cmd>lua require('hop').hint_lines({direction = require('hop.hint').HintDirection.BEFORE_CURSOR})<cr>")
|
||||
M.map("", "<leader><leader>l", "<cmd>lua require('hop').hint_words({direction = require('hop.hint').HintDirection.AFTER_CURSOR, current_line_only = true})<cr>")
|
||||
M.map("", "<leader><leader>h", "<cmd>lua require('hop').hint_words({direction = require('hop.hint').HintDirection.BEFORE_CURSOR, current_line_only = true})<cr>")
|
||||
|
||||
api.nvim_command(":command Bd lua MiniBufremove.delete()")
|
||||
api.nvim_command(":command FixWhitespace lua MiniTrailspace.trim()")
|
||||
|
||||
return M
|
|
@ -0,0 +1 @@
|
|||
require("bufferline").setup()
|
46
chezmoi/private_dot_config/nvim/lua/plugins/config/cmp.lua
Normal file
46
chezmoi/private_dot_config/nvim/lua/plugins/config/cmp.lua
Normal file
|
@ -0,0 +1,46 @@
|
|||
local cmp = require'cmp'
|
||||
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
-- REQUIRED - you must specify a snippet engine
|
||||
expand = function(args)
|
||||
require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<tab>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
['<C-p>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }),
|
||||
['<Down>'] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }),
|
||||
['<Up>'] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }),
|
||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Replace,
|
||||
select = true,
|
||||
})
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' }, -- For luasnip users.
|
||||
}, {
|
||||
{ name = 'buffer' },
|
||||
})
|
||||
})
|
||||
|
||||
-- Use buffer source for `/` (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline('/', {
|
||||
sources = {
|
||||
{ name = 'buffer' }
|
||||
}
|
||||
})
|
||||
|
||||
-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
|
||||
cmp.setup.cmdline(':', {
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'path' }
|
||||
}, {
|
||||
{ name = 'cmdline' }
|
||||
})
|
||||
})
|
|
@ -0,0 +1,7 @@
|
|||
require("gitsigns").setup {
|
||||
current_line_blame = true,
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
delay = 0,
|
||||
},
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
require("hop").setup()
|
|
@ -0,0 +1,6 @@
|
|||
require("indent_blankline").setup {
|
||||
show_current_context = true,
|
||||
show_current_context_start = true,
|
||||
}
|
||||
|
||||
vim.g.indent_blankline_use_treesitter = true
|
|
@ -0,0 +1,10 @@
|
|||
local lightbulb = require("nvim-lightbulb")
|
||||
|
||||
lightbulb.get_status_text()
|
||||
lightbulb.update_lightbulb({
|
||||
status_text = {
|
||||
enabled = true,
|
||||
text = "💡",
|
||||
text_unavailble = "",
|
||||
}
|
||||
})
|
|
@ -0,0 +1,104 @@
|
|||
local lsp_installer_servers = require'nvim-lsp-installer.servers'
|
||||
local cmp_lsp = require('cmp_nvim_lsp')
|
||||
local null_ls = require("null-ls")
|
||||
|
||||
-- Use an on_attach function to only map the following keys
|
||||
-- after the language server attaches to the current buffer
|
||||
local on_attach = function(client, bufnr)
|
||||
local function buf_set_keymap(...) vim.api.nvim_buf_set_keymap(bufnr, ...) end
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufnr, ...) end
|
||||
|
||||
-- Enable completion triggered by <c-x><c-o>
|
||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings.
|
||||
local opts = { noremap=true, silent=true }
|
||||
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
|
||||
--buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
|
||||
buf_set_keymap('n', 'gd', "<cmd>lua require('telescope.builtin').lsp_definitions()<CR>", opts)
|
||||
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
|
||||
--buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
|
||||
buf_set_keymap('n', 'gi', "<cmd>lua require('telescope.builtin').lsp_implementations()<CR>", opts)
|
||||
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
|
||||
--buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>D', "<cmd>lua require('telescope.builtin').lsp_type_definitions()<CR>", opts)
|
||||
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
|
||||
--buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>ca', "<cmd>lua require('telescope.builtin').lsp_code_actions()<CR>", opts)
|
||||
--buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
|
||||
buf_set_keymap('', 'gr', "<cmd>lua require('telescope.builtin').lsp_references()<CR>", opts)
|
||||
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
|
||||
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
|
||||
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
|
||||
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
|
||||
|
||||
require("lsp-status").on_attach(client) -- required for LSP status to function
|
||||
local basics = require("lsp_basics") -- adds nice human accessible LSP commands
|
||||
basics.make_lsp_commands(client, bufnr)
|
||||
basics.make_lsp_mappings(client, bufnr)
|
||||
|
||||
local sources = {
|
||||
null_ls.builtins.formatting.gofumpt,
|
||||
null_ls.builtins.formatting.goimports,
|
||||
null_ls.builtins.formatting.isort,
|
||||
null_ls.builtins.formatting.black.with({
|
||||
extra_args = { "-l 120" }
|
||||
}),
|
||||
null_ls.builtins.diagnostics.flake8.with({
|
||||
extra_args = { "--max-line-length=120" }
|
||||
}),
|
||||
null_ls.builtins.formatting.rubocop,
|
||||
null_ls.builtins.formatting.rustfmt,
|
||||
null_ls.builtins.diagnostics.shellcheck,
|
||||
null_ls.builtins.formatting.stylua,
|
||||
}
|
||||
|
||||
null_ls.setup({sources = sources })
|
||||
end
|
||||
|
||||
local lspServers = {
|
||||
bashls = {},
|
||||
cssls = {},
|
||||
dockerls = {},
|
||||
eslint = {},
|
||||
gopls = {
|
||||
cmd = {"gopls", "serve"},
|
||||
settings = {
|
||||
gopls = {
|
||||
analyses = {
|
||||
unusedparams = true,
|
||||
},
|
||||
staticcheck = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
html = {},
|
||||
jsonls = {},
|
||||
sumneko_lua = {},
|
||||
jedi_language_server = {},
|
||||
rust_analyzer = {},
|
||||
terraformls = {},
|
||||
tsserver = {},
|
||||
lemminx = {},
|
||||
yamlls = {}
|
||||
}
|
||||
|
||||
for lspServer, opts in pairs(lspServers) do
|
||||
local server_available, requested_server = lsp_installer_servers.get_server(lspServer)
|
||||
if server_available then
|
||||
opts["capabilities"] = cmp_lsp.update_capabilities(vim.lsp.protocol.make_client_capabilities())
|
||||
opts["on_attach"] = on_attach
|
||||
requested_server:on_ready(function ()
|
||||
requested_server:setup(opts)
|
||||
end)
|
||||
if not requested_server:is_installed() then
|
||||
requested_server:install()
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,5 @@
|
|||
require("mini.bufremove").setup()
|
||||
require("mini.comment").setup()
|
||||
require("mini.cursorword").setup()
|
||||
require("mini.surround").setup()
|
||||
require("mini.trailspace").setup()
|
|
@ -0,0 +1,2 @@
|
|||
local statusline = require('statusline')
|
||||
statusline.tabline = false
|
|
@ -0,0 +1,14 @@
|
|||
local telescope = require("telescope")
|
||||
|
||||
telescope.setup({
|
||||
extensions = {
|
||||
fzf = {
|
||||
fuzzy = true,
|
||||
override_generic_sorter = true,
|
||||
override_file_sorter = true,
|
||||
case_mode = "smart_case",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
telescope.load_extension("fzf")
|
|
@ -0,0 +1,14 @@
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
ensure_installed = "all", -- one of "all", "maintained" (parsers with maintainers), or a list of languages
|
||||
sync_install = false, -- install languages synchronously (only applied to `ensure_installed`)
|
||||
ignore_install = {}, -- List of parsers to ignore installing
|
||||
highlight = {
|
||||
enable = true, -- false will disable the whole extension
|
||||
disable = {}, -- list of language that will be disabled
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
}
|
69
chezmoi/private_dot_config/nvim/lua/plugins/init.lua
Normal file
69
chezmoi/private_dot_config/nvim/lua/plugins/init.lua
Normal file
|
@ -0,0 +1,69 @@
|
|||
local fn = vim.fn
|
||||
|
||||
local install_path = fn.stdpath('data') .. '/site/pack/paqs/start/paq-nvim'
|
||||
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({'git', 'clone', '--depth=1', 'https://github.com/savq/paq-nvim.git', install_path})
|
||||
end
|
||||
|
||||
require "paq" {
|
||||
"savq/paq-nvim"; -- let Paq manage itself
|
||||
|
||||
"morhetz/gruvbox"; -- gruvbox theme
|
||||
|
||||
"kyazdani42/nvim-web-devicons"; -- per the name, fancy icons with a Nerd Font patched font
|
||||
|
||||
"lewis6991/gitsigns.nvim"; -- git gutter
|
||||
"nvim-lua/plenary.nvim"; -- dependency of lewis6991/gitsigns.nvim, nvim-telescope/telescope.nvim
|
||||
|
||||
"nvim-telescope/telescope.nvim"; -- nice searching
|
||||
{"nvim-telescope/telescope-fzf-native.nvim", run="zsh -c make"}; -- enable fzf searching for telescope
|
||||
|
||||
|
||||
"phaazon/hop.nvim"; -- easymotion navigation
|
||||
|
||||
"beauwilliams/statusline.lua"; -- statusline
|
||||
"akinsho/bufferline.nvim"; -- bufferline
|
||||
|
||||
"echasnovski/mini.nvim"; -- bunch of good small plugins: whitespace, buffer layout, commenting, surround, etc
|
||||
|
||||
"tpope/vim-fugitive"; -- __the__ git plugin
|
||||
|
||||
{"nvim-treesitter/nvim-treesitter", run=TSUpdate}; -- nice and quick syntax tree
|
||||
|
||||
"lukas-reineke/indent-blankline.nvim"; -- pretty visualization of line indents
|
||||
|
||||
"kosayoda/nvim-lightbulb"; -- shows a light bulb like vs code for code actions
|
||||
"nvim-lua/lsp-status.nvim"; -- nice statusline components for LSP servers
|
||||
|
||||
"tpope/vim-sleuth"; -- automatic tab/spaces detection
|
||||
|
||||
"rhysd/vim-grammarous"; -- grammar checking
|
||||
|
||||
-- LSP Server
|
||||
"neovim/nvim-lspconfig";
|
||||
"williamboman/nvim-lsp-installer";
|
||||
"jose-elias-alvarez/null-ls.nvim";
|
||||
"nanotee/nvim-lsp-basics";
|
||||
|
||||
-- autocomplete with nvim-cmp
|
||||
"hrsh7th/cmp-nvim-lsp";
|
||||
"hrsh7th/cmp-buffer";
|
||||
"hrsh7th/cmp-path";
|
||||
"hrsh7th/cmp-cmdline";
|
||||
"hrsh7th/nvim-cmp";
|
||||
"L3MON4D3/LuaSnip";
|
||||
"saadparwaiz1/cmp_luasnip";
|
||||
}
|
||||
|
||||
require("plugins.config.bufferline")
|
||||
require("plugins.config.cmp")
|
||||
require("plugins.config.gitsigns")
|
||||
require("plugins.config.hop")
|
||||
require("plugins.config.indentblankline")
|
||||
require("plugins.config.lightbulb")
|
||||
require("plugins.config.lspinstall")
|
||||
require("plugins.config.mini")
|
||||
require("plugins.config.statusline")
|
||||
require("plugins.config.telescope")
|
||||
require("plugins.config.treesitter")
|
28
chezmoi/private_dot_config/nvim/lua/settings.lua
Normal file
28
chezmoi/private_dot_config/nvim/lua/settings.lua
Normal file
|
@ -0,0 +1,28 @@
|
|||
local g = vim.g
|
||||
local opt = vim.opt
|
||||
local cmd = vim.cmd
|
||||
|
||||
-- color theme
|
||||
-- gruvbox is used via the autocmd require
|
||||
g.gruvbox_contrast_dark = "hard" -- hard contrast mode for gruvobx
|
||||
opt.background = "dark" -- make sure dark mode is used
|
||||
|
||||
opt.termguicolors = true -- enable 24 bit colors
|
||||
opt.mouse = 'c' -- disable mouse
|
||||
opt.number = true -- show line numbers
|
||||
-- opt.cursorline = true -- highlight the line that the cursor is on
|
||||
opt.laststatus = 2 -- always show the status line
|
||||
opt.autoindent = true -- turn on autoindent
|
||||
opt.smarttab = true -- turn on smart tabs
|
||||
opt.incsearch = true -- turn on incremental search
|
||||
opt.ruler = true -- show ruler on page
|
||||
opt.lazyredraw = true -- make large files bearable
|
||||
opt.regexpengine = 1 -- make searching large files bearable
|
||||
|
||||
-- tabs look like 4 spaces
|
||||
opt.expandtab = true
|
||||
opt.tabstop = 4
|
||||
opt.shiftwidth = 4
|
||||
opt.softtabstop = 4
|
||||
|
||||
cmd('filetype plugin indent on')
|
430
chezmoi/private_dot_config/polybar/config
Normal file
430
chezmoi/private_dot_config/polybar/config
Normal file
|
@ -0,0 +1,430 @@
|
|||
;==========================================================
|
||||
;
|
||||
;
|
||||
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
|
||||
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
|
||||
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
|
||||
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
|
||||
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
|
||||
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
|
||||
;
|
||||
;
|
||||
; To learn more about how to configure Polybar
|
||||
; go to https://github.com/polybar/polybar
|
||||
;
|
||||
; The README contains a lot of information
|
||||
;
|
||||
;==========================================================
|
||||
|
||||
[colors]
|
||||
;background = ${xrdb:color0:#222}
|
||||
background = #222
|
||||
background-alt = #444
|
||||
;foreground = ${xrdb:color7:#222}
|
||||
foreground = #dfdfdf
|
||||
foreground-alt = #555
|
||||
primary = #ffb52a
|
||||
secondary = #e60053
|
||||
alert = #bd2c40
|
||||
|
||||
[bar/mybar]
|
||||
;monitor = ${env:MONITOR:HDMI-1}
|
||||
width = 100%
|
||||
height = 27
|
||||
;offset-x = 1%
|
||||
;offset-y = 1%
|
||||
radius = 6.0
|
||||
fixed-center = false
|
||||
|
||||
background = ${colors.background}
|
||||
foreground = ${colors.foreground}
|
||||
|
||||
line-size = 3
|
||||
line-color = #f00
|
||||
|
||||
border-size = 4
|
||||
border-color = #00000000
|
||||
|
||||
padding-left = 0
|
||||
padding-right = 2
|
||||
|
||||
module-margin-left = 1
|
||||
module-margin-right = 2
|
||||
|
||||
#font-0 = fixed:pixelsize=10;1
|
||||
font-0 = Source Code Pro:style=regular:size=9
|
||||
font-1 = Source Code Pro:style=regular:size=9
|
||||
font-2 = Source Code Pro:style=regular:size=9
|
||||
|
||||
modules-left = i3
|
||||
modules-center = xwindow
|
||||
modules-right = filesystem backlight-acpi pulseaudio memory cpu wlan eth battery temperature date powermenu
|
||||
|
||||
tray-position = right
|
||||
tray-padding = 2
|
||||
;tray-background = #0063ff
|
||||
|
||||
;wm-restack = bspwm
|
||||
;wm-restack = i3
|
||||
|
||||
;override-redirect = true
|
||||
|
||||
;scroll-up = bspwm-desknext
|
||||
;scroll-down = bspwm-deskprev
|
||||
|
||||
;scroll-up = i3wm-wsnext
|
||||
;scroll-down = i3wm-wsprev
|
||||
|
||||
cursor-click = pointer
|
||||
cursor-scroll = ns-resize
|
||||
|
||||
[module/xwindow]
|
||||
type = internal/xwindow
|
||||
label = %title:0:30:...%
|
||||
|
||||
[module/xkeyboard]
|
||||
type = internal/xkeyboard
|
||||
blacklist-0 = num lock
|
||||
|
||||
format-prefix = " "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-prefix-underline = ${colors.secondary}
|
||||
|
||||
label-layout = %layout%
|
||||
label-layout-underline = ${colors.secondary}
|
||||
|
||||
label-indicator-padding = 2
|
||||
label-indicator-margin = 1
|
||||
label-indicator-background = ${colors.secondary}
|
||||
label-indicator-underline = ${colors.secondary}
|
||||
|
||||
[module/filesystem]
|
||||
type = internal/fs
|
||||
interval = 25
|
||||
|
||||
mount-0 = /
|
||||
|
||||
label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
|
||||
label-unmounted = %mountpoint% not mounted
|
||||
label-unmounted-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/bspwm]
|
||||
type = internal/bspwm
|
||||
|
||||
label-focused = %index%
|
||||
label-focused-background = ${colors.background-alt}
|
||||
label-focused-underline= ${colors.primary}
|
||||
label-focused-padding = 2
|
||||
|
||||
label-occupied = %index%
|
||||
label-occupied-padding = 2
|
||||
|
||||
label-urgent = %index%!
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 2
|
||||
|
||||
label-empty = %index%
|
||||
label-empty-foreground = ${colors.foreground-alt}
|
||||
label-empty-padding = 2
|
||||
|
||||
; Separator in between workspaces
|
||||
; label-separator = |
|
||||
|
||||
[module/i3]
|
||||
type = internal/i3
|
||||
format = <label-state> <label-mode>
|
||||
index-sort = true
|
||||
wrapping-scroll = false
|
||||
|
||||
; Only show workspaces on the same output as the bar
|
||||
;pin-workspaces = true
|
||||
|
||||
label-mode-padding = 2
|
||||
label-mode-foreground = #000
|
||||
label-mode-background = ${colors.primary}
|
||||
|
||||
; focused = Active workspace on focused monitor
|
||||
label-focused = %index%
|
||||
label-focused-background = ${colors.background-alt}
|
||||
label-focused-underline= ${colors.primary}
|
||||
label-focused-padding = 2
|
||||
|
||||
; unfocused = Inactive workspace on any monitor
|
||||
label-unfocused = %index%
|
||||
label-unfocused-padding = 2
|
||||
|
||||
; visible = Active workspace on unfocused monitor
|
||||
label-visible = %index%
|
||||
label-visible-background = ${self.label-focused-background}
|
||||
label-visible-underline = ${self.label-focused-underline}
|
||||
label-visible-padding = ${self.label-focused-padding}
|
||||
|
||||
; urgent = Workspace with urgency hint set
|
||||
label-urgent = %index%
|
||||
label-urgent-background = ${colors.alert}
|
||||
label-urgent-padding = 2
|
||||
|
||||
; Separator in between workspaces
|
||||
; label-separator = |
|
||||
|
||||
|
||||
[module/mpd]
|
||||
type = internal/mpd
|
||||
format-online = <label-song> <icon-prev> <icon-stop> <toggle> <icon-next>
|
||||
|
||||
icon-prev =
|
||||
icon-stop =
|
||||
icon-play =
|
||||
icon-pause =
|
||||
icon-next =
|
||||
|
||||
label-song-maxlen = 25
|
||||
label-song-ellipsis = true
|
||||
|
||||
[module/xbacklight]
|
||||
type = internal/xbacklight
|
||||
|
||||
format = <label> <bar>
|
||||
label = BL
|
||||
|
||||
bar-width = 10
|
||||
bar-indicator = |
|
||||
bar-indicator-foreground = #fff
|
||||
bar-indicator-font = 2
|
||||
bar-fill = ─
|
||||
bar-fill-font = 2
|
||||
bar-fill-foreground = #9f78e1
|
||||
bar-empty = ─
|
||||
bar-empty-font = 2
|
||||
bar-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/backlight-acpi]
|
||||
inherit = module/xbacklight
|
||||
type = internal/backlight
|
||||
card = intel_backlight
|
||||
format = <label>
|
||||
label = "☼ %percentage%%"
|
||||
|
||||
[module/cpu]
|
||||
type = internal/cpu
|
||||
interval = 2
|
||||
format-prefix = "CPU "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #f90000
|
||||
label = %percentage:2%%
|
||||
|
||||
[module/memory]
|
||||
type = internal/memory
|
||||
interval = 2
|
||||
format-prefix = "RAM "
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #4bffdc
|
||||
label = %percentage_used%%
|
||||
|
||||
[module/wlan]
|
||||
type = internal/network
|
||||
interface = wlp0s20f3
|
||||
interval = 3.0
|
||||
|
||||
format-connected = <ramp-signal> <label-connected>
|
||||
format-connected-underline = #9f78e1
|
||||
label-connected = %essid%
|
||||
|
||||
format-disconnected =
|
||||
;format-disconnected = <label-disconnected>
|
||||
;format-disconnected-underline = ${self.format-connected-underline}
|
||||
;label-disconnected = %ifname% disconnected
|
||||
;label-disconnected-foreground = ${colors.foreground-alt}
|
||||
|
||||
ramp-signal-0 =
|
||||
ramp-signal-1 =
|
||||
ramp-signal-2 =
|
||||
ramp-signal-3 =
|
||||
ramp-signal-4 =
|
||||
ramp-signal-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/eth]
|
||||
type = internal/network
|
||||
interface = enp0s31f6
|
||||
interval = 3.0
|
||||
|
||||
format-connected-underline = #55aa55
|
||||
format-connected-prefix = " "
|
||||
format-connected-prefix-foreground = ${colors.foreground-alt}
|
||||
label-connected = %local_ip%
|
||||
|
||||
format-disconnected =
|
||||
;format-disconnected = <label-disconnected>
|
||||
;format-disconnected-underline = ${self.format-connected-underline}
|
||||
;label-disconnected = %ifname% disconnected
|
||||
;label-disconnected-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/date]
|
||||
type = internal/date
|
||||
interval = 5
|
||||
|
||||
date = " %Y-%m-%d"
|
||||
date-alt =
|
||||
|
||||
time = "%H:%M:%S %Z"
|
||||
time-alt = %H:%M
|
||||
|
||||
format-prefix =
|
||||
format-prefix-foreground = ${colors.foreground-alt}
|
||||
format-underline = #0a6cf5
|
||||
|
||||
label = %date% %time%
|
||||
|
||||
[module/pulseaudio]
|
||||
type = internal/pulseaudio
|
||||
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume = VOL %percentage%%
|
||||
label-volume-foreground = ${root.foreground}
|
||||
|
||||
label-muted = 🔇 muted
|
||||
label-muted-foreground = #666
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = #55aa55
|
||||
bar-volume-foreground-1 = #55aa55
|
||||
bar-volume-foreground-2 = #55aa55
|
||||
bar-volume-foreground-3 = #55aa55
|
||||
bar-volume-foreground-4 = #55aa55
|
||||
bar-volume-foreground-5 = #f5a70a
|
||||
bar-volume-foreground-6 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/alsa]
|
||||
type = internal/alsa
|
||||
|
||||
format-volume = <label-volume> <bar-volume>
|
||||
label-volume = VOL
|
||||
label-volume-foreground = ${root.foreground}
|
||||
|
||||
format-muted-prefix = " "
|
||||
format-muted-foreground = ${colors.foreground-alt}
|
||||
label-muted = sound muted
|
||||
|
||||
bar-volume-width = 10
|
||||
bar-volume-foreground-0 = #55aa55
|
||||
bar-volume-foreground-1 = #55aa55
|
||||
bar-volume-foreground-2 = #55aa55
|
||||
bar-volume-foreground-3 = #55aa55
|
||||
bar-volume-foreground-4 = #55aa55
|
||||
bar-volume-foreground-5 = #f5a70a
|
||||
bar-volume-foreground-6 = #ff5555
|
||||
bar-volume-gradient = false
|
||||
bar-volume-indicator = |
|
||||
bar-volume-indicator-font = 2
|
||||
bar-volume-fill = ─
|
||||
bar-volume-fill-font = 2
|
||||
bar-volume-empty = ─
|
||||
bar-volume-empty-font = 2
|
||||
bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/battery]
|
||||
type = internal/battery
|
||||
battery = BAT0
|
||||
adapter = AC
|
||||
full-at = 95
|
||||
|
||||
label-charging = Charging %percentage%% %time%
|
||||
label-discharging = Discharging %percentage%% %time%
|
||||
label-full = Fully charged
|
||||
|
||||
format-charging = <animation-charging> <label-charging>
|
||||
format-charging-underline = #ffb52a
|
||||
|
||||
format-discharging = <animation-discharging> <label-discharging>
|
||||
format-discharging-underline = ${self.format-charging-underline}
|
||||
|
||||
format-full-prefix = " "
|
||||
format-full-prefix-foreground = ${colors.foreground-alt}
|
||||
format-full-underline = ${self.format-charging-underline}
|
||||
|
||||
ramp-capacity-0 =
|
||||
ramp-capacity-1 =
|
||||
ramp-capacity-2 =
|
||||
ramp-capacity-foreground = ${colors.foreground-alt}
|
||||
|
||||
animation-charging-0 =
|
||||
animation-charging-1 =
|
||||
animation-charging-2 =
|
||||
animation-charging-foreground = ${colors.foreground-alt}
|
||||
animation-charging-framerate = 750
|
||||
|
||||
animation-discharging-0 =
|
||||
animation-discharging-1 =
|
||||
animation-discharging-2 =
|
||||
animation-discharging-foreground = ${colors.foreground-alt}
|
||||
animation-discharging-framerate = 750
|
||||
|
||||
[module/temperature]
|
||||
type = internal/temperature
|
||||
thermal-zone = 0
|
||||
warn-temperature = 60
|
||||
|
||||
format = <ramp> <label>
|
||||
format-underline = #f50a4d
|
||||
format-warn = <ramp> <label-warn>
|
||||
format-warn-underline = ${self.format-underline}
|
||||
|
||||
label = %temperature-c%
|
||||
label-warn = %temperature-c%
|
||||
label-warn-foreground = ${colors.secondary}
|
||||
|
||||
ramp-0 =
|
||||
ramp-1 =
|
||||
ramp-2 =
|
||||
ramp-foreground = ${colors.foreground-alt}
|
||||
|
||||
[module/powermenu]
|
||||
type = custom/menu
|
||||
|
||||
expand-right = true
|
||||
|
||||
format-spacing = 1
|
||||
|
||||
label-open =
|
||||
label-open-foreground = ${colors.secondary}
|
||||
label-close = cancel
|
||||
label-close-foreground = ${colors.secondary}
|
||||
label-separator = |
|
||||
label-separator-foreground = ${colors.foreground-alt}
|
||||
|
||||
menu-0-0 = reboot
|
||||
menu-0-0-exec = menu-open-1
|
||||
menu-0-1 = power off
|
||||
menu-0-1-exec = menu-open-2
|
||||
|
||||
menu-1-0 = cancel
|
||||
menu-1-0-exec = menu-open-0
|
||||
menu-1-1 = reboot
|
||||
menu-1-1-exec = sudo reboot
|
||||
|
||||
menu-2-0 = power off
|
||||
menu-2-0-exec = sudo poweroff
|
||||
menu-2-1 = cancel
|
||||
menu-2-1-exec = menu-open-0
|
||||
|
||||
[settings]
|
||||
screenchange-reload = true
|
||||
;compositing-background = xor
|
||||
;compositing-background = screen
|
||||
;compositing-foreground = source
|
||||
;compositing-border = over
|
||||
;pseudo-transparency = false
|
||||
|
||||
[global/wm]
|
||||
margin-top = 0
|
||||
margin-bottom = 0
|
||||
|
||||
; vim:ft=dosini
|
|
@ -0,0 +1,12 @@
|
|||
[Settings]
|
||||
gtk-application-prefer-dark-theme=1
|
||||
gtk-button-images=1
|
||||
gtk-cursor-theme-name=Adwaita
|
||||
gtk-decoration-layout=icon:minimize,maximize,close
|
||||
gtk-enable-animations=1
|
||||
gtk-font-name=Noto Sans, 10
|
||||
gtk-icon-theme-name=breeze-dark
|
||||
gtk-menu-images=1
|
||||
gtk-primary-button-warps-slider=0
|
||||
gtk-theme-name=Breeze-Dark
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ
|
1
chezmoi/private_dot_config/rofi/config
Normal file
1
chezmoi/private_dot_config/rofi/config
Normal file
|
@ -0,0 +1 @@
|
|||
rofi.theme: /usr/share/rofi/themes/gruvbox-dark-hard.rasi
|
6
chezmoi/private_dot_config/rofi/config.rasi
Normal file
6
chezmoi/private_dot_config/rofi/config.rasi
Normal file
|
@ -0,0 +1,6 @@
|
|||
configuration {
|
||||
theme: "/usr/share/rofi/themes/gruvbox-dark.rasi";
|
||||
font: "Source Code Pro 12";
|
||||
modi: "window,drun,ssh,combi,calc";
|
||||
combi-modi: "window,drun,ssh";
|
||||
}
|
255
chezmoi/private_dot_config/sway/config
Normal file
255
chezmoi/private_dot_config/sway/config
Normal file
|
@ -0,0 +1,255 @@
|
|||
# Default config for sway
|
||||
#
|
||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||
#
|
||||
# Read `man 5 sway` for a complete reference.
|
||||
|
||||
### Startup
|
||||
exec dunst
|
||||
exec lxqt-policykit
|
||||
exec wl-paste -t text --watch clipman store
|
||||
exec nm-applet --indicator
|
||||
exec blueman-applet
|
||||
exec nextcloud
|
||||
exec signal-desktop
|
||||
exec steam
|
||||
exec autotiling
|
||||
exec kanshi
|
||||
|
||||
### Window display
|
||||
# don't show the title bar on the window
|
||||
default_border none
|
||||
|
||||
### Variables
|
||||
#
|
||||
# Logo key. Use Mod1 for Alt.
|
||||
set $mod Mod4
|
||||
# Home row direction keys, like vim
|
||||
set $left h
|
||||
set $down j
|
||||
set $up k
|
||||
set $right l
|
||||
# Your preferred terminal emulator
|
||||
set $term alacritty
|
||||
# Your preferred application launcher
|
||||
# Note: pass the final command to swaymsg so that the resulting window can be opened
|
||||
# on the original workspace that the command was run on.
|
||||
set $menu dmenu_path | rofi -show combi | xargs swaymsg exec --
|
||||
|
||||
### Output configuration
|
||||
#
|
||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||
output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# output HDMI-A-1 resolution 1920x1080 position 1920,0
|
||||
#
|
||||
# You can get the names of your outputs by running: swaymsg -t get_outputs
|
||||
|
||||
### Idle configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
exec swayidle -w \
|
||||
timeout 300 'swaylock -f -c 000000' \
|
||||
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||
lock 'swaylock -f -c 000000' \
|
||||
unlock 'pkill swaylock' \
|
||||
before-sleep 'playerctl pause' \
|
||||
before-sleep 'swaylock -f -c 000000'
|
||||
#
|
||||
# This will lock your screen after 300 seconds of inactivity, then turn off
|
||||
# your displays after another 300 seconds, and turn your screens back on when
|
||||
# resumed. It will also lock your screen before your computer goes to sleep.
|
||||
|
||||
### Input configuration
|
||||
#
|
||||
# Example configuration:
|
||||
#
|
||||
# input "2:14:SynPS/2_Synaptics_TouchPad" {
|
||||
# dwt enabled
|
||||
# tap enabled
|
||||
# natural_scroll enabled
|
||||
# middle_emulation enabled
|
||||
# }
|
||||
#
|
||||
# You can get the names of your inputs by running: swaymsg -t get_inputs
|
||||
# Read `man 5 sway-input` for more information about this section.
|
||||
input type:touchpad {
|
||||
tap enabled
|
||||
natural_scroll enabled
|
||||
}
|
||||
|
||||
input 1267:10372:ELAN_Touchscreen {
|
||||
events disabled
|
||||
}
|
||||
|
||||
### Key bindings
|
||||
|
||||
### Screenshots
|
||||
set $grimshot ~/.local/bin/grimshot
|
||||
|
||||
bindsym Print exec $grimshot --notify save screen
|
||||
bindsym Ctrl+Print exec $grimshot --notify copy screen
|
||||
bindsym Shift+Print exec $grimshot --notify save area
|
||||
bindsym Ctrl+Shift+Print exec $grimshot --notify copy area
|
||||
|
||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl set +5%
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
bindsym XF86Display exec wdisplays
|
||||
bindsym $mod+Escape exec loginctl lock-session
|
||||
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
# Start a terminal
|
||||
bindsym $mod+Return exec $term
|
||||
|
||||
# Kill focused window
|
||||
bindsym $mod+Shift+q kill
|
||||
|
||||
# Start your launcher
|
||||
bindsym $mod+d exec $menu
|
||||
|
||||
# Drag floating windows by holding down $mod and left mouse button.
|
||||
# Resize them with right mouse button + $mod.
|
||||
# Despite the name, also works for non-floating windows.
|
||||
# Change normal to inverse to use left mouse button for resizing and right
|
||||
# mouse button for dragging.
|
||||
floating_modifier $mod normal
|
||||
|
||||
# Reload the configuration file
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
# Move your focus around
|
||||
bindsym $mod+$left focus left
|
||||
bindsym $mod+$down focus down
|
||||
bindsym $mod+$up focus up
|
||||
bindsym $mod+$right focus right
|
||||
# Or use $mod+[up|down|left|right]
|
||||
bindsym $mod+Left focus left
|
||||
bindsym $mod+Down focus down
|
||||
bindsym $mod+Up focus up
|
||||
bindsym $mod+Right focus right
|
||||
|
||||
# Move the focused window with the same, but add Shift
|
||||
bindsym $mod+Shift+$left move left
|
||||
bindsym $mod+Shift+$down move down
|
||||
bindsym $mod+Shift+$up move up
|
||||
bindsym $mod+Shift+$right move right
|
||||
# Ditto, with arrow keys
|
||||
bindsym $mod+Shift+Left move left
|
||||
bindsym $mod+Shift+Down move down
|
||||
bindsym $mod+Shift+Up move up
|
||||
bindsym $mod+Shift+Right move right
|
||||
#
|
||||
# Workspaces:
|
||||
#
|
||||
# Switch to workspace
|
||||
bindsym $mod+1 workspace number 1
|
||||
bindsym $mod+2 workspace number 2
|
||||
bindsym $mod+3 workspace number 3
|
||||
bindsym $mod+4 workspace number 4
|
||||
bindsym $mod+5 workspace number 5
|
||||
bindsym $mod+6 workspace number 6
|
||||
bindsym $mod+7 workspace number 7
|
||||
bindsym $mod+8 workspace number 8
|
||||
bindsym $mod+9 workspace number 9
|
||||
bindsym $mod+0 workspace number 10
|
||||
# Move focused container to workspace
|
||||
bindsym $mod+Shift+1 move container to workspace number 1
|
||||
bindsym $mod+Shift+2 move container to workspace number 2
|
||||
bindsym $mod+Shift+3 move container to workspace number 3
|
||||
bindsym $mod+Shift+4 move container to workspace number 4
|
||||
bindsym $mod+Shift+5 move container to workspace number 5
|
||||
bindsym $mod+Shift+6 move container to workspace number 6
|
||||
bindsym $mod+Shift+7 move container to workspace number 7
|
||||
bindsym $mod+Shift+8 move container to workspace number 8
|
||||
bindsym $mod+Shift+9 move container to workspace number 9
|
||||
bindsym $mod+Shift+0 move container to workspace number 10
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
# You can "split" the current object of your focus with
|
||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||
# respectively.
|
||||
bindsym $mod+b splith
|
||||
bindsym $mod+v splitv
|
||||
|
||||
# Switch the current container between different layout styles
|
||||
bindsym $mod+s layout stacking
|
||||
bindsym $mod+w layout tabbed
|
||||
bindsym $mod+e layout toggle split
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
|
||||
# Toggle the current focus between tiling and floating mode
|
||||
bindsym $mod+Shift+space floating toggle
|
||||
|
||||
# Swap focus between the tiling area and the floating area
|
||||
bindsym $mod+space focus mode_toggle
|
||||
|
||||
# Move focus to the parent container
|
||||
bindsym $mod+a focus parent
|
||||
#
|
||||
# Scratchpad:
|
||||
#
|
||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||
# You can send windows there and get them back later.
|
||||
|
||||
# Move the currently focused window to the scratchpad
|
||||
bindsym $mod+Shift+minus move scratchpad
|
||||
|
||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||
# If there are multiple scratchpad windows, this command cycles through them.
|
||||
bindsym $mod+minus scratchpad show
|
||||
#
|
||||
# Resizing containers:
|
||||
#
|
||||
mode "resize" {
|
||||
# left will shrink the containers width
|
||||
# right will grow the containers width
|
||||
# up will shrink the containers height
|
||||
# down will grow the containers height
|
||||
bindsym $left resize shrink width 10px
|
||||
bindsym $down resize grow height 10px
|
||||
bindsym $up resize shrink height 10px
|
||||
bindsym $right resize grow width 10px
|
||||
|
||||
# Ditto, with arrow keys
|
||||
bindsym Left resize shrink width 10px
|
||||
bindsym Down resize grow height 10px
|
||||
bindsym Up resize shrink height 10px
|
||||
bindsym Right resize grow width 10px
|
||||
|
||||
# Return to default mode
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
swaybar_command waybar
|
||||
}
|
||||
|
||||
include /etc/sway/config.d/*
|
146
chezmoi/private_dot_config/waybar/config
Normal file
146
chezmoi/private_dot_config/waybar/config
Normal file
|
@ -0,0 +1,146 @@
|
|||
{
|
||||
// "layer": "top", // Waybar at top layer
|
||||
// "position": "bottom", // Waybar position (top|bottom|left|right)
|
||||
"height": 30, // Waybar height (to be removed for auto height)
|
||||
// "width": 1280, // Waybar width
|
||||
// Choose the order of the modules
|
||||
"modules-left": ["sway/workspaces", "sway/mode", "custom/media"],
|
||||
"modules-center": ["sway/window"],
|
||||
"modules-right": ["idle_inhibitor", "pulseaudio", "network", "cpu", "memory", "temperature", "backlight", "battery", "battery#bat2", "clock", "tray"],
|
||||
// Modules configuration
|
||||
// "sway/workspaces": {
|
||||
// "disable-scroll": true,
|
||||
// "all-outputs": true,
|
||||
// "format": "{name}: {icon}",
|
||||
// "format-icons": {
|
||||
// "1": "",
|
||||
// "2": "",
|
||||
// "3": "",
|
||||
// "4": "",
|
||||
// "5": "",
|
||||
// "urgent": "",
|
||||
// "focused": "",
|
||||
// "default": ""
|
||||
// }
|
||||
// },
|
||||
"sway/mode": {
|
||||
"format": "<span style=\"italic\">{}</span>"
|
||||
},
|
||||
"mpd": {
|
||||
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ ",
|
||||
"format-disconnected": "Disconnected ",
|
||||
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
|
||||
"unknown-tag": "N/A",
|
||||
"interval": 2,
|
||||
"consume-icons": {
|
||||
"on": " "
|
||||
},
|
||||
"random-icons": {
|
||||
"off": "<span color=\"#f53c3c\"></span> ",
|
||||
"on": " "
|
||||
},
|
||||
"repeat-icons": {
|
||||
"on": " "
|
||||
},
|
||||
"single-icons": {
|
||||
"on": "1 "
|
||||
},
|
||||
"state-icons": {
|
||||
"paused": "",
|
||||
"playing": ""
|
||||
},
|
||||
"tooltip-format": "MPD (connected)",
|
||||
"tooltip-format-disconnected": "MPD (disconnected)"
|
||||
},
|
||||
"idle_inhibitor": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"activated": "",
|
||||
"deactivated": ""
|
||||
}
|
||||
},
|
||||
"tray": {
|
||||
// "icon-size": 21,
|
||||
"spacing": 10
|
||||
},
|
||||
"clock": {
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
|
||||
"format": "{:%m/%d/%y %H:%M}"
|
||||
},
|
||||
"cpu": {
|
||||
"format": "{usage}% ",
|
||||
"tooltip": false
|
||||
},
|
||||
"memory": {
|
||||
"format": "{}% "
|
||||
},
|
||||
"temperature": {
|
||||
// "thermal-zone": 2,
|
||||
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
|
||||
"critical-threshold": 80,
|
||||
// "format-critical": "{temperatureC}°C {icon}",
|
||||
"format": "{temperatureC}°C {icon}",
|
||||
"format-icons": ["", "", ""]
|
||||
},
|
||||
"backlight": {
|
||||
// "device": "acpi_video1",
|
||||
"format": "{percent}% {icon}",
|
||||
"format-icons": ["", ""]
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
// "good": 95,
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{capacity}% {icon}",
|
||||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
"format-alt": "{time} {icon}",
|
||||
// "format-good": "", // An empty format will hide the module
|
||||
// "format-full": "",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"battery#bat2": {
|
||||
"bat": "BAT2"
|
||||
},
|
||||
"network": {
|
||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
|
||||
"format-linked": "{ifname} (No IP) ",
|
||||
"format-disconnected": "Disconnected ⚠",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||
},
|
||||
"pulseaudio": {
|
||||
// "scroll-step": 1, // %, can be a float
|
||||
"format": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth": "{volume}% {icon} {format_source}",
|
||||
"format-bluetooth-muted": " {icon} {format_source}",
|
||||
"format-muted": " {format_source}",
|
||||
"format-source": "{volume}% ",
|
||||
"format-source-muted": "",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click": "pavucontrol"
|
||||
},
|
||||
"custom/media": {
|
||||
"format": "{icon} {}",
|
||||
"return-type": "json",
|
||||
"max-length": 40,
|
||||
"format-icons": {
|
||||
"spotify": "",
|
||||
"default": "🎜"
|
||||
},
|
||||
"escape": true,
|
||||
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
|
||||
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue