This commit is contained in:
Arthur Khachaturov 2024-08-27 22:18:49 +03:00
parent 8d167995c7
commit 43c9688558
No known key found for this signature in database
GPG key ID: CAC2B7EB6DF45D55
6 changed files with 38 additions and 21 deletions

View file

@ -2,6 +2,7 @@ return {
'nvim-telescope/telescope.nvim',
branch = '0.1.x',
dependencies = {
'navarasu/onedark.nvim',
'nvim-lua/plenary.nvim',
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
},

View file

@ -1,5 +1,6 @@
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
# Battery icons
set -g @batt_icon_charge_tier8 ' '
@ -11,6 +12,9 @@ set -g @batt_icon_charge_tier3 ' '
set -g @batt_icon_charge_tier2 ' '
set -g @batt_icon_charge_tier1 '! !'
# better-mouse-mode
set -g @emulate-scroll-for-no-mouse-alternate-buffer "on"
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.local/share/tmux-plugins'
# Run tmux-plugin-manager

View file

@ -75,7 +75,6 @@ alias .......="cd ../../../../../../"
alias rz="exec zsh"
alias venv="source src_venv"
alias ex="source src_example"
alias cdb="compiledb "
alias info="pinfo "
alias bat="batcat "
alias img="nsxiv "
@ -92,19 +91,22 @@ t() { taskell "${1:-${HOME}/.taskell.md}"; }
vims() { vim "$(whereis "$1" | rev | cut -d ' ' -f 1 | rev)"; }; compdef _command vims
bc() { unbuffer "$@" | bat; }; compdef _command bc
# compdef
compdef -a '_git; _git-commit' gdc # todo
compdef '_files -g "*.md"' md
# git aliases
alias gitignore="cp ${HOME}/.local/share/gitignore-template ./.gitignore"
gl() { git log "$@" | bat }; compdef '_git; _git-log' gl
alias gs="git status"
alias gc="git commit"
alias gca="git commit --amend --no-edit"
alias gp="git push"
alias gl="git log"
alias ga="git add"
alias gck="git checkout"
alias gb="git branch"
alias gd="git diff"
alias gr="git restore"
alias gr="git reset"
alias gcl="git clone"
alias gds="gd --staged"
@ -113,12 +115,8 @@ alias dc="docker compose"
alias docker!="DOCKER_HOST=ssh://docker /usr/bin/docker"
alias dc!="docker! compose"
# tmux aliases
tn() {
tmux new-session -s "${1-"$(basename "$(pwd)")"}"
}
# tmux stuff
tn() { tmux new-session -s "${1-"$(basename "$(pwd)")"}" }
alias ta="tmux a -t"
# disable xon controll chars

View file

@ -1,3 +1,5 @@
[core]
pager = delta
[user]
email = me@wzray.ru
name = Arthur Khachaturov
@ -5,3 +7,12 @@
defaultBranch = main
[commit]
gpgsign = true
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true
syntax-theme = OneHalfDark
[merge]
conflictstyle = diff3
[diff]
colorMoved = default

View file

@ -44,10 +44,10 @@ case "$1" in
esac
if [ "$#" -lt "1" ]; then
die "Missing commit message!"
die "Missing date!"
fi
export GIT_AUTHOR_DATE="${date}"
export GIT_COMMITTER_DATE="${date}"
git commit -m "$@"
git commit "$@"

View file

@ -1,6 +1,7 @@
#!/bin/bash
: "${1:?Missing filename!}"
[ ! -f "$1" ] && { echo "Wrong filename!" >&2; exit 1; }
FILENAME="$(mktemp)"
@ -11,16 +12,18 @@ cleanup() {
trap 'cleanup' INT HUP TRAP
shift_header() {
read -r line < "$1"
if [[ "$line" = "# "* ]]; then
echo "---"
echo "title: ${line#"# "}"
echo "---"
tail -n +2 "$1"
else
cat "$1"
fi
local counter=1
while read -r line; do
(( counter+=1 ))
if [[ "$line" = "# "* ]]; then
echo "---"
echo "title: ${line#"# "}"
echo "---"
tail -n +"$counter" < "$1"
return
fi
done < "$1"
cat "$1"
}
main() {