first commit
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# emacs stuff
|
||||
.emacs.d/straight
|
||||
.emacs.d/eln-cache
|
||||
36
.gitmodules
vendored
Normal file
36
.gitmodules
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
[submodule "profiles/base/.zsh/plugins/zsh-syntax-highlighting"]
|
||||
path = profiles/base/.zsh/plugins/zsh-syntax-highlighting
|
||||
url = https://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||
[submodule "profiles/base/.zsh/plugins/zsh-autosuggestions"]
|
||||
path = profiles/base/.zsh/plugins/zsh-autosuggestions
|
||||
url = https://github.com/zsh-users/zsh-autosuggestions.git
|
||||
[submodule "profiles/base/.zsh/plugins/zsh-completions"]
|
||||
path = profiles/base/.zsh/plugins/zsh-completions
|
||||
url = https://github.com/zsh-users/zsh-completions.git
|
||||
[submodule "profiles/base/.zsh/plugins/powerlevel10k"]
|
||||
path = profiles/base/.zsh/plugins/powerlevel10k
|
||||
url = https://github.com/romkatv/powerlevel10k.git
|
||||
[submodule "profiles/base/.tmux/plugins/tmux-pain-control"]
|
||||
path = profiles/base/.tmux/plugins/tmux-pain-control
|
||||
url = https://github.com/tmux-plugins/tmux-pain-control.git
|
||||
[submodule "profiles/base/.tmux/plugins/tmux-pass"]
|
||||
path = profiles/base/.tmux/plugins/tmux-pass
|
||||
url = https://github.com/rafi/tmux-pass.git
|
||||
[submodule "profiles/base/.tmux/plugins/tmux-pomodoro-plus"]
|
||||
path = profiles/base/.tmux/plugins/tmux-pomodoro-plus
|
||||
url = https://github.com/olimorris/tmux-pomodoro-plus.git
|
||||
[submodule "profiles/base/.tmux/plugins/tmux-sensible"]
|
||||
path = profiles/base/.tmux/plugins/tmux-sensible
|
||||
url = https://github.com/tmux-plugins/tmux-sensible.git
|
||||
[submodule "profiles/base/.tmux/plugins/tmux-suspend"]
|
||||
path = profiles/base/.tmux/plugins/tmux-suspend
|
||||
url = https://github.com/MunifTanjim/tmux-suspend.git
|
||||
[submodule "profiles/base/.tmux/plugins/tpm"]
|
||||
path = profiles/base/.tmux/plugins/tpm
|
||||
url = https://github.com/tmux-plugins/tpm.git
|
||||
[submodule "profiles/desktop/.config/i3/i3lock-multimonitor"]
|
||||
path = profiles/desktop/.config/i3/i3lock-multimonitor
|
||||
url = https://github.com/ShikherVerma/i3lock-multimonitor.git
|
||||
[submodule "profiles/desktop/.config/i3blocks/i3blocks-contrib"]
|
||||
path = profiles/desktop/.config/i3blocks/i3blocks-contrib
|
||||
url = https://github.com/vivien/i3blocks-contrib.git
|
||||
279
install
Executable file
279
install
Executable file
@@ -0,0 +1,279 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" \
|
||||
|| exit 1
|
||||
readonly SCRIPT_DIR
|
||||
readonly PROFILES_DIR="${SCRIPT_DIR}/profiles"
|
||||
readonly -a STOW_ARGS=("--no-folding" "--adopt" "--dir" "${PROFILES_DIR}" "--target" "${HOME}")
|
||||
readonly SCRIPT_NAME="${0##*/}"
|
||||
|
||||
print_opt() {
|
||||
local -r option="$1"
|
||||
local -r description="$2"
|
||||
printf " %-22s %s\n" "${option}" "${description}"
|
||||
}
|
||||
|
||||
shell_quote() {
|
||||
local -r string="$1"
|
||||
printf "'%s'" "${string//'/'\\''}"
|
||||
}
|
||||
|
||||
array_contains() {
|
||||
local -r target_item="$1"; shift
|
||||
local -a -r array=( "$@" )
|
||||
local item
|
||||
for item in "${array[@]}"; do
|
||||
if [[ ${item} == "${target_item}" ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
die() {
|
||||
local -r message="$1"
|
||||
printf "%s: %b\n" "${SCRIPT_NAME}" "${message}" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
invalid_option() {
|
||||
local -r option="$1"
|
||||
die "invalid option $(shell_quote "${option}")\nTry '${SCRIPT_NAME} --help' for usage."
|
||||
}
|
||||
|
||||
check_deps() {
|
||||
if ! command -v stow >/dev/null 2>&1; then
|
||||
cat >&2 <<EOF
|
||||
Error: 'stow' not found in PATH.
|
||||
|
||||
GNU Stow is a symlink farm manager used to deploy dotfiles/packages
|
||||
by creating symbolic links into \${HOME}.
|
||||
|
||||
Install it first:
|
||||
Arch Linux: pacman -S stow
|
||||
Debian/Ubuntu: apt install stow
|
||||
Fedora: dnf install stow
|
||||
Typically, on other Linux distributions you can use their own package
|
||||
managers. For other systems, you can find in the Internet installation
|
||||
instructions appropriate to them or build manually GNU Stow from the
|
||||
source if GNU Stow is not packaged or your system requires it.
|
||||
|
||||
Project: https://www.gnu.org/software/stow/
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
require_profiles_dir() {
|
||||
if [[ ! -d "${PROFILES_DIR}" ]]; then
|
||||
cat >&2 <<EOF
|
||||
Error: profiles directory not found: ${PROFILES_DIR}
|
||||
|
||||
This directory must contain profile subdirectories with dotfiles.
|
||||
|
||||
Make sure you:
|
||||
- run the script from the repository root, or
|
||||
- create the directory, or
|
||||
- clone the dotfiles repository correctly.
|
||||
|
||||
More information about what is profile can be found using '${SCRIPT_NAME} --help profile'.
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
mapfile -t PROFILES < <(find "${PROFILES_DIR}" -mindepth 1 -maxdepth 1 -type d -printf '%f\n')
|
||||
readonly PROFILES
|
||||
}
|
||||
|
||||
parse_args() {
|
||||
list_profiles=""
|
||||
prune_symlinks=""
|
||||
verbose=""
|
||||
profile=""
|
||||
while (( $# > 0 )); do
|
||||
case "$1" in
|
||||
-h)
|
||||
show_general_help
|
||||
exit 0
|
||||
;;
|
||||
--help)
|
||||
if (( $# >= 2 )) && [[ -n $2 ]] && [[ $2 != -* ]]; then
|
||||
show_help_topic "$2"
|
||||
else
|
||||
show_general_help
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
--help=*)
|
||||
local -r topic="${1#*=}"
|
||||
[[ -z ${topic} ]] && show_general_help && exit 0
|
||||
show_help_topic "${topic}"
|
||||
exit 0
|
||||
;;
|
||||
-l|--list-profiles) list_profiles="true"; shift ;;
|
||||
-P|--prune-symlinks) prune_symlinks="true"; shift ;;
|
||||
-v|--verbose) verbose="true"; shift ;;
|
||||
-p|--profile)
|
||||
( (( $# < 2 )) || [[ -z "$2" ]] ) && die "--profile requires an argument"
|
||||
profile="$2"
|
||||
shift 2
|
||||
;;
|
||||
*) invalid_option "$1" ;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
validate_args() {
|
||||
if [[ ${list_profiles} && ( ${prune_symlinks} || ${verbose} || ${profile} ) ]]; then
|
||||
die "options '--list-profiles' and others cannot be used together"
|
||||
fi
|
||||
|
||||
if [[ -n ${profile} ]] && ! array_contains "${profile}" "${PROFILES[@]}"; then
|
||||
die "profile $(shell_quote "${profile}") cannot be found"
|
||||
fi
|
||||
}
|
||||
|
||||
show_general_help() {
|
||||
echo "Usage: ${SCRIPT_NAME} [options]"
|
||||
echo " ${SCRIPT_NAME} -l | --list-profiles"
|
||||
echo " ${SCRIPT_NAME} --help[=TOPIC]"
|
||||
echo
|
||||
echo "Options:"
|
||||
print_opt "-h, --help[=TOPIC]" "show general help or help for a specific topic"
|
||||
print_opt "-p, --profile PROFILE" "select profile"
|
||||
print_opt "-v, --verbose" "increase verbosity"
|
||||
print_opt "-P, --prune-symlinks" "remove dangling symlinks in home directory"
|
||||
print_opt "-l, --list-profiles" "list available profiles (cannot be combined with other options)"
|
||||
echo
|
||||
echo "Topics:"
|
||||
print_opt "profile" "explanation of profile structure and usage"
|
||||
echo
|
||||
echo "Profile:"
|
||||
echo " Directory containing dotfiles plus optional parent and hooks/."
|
||||
echo " Used by the installer to group and deploy related configurations."
|
||||
}
|
||||
|
||||
show_help_topic() {
|
||||
local topic="$1"
|
||||
case "${topic}" in
|
||||
profile)
|
||||
cat <<EOF
|
||||
A profile is a directory under 'profiles/' that groups dotfiles to be installed
|
||||
together using GNU Stow.
|
||||
|
||||
Contents:
|
||||
dotfiles/ files or directories to deploy (e.g. .config)
|
||||
parent optional text file with parent profile name
|
||||
hooks/pre/ scripts run before installation
|
||||
hooks/post/ scripts run after installation
|
||||
|
||||
Only executable files inside hooks are executed.
|
||||
|
||||
Profiles may inherit from a parent. The installer builds the dependency
|
||||
tree automatically and installs profiles in the correct order.
|
||||
|
||||
Use .stow-local-ignore to prevent linking internal files such as hooks/ and parent.
|
||||
EOF
|
||||
;;
|
||||
*) die "unknown help topic: ${topic}" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
run_pre_hooks() {
|
||||
local -r target_profile="$1"
|
||||
for hook in "${PROFILES_DIR}/${target_profile}"/hooks/pre/*; do
|
||||
if [[ -f "${hook}" && -x "${hook}" ]]; then
|
||||
echo "Running pre-install hook ${hook##*/}"
|
||||
"${hook}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
run_post_hooks() {
|
||||
local -r target_profile="$1"
|
||||
for hook in "${PROFILES_DIR}/${target_profile}"/hooks/post/*; do
|
||||
if [[ -f "${hook}" && -x "${hook}" ]]; then
|
||||
echo "Running post-install hook ${hook##*/}"
|
||||
"${hook}"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
prune_symlinks() {
|
||||
echo -n "Removing dangling symlinks in home directory... "
|
||||
|
||||
pushd "${HOME}" >/dev/null
|
||||
local common_files
|
||||
local -r target_profile="$1"
|
||||
mapfile -t common_files < <(comm -12 <(find "${HOME}" -type l -printf '%P\n' 2>/dev/null | sort) \
|
||||
<(find "${PROFILES_DIR}/${target_profile}" -type f -printf '%P\n' | sort))
|
||||
local target_file
|
||||
for target_file in "${common_files[@]}"; do
|
||||
local -a rm_args=( "--force" )
|
||||
[[ ${verbose} ]] && rm_args+=( "--verbose" )
|
||||
rm "${rm_args[@]}" "${target_file}"
|
||||
done
|
||||
popd >/dev/null
|
||||
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
stow_profile() {
|
||||
local -r target_profile="$1"
|
||||
local error_log
|
||||
error_log="$(stow "${STOW_ARGS[@]}" "${target_profile}" 2>&1)"
|
||||
if (( $? == 0 )); then
|
||||
echo "Profile ${target_profile} has been stowed"
|
||||
else
|
||||
echo "Failed to create symlinks pointing to dotfiles in profile ${target_profile}"
|
||||
echo "Executed command: stow ${STOW_ARGS[*]} ${target_profile}"
|
||||
fi
|
||||
if [[ -n "${error_log}" ]]; then
|
||||
echo "${error_log}" > /tmp/stow-error.log
|
||||
[[ ${verbose} ]] && echo "${error_log}"
|
||||
echo "Error log has been saved into /tmp/stow-error.log"
|
||||
fi
|
||||
}
|
||||
|
||||
fetch_parents() {
|
||||
local -r target_profile="$1"
|
||||
if [[ -s "${PROFILES_DIR}/${target_profile}/parent" ]]; then
|
||||
local parent
|
||||
parent=$(cat "${PROFILES_DIR}/${target_profile}/parent")
|
||||
if [[ -s "${PROFILES_DIR}/${parent}/parent" ]]; then
|
||||
fetch_parents "${parent}"
|
||||
fi
|
||||
echo "${parent}"
|
||||
fi
|
||||
}
|
||||
|
||||
build_deptree() {
|
||||
local -r target_profile="$1"
|
||||
fetch_parents "${target_profile}"
|
||||
echo "${target_profile}"
|
||||
}
|
||||
|
||||
install_dotfiles() {
|
||||
local target_profile
|
||||
for target_profile in $(build_deptree "${profile}"); do
|
||||
run_pre_hooks "${target_profile}"
|
||||
[[ ${prune_symlinks} ]] && prune_symlinks "${target_profile}"
|
||||
stow_profile "${target_profile}"
|
||||
run_post_hooks "${target_profile}"
|
||||
done
|
||||
}
|
||||
|
||||
main() {
|
||||
check_deps
|
||||
parse_args "$@"
|
||||
require_profiles_dir
|
||||
(( $# == 0 )) && show_general_help && exit 1
|
||||
validate_args
|
||||
[[ -n ${list_profiles} ]] && echo "${PROFILES[@]}" && exit 0
|
||||
install_dotfiles
|
||||
}
|
||||
|
||||
main "$@"
|
||||
148
profiles/base/.bashrc
Normal file
148
profiles/base/.bashrc
Normal file
@@ -0,0 +1,148 @@
|
||||
#
|
||||
# ~/.bashrc
|
||||
#
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# scripts from gentoo
|
||||
|
||||
# shellcheck source=.bashrc.d/10-gentoo-color-r2.bash
|
||||
source "${HOME}/.bashrc.d/10-gentoo-color-r2.bash" # prompt
|
||||
# shellcheck source=.bashrc.d/10-gentoo-title-r3.bash
|
||||
source "${HOME}/.bashrc.d/10-gentoo-title-r3.bash"
|
||||
|
||||
# custom variables
|
||||
if command -v nvim &> /dev/null; then
|
||||
export EDITOR="nvim"
|
||||
else
|
||||
export EDITOR="vim"
|
||||
fi
|
||||
# export EDITOR="ec"
|
||||
export VISUAL="${EDITOR}"
|
||||
export SUDO_EDITOR="${EDITOR}"
|
||||
export VIRSH_DEFAULT_CONNECT_URI="qemu:///system"
|
||||
export BROWSER="chromium"
|
||||
export PAGER="less -R -F"
|
||||
export BAT_PAGER="${PAGER}"
|
||||
export MANPAGER="less -R --use-color -Dd+r -Du+b"
|
||||
[ -f "/usr/share/cowsay/cows" ] && export COWPATH="/usr/share/cowsay/cows"
|
||||
export CHROOT="${HOME}/arch_chroot"
|
||||
export AUR_REPO="whiteman808"
|
||||
export AURDEST="${HOME}/.cache/paru/clone"
|
||||
export AUR_PAGER="ranger"
|
||||
export GPGKEY="4A45503BBE575E3D4DAF28E27264AFFDC98D52BB"
|
||||
|
||||
# color output
|
||||
alias diff='diff --color=auto'
|
||||
alias grep='grep --color=auto'
|
||||
alias ip='ip -color=auto'
|
||||
alias ls='ls --color=auto'
|
||||
export MANROFFOPT="-P -c"
|
||||
export LESS="-R --use-color -Dd+r\$Du+b\$"
|
||||
|
||||
# better ls
|
||||
if type "eza" > /dev/null; then
|
||||
alias ll='eza -bghHlS'
|
||||
else
|
||||
alias ll='exa -bghHlS'
|
||||
fi
|
||||
|
||||
# bat (debian)
|
||||
if type "batcat" >/dev/null 2>&1; then
|
||||
alias bat='batcat'
|
||||
fi
|
||||
|
||||
# HSTR configuration - add this to ~/.bashrc
|
||||
alias hh=hstr # hh to be alias for hstr
|
||||
export HSTR_CONFIG=hicolor # get more colors
|
||||
shopt -s histappend # append new history items to .bash_history
|
||||
export HISTCONTROL=ignorespace # leading space hides commands from history
|
||||
export HISTFILESIZE=10000 # increase history file size (default is 500)
|
||||
export HISTSIZE=${HISTFILESIZE} # increase history size (default is 500)
|
||||
# ensure synchronization between bash memory and history file
|
||||
export PROMPT_COMMAND=( "history -a; history -n;" "${PROMPT_COMMAND[@]}" )
|
||||
function hstrnotiocsti {
|
||||
{ READLINE_LINE="$( { </dev/tty hstr -- "${READLINE_LINE}"; } 2>&1 1>&3 3>&- )"; } 3>&1;
|
||||
READLINE_POINT=${#READLINE_LINE}
|
||||
}
|
||||
# if this is interactive shell, then bind hstr to Ctrl-r (for Vi mode check doc)
|
||||
if [[ $- =~ .*i.* ]]; then bind -x '"\C-r": "hstrnotiocsti"'; fi
|
||||
export HSTR_TIOCSTI=n
|
||||
|
||||
# useful commands
|
||||
alias ncmpcpp='ncmpcpp -b ~/.config/ncmpcpp/bindings'
|
||||
alias tb='nc termbin.com 9999'
|
||||
alias mux='tmuxinator'
|
||||
alias tm='tmuxinator start misc'
|
||||
alias tq='tmuxinator start quake'
|
||||
alias sudo='sudo '
|
||||
alias rsync_copy='rsync -aAXUHvh --partial-dir=.rsync-partial --progress'
|
||||
alias rsync_copy_ssh='rsync_copy -e ssh'
|
||||
alias rsync_backup='rsync_copy --numeric-ids --delete --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"}'
|
||||
alias rsync_backup_ssh='rsync_backup -e ssh'
|
||||
alias rsync_restore='rsync_copy --numeric-ids --delete --exclude="lost+found"'
|
||||
alias rsync_restore_ssh='rsync_restore -e ssh'
|
||||
alias glog='git log --oneline'
|
||||
alias emerge_world='emerge --ask --verbose --deep --newuse --update @world'
|
||||
alias sync_repo='rsync_copy_ssh --delete ~/arch_paczuchy/* vps.paraboletancza.org:/srv/http/arch.paraboletancza.org'
|
||||
alias aur_sync='aur sync --sign --chroot'
|
||||
alias aur_build='aur build --sign --chroot'
|
||||
|
||||
take() {
|
||||
mkdir -p "$1"
|
||||
cd "$1" || exit 1
|
||||
}
|
||||
|
||||
# lf
|
||||
lfwrapper() {
|
||||
command lf "$@"
|
||||
|
||||
# cleanup
|
||||
awk '$1 == "archivemount" { print $2 }' /etc/mtab | while read -r mntdir; do
|
||||
sanitized_input="$(printf "${mntdir}")" # /etc/mtab uses octal representation of spaces (possible other symbols too), printf would convert octal representation, so that it can be used in the umount & rmdir commands.
|
||||
umount "${sanitized_input}"
|
||||
rmdir "${sanitized_input}"
|
||||
done
|
||||
}
|
||||
|
||||
lfcd() {
|
||||
dir="$(lfwrapper -print-last-dir "$@")"
|
||||
while ! cd "${dir}" 2>/dev/null; do
|
||||
dir="$(dirname -- "${dir}")"
|
||||
done
|
||||
}
|
||||
alias lf=lfcd
|
||||
|
||||
# ranger
|
||||
ranger_cd() {
|
||||
temp_file="$(mktemp -t "ranger_cd.XXXXXXXXXX")"
|
||||
ranger --choosedir="${temp_file}" -- "${@:-${PWD}}"
|
||||
if chosen_dir="$(cat -- "${temp_file}")" && [ -n "${chosen_dir}" ] && [ "${chosen_dir}" != "${PWD}" ]; then
|
||||
cd -- "${chosen_dir}" || exit 1
|
||||
fi
|
||||
rm -f -- "${temp_file}"
|
||||
}
|
||||
alias ranger=ranger_cd
|
||||
bind '"\C-o":"ranger\n"'
|
||||
|
||||
# mc
|
||||
# shellcheck source=/dev/null
|
||||
[[ -f "/usr/libexec/mc/mc.sh" ]] && source "/usr/libexec/mc/mc.sh"
|
||||
[[ -f "/usr/lib/mc/mc.sh" ]] && source "/usr/lib/mc/mc.sh"
|
||||
|
||||
# gpg-agent
|
||||
unset SSH_AGENT_PID
|
||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket 2>/dev/null)"
|
||||
export SSH_AUTH_SOCK
|
||||
fi
|
||||
|
||||
# inside tmux, we don't know if Sway got restarted
|
||||
if [[ -v TMUX ]]; then
|
||||
swaymsg() {
|
||||
SWAYSOCK=${XDG_RUNTIME_DIR}/sway-ipc.${UID}.$(pgrep -x sway).sock
|
||||
export SWAYSOCK
|
||||
command swaymsg "$@"
|
||||
}
|
||||
fi
|
||||
78
profiles/base/.bashrc.d/10-gentoo-color-r2.bash
Normal file
78
profiles/base/.bashrc.d/10-gentoo-color-r2.bash
Normal file
@@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env bash
|
||||
# copied from https://gitweb.gentoo.org/repo/gentoo.git/tree/app-shells/bash
|
||||
|
||||
if [[ ${NO_COLOR} ]]; then
|
||||
# Respect the user's wish not to use color. See https://no-color.org/.
|
||||
gentoo_color=0
|
||||
elif [[ ${COLORTERM@a} == *x* && ${COLORTERM} == @(24bit|truecolor) ]]; then
|
||||
# The COLORTERM environment variable can reasonably be trusted here.
|
||||
# See https://github.com/termstandard/colors for further information.
|
||||
gentoo_color=1
|
||||
else
|
||||
# Check TERM against a whitelist covering a majority of popular
|
||||
# terminal emulators and virtual console implementations known to
|
||||
# support color. If no matching entry is found, try to use tput(1) to
|
||||
# determine whether color is supported.
|
||||
case ${TERM} in
|
||||
*color* |\
|
||||
*direct* |\
|
||||
*ghostty |\
|
||||
[Ekx]term* |\
|
||||
alacritty |\
|
||||
aterm |\
|
||||
contour |\
|
||||
dtterm |\
|
||||
foot* |\
|
||||
jfbterm |\
|
||||
linux |\
|
||||
mlterm |\
|
||||
rxvt* |\
|
||||
screen* |\
|
||||
tmux* |\
|
||||
wsvt25* ) gentoo_color=1 ;;
|
||||
* ) gentoo_color=$(tput colors 2>/dev/null)
|
||||
esac
|
||||
fi
|
||||
|
||||
# For direxpand to be missing indicates that bash is lacking readline support.
|
||||
prompt_exit_code() {
|
||||
local -r exit_code=$?
|
||||
if [[ ${exit_code} -ne 0 ]]; then
|
||||
printf "%s " "${exit_code}"
|
||||
fi
|
||||
}
|
||||
|
||||
if (( gentoo_color <= 0 )) || ( ! shopt -u direxpand 2>/dev/null ); then
|
||||
# Define a prompt without color.
|
||||
PS1='\u@\h \w \$ '
|
||||
elif (( EUID == 0 )); then
|
||||
# If root, omit the username and print the hostname in red.
|
||||
PS1='\[\e[01;31m\]\h\[\e[01;34m\] \w \$\[\e[00m\] '
|
||||
else
|
||||
# Otherwise, print the username and hostname in green.
|
||||
PS1='\[\e[01;32m\]\u@\h\[\e[01;34m\] \[\e[01;31m\]$(prompt_exit_code)\[\e[01;34m\]\w \$\[\e[00m\] '
|
||||
fi
|
||||
|
||||
if (( gentoo_color > 0 )); then
|
||||
# Colorize the output of diff(1), grep(1) and a few coreutils utilities.
|
||||
# However, do so only where no alias/function by the given name exists.
|
||||
for _ in diff dir grep ls vdir; do
|
||||
if [[ $(type -t "$_") == file ]]; then
|
||||
alias "$_=$_ --color=auto"
|
||||
fi
|
||||
done
|
||||
|
||||
# Enable colors for ls(1) and some other utilities that respect the
|
||||
# LS_COLORS variable. Prefer ~/.dir_colors, per bug #64489.
|
||||
if hash dircolors 2>/dev/null; then
|
||||
if [[ -f ~/.dir_colors ]]; then
|
||||
eval "$(COLORTERM=1 dircolors -b -- ~/.dir_colors)"
|
||||
elif [[ -f /etc/DIR_COLORS ]]; then
|
||||
eval "$(COLORTERM=1 dircolors -b /etc/DIR_COLORS)"
|
||||
else
|
||||
eval "$(COLORTERM=1 dircolors -b)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
unset -v gentoo_color
|
||||
78
profiles/base/.bashrc.d/10-gentoo-title-r3.bash
Normal file
78
profiles/base/.bashrc.d/10-gentoo-title-r3.bash
Normal file
@@ -0,0 +1,78 @@
|
||||
#!/usr/bin/env bash
|
||||
# copied from https://gitweb.gentoo.org/repo/gentoo.git/tree/app-shells/bash
|
||||
|
||||
# For information regarding the control sequences used, please refer to
|
||||
# https://invisible-island.net/xterm/ctlseqs/ctlseqs.html.
|
||||
|
||||
genfun_set_win_title() {
|
||||
# Advertise the fact that the presently running interactive shell will
|
||||
# update the title. Doing so allows for its subprocesses to determine
|
||||
# whether it is safe to set the title of their own accord. Note that 0
|
||||
# refers to the value of Ps within the OSC Ps ; Pt BEL sequence.
|
||||
export SHELL_SETS_TITLE=0
|
||||
|
||||
# Sets the window title with the Set Text Parameters control sequence.
|
||||
# For screen, the sequence defines the hardstatus (%h) and for tmux, the
|
||||
# pane_title (#T). For graphical terminal emulators, it is normal for
|
||||
# the title bar to be affected.
|
||||
genfun_set_win_title() {
|
||||
local prompt
|
||||
|
||||
if [[ ${PROMPT_DIRTRIM} ]]; then
|
||||
# Respect the value of PROMPT_DIRTRIM. If set as 0, the
|
||||
# current working directory shall be shown in full.
|
||||
prompt='\u@\h \w'
|
||||
else
|
||||
# Show the basename of the current working directory.
|
||||
prompt='\u@\h \W'
|
||||
fi
|
||||
printf '\033]0;%s\007' "${prompt@P}"
|
||||
}
|
||||
|
||||
genfun_set_win_title
|
||||
}
|
||||
|
||||
unset -v SHELL_SETS_TITLE
|
||||
|
||||
# Determine whether the terminal can handle the Set Text Parameters sequence.
|
||||
# The only terminals permitted here are those for which there is empirical
|
||||
# evidence that the sequence is supported and that the UTF-8 character encoding
|
||||
# is handled correctly. Quite rightly, this precludes many vintage terminals.
|
||||
case ${TERM} in
|
||||
alacritty*|contour|foot*|tmux*|xterm-ghostty)
|
||||
# The terminal emulator also supports XTWINOPS. If the PTY was
|
||||
# created by sshd(8) then push the current window title to the
|
||||
# stack and arrange for it to be popped upon exiting. Xterm also
|
||||
# supports this but there are far too many terminal emulators
|
||||
# that falsely identify as being xterm-compatible.
|
||||
if [[ ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then
|
||||
trap 'printf "\033[23;0t"' EXIT
|
||||
printf '\033[22;0t'
|
||||
fi
|
||||
;;
|
||||
rxvt-unicode*|st-256color|xterm*)
|
||||
# If the PTY was created by sshd(8) then proceed no further.
|
||||
# Alas, there exist many operating environments in which the
|
||||
# title would otherwise not be restored upon ssh(1) exiting.
|
||||
# Those wanting for the title to be set regardless may adjust
|
||||
# ~/.bashrc or create a bashrc.d drop-in to set PROMPT_COMMAND.
|
||||
# For example, PROMPT_COMMAND=(genfun_set_win_title).
|
||||
if [[ ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then
|
||||
return
|
||||
fi
|
||||
;;
|
||||
screen*)
|
||||
# If the PTY was created by sshd(8) and screen(1) was launched
|
||||
# prior to the SSH session beginning, as opposed to afterwards,
|
||||
# proceed no further. It is another case in which there would be
|
||||
# no guarantee of the title being restored upon ssh(1) exiting.
|
||||
if [[ ! ${WINDOW} && ${SSH_TTY} && ${SSH_TTY} == "$(tty)" ]]; then
|
||||
return
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
return
|
||||
esac
|
||||
|
||||
# Arrange for the title to be updated each time the primary prompt is displayed.
|
||||
PROMPT_COMMAND+=('genfun_set_win_title')
|
||||
20
profiles/base/.inputrc
Normal file
20
profiles/base/.inputrc
Normal file
@@ -0,0 +1,20 @@
|
||||
$include /etc/inputrc
|
||||
set editing-mode vi
|
||||
set keyseq-timeout 0.01
|
||||
set show-mode-in-prompt on
|
||||
$if mode=vi
|
||||
set keymap vi-command
|
||||
# these are for vi-command mode
|
||||
"\e[A": history-search-backward
|
||||
"\e[B": history-search-forward
|
||||
j: history-search-forward
|
||||
k: history-search-backward
|
||||
"\C-l": clear-screen
|
||||
set keymap vi-insert
|
||||
# these are for vi-insert mode
|
||||
"\e[A": history-search-backward
|
||||
"\e[B": history-search-forward
|
||||
"\C-l": clear-screen
|
||||
$endif
|
||||
set vi-ins-mode-string "\1\e[6 q\2(ins) "
|
||||
set vi-cmd-mode-string "\1\e[4 q\2(cmd) "
|
||||
85
profiles/base/.local/bin/check_ip
Executable file
85
profiles/base/.local/bin/check_ip
Executable file
@@ -0,0 +1,85 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
set -o nounset
|
||||
|
||||
readonly SCRIPT_NAME="${0##*/}"
|
||||
|
||||
check_deps() {
|
||||
command -v "curl" >/dev/null 2>&1 || die "curl: command not found"
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage: ${SCRIPT_NAME} [--family auto|4|6] [-h|--help]
|
||||
|
||||
Query an external service using curl and print:
|
||||
1) public IP address
|
||||
2) reverse DNS (PTR record)
|
||||
3) curl version
|
||||
|
||||
Options:
|
||||
--family auto|4|6 select IP protocol version (default: auto)
|
||||
-h, --help show help and exit
|
||||
EOF
|
||||
}
|
||||
|
||||
shell_quote() {
|
||||
local -r string="$1"
|
||||
printf "'%s'" "${string//'/'\\''}"
|
||||
}
|
||||
|
||||
die() {
|
||||
local -r message="$1"
|
||||
printf "%s: %b\n" "${SCRIPT_NAME}" "${message}" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
invalid_option() {
|
||||
local -r option="$1"
|
||||
die "invalid option $(shell_quote "${option}")\nTry '${SCRIPT_NAME} --help' for usage."
|
||||
}
|
||||
|
||||
parse_args() {
|
||||
family="auto"
|
||||
while (( $# > 0 )); do
|
||||
case "$1" in
|
||||
-h|--help) usage; exit 0 ;;
|
||||
--family)
|
||||
( (( $# < 2 )) || [[ -z "$2" ]] ) && die "--family requires an argument (auto, 4 or 6)"
|
||||
family="$2"
|
||||
shift 2
|
||||
;;
|
||||
--family=*)
|
||||
family="${1#*=}"
|
||||
[[ -z "${family}" ]] && die "--family requires an argument (auto, 4 or 6)"
|
||||
shift
|
||||
;;
|
||||
*) invalid_option "$1" ;;
|
||||
esac
|
||||
done
|
||||
validate_args
|
||||
}
|
||||
|
||||
validate_args() {
|
||||
case "${family}" in
|
||||
auto|4|6) ;;
|
||||
*) die "invalid value for family: '${family}' (expected auto, 4 or 6)"
|
||||
esac
|
||||
}
|
||||
|
||||
show_ip() {
|
||||
local -a curl_args=()
|
||||
[[ ${family} == "4" ]] && curl_args=( "-4" )
|
||||
[[ ${family} == "6" ]] && curl_args=( "-6" )
|
||||
curl "${curl_args[@]}" "zx2c4.com/ip"
|
||||
}
|
||||
|
||||
main() {
|
||||
check_deps
|
||||
parse_args "$@"
|
||||
show_ip
|
||||
}
|
||||
|
||||
main "$@"
|
||||
138
profiles/base/.local/bin/dnsleaktest
Executable file
138
profiles/base/.local/bin/dnsleaktest
Executable file
@@ -0,0 +1,138 @@
|
||||
#!/usr/bin/env bash
|
||||
#usage: ./dnsleaktest.sh [-i interface_ip|interface_name]
|
||||
#example: ./dnsleaktest.sh -i eth1
|
||||
# ./dnsleaktest.sh -i 10.0.0.2
|
||||
|
||||
RED='\033[0;31m'
|
||||
BOLD='\033[1m'
|
||||
NC='\033[0m'
|
||||
api_domain='bash.ws'
|
||||
error_code=1
|
||||
|
||||
getopts "i:" opt
|
||||
interface=$OPTARG
|
||||
|
||||
function echo_bold {
|
||||
echo -e "${BOLD}${1}${NC}"
|
||||
}
|
||||
|
||||
if [ -z "$interface" ]; then
|
||||
curl_interface=""
|
||||
ping_interface=""
|
||||
else
|
||||
curl_interface="--interface ${interface}"
|
||||
ping_interface="-I ${interface}"
|
||||
echo_bold "Interface: ${interface}"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
function increment_error_code {
|
||||
error_code=$((error_code + 1))
|
||||
}
|
||||
|
||||
function echo_error {
|
||||
(>&2 echo -e "${RED}${1}${NC}")
|
||||
}
|
||||
|
||||
function require_command {
|
||||
command -v $1 > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo_error "Please, install \"$1\""
|
||||
exit $error_code
|
||||
fi
|
||||
increment_error_code
|
||||
}
|
||||
|
||||
function check_internet_connection {
|
||||
curl --silent --head ${curl_interface} --request GET "https://${api_domain}" | grep "200 OK" > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo_error "No internet connection."
|
||||
exit $error_code
|
||||
fi
|
||||
increment_error_code
|
||||
}
|
||||
|
||||
require_command curl
|
||||
require_command ping
|
||||
check_internet_connection
|
||||
|
||||
if command -v jq &> /dev/null; then
|
||||
jq_exists=1
|
||||
else
|
||||
jq_exists=0
|
||||
fi
|
||||
|
||||
id=$(curl ${curl_interface} --silent "https://${api_domain}/id")
|
||||
|
||||
for i in $(seq 1 10); do
|
||||
ping -c 1 ${ping_interface} "${i}.${id}.${api_domain}" > /dev/null 2>&1
|
||||
done
|
||||
|
||||
function print_servers {
|
||||
|
||||
if (( $jq_exists )); then
|
||||
|
||||
echo ${result_json} | \
|
||||
jq --monochrome-output \
|
||||
--raw-output \
|
||||
".[] | select(.type == \"${1}\") | \"\(.ip)\(if .country_name != \"\" and .country_name != false then \" [\(.country_name)\(if .asn != \"\" and .asn != false then \" \(.asn)\" else \"\" end)]\" else \"\" end)\""
|
||||
|
||||
else
|
||||
|
||||
while IFS= read -r line; do
|
||||
if [[ "$line" != *${1} ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
ip=$(echo $line | cut -d'|' -f 1)
|
||||
code=$(echo $line | cut -d'|' -f 2)
|
||||
country=$(echo $line | cut -d'|' -f 3)
|
||||
asn=$(echo $line | cut -d'|' -f 4)
|
||||
|
||||
if [ -z "${ip// }" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
if [ -z "${country// }" ]; then
|
||||
echo "$ip"
|
||||
else
|
||||
if [ -z "${asn// }" ]; then
|
||||
echo "$ip [$country]"
|
||||
else
|
||||
echo "$ip [$country, $asn]"
|
||||
fi
|
||||
fi
|
||||
done <<< "$result_txt"
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
if (( $jq_exists )); then
|
||||
result_json=$(curl ${curl_interface} --silent "https://${api_domain}/dnsleak/test/${id}?json")
|
||||
else
|
||||
result_txt=$(curl ${curl_interface} --silent "https://${api_domain}/dnsleak/test/${id}?txt")
|
||||
fi
|
||||
|
||||
dns_count=$(print_servers "dns" | wc -l)
|
||||
|
||||
echo_bold "Your IP:"
|
||||
print_servers "ip"
|
||||
|
||||
echo ""
|
||||
if [ ${dns_count} -eq "0" ];then
|
||||
echo_bold "No DNS servers found"
|
||||
else
|
||||
if [ ${dns_count} -eq "1" ];then
|
||||
echo_bold "You use ${dns_count} DNS server:"
|
||||
else
|
||||
echo_bold "You use ${dns_count} DNS servers:"
|
||||
fi
|
||||
print_servers "dns"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo_bold "Conclusion:"
|
||||
print_servers "conclusion"
|
||||
|
||||
exit 0
|
||||
8
profiles/base/.local/bin/iommu_groups
Executable file
8
profiles/base/.local/bin/iommu_groups
Executable file
@@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
shopt -s nullglob
|
||||
for g in $(find /sys/kernel/iommu_groups/* -maxdepth 0 -type d | sort -V); do
|
||||
echo "IOMMU Group ${g##*/}:"
|
||||
for d in ${g}/devices/*; do
|
||||
echo -e "\t$(lspci -nns ${d##*/})"
|
||||
done;
|
||||
done;
|
||||
6
profiles/base/.local/bin/transfer
Executable file
6
profiles/base/.local/bin/transfer
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
transfer() (if [ $# -eq 0 ]; then printf "No arguments specified.\nUsage:\n transfer <file|directory>\n ... | transfer <file_name>\n">&2; return 1; fi; file_name=$(basename "$1"); if [ -t 0 ]; then file="$1"; if [ ! -e "$file" ]; then echo "$file: No such file or directory">&2; return 1; fi; if [ -d "$file" ]; then cd "$file" || return 1; file_name="$file_name.zip"; set -- zip -r -q - .; else set -- cat "$file"; fi; else set -- cat; fi; url=$("$@" | curl --silent --show-error --progress-bar --upload-file "-" "https://transfer.sh/$file_name"); echo "$url"; )
|
||||
|
||||
transfer
|
||||
|
||||
1712
profiles/base/.p10k.zsh
Normal file
1712
profiles/base/.p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
17
profiles/base/.stow-local-ignore
Normal file
17
profiles/base/.stow-local-ignore
Normal file
@@ -0,0 +1,17 @@
|
||||
\.git
|
||||
\.gitignore
|
||||
\.gitmodules
|
||||
|
||||
.+~ # emacs backup files
|
||||
\#.*\# # emacs autosave files
|
||||
\.emacs.d/straight
|
||||
\.emacs.d/eln-cache
|
||||
^/hooks$
|
||||
^/parent$
|
||||
|
||||
^/README.*
|
||||
^/LICENSE.*
|
||||
^/COPYING
|
||||
|
||||
^/install
|
||||
^/pyproject.toml
|
||||
106
profiles/base/.tmux.conf
Normal file
106
profiles/base/.tmux.conf
Normal file
@@ -0,0 +1,106 @@
|
||||
## user experience related stuff
|
||||
|
||||
# fix delay between switching modes in vim
|
||||
set -sg escape-time 20
|
||||
|
||||
# remap prefix
|
||||
unbind C-b
|
||||
set -g prefix M-q
|
||||
bind M-q send-prefix
|
||||
|
||||
# make colors display correctly
|
||||
set -g default-terminal "tmux-256color"
|
||||
set -ag terminal-overrides ",*:RGB"
|
||||
|
||||
# set cursor style to underline
|
||||
set -g cursor-style "underline"
|
||||
|
||||
# avoid setting cursor back to block after detaching tmux
|
||||
set -ag terminal-overrides ",*:Se=\e[4 q"
|
||||
|
||||
# undercurl support
|
||||
set -ag terminal-overrides ',*:Smulx=\E[4::%p1%dm'
|
||||
|
||||
# support colors for undercurl
|
||||
set -ag terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m'
|
||||
|
||||
# set scrollback buffer to 10000
|
||||
set -g history-limit 10000
|
||||
|
||||
# customize the status line
|
||||
set -g status-fg colour2
|
||||
set -g status-style bg=default
|
||||
|
||||
# disable mouse
|
||||
set -g mouse off
|
||||
|
||||
# enable clipboard
|
||||
set -g set-clipboard on
|
||||
set -ag terminal-overrides ",*:clipboard"
|
||||
|
||||
# emacs keybindings
|
||||
# set -g mode-keys emacs
|
||||
# set -g status-keys emacs
|
||||
# bind -Tcopy-mode C-w send -X copy-pipe-and-cancel 'xsel --clipboard --input'
|
||||
# bind -Tcopy-mode M-w send -X copy-pipe-and-cancel 'xsel --clipboard --input'
|
||||
|
||||
# vi keybindings
|
||||
set -g mode-keys vi
|
||||
set -g status-keys vi
|
||||
|
||||
# copy & paste settings
|
||||
bind-key -T copy-mode-vi v send -X begin-selection
|
||||
bind-key -T copy-mode-vi V send -X select-line
|
||||
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'wl-copy'
|
||||
|
||||
# status bar configuration
|
||||
set -g status-right-length 100
|
||||
set -g status-left-length 50
|
||||
set -g status-right "#{pomodoro_status} #{@mode_indicator_suspend}#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,}\"#{=21:pane_title}\""
|
||||
|
||||
# urlscan
|
||||
bind-key u run "tmux popup -E -b double -w 100% -h 40% -y 0 \
|
||||
sh -c 'tmux capture-pane -Jp | urlscan -d -c' "
|
||||
|
||||
## tmux plugins related stuff
|
||||
|
||||
# list of plugins
|
||||
set -g @plugin 'tmux-plugins/tpm'
|
||||
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||
set -g @plugin 'tmux-plugins/tmux-pain-control'
|
||||
set -g @plugin 'MunifTanjim/tmux-suspend'
|
||||
set -g @plugin 'rafi/tmux-pass'
|
||||
set -g @plugin 'olimorris/tmux-pomodoro-plus'
|
||||
|
||||
# tmux-suspend
|
||||
set -g @suspend_suspended_options " \
|
||||
@mode_indicator_suspend::[*] "
|
||||
set -g @suspend_key 'F12'
|
||||
|
||||
# tmux-pass
|
||||
set -g @pass-copy-to-clipboard off
|
||||
set -g @pass-hide-pw-from-preview on
|
||||
set -g @pass-hide-preview on
|
||||
|
||||
# tmux-pomodoro-plus
|
||||
set -g @pomodoro_on " 🍅 " # The formatted output when the Pomodoro is running
|
||||
set -g @pomodoro_complete " ✔︎ " # The formatted output when the break is running
|
||||
set -g @pomodoro_pause " ⏸︎ " # The formatted output when the Pomodoro/break is paused
|
||||
set -g @pomodoro_prompt_break " ⏲︎ break?" # The formatted output when waiting to start a break
|
||||
set -g @pomodoro_prompt_pomodoro " ⏱︎ start?" # The formatted output when waiting to start a Pomodoro
|
||||
|
||||
set -g @pomodoro_mins 25 # The duration of the Pomodoro
|
||||
set -g @pomodoro_break_mins 5 # The duration of the break after the Pomodoro completes
|
||||
set -g @pomodoro_intervals 4 # The number of intervals before a longer break is started
|
||||
set -g @pomodoro_long_break_mins 25 # The duration of the long break
|
||||
|
||||
set -g @pomodoro_sound 'off' # Sound for desktop notifications (Run `ls /System/Library/Sounds` for a list of sounds to use on Mac)
|
||||
set -g @pomodoro_notifications 'on' # Enable desktop notifications from your terminal
|
||||
set -g @pomodoro_interval_display " [%s/%s]"
|
||||
|
||||
# automatically install tpm and tmux plugins when tmux is started
|
||||
if "test ! -d ~/.tmux/plugins/tpm" \
|
||||
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
|
||||
|
||||
# initialize tmux plugin manager (keep this line at the very bottom of tmux.conf)
|
||||
run '~/.tmux/plugins/tpm/tpm'
|
||||
1
profiles/base/.tmux/plugins/tmux-pain-control
Submodule
1
profiles/base/.tmux/plugins/tmux-pain-control
Submodule
Submodule profiles/base/.tmux/plugins/tmux-pain-control added at 32b760f665
1
profiles/base/.tmux/plugins/tmux-pass
Submodule
1
profiles/base/.tmux/plugins/tmux-pass
Submodule
Submodule profiles/base/.tmux/plugins/tmux-pass added at f0e73a859a
1
profiles/base/.tmux/plugins/tmux-pomodoro-plus
Submodule
1
profiles/base/.tmux/plugins/tmux-pomodoro-plus
Submodule
Submodule profiles/base/.tmux/plugins/tmux-pomodoro-plus added at f1b76b7601
1
profiles/base/.tmux/plugins/tmux-sensible
Submodule
1
profiles/base/.tmux/plugins/tmux-sensible
Submodule
Submodule profiles/base/.tmux/plugins/tmux-sensible added at 25cb91f42d
1
profiles/base/.tmux/plugins/tmux-suspend
Submodule
1
profiles/base/.tmux/plugins/tmux-suspend
Submodule
Submodule profiles/base/.tmux/plugins/tmux-suspend added at 1a2f806666
1
profiles/base/.tmux/plugins/tpm
Submodule
1
profiles/base/.tmux/plugins/tpm
Submodule
Submodule profiles/base/.tmux/plugins/tpm added at 99469c4a9b
4
profiles/base/.vim/after/ftplugin/lua.vim
Normal file
4
profiles/base/.vim/after/ftplugin/lua.vim
Normal file
@@ -0,0 +1,4 @@
|
||||
" set default tab width to 2 spaces
|
||||
set tabstop=2 " number of spaces that a tab counts for
|
||||
set shiftwidth=2 " size of an autoindented shift
|
||||
set softtabstop=0 " indentation size
|
||||
1
profiles/base/.vim/after/ftplugin/make.vim
Normal file
1
profiles/base/.vim/after/ftplugin/make.vim
Normal file
@@ -0,0 +1 @@
|
||||
set noexpandtab " use tabs instead of spaces
|
||||
78
profiles/base/.vim/plugin/vimtmuxclipboard.vim
Normal file
78
profiles/base/.vim/plugin/vimtmuxclipboard.vim
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
let g:vim_tmux_clipboard#loadb_option = get(g:, 'vim_tmux_clipboard#loadb_option', '')
|
||||
|
||||
func! s:TmuxBufferName()
|
||||
let l:list = systemlist('tmux list-buffers -F"#{buffer_name}"')
|
||||
if len(l:list)==0
|
||||
return ""
|
||||
else
|
||||
return l:list[0]
|
||||
endif
|
||||
endfunc
|
||||
|
||||
function! s:on_stdout(job_id, data, event)
|
||||
let @" = join(a:data, "\n")
|
||||
endfunction
|
||||
|
||||
func! s:AsyncTmuxBuffer()
|
||||
call jobstart('tmux show-buffer', {'on_stdout': function('s:on_stdout'), 'stdout_buffered': 1})
|
||||
endfunc
|
||||
|
||||
func! s:TmuxBuffer()
|
||||
return system('tmux show-buffer')
|
||||
endfunc
|
||||
|
||||
func! s:Enable()
|
||||
|
||||
if $TMUX==''
|
||||
" not in tmux session
|
||||
return
|
||||
endif
|
||||
|
||||
let s:lastbname=""
|
||||
|
||||
" if support TextYankPost
|
||||
if exists('##TextYankPost')==1
|
||||
" @"
|
||||
augroup vimtmuxclipboard
|
||||
autocmd!
|
||||
autocmd FocusLost * call s:update_from_tmux()
|
||||
autocmd FocusGained * call s:update_from_tmux()
|
||||
autocmd TextYankPost * silent! call system('tmux loadb ' . g:vim_tmux_clipboard#loadb_option . ' -',join(v:event["regcontents"],"\n"))
|
||||
augroup END
|
||||
if exists('*jobstart')==1 " Only supported on Neovim
|
||||
call s:AsyncTmuxBuffer()
|
||||
else
|
||||
let @" = s:TmuxBuffer()
|
||||
endif
|
||||
else
|
||||
" vim doesn't support TextYankPost event
|
||||
" This is a workaround for vim
|
||||
augroup vimtmuxclipboard
|
||||
autocmd!
|
||||
autocmd FocusLost * silent! call system('tmux loadb ' . g:vim_tmux_clipboard#loadb_option . ' -',@")
|
||||
autocmd FocusGained * let @" = s:TmuxBuffer()
|
||||
augroup END
|
||||
let @" = s:TmuxBuffer()
|
||||
endif
|
||||
|
||||
endfunc
|
||||
|
||||
func! s:update_from_tmux()
|
||||
let buffer_name = s:TmuxBufferName()
|
||||
if s:lastbname != buffer_name
|
||||
let @" = s:TmuxBuffer()
|
||||
endif
|
||||
let s:lastbname=s:TmuxBufferName()
|
||||
endfunc
|
||||
|
||||
call s:Enable()
|
||||
|
||||
" " workaround for this bug
|
||||
" if shellescape("\n")=="'\\\n'"
|
||||
" let l:s=substitute(l:s,'\\\n',"\n","g")
|
||||
" let g:tmp_s=substitute(l:s,'\\\n',"\n","g")
|
||||
" ");
|
||||
" let g:tmp_cmd='tmux set-buffer ' . l:s
|
||||
" endif
|
||||
" silent! call system('tmux loadb -w -',l:s)
|
||||
65
profiles/base/.vimrc
Normal file
65
profiles/base/.vimrc
Normal file
@@ -0,0 +1,65 @@
|
||||
" must have stuff
|
||||
set nocompatible " use modern vim defaults
|
||||
filetype plugin indent on
|
||||
set autoindent
|
||||
syntax on " highlight syntax
|
||||
set number " display line numbers
|
||||
|
||||
" disable arrow keys
|
||||
noremap <Up> <Nop>
|
||||
noremap <Down> <Nop>
|
||||
noremap <Left> <Nop>
|
||||
noremap <Right> <Nop>
|
||||
inoremap <Up> <Nop>
|
||||
inoremap <Down> <Nop>
|
||||
inoremap <Left> <Nop>
|
||||
inoremap <Right> <Nop>
|
||||
|
||||
" set cursor shape to underline in the normal and command mode,
|
||||
" in the insert mode change shape to vertical bar, and disable
|
||||
" blinking in all modes
|
||||
set guicursor=n-c:hor20
|
||||
set guicursor+=i:ver20
|
||||
set guicursor+=a:blinkon0
|
||||
let &t_EI = "\e[4 q" " solid underscore
|
||||
let &t_SI = "\e[6 q" " vertical bar
|
||||
if has("autocmd") " reset cursor to underscore after I leave vim
|
||||
augroup cursor
|
||||
autocmd!
|
||||
autocmd VimLeave * silent execute '!echo -ne "\e[4 q"' | redraw!
|
||||
augroup END
|
||||
endif
|
||||
|
||||
" fix delay when sending escape sequences from insert mode
|
||||
set timeout
|
||||
set timeoutlen=1000
|
||||
set ttimeout
|
||||
set ttimeoutlen=50
|
||||
|
||||
" set default tab width to 4 spaces
|
||||
set tabstop=4 " number of spaces that a tab counts for
|
||||
set shiftwidth=4 " number of spaces that are inserted during indent operations
|
||||
set softtabstop=4 " number of spaces that are inserted after pressing tab
|
||||
set expandtab " use spaces instead of tabs
|
||||
|
||||
" persistent undo
|
||||
if has("persistent_undo")
|
||||
let target_path = expand('~/.local/state/vim/undo')
|
||||
|
||||
" create the directory and any parent directories
|
||||
" if the location does not exist.
|
||||
call mkdir(target_path, "p", 0700)
|
||||
|
||||
let &undodir=target_path
|
||||
set undofile
|
||||
endif
|
||||
|
||||
" enable clipboard
|
||||
if has("clipboard")
|
||||
set clipboard=unnamedplus,unnamed
|
||||
endif
|
||||
|
||||
" stuff related to editing html files
|
||||
let g:html_indent_autotags = "html,thead,tbody,tfoot"
|
||||
let g:html_indent_script1 = "auto"
|
||||
let g:html_indent_style1 = "auto"
|
||||
11
profiles/base/.zsh/conf.d/00-base.zsh
Normal file
11
profiles/base/.zsh/conf.d/00-base.zsh
Normal file
@@ -0,0 +1,11 @@
|
||||
# Set PATH environment variable
|
||||
typeset -U path PATH
|
||||
path=("${HOME}/.local/bin" "/usr/local/sbin" "/usr/local/bin" "/usr/sbin" "/sbin" "${path[@]}")
|
||||
export PATH
|
||||
|
||||
# Configure shell history behavior
|
||||
HISTFILE="${HOME}/.zsh_history"
|
||||
HISTSIZE=10000
|
||||
SAVEHIST=10000
|
||||
setopt appendhistory
|
||||
setopt HIST_IGNORE_SPACE
|
||||
13
profiles/base/.zsh/conf.d/01-prompt.zsh
Normal file
13
profiles/base/.zsh/conf.d/01-prompt.zsh
Normal file
@@ -0,0 +1,13 @@
|
||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||
# Initialization code that may require console input (password prompts, [y/n]
|
||||
# confirmations, etc.) must go above this block; everything else may go below.
|
||||
if [[ -r "${XDG_CACHE_HOME:-${HOME}/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||
source "${XDG_CACHE_HOME:-${HOME}/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||
fi
|
||||
|
||||
# plugins
|
||||
source "${HOME}/.zsh/plugins/powerlevel10k/powerlevel10k.zsh-theme"
|
||||
source "${HOME}/.zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
||||
|
||||
# To customize prompt, run `p10k configure` or edit ~/.zsh/prompt/p10k.zsh.
|
||||
[[ -f "${HOME}/.zsh/prompt/p10k.zsh" ]] && source "${HOME}/.zsh/prompt/p10k.zsh"
|
||||
33
profiles/base/.zsh/conf.d/02-vi-keybindings.zsh
Normal file
33
profiles/base/.zsh/conf.d/02-vi-keybindings.zsh
Normal file
@@ -0,0 +1,33 @@
|
||||
# Enable vi keybindings
|
||||
bindkey -v
|
||||
export KEYTIMEOUT=1
|
||||
autoload -z edit-command-line
|
||||
zle -N edit-command-line
|
||||
bindkey '^e' edit-command-line
|
||||
|
||||
# Fix backspace character behavior in vi mode
|
||||
bindkey '^?' backward-delete-char
|
||||
bindkey '^W' backward-kill-word
|
||||
bindkey '^H' backward-delete-char # Control-h also deletes the previous char.
|
||||
bindkey '^U' backward-kill-line
|
||||
|
||||
# Change cursor shape for different vi modes
|
||||
zle-keymap-select() {
|
||||
if [[ ${KEYMAP} == vicmd ]] ||
|
||||
[[ $1 = "block" ]]; then
|
||||
echo -ne '\e[4 q'
|
||||
elif [[ ${KEYMAP} == main ]] ||
|
||||
[[ ${KEYMAP} == viins ]] ||
|
||||
[[ ${KEYMAP} == "" ]] ||
|
||||
[[ $1 == "beam" ]]; then
|
||||
echo -ne '\e[6 q'
|
||||
fi
|
||||
}
|
||||
zle -N zle-keymap-select
|
||||
zle-line-init() {
|
||||
zle -K viins # Initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
|
||||
echo -ne '\e[6 q'
|
||||
}
|
||||
zle -N zle-line-init
|
||||
echo -ne '\e[6 q' # Use beam shape cursor on startup
|
||||
preexec() { echo -ne '\e[6 q' } # Use beam shape cursor for each new prompt
|
||||
14
profiles/base/.zsh/conf.d/03-plugins.zsh
Normal file
14
profiles/base/.zsh/conf.d/03-plugins.zsh
Normal file
@@ -0,0 +1,14 @@
|
||||
## Plugins configuration
|
||||
|
||||
# Completions
|
||||
fpath=("${HOME}/.zsh/plugins/zsh-completions/src" "${fpath[@]}")
|
||||
autoload -U compinit promptinit
|
||||
compinit
|
||||
promptinit
|
||||
[[ -f "/etc/gentoo-release" ]] && prompt gentoo
|
||||
|
||||
# Enable cache for completions
|
||||
zstyle ":completion::complete:*" use-cache 1
|
||||
|
||||
# Syntax highlighting in zsh prompt
|
||||
source "${HOME}/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||
3
profiles/base/.zsh/conf.d/04-emacs.zsh
Normal file
3
profiles/base/.zsh/conf.d/04-emacs.zsh
Normal file
@@ -0,0 +1,3 @@
|
||||
# emacs specific stuff
|
||||
[ -n "${EAT_SHELL_INTEGRATION_DIR}" ] && \
|
||||
source "${EAT_SHELL_INTEGRATION_DIR}/zsh"
|
||||
26
profiles/base/.zsh/conf.d/05-env.zsh
Normal file
26
profiles/base/.zsh/conf.d/05-env.zsh
Normal file
@@ -0,0 +1,26 @@
|
||||
# Set environment variables
|
||||
if command -v nvim &> /dev/null; then
|
||||
export EDITOR="nvim"
|
||||
else
|
||||
export EDITOR="vim"
|
||||
fi
|
||||
# export EDITOR="ec"
|
||||
export VISUAL="${EDITOR}"
|
||||
export SUDO_EDITOR="${EDITOR}"
|
||||
export VIRSH_DEFAULT_CONNECT_URI="qemu:///system"
|
||||
export BROWSER="chromium"
|
||||
export PAGER="less -R -F"
|
||||
export BAT_PAGER="${PAGER}"
|
||||
export MANPAGER="less -R --use-color -Dd+r -Du+b"
|
||||
[ -f "/usr/share/cowsay/cows" ] && export COWPATH="/usr/share/cowsay/cows"
|
||||
export CHROOT="${HOME}/arch_chroot"
|
||||
export AUR_REPO="whiteman808"
|
||||
export AURDEST="${HOME}/.cache/paru/clone"
|
||||
export AUR_PAGER="ranger"
|
||||
export GPGKEY="4A45503BBE575E3D4DAF28E27264AFFDC98D52BB"
|
||||
|
||||
# gpg-agent
|
||||
unset SSH_AGENT_PID
|
||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket 2>/dev/null)"
|
||||
fi
|
||||
22
profiles/base/.zsh/conf.d/06-color-output.zsh
Normal file
22
profiles/base/.zsh/conf.d/06-color-output.zsh
Normal file
@@ -0,0 +1,22 @@
|
||||
alias diff="diff --color=auto"
|
||||
alias grep="grep --color=auto"
|
||||
alias ip="ip -color=auto"
|
||||
alias ls="ls --color=auto"
|
||||
export MANROFFOPT="-P -c"
|
||||
export LESS='-R --use-color -Dd+r$Du+b$'
|
||||
|
||||
zmodload zsh/zpty
|
||||
|
||||
pty() {
|
||||
zpty pty-${UID} ${1+$@}
|
||||
if [[ ! -t 1 ]]; then
|
||||
setopt local_traps
|
||||
trap '' INT
|
||||
fi
|
||||
zpty -r pty-${UID}
|
||||
zpty -d pty-${UID}
|
||||
}
|
||||
|
||||
ptyless() {
|
||||
pty $@ | less
|
||||
}
|
||||
101
profiles/base/.zsh/conf.d/07-tool-integrations.zsh
Normal file
101
profiles/base/.zsh/conf.d/07-tool-integrations.zsh
Normal file
@@ -0,0 +1,101 @@
|
||||
# HSTR configuration - add this to ~/.zshrc
|
||||
if type "hstr" >/dev/null; then
|
||||
alias hh=hstr # hh to be alias for hstr
|
||||
setopt histignorespace # skip cmds w/ leading space from history
|
||||
export HSTR_CONFIG=hicolor # get more colors
|
||||
hstr_no_tiocsti() {
|
||||
zle -I
|
||||
{ HSTR_OUT="$( { </dev/tty hstr ${BUFFER}; } 2>&1 1>&3 3>&- )"; } 3>&1;
|
||||
BUFFER="${HSTR_OUT}"
|
||||
CURSOR=${#BUFFER}
|
||||
zle redisplay
|
||||
}
|
||||
zle -N hstr_no_tiocsti
|
||||
bindkey '\C-r' hstr_no_tiocsti
|
||||
export HSTR_TIOCSTI=n
|
||||
else
|
||||
bindkey '\C-r' history-incremental-search-backward
|
||||
fi
|
||||
|
||||
# better ls
|
||||
if command -v "eza" >/dev/null 2>&1; then
|
||||
alias ll="eza -bghHlS"
|
||||
else
|
||||
alias ll="exa -bghHlS"
|
||||
fi
|
||||
|
||||
# bat (debian)
|
||||
if command -v "batcat" >/dev/null 2>&1; then
|
||||
alias bat="batcat"
|
||||
fi
|
||||
|
||||
# lf
|
||||
lfwrapper() {
|
||||
command lf "$@"
|
||||
|
||||
# cleanup
|
||||
awk '$1 == "archivemount" { print $2 }' /etc/mtab | while read -r mntdir; do
|
||||
sanitized_input="$(printf "${mntdir}")" # /etc/mtab uses octal representation of spaces (possible other symbols too), printf would convert octal representation, so that it can be used in the umount & rmdir commands.
|
||||
umount "${sanitized_input}"
|
||||
rmdir "${sanitized_input}"
|
||||
done
|
||||
}
|
||||
|
||||
lfcd() {
|
||||
dir="$(lfwrapper -print-last-dir "$@")"
|
||||
while ! cd "${dir}" 2>/dev/null; do
|
||||
dir="$(dirname -- "${dir}")"
|
||||
done
|
||||
}
|
||||
alias lf=lfcd
|
||||
|
||||
# ranger
|
||||
ranger_cd() {
|
||||
temp_file="$(mktemp -t "ranger_cd.XXXXXXXXXX")"
|
||||
ranger --choosedir="${temp_file}" -- "${@:-${PWD}}"
|
||||
if chosen_dir="$(cat -- "${temp_file}")" && [ -n "${chosen_dir}" ] && [ "${chosen_dir}" != "${PWD}" ]; then
|
||||
cd -- "${chosen_dir}"
|
||||
fi
|
||||
rm -f -- "${temp_file}"
|
||||
}
|
||||
alias ranger=ranger_cd
|
||||
|
||||
# mc
|
||||
if [ -f "/usr/libexec/mc/mc.sh" ]; then
|
||||
source "/usr/libexec/mc/mc.sh"
|
||||
fi
|
||||
|
||||
# nix package manager
|
||||
if [ -e "${HOME}/.nix-profile/etc/profile.d/nix.sh" ]; then
|
||||
source "${HOME}/.nix-profile/etc/profile.d/nix.sh"
|
||||
fi # added by Nix installer
|
||||
|
||||
# nix shell
|
||||
if command -v nix-your-shell >/dev/null 2>&1; then
|
||||
nix-your-shell zsh | source /dev/stdin
|
||||
fi
|
||||
|
||||
# node.js
|
||||
export NVM_DIR="${HOME}/.nvm"
|
||||
[ -s "${NVM_DIR}/nvm.sh" ] && source "${NVM_DIR}/nvm.sh" # This loads nvm
|
||||
[ -s "${NVM_DIR}/bash_completion" ] && source "${NVM_DIR}/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
# rvm
|
||||
[ -s "${HOME}/.rvm/scripts/rvm" ] && source "${HOME}/.rvm/scripts/rvm"
|
||||
|
||||
# pyenv
|
||||
export PYENV_ROOT="${HOME}/.pyenv"
|
||||
if [[ -d "${PYENV_ROOT}/bin" ]]; then
|
||||
path=("${PYENV_ROOT}/bin" "${path[@]}")
|
||||
export PATH
|
||||
eval "$(pyenv init - zsh)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
fi
|
||||
|
||||
# inside tmux, we don't know if Sway got restarted
|
||||
if [[ -v TMUX ]]; then
|
||||
swaymsg() {
|
||||
export SWAYSOCK="${XDG_RUNTIME_DIR}/sway-ipc.${UID}.$(pgrep -x sway).sock"
|
||||
command swaymsg "$@"
|
||||
}
|
||||
fi
|
||||
17
profiles/base/.zsh/conf.d/08-aliases.zsh
Normal file
17
profiles/base/.zsh/conf.d/08-aliases.zsh
Normal file
@@ -0,0 +1,17 @@
|
||||
alias ncmpcpp="ncmpcpp -b ${HOME}/.config/ncmpcpp/bindings"
|
||||
alias tb="nc termbin.com 9999"
|
||||
alias mux="tmuxinator"
|
||||
alias tm="tmuxinator start misc"
|
||||
alias tq="tmuxinator start quake"
|
||||
alias sudo="sudo "
|
||||
alias rsync_copy="rsync -aAXUHvh --partial-dir=.rsync-partial --progress"
|
||||
alias rsync_copy_ssh="rsync_copy -e ssh"
|
||||
alias rsync_backup="rsync_copy --numeric-ids --delete --exclude={'/dev/*','/proc/*','/sys/*','/tmp/*','/run/*','/mnt/*','/media/*','/lost+found'}"
|
||||
alias rsync_backup_ssh="rsync_backup -e ssh"
|
||||
alias rsync_restore="rsync_copy --numeric-ids --delete --exclude='lost+found'"
|
||||
alias rsync_restore_ssh="rsync_restore -e ssh"
|
||||
alias glog="git log --oneline"
|
||||
alias emerge_world="emerge --ask --verbose --deep --newuse --update @world"
|
||||
alias sync_repo="rsync_copy_ssh --delete ~/arch_paczuchy/* vps.paraboletancza.org:/srv/http/arch.paraboletancza.org"
|
||||
alias aur_sync="aur sync --sign --chroot"
|
||||
alias aur_build="aur build --sign --chroot"
|
||||
35
profiles/base/.zsh/conf.d/09-functions.zsh
Normal file
35
profiles/base/.zsh/conf.d/09-functions.zsh
Normal file
@@ -0,0 +1,35 @@
|
||||
take() {
|
||||
local -r directory="$1"
|
||||
mkdir -p "${directory}"
|
||||
cd "${directory}"
|
||||
}
|
||||
|
||||
# downloading from youtube
|
||||
yt-dlp() {
|
||||
local -a -r args=(
|
||||
--cookies-from-browser "chromium:${HOME}/.local/share/qutebrowser"
|
||||
--extractor-args "youtube:player_client=default,web_safari;player_js_version=actual"
|
||||
--fragment-retries infinite
|
||||
)
|
||||
command yt-dlp "${args[@]}" "$@"
|
||||
}
|
||||
|
||||
yt_dl_mp3() {
|
||||
yt-dlp -t mp3 --embed-thumbnail "$@"
|
||||
}
|
||||
|
||||
yt_dl_channel() {
|
||||
local -a -r args=(
|
||||
--download-archive "archive.txt"
|
||||
--output "%(upload_date)s.%(title)s.%(id)s.%(ext)s"
|
||||
--merge-output-format mkv
|
||||
--ignore-errors
|
||||
--write-sub
|
||||
--sub-langs "en,pl"
|
||||
--cookies-from-browser "chromium:${HOME}/.local/share/qutebrowser"
|
||||
--write-description
|
||||
--write-info-json
|
||||
--write-thumbnail
|
||||
)
|
||||
yt-dlp "${args[@]}" "$@"
|
||||
}
|
||||
1
profiles/base/.zsh/conf.d/10-keybindings.zsh
Normal file
1
profiles/base/.zsh/conf.d/10-keybindings.zsh
Normal file
@@ -0,0 +1 @@
|
||||
bindkey -s '^o' 'ranger\n'
|
||||
1
profiles/base/.zsh/plugins/powerlevel10k
Submodule
1
profiles/base/.zsh/plugins/powerlevel10k
Submodule
Submodule profiles/base/.zsh/plugins/powerlevel10k added at 8ed1f58e08
1
profiles/base/.zsh/plugins/zsh-autosuggestions
Submodule
1
profiles/base/.zsh/plugins/zsh-autosuggestions
Submodule
Submodule profiles/base/.zsh/plugins/zsh-autosuggestions added at 85919cd1ff
1
profiles/base/.zsh/plugins/zsh-completions
Submodule
1
profiles/base/.zsh/plugins/zsh-completions
Submodule
Submodule profiles/base/.zsh/plugins/zsh-completions added at 989d044545
Submodule profiles/base/.zsh/plugins/zsh-syntax-highlighting added at 1d85c69261
1712
profiles/base/.zsh/prompt/p10k.zsh
Normal file
1712
profiles/base/.zsh/prompt/p10k.zsh
Normal file
File diff suppressed because it is too large
Load Diff
4
profiles/base/.zshrc
Normal file
4
profiles/base/.zshrc
Normal file
@@ -0,0 +1,4 @@
|
||||
# load zsh configuration
|
||||
for file in "${HOME}/.zsh/conf.d/"*.zsh(N); do
|
||||
source "${file}"
|
||||
done
|
||||
3
profiles/desktop/.Xresources
Normal file
3
profiles/desktop/.Xresources
Normal file
@@ -0,0 +1,3 @@
|
||||
#include ".Xresources.d/rxvt-unicode"
|
||||
#include ".Xresources.d/fonts"
|
||||
#include ".Xresources.d/themes/Elementary"
|
||||
6
profiles/desktop/.Xresources.d/fonts
Normal file
6
profiles/desktop/.Xresources.d/fonts
Normal file
@@ -0,0 +1,6 @@
|
||||
Xft.antialias: true
|
||||
Xft.rgba: rgb
|
||||
Xft.hinting: true
|
||||
Xft.hintstyle: hintslight
|
||||
Xft.autohint: true
|
||||
Xft.lcdfilter: lcddefault
|
||||
47
profiles/desktop/.Xresources.d/rxvt-unicode
Normal file
47
profiles/desktop/.Xresources.d/rxvt-unicode
Normal file
@@ -0,0 +1,47 @@
|
||||
! terminal font
|
||||
URxvt.font: xft:Hack Nerd Font:size=10:style=Regular
|
||||
URxvt.boldFont: xft:Hack Nerd Font:size=10:style=Bold
|
||||
URxvt.italicFont: xft:Hack Nerd Font:size=10:style=Italic
|
||||
URxvt.boldItalicFont: xft:Hack Nerd Font:size=10:style=Bold Italic
|
||||
URxvt.letterSpace: -1
|
||||
URxvt.lineSpace: -1
|
||||
|
||||
! scrollback buffer lines - 65535 is max on most machines (64 is default)
|
||||
URxvt.saveLines: 16384
|
||||
|
||||
! scroll bar
|
||||
URxvt.scrollBar: false
|
||||
URxvt.scrollBar_right: false
|
||||
URxvt.scrollBar_floating: false
|
||||
URxvt.scrollstyle: rxvt
|
||||
|
||||
! transparency
|
||||
URxvt.inheritPixmap: true
|
||||
URxvt.transparent: true
|
||||
! URxvt*shading: 0 to 99 darkens, 101 to 200 lightens
|
||||
URxvt.shading: 20
|
||||
|
||||
! The string will be interpreted as if typed into the shell as-is.
|
||||
! In this example, printing will be disabled altogether.
|
||||
URxvt.print-pipe: "cat > /dev/null"
|
||||
|
||||
!-*- Perl extensions -*-
|
||||
URxvt.perl-ext-common: default,selection-to-clipboard,matcher,keyboard-select,url-select,font-size,clipboard
|
||||
URxvt.keysym.M-u: perl:url-select:select_next
|
||||
URxvt.url-select.button: 1
|
||||
URxvt.url-select.launcher: chromium
|
||||
URxvt.url-select.underline: true
|
||||
URxvt.keysym.M-Escape:perl:keyboard-select:activate
|
||||
! The following configuration will automatically update the CLIPBOARD when the PRIMARY selection changes
|
||||
! This is deprecated since Control-Alt-C/V has been implemented since 9.20
|
||||
URxvt.clipboard.autocopy: true
|
||||
URxvt.keysym.C-V: clipboard:paste
|
||||
URxvt.keysym.C-Up: font-size:increase
|
||||
URxvt.keysym.C-Down: font-size:decrease
|
||||
URxvt.keysym.C-S-Up: font-size:incglobal
|
||||
URxvt.keysym.C-S-Down: font-size:decglobal
|
||||
URxvt.keysym.C-equal: font-size:reset
|
||||
URxvt.keysym.C-slash: font-size:show
|
||||
|
||||
! fix geometry
|
||||
URxvt.geometry: 400x400
|
||||
44
profiles/desktop/.Xresources.d/themes/Elementary
Normal file
44
profiles/desktop/.Xresources.d/themes/Elementary
Normal file
@@ -0,0 +1,44 @@
|
||||
!
|
||||
! Generated with :
|
||||
! XRDB2Xreources.py
|
||||
!
|
||||
*.foreground: #efefef
|
||||
*.background: #000000
|
||||
*.cursorColor: #bbbbbb
|
||||
!
|
||||
! Black
|
||||
*.color0: #000000
|
||||
*.color8: #5d5d5d
|
||||
!
|
||||
! Red
|
||||
*.color1: #e1321a
|
||||
*.color9: #ff361e
|
||||
!
|
||||
! Green
|
||||
*.color2: #6ab017
|
||||
*.color10: #7bc91f
|
||||
!
|
||||
! Yellow
|
||||
*.color3: #ffc005
|
||||
*.color11: #ffd00a
|
||||
!
|
||||
! Blue
|
||||
*.color4: #004f9e
|
||||
*.color12: #0071ff
|
||||
!
|
||||
! Magenta
|
||||
*.color5: #ec0048
|
||||
*.color13: #ff1d62
|
||||
!
|
||||
! Cyan
|
||||
*.color6: #2aa7e7
|
||||
*.color14: #4bb8fd
|
||||
!
|
||||
! White
|
||||
*.color7: #f2f2f2
|
||||
*.color15: #ffffff
|
||||
!
|
||||
! Bold, Italic, Underline
|
||||
*.colorBD: #ffffff
|
||||
!*.colorIT:
|
||||
!*.colorUL:
|
||||
85
profiles/desktop/.alacritty.toml
Normal file
85
profiles/desktop/.alacritty.toml
Normal file
@@ -0,0 +1,85 @@
|
||||
[env]
|
||||
TERM = 'xterm-256color'
|
||||
|
||||
[cursor]
|
||||
style = 'Underline'
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = 'V'
|
||||
mods = 'Control|Alt'
|
||||
action = 'Paste'
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = 'C'
|
||||
mods = 'Control|Alt'
|
||||
action = 'Copy'
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = 'V'
|
||||
mods = 'Control|Shift'
|
||||
action = 'None'
|
||||
|
||||
[[keyboard.bindings]]
|
||||
key = 'C'
|
||||
mods = 'Control|Shift'
|
||||
action = 'None'
|
||||
|
||||
# Colors (Elementary)
|
||||
|
||||
[colors.bright]
|
||||
black = '#5d5d5d'
|
||||
blue = '#0071ff'
|
||||
cyan = '#4bb8fd'
|
||||
green = '#7bc91f'
|
||||
magenta = '#ff1d62'
|
||||
red = '#ff361e'
|
||||
white = '#ffffff'
|
||||
yellow = '#ffd00a'
|
||||
|
||||
[colors.cursor]
|
||||
cursor = '#bbbbbb'
|
||||
text = '#ffffff'
|
||||
|
||||
[colors.normal]
|
||||
black = '#000000'
|
||||
blue = '#004f9e'
|
||||
cyan = '#2aa7e7'
|
||||
green = '#6ab017'
|
||||
magenta = '#ec0048'
|
||||
red = '#e1321a'
|
||||
white = '#f2f2f2'
|
||||
yellow = '#ffc005'
|
||||
|
||||
[colors.primary]
|
||||
background = '#000000'
|
||||
foreground = '#efefef'
|
||||
|
||||
[colors.selection]
|
||||
background = '#b5d5ff'
|
||||
text = '#000000'
|
||||
|
||||
[window]
|
||||
opacity = 0.9
|
||||
|
||||
[font]
|
||||
size = 15.0
|
||||
|
||||
[font.offset]
|
||||
x = -1
|
||||
y = -1
|
||||
|
||||
[font.bold]
|
||||
family = 'Hack Nerd Font Mono'
|
||||
style = 'Bold'
|
||||
|
||||
[font.bold_italic]
|
||||
family = 'Hack Nerd Font Mono'
|
||||
style = 'Bold Italic'
|
||||
|
||||
[font.italic]
|
||||
family = 'Hack Nerd Font Mono'
|
||||
style = 'Italic'
|
||||
|
||||
[font.normal]
|
||||
family = 'Hack Nerd Font Mono'
|
||||
style = 'Regular'
|
||||
20
profiles/desktop/.config/Trolltech.conf
Normal file
20
profiles/desktop/.config/Trolltech.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
[Qt]
|
||||
style=GTK+
|
||||
|
||||
[qt]
|
||||
GUIEffects=none
|
||||
KDE\contrast=7
|
||||
KWinPalette\activeBackground=#272727
|
||||
KWinPalette\activeBlend=#272727
|
||||
KWinPalette\activeForeground=#dfdfdf
|
||||
KWinPalette\activeTitleBtnBg=#121212
|
||||
KWinPalette\frame=#121212
|
||||
KWinPalette\inactiveBackground=#1e1e1e
|
||||
KWinPalette\inactiveBlend=#1e1e1e
|
||||
KWinPalette\inactiveForeground=#8b8b8b
|
||||
KWinPalette\inactiveFrame=#121212
|
||||
KWinPalette\inactiveTitleBtnBg=#121212
|
||||
Palette\active=#dfdfdf, #2e2e2e, #dbdbdb, #b2b2b2, #949494, #6d6d6d, #dfdfdf, #ffffff, #ffffff, #1e1e1e, #121212, #b2b2b2, #285616, #ffffff, #5be026, #ad65af, #2d2d2d, #000000, #616161, #dfdfdf, #696969, #285616
|
||||
Palette\disabled=#565656, #2c2c2c, #dbdbdb, #b2b2b2, #949494, #6d6d6d, #5d5d5d, #ffffff, #727272, #1d1d1d, #111111, #b2b2b2, #111111, #565656, #315d1f, #4c344d, #2b2b2b, #000000, #616161, #dfdfdf, #363636, #111111
|
||||
Palette\inactive=#dfdfdf, #2e2e2e, #dbdbdb, #b2b2b2, #949494, #6d6d6d, #dfdfdf, #ffffff, #ffffff, #1e1e1e, #121212, #b2b2b2, #15290d, #dfdfdf, #5be026, #ad65af, #2d2d2d, #000000, #616161, #dfdfdf, #696969, #15290d
|
||||
font="Noto Sans,10,-1,0,400,0,0,0,0,0,0,0,0,0,0,1"
|
||||
171841
profiles/desktop/.config/aacs/KEYDB.cfg
Normal file
171841
profiles/desktop/.config/aacs/KEYDB.cfg
Normal file
File diff suppressed because it is too large
Load Diff
2
profiles/desktop/.config/ctpv/config
Normal file
2
profiles/desktop/.config/ctpv/config
Normal file
@@ -0,0 +1,2 @@
|
||||
priority bat
|
||||
set chafasixel
|
||||
25
profiles/desktop/.config/dunst/dunstrc
Normal file
25
profiles/desktop/.config/dunst/dunstrc
Normal file
@@ -0,0 +1,25 @@
|
||||
[global]
|
||||
font = Hack Nerd Font 12
|
||||
enable_recursive_icon_lookup = true
|
||||
icon_theme = "Numix-Circle"
|
||||
width = 550
|
||||
offset = 10x10
|
||||
gap_size = 5
|
||||
|
||||
[urgency_low]
|
||||
background = "#066d01"
|
||||
foreground = "#eeeeee"
|
||||
frame_color = "#044201"
|
||||
timeout = 5
|
||||
|
||||
[urgency_normal]
|
||||
background = "#066d01"
|
||||
foreground = "#eeeeee"
|
||||
frame_color = "#044201"
|
||||
timeout = 10
|
||||
|
||||
[urgency_critical]
|
||||
background = "#6d0a01"
|
||||
foreground = "#eeeeee"
|
||||
frame_color = "#420601"
|
||||
timeout = 20
|
||||
37
profiles/desktop/.config/foot/foot.ini
Normal file
37
profiles/desktop/.config/foot/foot.ini
Normal file
@@ -0,0 +1,37 @@
|
||||
[main]
|
||||
font=Hack Nerd Font Mono:size=15
|
||||
font-bold=Hack Nerd Font Mono:size=15:style=Bold
|
||||
font-italic=Hack Nerd Font Mono:size=15:style=Italic
|
||||
font-bold-italic=Hack Nerd Font Mono:size=15:style=Bold Italic
|
||||
line-height=17
|
||||
letter-spacing=-1
|
||||
|
||||
[cursor]
|
||||
style=underline
|
||||
|
||||
[key-bindings]
|
||||
clipboard-paste=Control+Alt+v XF86Paste
|
||||
clipboard-copy=Control+Alt+c XF86Copy
|
||||
|
||||
[colors]
|
||||
background=000000
|
||||
foreground=efefef
|
||||
selection-background=b5d5ff
|
||||
selection-foreground=000000
|
||||
regular0=000000
|
||||
regular1=e1321a
|
||||
regular2=6ab017
|
||||
regular3=ffc005
|
||||
regular4=004f9e
|
||||
regular5=ec0048
|
||||
regular6=2aa7e7
|
||||
regular7=f2f2f2
|
||||
bright0=5d5d5d
|
||||
bright1=ff361e
|
||||
bright2=7bc91f
|
||||
bright3=ffd00a
|
||||
bright4=0071ff
|
||||
bright5=ff1d62
|
||||
bright6=4bb8fd
|
||||
bright7=ffffff
|
||||
alpha=0.8
|
||||
25
profiles/desktop/.config/gtk-3.0/settings.ini
Normal file
25
profiles/desktop/.config/gtk-3.0/settings.ini
Normal file
@@ -0,0 +1,25 @@
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-button-images=true
|
||||
gtk-cursor-blink=true
|
||||
gtk-cursor-blink-time=1000
|
||||
gtk-cursor-theme-name=Vimix-cursors
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-decoration-layout=icon:minimize,maximize,close
|
||||
gtk-enable-animations=true
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-font-name=Noto Sans, 10
|
||||
gtk-icon-theme-name=Numix-Circle
|
||||
gtk-menu-images=true
|
||||
gtk-modules=colorreload-gtk-module
|
||||
gtk-primary-button-warps-slider=true
|
||||
gtk-sound-theme-name=ocean
|
||||
gtk-theme-name=Materia-dark-compact
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-toolbar-style=3
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-dpi=98304
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintslight
|
||||
gtk-xft-rgba=rgb
|
||||
14
profiles/desktop/.config/gtk-4.0/settings.ini
Normal file
14
profiles/desktop/.config/gtk-4.0/settings.ini
Normal file
@@ -0,0 +1,14 @@
|
||||
[Settings]
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-cursor-blink=true
|
||||
gtk-cursor-blink-time=1000
|
||||
gtk-cursor-theme-name=Vimix-cursors
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-decoration-layout=icon:minimize,maximize,close
|
||||
gtk-enable-animations=true
|
||||
gtk-font-name=Noto Sans, 10
|
||||
gtk-icon-theme-name=Numix-Circle
|
||||
gtk-primary-button-warps-slider=true
|
||||
gtk-sound-theme-name=ocean
|
||||
gtk-theme-name=Materia-dark-compact
|
||||
gtk-xft-dpi=98304
|
||||
7
profiles/desktop/.config/i3-quickterm/config.json
Normal file
7
profiles/desktop/.config/i3-quickterm/config.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"term": "alacritty",
|
||||
"shells": {
|
||||
"shell": "zsh -c 'tmuxinator start quake'"
|
||||
},
|
||||
"ratio": 0.5
|
||||
}
|
||||
314
profiles/desktop/.config/i3/config
Normal file
314
profiles/desktop/.config/i3/config
Normal file
@@ -0,0 +1,314 @@
|
||||
# This file has been auto-generated by i3-config-wizard(1).
|
||||
# It will not be overwritten, so edit it as you like.
|
||||
#
|
||||
# Should you change your keyboard layout some time, delete
|
||||
# this file and re-run i3-config-wizard(1).
|
||||
#
|
||||
|
||||
# i3 config file (v4)
|
||||
#
|
||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||
|
||||
set $mod Mod4
|
||||
set $Locker ~/.config/i3/i3lock-multimonitor/lock -i ~/.config/i3/lockscreen.png
|
||||
|
||||
# Font for window titles. Will also be used by the bar unless a different font
|
||||
# is used in the bar {} block below.
|
||||
font pango:Iosevka,Font Awesome 7 Free,Font Awesome 7 Brands 9
|
||||
|
||||
# This font is widely installed, provides lots of unicode glyphs, right-to-left
|
||||
# text rendering and scalability on retina/hidpi displays (thanks to pango).
|
||||
#font pango:DejaVu Sans Mono 12
|
||||
|
||||
# prevent blank screen & auto lock
|
||||
exec --no-startup-id xset s off -dpms
|
||||
|
||||
# Start XDG autostart .desktop files using dex. See also
|
||||
# https://wiki.archlinux.org/index.php/XDG_Autostart
|
||||
exec --no-startup-id dex --autostart --environment i3
|
||||
|
||||
# The combination of xss-lock, nm-applet and pactl is a popular choice, so
|
||||
# they are included here as an example. Modify as you see fit.
|
||||
|
||||
# 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 -- $Locker
|
||||
|
||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||
# exec --no-startup-id nm-applet
|
||||
|
||||
# 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@ +1% && $refresh_i3status
|
||||
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -1% && $refresh_i3status
|
||||
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
|
||||
bindsym $mod+F4 exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
|
||||
|
||||
# Pipewire-pulse
|
||||
bindsym $mod+F3 exec pactl set-sink-mute 0 toggle
|
||||
bindsym $mod+F3 --release exec pkill -RTMIN+1 i3blocks
|
||||
bindsym $mod+F1 exec pactl set-sink-volume 0 -1%
|
||||
bindsym $mod+F1 --release exec pkill -RTMIN+1 i3blocks
|
||||
bindsym $mod+F2 exec pactl set-sink-volume 0 +1%
|
||||
bindsym $mod+F2 --release exec pkill -RTMIN+1 i3blocks
|
||||
|
||||
# Media player controls
|
||||
bindsym XF86AudioPlay exec playerctl play-pause
|
||||
bindsym XF86AudioPause exec playerctl play-pause
|
||||
bindsym XF86AudioNext exec playerctl next
|
||||
bindsym XF86AudioPrev exec playerctl previous
|
||||
|
||||
# don't follow focus with mouse
|
||||
focus_follows_mouse no
|
||||
|
||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||
floating_modifier $mod
|
||||
|
||||
# move tiling windows via drag & drop by left-clicking into the title bar,
|
||||
# or left-clicking anywhere into the window while holding the floating modifier.
|
||||
tiling_drag modifier titlebar
|
||||
|
||||
# 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
|
||||
# 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+Control+h split h
|
||||
|
||||
# split in vertical orientation
|
||||
bindsym $mod+Control+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: Torrenty"
|
||||
set $ws6 "6: Libreoffice"
|
||||
set $ws7 "7: Wirtualki"
|
||||
set $ws8 "8: Emacs"
|
||||
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'"
|
||||
set $mode_system (l)ock, l(o)gout, (s)uspend, (h)ibernate, (r)eboot, shu(t)down
|
||||
mode "$mode_system" {
|
||||
bindsym l exec --no-startup-id $Locker, mode "default"
|
||||
bindsym o exec --no-startup-id i3-msg exit, mode "default"
|
||||
bindsym s exec --no-startup-id $Locker && systemctl suspend, mode "default"
|
||||
bindsym r exec --no-startup-id systemctl reboot, mode "default"
|
||||
bindsym h exec --no-startup-id systemctl hibernate, mode "default"
|
||||
bindsym t exec --no-startup-id systemctl poweroff -i, mode "default"
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
|
||||
bindsym $mod+Shift+e mode "$mode_system"
|
||||
|
||||
# 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"
|
||||
|
||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
||||
# finds out, if available)
|
||||
bar {
|
||||
status_command i3blocks -c ~/.config/i3blocks/i3blocks.conf
|
||||
position top
|
||||
i3bar_command i3bar --transparency
|
||||
tray_output none
|
||||
colors {
|
||||
background #00000099
|
||||
statusline #ffffff
|
||||
separator #000000
|
||||
|
||||
focused_workspace #34003f #6e0284 #ffffff
|
||||
#active_workspace #333333 #5f676a #ffffff
|
||||
inactive_workspace #220028 #35013f #888888
|
||||
urgent_workspace #470801 #630000 #ffffff
|
||||
#binding_mode #2f343a #900000 #ffffff
|
||||
}
|
||||
}
|
||||
|
||||
# gnome-keyring
|
||||
exec --no-startup-id dbus-update-activation-environment --systemd --all
|
||||
exec --no-startup-id gnome-keyring-daemon --start --components=secrets
|
||||
|
||||
# picom
|
||||
exec --no-startup-id picom
|
||||
|
||||
# dunst
|
||||
exec --no-startup-id dunst
|
||||
|
||||
# display wallpaper
|
||||
exec --no-startup-id feh --bg-fill ~/.config/i3/wallpaper.png
|
||||
|
||||
# shortcut for lockscreen
|
||||
bindsym $mod+x exec $Locker
|
||||
|
||||
# set default workspace layout
|
||||
workspace_layout tabbed
|
||||
|
||||
# window assignments
|
||||
assign [class="[Ff]irefox.*"] $ws2
|
||||
assign [class="[Ll]ibre[Ww]olf"] $ws2
|
||||
assign [class="[Cc]hromium"] $ws3
|
||||
assign [class="[Gg]oogle[ -]*[Cc]hrome.*"] $ws3
|
||||
assign [class="[Tt]hunderbird.*"] $ws4
|
||||
assign [class="[Tt]or\s*[Bb]rowser"] $ws10
|
||||
assign [class="[Nn]yxt"] $ws10
|
||||
assign [class="qutebrowser"] $ws10
|
||||
assign [class="[Ll]uakit"] $ws10
|
||||
assign [class="[Vv]irt[ -]*manager"] $ws7
|
||||
assign [class="[Vv]irt[ -]*viewer"] $ws7
|
||||
assign [class="[Qq]emu"] $ws7
|
||||
assign [class="q[Bb]ittorrent"] $ws5
|
||||
assign [class="[Nn]icotine"] $ws5
|
||||
assign [class="[Ll]ibreoffice.*"] $ws6
|
||||
assign [class="[Mm]ullvad.*"] $ws10
|
||||
assign [class="[Qq]t[ -]*[Cc]reator"] $ws10
|
||||
assign [class="[Ee]macs"] $ws8
|
||||
assign [class="[Kk]iwix"] $ws10
|
||||
assign [class="[Gg]alaxy[ -]*[Bb]uds[ -]*[Cc]lient"] $ws10
|
||||
assign [class="[Kk]ee[Pp]ass.*"] $ws10
|
||||
assign [class="[Tt]hunar"] $ws10
|
||||
assign [class="[Pp][Hh][Pp][Ss]torm"] $ws10
|
||||
assign [class="[Rr]uby[Mm]ine"] $ws10
|
||||
assign [class="[Dd]ata[Gg]rip"] $ws10
|
||||
assign [class="[Ww]eb[Ss]torm"] $ws10
|
||||
assign [class="[Jj]etbrains.*"] $ws10
|
||||
for_window [class="[Tt]or\s*[Bb]rowser"] floating enable, border normal
|
||||
for_window [class="[Ff]lame[Ss]hot"] floating enable, border normal
|
||||
|
||||
# color scheme for windows
|
||||
# border background text indicator (a line which shows where the next window will be placed)
|
||||
client.focused #0b4701 #044f00 #ffffff #0b4701
|
||||
client.unfocused #072d00 #023000 #969696 #072d00
|
||||
client.focused_inactive #072d00 #023000 #969696 #072d00
|
||||
client.urgent #630000 #630000 #ffffff #630000
|
||||
|
||||
# hide title bar
|
||||
default_border pixel 1
|
||||
default_floating_border pixel 1
|
||||
|
||||
# start rofi
|
||||
bindsym $mod+d exec --no-startup-id rofi -show combi
|
||||
bindsym $mod+p exec --no-startup-id ~/.local/bin/rofi-pass
|
||||
|
||||
# i3-quickterm
|
||||
bindsym $mod+b exec i3-quickterm shell
|
||||
|
||||
# flameshot (for screenshots)
|
||||
bindsym $mod+Print exec flameshot full -u -p ~/Pictures/Screenshots
|
||||
bindsym $mod+Shift+Print exec flameshot gui -u -p ~/Pictures/Screenshots
|
||||
bindsym Print exec flameshot full -p ~/Pictures/Screenshots
|
||||
bindsym Shift+Print exec flameshot gui -p ~/Pictures/Screenshots
|
||||
1
profiles/desktop/.config/i3/i3lock-multimonitor
Submodule
1
profiles/desktop/.config/i3/i3lock-multimonitor
Submodule
Submodule profiles/desktop/.config/i3/i3lock-multimonitor added at 146d6de67c
BIN
profiles/desktop/.config/i3/lockscreen.png
Normal file
BIN
profiles/desktop/.config/i3/lockscreen.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
BIN
profiles/desktop/.config/i3/wallpaper.png
Normal file
BIN
profiles/desktop/.config/i3/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 877 KiB |
Submodule profiles/desktop/.config/i3blocks/i3blocks-contrib added at 9d66d81da8
76
profiles/desktop/.config/i3blocks/i3blocks.conf
Normal file
76
profiles/desktop/.config/i3blocks/i3blocks.conf
Normal file
@@ -0,0 +1,76 @@
|
||||
# Global properties
|
||||
separator=false
|
||||
separator_block_width=15
|
||||
|
||||
#[essid]
|
||||
#command=~/.config/i3blocks/i3blocks-contrib/essid/essid
|
||||
#interval=60
|
||||
#INTERFACE=wlo1
|
||||
#label=
|
||||
#separator=false
|
||||
#
|
||||
#[wifi]
|
||||
#command=~/.config/i3blocks/i3blocks-contrib/wifi/wifi
|
||||
#INTERFACE=wlo1
|
||||
#interval=60
|
||||
#
|
||||
[iface]
|
||||
command=~/.config/i3blocks/i3blocks-contrib/iface/iface
|
||||
LABEL=
|
||||
ADDRESS_FAMILY=inet6?
|
||||
color=#00FF00
|
||||
interval=10
|
||||
# set this to 1 to display the name of the connected WIFI interface instead of the IP address.
|
||||
display_wifi_name=1
|
||||
|
||||
[load_average]
|
||||
command=~/.config/i3blocks/i3blocks-contrib/load_average/load_average
|
||||
interval=10
|
||||
min_width= 99.99
|
||||
align=center
|
||||
|
||||
[memory]
|
||||
command=~/.config/i3blocks/i3blocks-contrib/memory/memory
|
||||
label=
|
||||
interval=30
|
||||
separator=false
|
||||
|
||||
# [memory]
|
||||
# command=~/.config/i3blocks/i3blocks-contrib/memory/memory
|
||||
# label=
|
||||
# instance=swap
|
||||
# interval=30
|
||||
|
||||
[temperature]
|
||||
command=~/.config/i3blocks/i3blocks-contrib/temperature/temperature
|
||||
label=
|
||||
interval=10
|
||||
T_WARN=70
|
||||
T_CRIT=90
|
||||
SENSOR_CHIP=coretemp-isa-0000
|
||||
min_width= 100.0°C
|
||||
align=center
|
||||
|
||||
[volume-pipewire]
|
||||
command=~/.config/i3blocks/i3blocks-contrib/volume-pipewire/volume-pipewire
|
||||
interval=persist
|
||||
signal=1
|
||||
SUBSCRIBE=1
|
||||
|
||||
[battery]
|
||||
command=~/.config/i3blocks/i3blocks-contrib/battery/battery
|
||||
interval=30
|
||||
#LABEL=BAT
|
||||
LABEL=⚡
|
||||
#BAT_NUMBER=0
|
||||
|
||||
[time]
|
||||
label=
|
||||
command=date '+%d %b %Y %a'
|
||||
interval=1
|
||||
separator=false
|
||||
|
||||
[time]
|
||||
label=
|
||||
command=date '+%H:%M'
|
||||
interval=1
|
||||
114
profiles/desktop/.config/lf/lfrc
Normal file
114
profiles/desktop/.config/lf/lfrc
Normal file
@@ -0,0 +1,114 @@
|
||||
# interpreter for shell commands
|
||||
set shell sh
|
||||
|
||||
# set '-eu' options for shell commands
|
||||
# These options are used to have safer shell commands. Option '-e' is used to
|
||||
# exit on error and option '-u' is used to give error for unset variables.
|
||||
# Option '-f' disables pathname expansion which can be useful when $f, $fs, and
|
||||
# $fx variables contain names with '*' or '?' characters. However, this option
|
||||
# is used selectively within individual commands as it can be limiting at
|
||||
# times.
|
||||
set shellopts '-eu'
|
||||
|
||||
# set internal field separator (IFS) to "\n" for shell commands
|
||||
# This is useful to automatically split file names in $fs and $fx properly
|
||||
# since default file separator used in these variables (i.e. 'filesep' option)
|
||||
# is newline. You need to consider the values of these options and create your
|
||||
# commands accordingly.
|
||||
set ifs "\n"
|
||||
|
||||
# leave some space at the top and the bottom of the screen
|
||||
set scrolloff 10
|
||||
|
||||
# Use the `dim` attribute instead of underline for the cursor in the preview pane
|
||||
set cursorpreviewfmt "\033[7;2m"
|
||||
|
||||
# use enter for shell commands
|
||||
map <enter> shell
|
||||
|
||||
# show the result of execution of previous commands
|
||||
map ` !true
|
||||
|
||||
# execute current file (must be executable)
|
||||
map x $$f
|
||||
map X !$f
|
||||
|
||||
# dedicated keys for file opener actions
|
||||
map o &mimeopen $f
|
||||
map O $mimeopen --ask $f
|
||||
|
||||
# define a custom 'open' command
|
||||
# This command is called when current file is not a directory. You may want to
|
||||
# use either file extensions and/or mime types here. Below uses an editor for
|
||||
# text files and a file opener for the rest.
|
||||
cmd open &{{
|
||||
case $(file --mime-type -Lb $f) in
|
||||
text/*) lf -remote "send $id \$$EDITOR \$fx";;
|
||||
*) for f in $fx; do $OPENER $f > /dev/null 2> /dev/null & done;;
|
||||
esac
|
||||
}}
|
||||
|
||||
# mkdir command. See wiki if you want it to select created dir
|
||||
map a :push %mkdir<space>
|
||||
|
||||
# define a custom 'rename' command without prompt for overwrite
|
||||
# cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
|
||||
# map r push :rename<space>
|
||||
|
||||
# make sure trash folder exists
|
||||
# %mkdir -p ~/.trash
|
||||
|
||||
# move current file or selected files to trash folder
|
||||
# (also see 'man mv' for backup/overwrite options)
|
||||
cmd trash %set -f; mv -t ~/.trash $fx
|
||||
|
||||
# define a custom 'delete' command
|
||||
# cmd delete ${{
|
||||
# set -f
|
||||
# printf "$fx\n"
|
||||
# printf "delete? [y/N] "
|
||||
# read ans
|
||||
# [ "$ans" = "y" ] && rm -rf $fx
|
||||
# }}
|
||||
|
||||
# use '<delete>' key for either 'trash' or 'delete' command
|
||||
# map <delete> trash
|
||||
# map <delete> delete
|
||||
|
||||
# extract the current file with the right command
|
||||
# (xkcd link: https://xkcd.com/1168/)
|
||||
cmd extract ${{
|
||||
set -f
|
||||
case $f in
|
||||
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
|
||||
*.tar.gz|*.tgz) tar xzvf $f;;
|
||||
*.tar.xz|*.txz) tar xJvf $f;;
|
||||
*.zip) unzip $f;;
|
||||
*.rar) unrar x $f;;
|
||||
*.7z) 7z x $f;;
|
||||
esac
|
||||
}}
|
||||
|
||||
# compress current file or selected files with tar and gunzip
|
||||
cmd tar ${{
|
||||
set -f
|
||||
mkdir $1
|
||||
cp -r $fx $1
|
||||
tar czf $1.tar.gz $1
|
||||
rm -rf $1
|
||||
}}
|
||||
|
||||
# compress current file or selected files with zip
|
||||
cmd zip ${{
|
||||
set -f
|
||||
mkdir $1
|
||||
cp -r $fx $1
|
||||
zip -r $1.zip $1
|
||||
rm -rf $1
|
||||
}}
|
||||
|
||||
# set previewer
|
||||
set previewer ctpv
|
||||
set cleaner ctpvclear
|
||||
&ctpv -s $id
|
||||
&ctpvquit $id
|
||||
24
profiles/desktop/.config/lf/previewer_sandbox
Normal file
24
profiles/desktop/.config/lf/previewer_sandbox
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
## ~/.config/lf/previewer_sandbox
|
||||
|
||||
set -euo pipefail
|
||||
(
|
||||
exec bwrap \
|
||||
--ro-bind /usr/bin /usr/bin \
|
||||
--ro-bind /usr/share/ /usr/share/ \
|
||||
--ro-bind /usr/lib /usr/lib \
|
||||
--ro-bind /usr/lib64 /usr/lib64 \
|
||||
--symlink /usr/bin /bin \
|
||||
--symlink /usr/bin /sbin \
|
||||
--symlink /usr/lib /lib \
|
||||
--symlink /usr/lib64 /lib64 \
|
||||
--proc /proc \
|
||||
--dev /dev \
|
||||
--ro-bind /etc /etc \
|
||||
--ro-bind ~/.config ~/.config \
|
||||
--ro-bind ~/.cache ~/.cache \
|
||||
--ro-bind "$PWD" "$PWD" \
|
||||
--unshare-all \
|
||||
--new-session \
|
||||
ctpv "$@"
|
||||
)
|
||||
18
profiles/desktop/.config/mako/config
Normal file
18
profiles/desktop/.config/mako/config
Normal file
@@ -0,0 +1,18 @@
|
||||
font=Hack Nerd Font 12
|
||||
icon-path=/usr/share/icons/Numix-Circle
|
||||
width=550
|
||||
border-size=3
|
||||
padding=10,10,10,10
|
||||
background-color=#055d01
|
||||
text-color=#eeeeee
|
||||
border-color=#044201
|
||||
default-timeout=10000
|
||||
|
||||
[urgency="low"]
|
||||
default-timeout=5000
|
||||
|
||||
[urgency="critical"]
|
||||
background-color=#6d0a01
|
||||
text-color=#eeeeee
|
||||
border-color=#420601
|
||||
default-timeout=20000
|
||||
30
profiles/desktop/.config/mpd/mpd.conf
Normal file
30
profiles/desktop/.config/mpd/mpd.conf
Normal file
@@ -0,0 +1,30 @@
|
||||
# Recommended location for database
|
||||
db_file "~/.config/mpd/database"
|
||||
|
||||
# If running mpd using systemd, delete this line to log directly to systemd.
|
||||
#log_file "syslog"
|
||||
|
||||
# The music directory is by default the XDG directory, uncomment to amend and choose a different directory
|
||||
music_directory "~/Music"
|
||||
|
||||
# Uncomment to refresh the database whenever files in the music_directory are changed
|
||||
#auto_update "yes"
|
||||
|
||||
#auto_update_depth "5"
|
||||
|
||||
# Uncomment to enable the functionalities
|
||||
playlist_directory "~/.config/mpd/playlists"
|
||||
#pid_file "~/.config/mpd/pid"
|
||||
state_file "~/.config/mpd/state"
|
||||
sticker_file "~/.config/mpd/sticker.sql"
|
||||
|
||||
bind_to_address "~/.config/mpd/socket"
|
||||
|
||||
restore_paused "yes"
|
||||
|
||||
#max_output_buffer_size "32768"
|
||||
|
||||
audio_output {
|
||||
type "pipewire"
|
||||
name "Pipewire Output"
|
||||
}
|
||||
30
profiles/desktop/.config/ncmpcpp/bindings
Normal file
30
profiles/desktop/.config/ncmpcpp/bindings
Normal file
@@ -0,0 +1,30 @@
|
||||
def_key "j"
|
||||
scroll_down
|
||||
def_key "k"
|
||||
scroll_up
|
||||
def_key "h"
|
||||
previous_column
|
||||
def_key "h"
|
||||
volume_down
|
||||
def_key "l"
|
||||
next_column
|
||||
def_key "l"
|
||||
volume_up
|
||||
def_key "ctrl-b"
|
||||
page_up
|
||||
def_key "ctrl-u"
|
||||
page_up
|
||||
def_key "ctrl-f"
|
||||
page_down
|
||||
def_key "ctrl-d"
|
||||
page_down
|
||||
def_key "g"
|
||||
move_home
|
||||
def_key "G"
|
||||
move_end
|
||||
def_key "n"
|
||||
next_found_item
|
||||
def_key "N"
|
||||
previous_found_item
|
||||
def_key ";"
|
||||
show_lyrics
|
||||
2
profiles/desktop/.config/ncmpcpp/config
Normal file
2
profiles/desktop/.config/ncmpcpp/config
Normal file
@@ -0,0 +1,2 @@
|
||||
seek_time = "2"
|
||||
lyrics_fetchers = tekstowo
|
||||
7
profiles/desktop/.config/nvim/.stylua.toml
Normal file
7
profiles/desktop/.config/nvim/.stylua.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
line_endings = 'Unix'
|
||||
indent_type = 'Spaces'
|
||||
indent_width = 2
|
||||
quote_style = 'AutoPreferSingle'
|
||||
call_parentheses = 'Always'
|
||||
[sort_requires]
|
||||
enabled = true
|
||||
4
profiles/desktop/.config/nvim/after/ftplugin/lua.lua
Normal file
4
profiles/desktop/.config/nvim/after/ftplugin/lua.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
-- set default tab width to 2 spaces
|
||||
vim.opt_local.tabstop = 2 -- number of spaces that a tab counts for
|
||||
vim.opt_local.shiftwidth = 2 -- size of an autoindented shift
|
||||
vim.opt_local.softtabstop = 0 -- indentation size
|
||||
1
profiles/desktop/.config/nvim/after/ftplugin/make.lua
Normal file
1
profiles/desktop/.config/nvim/after/ftplugin/make.lua
Normal file
@@ -0,0 +1 @@
|
||||
vim.opt_local.expandtab = false -- use tabs instead of spaces
|
||||
4
profiles/desktop/.config/nvim/after/ftplugin/vim.lua
Normal file
4
profiles/desktop/.config/nvim/after/ftplugin/vim.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
-- set default tab width to 2 spaces
|
||||
vim.opt_local.tabstop = 2 -- number of spaces that a tab counts for
|
||||
vim.opt_local.shiftwidth = 2 -- size of an autoindented shift
|
||||
vim.opt_local.softtabstop = 0 -- indentation size
|
||||
8
profiles/desktop/.config/nvim/init.lua
Normal file
8
profiles/desktop/.config/nvim/init.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
-- load settings
|
||||
require('config.settings')
|
||||
|
||||
-- load plugins
|
||||
require('config.lazy')
|
||||
|
||||
-- load keybindings
|
||||
require('config.keybindings')
|
||||
36
profiles/desktop/.config/nvim/lazy-lock.json
Normal file
36
profiles/desktop/.config/nvim/lazy-lock.json
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" },
|
||||
"catppuccin": { "branch": "main", "commit": "beaf41a30c26fd7d6c386d383155cbd65dd554cd" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"conform.nvim": { "branch": "master", "commit": "c2526f1cde528a66e086ab1668e996d162c75f4f" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "abf82a65f185bd54adc0679f74b7d6e1ada690c9" },
|
||||
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "c953789db7fd28eafe5eb5659846d34b5024b3cc" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||
"nvim-config-local": { "branch": "main", "commit": "990f3e35e0fba8fb83012d7e85f9a6a77de7f87f" },
|
||||
"nvim-lint": { "branch": "master", "commit": "bcd1a44edbea8cd473af7e7582d3f7ffc60d8e81" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "3f58aeca0c6ece8a9fb8782ea3fcb6024f285be3" },
|
||||
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
|
||||
"nvim-treesitter": { "branch": "main", "commit": "4967fa48b0fe7a7f92cee546c76bb4bb61bb14d5" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "db15f2e0df2f5db916e511e3fffb682ef2f6354f" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "803353450c374192393f5387b6a0176d0972b848" },
|
||||
"orgmode": { "branch": "master", "commit": "c421c7677b7332f5fd543023283a2290cf8dd4ff" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
|
||||
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
|
||||
"undotree": { "branch": "master", "commit": "fc28931fbfba66ab75d9af23fe46ffbbb9de6e8c" },
|
||||
"vim-indent-object": { "branch": "master", "commit": "8ab36d5ec2a3a60468437a95e142ce994df598c6" },
|
||||
"vim-tmux-clipboard": { "branch": "master", "commit": "d4774dc7dfdd4b8a60613355ed32e6a1c18220cf" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
3
profiles/desktop/.config/nvim/lua/config/keybindings.lua
Normal file
3
profiles/desktop/.config/nvim/lua/config/keybindings.lua
Normal file
@@ -0,0 +1,3 @@
|
||||
-- keep in visual mode after indenting
|
||||
vim.keymap.set('v', '<', '<gv')
|
||||
vim.keymap.set('v', '>', '>gv')
|
||||
37
profiles/desktop/.config/nvim/lua/config/lazy.lua
Normal file
37
profiles/desktop/.config/nvim/lua/config/lazy.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
-- Bootstrap lazy.nvim
|
||||
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
||||
if not (vim.uv or vim.loop).fs_stat(lazypath) then
|
||||
local lazyrepo = 'https://github.com/folke/lazy.nvim.git'
|
||||
local out = vim.fn.system({ 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath })
|
||||
if vim.v.shell_error ~= 0 then
|
||||
vim.api.nvim_echo({
|
||||
{ 'Failed to clone lazy.nvim:\n', 'ErrorMsg' },
|
||||
{ out, 'WarningMsg' },
|
||||
{ '\nPress any key to exit...' },
|
||||
}, true, {})
|
||||
vim.fn.getchar()
|
||||
os.exit(1)
|
||||
end
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- Make sure to setup `mapleader` and `maplocalleader` before
|
||||
-- loading lazy.nvim so that mappings are correct.
|
||||
-- This is also a good place to setup other settings (vim.opt)
|
||||
vim.g.mapleader = ' '
|
||||
vim.g.maplocalleader = '\\'
|
||||
|
||||
-- Setup lazy.nvim
|
||||
require('lazy').setup({
|
||||
spec = {
|
||||
-- import your plugins
|
||||
{ import = 'plugins' },
|
||||
},
|
||||
-- Configure any other settings here. See the documentation for more details.
|
||||
-- colorscheme that will be used when installing plugins.
|
||||
install = { colorscheme = { 'catppuccin' } },
|
||||
-- configure ui
|
||||
ui = { border = 'rounded' },
|
||||
-- automatically check for plugin updates
|
||||
checker = { enabled = true, notify = false },
|
||||
})
|
||||
101
profiles/desktop/.config/nvim/lua/config/settings.lua
Normal file
101
profiles/desktop/.config/nvim/lua/config/settings.lua
Normal file
@@ -0,0 +1,101 @@
|
||||
-- true color support
|
||||
vim.o.termguicolors = true
|
||||
|
||||
-- fix transparency issues with alacritty
|
||||
local highlights = {
|
||||
'Normal',
|
||||
'LineNr',
|
||||
'Folded',
|
||||
'NonText',
|
||||
'SpecialKey',
|
||||
'VertSplit',
|
||||
'SignColumn',
|
||||
'EndOfBuffer',
|
||||
'TablineFill', -- this is specific to how I like my tabline to look like
|
||||
}
|
||||
for _, name in pairs(highlights) do
|
||||
vim.cmd.highlight(name .. ' guibg=none ctermbg=none')
|
||||
end
|
||||
|
||||
-- disable arrow keys
|
||||
local all_modes = { 'n', 'i', 'v', 'o' }
|
||||
|
||||
vim.keymap.set(all_modes, '<Up>', '<Nop>', { noremap = true, silent = true })
|
||||
vim.keymap.set(all_modes, '<Down>', '<Nop>', { noremap = true, silent = true })
|
||||
vim.keymap.set(all_modes, '<Left>', '<Nop>', { noremap = true, silent = true })
|
||||
vim.keymap.set(all_modes, '<Right>', '<Nop>', { noremap = true, silent = true })
|
||||
|
||||
vim.o.number = true -- display line numbers
|
||||
vim.opt.clipboard:append({ 'unnamedplus', 'unnamed' }) -- always use clipboard in x11
|
||||
vim.o.encoding = 'UTF-8' -- sets the character encoding used inside vim
|
||||
vim.o.title = true -- when on, the title of the window will be set to the value of 'titlestring'
|
||||
vim.o.signcolumn = 'yes'
|
||||
|
||||
-- spell checking
|
||||
vim.o.spell = true
|
||||
vim.opt.spelllang:append({ 'en_us', 'en_gb', 'pl' })
|
||||
vim.opt.spelloptions:append({ 'camel' })
|
||||
vim.o.spellcapcheck = ''
|
||||
|
||||
-- persistent undo
|
||||
local undodir = vim.fn.stdpath('state') .. 'undo'
|
||||
vim.fn.mkdir(undodir, 'p', '0700')
|
||||
vim.o.undodir = undodir
|
||||
vim.o.undofile = true
|
||||
|
||||
-- set proper file types for files in ~/ansible directory
|
||||
vim.filetype.add({
|
||||
pattern = {
|
||||
[os.getenv('HOME') .. '/ansible/.*%.yml'] = 'yaml.ansible',
|
||||
},
|
||||
})
|
||||
|
||||
-- neovim terminal configuration
|
||||
local augroup_term = vim.api.nvim_create_augroup('augroup_term', { clear = true })
|
||||
vim.api.nvim_create_autocmd('TermOpen', { -- enter insert mode automatically
|
||||
group = augroup_term,
|
||||
pattern = '*',
|
||||
callback = vim.cmd.startinsert,
|
||||
})
|
||||
vim.api.nvim_create_autocmd('TermOpen', { -- disable number lines on terminal buffers
|
||||
group = augroup_term,
|
||||
pattern = '*',
|
||||
callback = function()
|
||||
vim.o.number = false
|
||||
vim.o.relativenumber = false
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd('TermOpen', { -- allow use ctrl-c on terminal windows
|
||||
group = augroup_term,
|
||||
pattern = '*',
|
||||
callback = function(args)
|
||||
vim.keymap.set('n', '<C-c>', 'i<C-c>', { buffer = args.buf })
|
||||
end,
|
||||
})
|
||||
vim.api.nvim_create_autocmd('TermEnter', { -- no sign column
|
||||
group = augroup_term,
|
||||
pattern = '*',
|
||||
callback = function()
|
||||
vim.opt_local.signcolumn = false
|
||||
end,
|
||||
})
|
||||
vim.keymap.set('t', '<Esc>', '<C-\\><C-n>') -- esc to exit insert mode
|
||||
|
||||
-- set default tab width to 4 spaces
|
||||
vim.o.tabstop = 4 -- number of spaces that a tab counts for
|
||||
vim.o.shiftwidth = 4 -- number of spaces that are inserted during indent operations
|
||||
vim.o.softtabstop = 4 -- number of spaces that are inserted after pressing tab
|
||||
vim.o.expandtab = true -- use spaces instead of tabs
|
||||
|
||||
-- c/c++ settings
|
||||
vim.opt.cinoptions:append({ 'N-s' })
|
||||
|
||||
-- web dev settings
|
||||
vim.g.html_indent_autotags = 'html,thead,tbody,tfoot'
|
||||
vim.g.html_indent_script1 = 'auto'
|
||||
vim.g.html_indent_style1 = 'auto'
|
||||
|
||||
-- set cursor shape to underline in the normal and command mode,
|
||||
-- in the insert mode change shape to vertical bar, and disable
|
||||
-- blinking in all modes
|
||||
vim.opt.guicursor:append({ 'n-c:hor20', 'i:ver20', 'a:blinkon0' })
|
||||
15
profiles/desktop/.config/nvim/lua/plugins/catppuccin.lua
Normal file
15
profiles/desktop/.config/nvim/lua/plugins/catppuccin.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
return {
|
||||
'catppuccin/nvim',
|
||||
name = 'catppuccin',
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
config = function()
|
||||
require('catppuccin').setup({
|
||||
flavour = 'mocha', -- latte, frappe, macchiato, mocha
|
||||
transparent_background = true, -- disables setting the background color.
|
||||
})
|
||||
|
||||
-- setup must be called before loading
|
||||
vim.cmd.colorscheme('catppuccin')
|
||||
end,
|
||||
}
|
||||
6
profiles/desktop/.config/nvim/lua/plugins/colorizer.lua
Normal file
6
profiles/desktop/.config/nvim/lua/plugins/colorizer.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
-- 'norcalli/nvim-colorizer.lua',
|
||||
-- config = function()
|
||||
-- require('colorizer').setup({ '*' })
|
||||
-- end,
|
||||
}
|
||||
37
profiles/desktop/.config/nvim/lua/plugins/conform.lua
Normal file
37
profiles/desktop/.config/nvim/lua/plugins/conform.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return {
|
||||
'stevearc/conform.nvim',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
config = function()
|
||||
local conform = require('conform')
|
||||
|
||||
conform.setup({
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
cpp = { 'clang-format' },
|
||||
c = { 'clang-format' },
|
||||
html = { 'prettier' },
|
||||
css = { 'prettier' },
|
||||
javascript = { 'prettier' },
|
||||
python = { 'autopep8', 'isort' },
|
||||
bash = { 'beautysh' },
|
||||
csh = { 'beautysh' },
|
||||
ksh = { 'beautysh' },
|
||||
sh = { 'beautysh' },
|
||||
zsh = { 'beautysh' },
|
||||
},
|
||||
-- format_on_save = {
|
||||
-- lsp_fallback = true,
|
||||
-- async = false,
|
||||
-- timeout_ms = 1000,
|
||||
-- },
|
||||
})
|
||||
|
||||
vim.keymap.set({ 'n', 'v' }, '<leader>cf', function()
|
||||
conform.format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = 1000,
|
||||
})
|
||||
end, { desc = 'Format file or range (in visual mode)' })
|
||||
end,
|
||||
}
|
||||
48
profiles/desktop/.config/nvim/lua/plugins/gitsigns.lua
Normal file
48
profiles/desktop/.config/nvim/lua/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
return {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
config = function()
|
||||
local gitsigns = require('gitsigns')
|
||||
gitsigns.setup({
|
||||
signs = {
|
||||
add = { text = '│' },
|
||||
change = { text = '│' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
interval = 1000,
|
||||
follow_files = true,
|
||||
},
|
||||
attach_to_untracked = true,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
ignore_whitespace = false,
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%Y-%m-%d> - <summary>',
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = 'single',
|
||||
style = 'minimal',
|
||||
relative = 'cursor',
|
||||
row = 0,
|
||||
col = 1,
|
||||
},
|
||||
-- yadm = {
|
||||
-- enable = false,
|
||||
-- },
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
'nmac427/guess-indent.nvim',
|
||||
config = true,
|
||||
}
|
||||
102
profiles/desktop/.config/nvim/lua/plugins/lspconfig.lua
Normal file
102
profiles/desktop/.config/nvim/lua/plugins/lspconfig.lua
Normal file
@@ -0,0 +1,102 @@
|
||||
return {
|
||||
'neovim/nvim-lspconfig',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
dependencies = {
|
||||
'hrsh7th/cmp-nvim-lsp', -- LSP source for nvim-cmp,
|
||||
{ 'folke/neodev.nvim', config = true },
|
||||
},
|
||||
config = function()
|
||||
require('vim.lsp.protocol')
|
||||
|
||||
require('mason-lspconfig').setup({
|
||||
automatic_enable = true,
|
||||
})
|
||||
|
||||
vim.lsp.config('*', {
|
||||
capabilities = {
|
||||
textDocument = {
|
||||
completion = {
|
||||
completionItem = {
|
||||
snippetSupport = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.lsp.config('lua_ls', {
|
||||
on_init = function(client)
|
||||
if client.workspace_folders then
|
||||
local path = client.workspace_folders[1].name
|
||||
if
|
||||
path ~= vim.fn.stdpath('config')
|
||||
and (vim.uv.fs_stat(path .. '/.luarc.json') or vim.uv.fs_stat(path .. '/.luarc.jsonc'))
|
||||
then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
|
||||
runtime = {
|
||||
-- Tell the language server which version of Lua you're using (most
|
||||
-- likely LuaJIT in the case of Neovim)
|
||||
version = 'LuaJIT',
|
||||
-- Tell the language server how to find Lua modules same way as Neovim
|
||||
-- (see `:h lua-module-load`)
|
||||
path = {
|
||||
'lua/?.lua',
|
||||
'lua/?/init.lua',
|
||||
},
|
||||
},
|
||||
-- Make the server aware of Neovim runtime files
|
||||
workspace = {
|
||||
checkThirdParty = false,
|
||||
library = {
|
||||
vim.env.VIMRUNTIME,
|
||||
-- Depending on the usage, you might want to add additional paths
|
||||
-- here.
|
||||
'${3rd}/luv/library'
|
||||
-- '${3rd}/busted/library'
|
||||
},
|
||||
-- Or pull in all of 'runtimepath'.
|
||||
-- NOTE: this is a lot slower and will cause issues when working on
|
||||
-- your own configuration.
|
||||
-- See https://github.com/neovim/nvim-lspconfig/issues/3189
|
||||
-- library = {
|
||||
-- vim.api.nvim_get_runtime_file('', true),
|
||||
-- }
|
||||
},
|
||||
})
|
||||
end,
|
||||
settings = {
|
||||
Lua = {},
|
||||
},
|
||||
})
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = {
|
||||
prefix = '●', -- Could be '■', '●', '▎', 'x'
|
||||
},
|
||||
signs = {
|
||||
text = {
|
||||
[vim.diagnostic.severity.ERROR] = ' ',
|
||||
[vim.diagnostic.severity.WARN] = ' ',
|
||||
[vim.diagnostic.severity.INFO] = ' ',
|
||||
[vim.diagnostic.severity.HINT] = ' ',
|
||||
},
|
||||
texthl = {
|
||||
[vim.diagnostic.severity.ERROR] = 'DiagnosticSignError',
|
||||
[vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn',
|
||||
[vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo',
|
||||
[vim.diagnostic.severity.HINT] = 'DiagnosticSignHint',
|
||||
},
|
||||
numhl = {
|
||||
[vim.diagnostic.severity.ERROR] = 'DiagnosticSignError',
|
||||
[vim.diagnostic.severity.WARN] = 'DiagnosticSignWarn',
|
||||
[vim.diagnostic.severity.INFO] = 'DiagnosticSignInfo',
|
||||
[vim.diagnostic.severity.HINT] = 'DiagnosticSignHint',
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
11
profiles/desktop/.config/nvim/lua/plugins/lualine.lua
Normal file
11
profiles/desktop/.config/nvim/lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
'nvim-lualine/lualine.nvim',
|
||||
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
||||
opts = {
|
||||
options = {
|
||||
theme = 'catppuccin',
|
||||
section_separators = { left = '', right = '' },
|
||||
component_separators = { left = '', right = '' },
|
||||
},
|
||||
},
|
||||
}
|
||||
75
profiles/desktop/.config/nvim/lua/plugins/mason.lua
Normal file
75
profiles/desktop/.config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,75 @@
|
||||
return {
|
||||
'williamboman/mason.nvim',
|
||||
dependencies = {
|
||||
'williamboman/mason-lspconfig.nvim',
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
},
|
||||
config = function()
|
||||
require('mason').setup({
|
||||
ui = { border = 'rounded' },
|
||||
})
|
||||
|
||||
require('mason-lspconfig').setup({
|
||||
automatic_enable = true,
|
||||
})
|
||||
|
||||
require('mason-tool-installer').setup({
|
||||
ensure_installed = {
|
||||
-- lua scripting
|
||||
'stylua', -- lua formatter
|
||||
'lua_ls',
|
||||
|
||||
-- vimrc editing
|
||||
'vimls',
|
||||
|
||||
-- editorconfig stuff
|
||||
'editorconfig-checker',
|
||||
|
||||
-- system administration's related stuff
|
||||
'ansiblels',
|
||||
'yamllint',
|
||||
'systemdlint',
|
||||
-- 'nginx_language_server',
|
||||
'dockerls',
|
||||
'docker_compose_language_service',
|
||||
|
||||
-- shell scripting
|
||||
'shellcheck',
|
||||
'bashls',
|
||||
'beautysh',
|
||||
|
||||
-- python
|
||||
'python-lsp-server',
|
||||
'pylint',
|
||||
'autopep8',
|
||||
'mypy',
|
||||
'isort',
|
||||
|
||||
-- c/c++
|
||||
'clangd',
|
||||
'clang-format',
|
||||
'cmakelang',
|
||||
'cmakelint',
|
||||
'checkmake',
|
||||
|
||||
-- latex
|
||||
'texlab',
|
||||
'latexindent',
|
||||
|
||||
-- web development
|
||||
'html',
|
||||
'cssls',
|
||||
'stylelint',
|
||||
'eslint',
|
||||
'standardjs',
|
||||
'jsonlint',
|
||||
|
||||
-- databases
|
||||
'sqlfluff',
|
||||
|
||||
-- misc
|
||||
'jinja_lsp',
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
9
profiles/desktop/.config/nvim/lua/plugins/notify.lua
Normal file
9
profiles/desktop/.config/nvim/lua/plugins/notify.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
return {
|
||||
'rcarriga/nvim-notify',
|
||||
config = function()
|
||||
vim.notify = require("notify")
|
||||
vim.notify.setup({
|
||||
background_colour = "#000000",
|
||||
})
|
||||
end
|
||||
}
|
||||
10
profiles/desktop/.config/nvim/lua/plugins/nvim-autopairs.lua
Normal file
10
profiles/desktop/.config/nvim/lua/plugins/nvim-autopairs.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
return {
|
||||
'windwp/nvim-autopairs',
|
||||
event = 'InsertEnter',
|
||||
opts = {
|
||||
disable_filetype = { 'TelescopePrompt', 'spectre_panel', 'snacks_picker_input', 'vim' },
|
||||
enable_afterquote = false,
|
||||
enable_bracket_in_quote = false,
|
||||
ignored_next_char = '[%w%.]', -- will ignore alphanumeric and `.` symbol
|
||||
},
|
||||
}
|
||||
76
profiles/desktop/.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
76
profiles/desktop/.config/nvim/lua/plugins/nvim-cmp.lua
Normal file
@@ -0,0 +1,76 @@
|
||||
return {
|
||||
'hrsh7th/nvim-cmp',
|
||||
dependencies = {
|
||||
'hrsh7th/cmp-buffer', -- source for text in buffer
|
||||
'hrsh7th/cmp-path', -- source for file system paths
|
||||
'saadparwaiz1/cmp_luasnip', -- snippets source for nvim-cmp
|
||||
{ 'L3MON4D3/LuaSnip', config = true }, -- snippets plugin
|
||||
'onsails/lspkind.nvim', -- vs-code like pictograms
|
||||
},
|
||||
config = function()
|
||||
local cmp = require('cmp')
|
||||
local luasnip = require('luasnip')
|
||||
|
||||
local window_style = cmp.config.window.bordered({
|
||||
winhighlight = 'Normal:Pmenu,FloatBorder:Pmenu,Search:None',
|
||||
col_offset = -3,
|
||||
side_padding = 0,
|
||||
})
|
||||
cmp.setup({
|
||||
view = {
|
||||
docs = { auto_open = false },
|
||||
},
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
luasnip.lsp_expand(args.body) -- use luasnip engine
|
||||
end,
|
||||
},
|
||||
window = {
|
||||
completion = window_style,
|
||||
documentation = window_style,
|
||||
},
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-g>'] = cmp.mapping.abort(),
|
||||
['<CR>'] = cmp.mapping.confirm({ select = false }),
|
||||
['<C-d>'] = cmp.mapping(function(fallback)
|
||||
if cmp.visible_docs() then
|
||||
cmp.close_docs()
|
||||
elseif cmp.visible() then
|
||||
cmp.open_docs()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'nvim_lsp', max_item_count = 10, keyword_length = 1 },
|
||||
{ name = 'luasnip', max_item_count = 10, keyword_length = 1 },
|
||||
{ name = 'buffer', max_item_count = 10, keyword_length = 1 },
|
||||
{ name = 'path', max_item_count = 10, keyword_length = 1 },
|
||||
}),
|
||||
formatting = {
|
||||
fields = { 'kind', 'abbr', 'menu' },
|
||||
format = function(entry, vim_item)
|
||||
local kind = require('lspkind').cmp_format({ mode = 'symbol_text', maxwidth = 50 })(entry, vim_item)
|
||||
local strings = vim.split(kind.kind, '%s', { trimempty = true })
|
||||
kind.kind = ' ' .. (strings[1] or '') .. ' '
|
||||
kind.menu = ' (' .. (strings[2] or '') .. ')'
|
||||
|
||||
return kind
|
||||
end,
|
||||
},
|
||||
enabled = function()
|
||||
-- disable completion in comments
|
||||
local context = require('cmp.config.context')
|
||||
-- keep command mode completion enabled when cursor is in a comment
|
||||
if vim.api.nvim_get_mode().mode == 'c' then
|
||||
return true
|
||||
else
|
||||
return not context.in_treesitter_capture('comment') and not context.in_syntax_group('Comment')
|
||||
end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
return {
|
||||
'klen/nvim-config-local',
|
||||
config = function()
|
||||
require('config-local').setup({
|
||||
-- Default options (optional)
|
||||
|
||||
-- Config file patterns to load (lua supported)
|
||||
config_files = { '.nvim.lua', '.nvimrc', '.exrc' },
|
||||
|
||||
-- Where the plugin keeps files data
|
||||
hashfile = vim.fn.stdpath('data') .. '/config-local',
|
||||
|
||||
autocommands_create = true, -- Create autocommands (VimEnter, DirectoryChanged)
|
||||
commands_create = true, -- Create commands (ConfigLocalSource, ConfigLocalEdit, ConfigLocalTrust, ConfigLocalDeny)
|
||||
silent = true, -- Disable plugin messages (Config loaded/denied)
|
||||
lookup_parents = false, -- Lookup config files in parent directories
|
||||
})
|
||||
end,
|
||||
}
|
||||
30
profiles/desktop/.config/nvim/lua/plugins/nvim-lint.lua
Normal file
30
profiles/desktop/.config/nvim/lua/plugins/nvim-lint.lua
Normal file
@@ -0,0 +1,30 @@
|
||||
return {
|
||||
'mfussenegger/nvim-lint',
|
||||
config = function()
|
||||
require('lint').linters_by_ft = {
|
||||
['yaml.ansible'] = { 'ansible_lint' },
|
||||
bash = { 'shellcheck' },
|
||||
make = { 'checkmake' },
|
||||
cmake = { 'cmakelint' },
|
||||
cpp = { 'clangtidy' },
|
||||
c = { 'clangtidy' },
|
||||
editorconfig = { 'editorconfig-checker' },
|
||||
html = { 'tidy' },
|
||||
json = { 'jsonlint' },
|
||||
sql = { 'sqlfluff' },
|
||||
js = { 'standardjs' },
|
||||
css = { 'stylelint' },
|
||||
systemd = { 'systemdlint' },
|
||||
yaml = { 'yamllint' },
|
||||
zsh = { 'zsh' },
|
||||
python = { 'pylint', 'mypy' },
|
||||
}
|
||||
vim.api.nvim_create_autocmd({ 'BufWritePost' }, {
|
||||
callback = function()
|
||||
-- try_lint without arguments runs the linters defined in `linters_by_ft`
|
||||
-- for the current filetype
|
||||
require('lint').try_lint()
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
build = ':TSUpdate',
|
||||
lazy = false,
|
||||
config = function()
|
||||
local treesitter = require('nvim-treesitter')
|
||||
treesitter.setup({})
|
||||
treesitter.install({
|
||||
'c',
|
||||
'cpp',
|
||||
'lua',
|
||||
'bash',
|
||||
'json',
|
||||
'yaml',
|
||||
'vim',
|
||||
'dockerfile',
|
||||
'gitignore',
|
||||
'html',
|
||||
'css',
|
||||
})
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
return {
|
||||
'windwp/nvim-ts-autotag',
|
||||
config = function()
|
||||
require('nvim-ts-autotag').setup({
|
||||
opts = {
|
||||
-- Defaults
|
||||
enable_close = true, -- Auto close tags
|
||||
enable_rename = true, -- Auto rename pairs of tags
|
||||
enable_close_on_slash = false, -- Auto close on trailing </
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
11
profiles/desktop/.config/nvim/lua/plugins/orgmode.lua
Normal file
11
profiles/desktop/.config/nvim/lua/plugins/orgmode.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
'nvim-orgmode/orgmode',
|
||||
event = 'VeryLazy',
|
||||
config = function()
|
||||
-- Setup orgmode
|
||||
require('orgmode').setup({
|
||||
org_agenda_files = '~/orgfiles/**/*',
|
||||
org_default_notes_file = '~/orgfiles/refile.org',
|
||||
})
|
||||
end,
|
||||
}
|
||||
21
profiles/desktop/.config/nvim/lua/plugins/telescope.lua
Normal file
21
profiles/desktop/.config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
return {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
tag = '0.1.8',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
require('telescope').setup({
|
||||
pickers = {
|
||||
find_files = { theme = 'dropdown' },
|
||||
grep_string = { theme = 'dropdown' },
|
||||
live_grep = { theme = 'dropdown' },
|
||||
},
|
||||
})
|
||||
|
||||
-- key bindings
|
||||
local builtin = require('telescope.builtin')
|
||||
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
|
||||
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
|
||||
vim.keymap.set('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
|
||||
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
'folke/todo-comments.nvim',
|
||||
dependencies = { 'nvim-lua/plenary.nvim' },
|
||||
config = true,
|
||||
}
|
||||
37
profiles/desktop/.config/nvim/lua/plugins/trouble.lua
Normal file
37
profiles/desktop/.config/nvim/lua/plugins/trouble.lua
Normal file
@@ -0,0 +1,37 @@
|
||||
return {
|
||||
'folke/trouble.nvim',
|
||||
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
||||
cmd = 'Trouble',
|
||||
keys = {
|
||||
{
|
||||
'<leader>xx',
|
||||
'<cmd>Trouble diagnostics toggle<cr>',
|
||||
desc = 'Diagnostics (Trouble)',
|
||||
},
|
||||
{
|
||||
'<leader>xX',
|
||||
'<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
|
||||
desc = 'Buffer Diagnostics (Trouble)',
|
||||
},
|
||||
{
|
||||
'<leader>cs',
|
||||
'<cmd>Trouble symbols toggle focus=false<cr>',
|
||||
desc = 'Symbols (Trouble)',
|
||||
},
|
||||
{
|
||||
'<leader>cl',
|
||||
'<cmd>Trouble lsp toggle focus=false win.position=right<cr>',
|
||||
desc = 'LSP Definitions / references / ... (Trouble)',
|
||||
},
|
||||
{
|
||||
'<leader>xL',
|
||||
'<cmd>Trouble loclist toggle<cr>',
|
||||
desc = 'Location List (Trouble)',
|
||||
},
|
||||
{
|
||||
'<leader>xQ',
|
||||
'<cmd>Trouble qflist toggle<cr>',
|
||||
desc = 'Quickfix List (Trouble)',
|
||||
},
|
||||
},
|
||||
}
|
||||
6
profiles/desktop/.config/nvim/lua/plugins/undotree.lua
Normal file
6
profiles/desktop/.config/nvim/lua/plugins/undotree.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
return {
|
||||
'mbbill/undotree',
|
||||
config = function()
|
||||
vim.keymap.set('n', '<leader>ut', vim.cmd.UndotreeToggle)
|
||||
end,
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
'michaeljsmith/vim-indent-object',
|
||||
config = function() end,
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
return {
|
||||
'roxma/vim-tmux-clipboard',
|
||||
config = function() end,
|
||||
}
|
||||
18
profiles/desktop/.config/nvim/lua/plugins/which-key.lua
Normal file
18
profiles/desktop/.config/nvim/lua/plugins/which-key.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
return {
|
||||
'folke/which-key.nvim',
|
||||
event = 'VeryLazy',
|
||||
opts = {
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
'<leader>?',
|
||||
function()
|
||||
require('which-key').show({ global = false })
|
||||
end,
|
||||
desc = 'Buffer Local Keymaps (which-key)',
|
||||
},
|
||||
},
|
||||
}
|
||||
39
profiles/desktop/.config/paru/paru.conf
Normal file
39
profiles/desktop/.config/paru/paru.conf
Normal file
@@ -0,0 +1,39 @@
|
||||
#
|
||||
# $PARU_CONF
|
||||
# /etc/paru.conf
|
||||
# ~/.config/paru/paru.conf
|
||||
#
|
||||
# See the paru.conf(5) manpage for options
|
||||
|
||||
#
|
||||
# GENERAL OPTIONS
|
||||
#
|
||||
[options]
|
||||
PgpFetch
|
||||
Devel
|
||||
Provides
|
||||
DevelSuffixes = -git -cvs -svn -bzr -darcs -always -hg -fossil
|
||||
#AurOnly
|
||||
#BottomUp
|
||||
#RemoveMake
|
||||
SudoLoop
|
||||
#UseAsk
|
||||
#SaveChanges
|
||||
#CombinedUpgrade
|
||||
#CleanAfter
|
||||
#UpgradeMenu
|
||||
#NewsOnUpgrade
|
||||
|
||||
LocalRepo
|
||||
Chroot
|
||||
Sign
|
||||
SignDb
|
||||
#KeepRepoCache
|
||||
|
||||
#
|
||||
# Binary OPTIONS
|
||||
#
|
||||
[bin]
|
||||
#FileManager = vifm
|
||||
MFlags = --nosign
|
||||
#Sudo = doas
|
||||
@@ -0,0 +1,14 @@
|
||||
[github.com*]
|
||||
target=github.com/whiteman808
|
||||
|
||||
[gitlab.com*]
|
||||
target=gitlab.com/whiteman809
|
||||
|
||||
[bitbucket.org*]
|
||||
target=bitbucket.org/whiteman808@paraboletancza.org
|
||||
|
||||
[codeberg.org*]
|
||||
target=codeberg.org/whiteman808
|
||||
|
||||
[git.paraboletancza.org*]
|
||||
target=git.paraboletancza.org/whiteman808
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user