:)
This commit is contained in:
parent
8d167995c7
commit
43c9688558
6 changed files with 38 additions and 21 deletions
|
@ -2,6 +2,7 @@ return {
|
||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
branch = '0.1.x',
|
branch = '0.1.x',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
|
'navarasu/onedark.nvim',
|
||||||
'nvim-lua/plenary.nvim',
|
'nvim-lua/plenary.nvim',
|
||||||
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
|
{ 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' },
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
set -g @plugin 'tmux-plugins/tmux-battery'
|
set -g @plugin 'tmux-plugins/tmux-battery'
|
||||||
|
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
|
||||||
|
|
||||||
# Battery icons
|
# Battery icons
|
||||||
set -g @batt_icon_charge_tier8 ' '
|
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_tier2 ' '
|
||||||
set -g @batt_icon_charge_tier1 '! !'
|
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'
|
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.local/share/tmux-plugins'
|
||||||
|
|
||||||
# Run tmux-plugin-manager
|
# Run tmux-plugin-manager
|
||||||
|
|
|
@ -75,7 +75,6 @@ alias .......="cd ../../../../../../"
|
||||||
alias rz="exec zsh"
|
alias rz="exec zsh"
|
||||||
alias venv="source src_venv"
|
alias venv="source src_venv"
|
||||||
alias ex="source src_example"
|
alias ex="source src_example"
|
||||||
alias cdb="compiledb "
|
|
||||||
alias info="pinfo "
|
alias info="pinfo "
|
||||||
alias bat="batcat "
|
alias bat="batcat "
|
||||||
alias img="nsxiv "
|
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
|
vims() { vim "$(whereis "$1" | rev | cut -d ' ' -f 1 | rev)"; }; compdef _command vims
|
||||||
bc() { unbuffer "$@" | bat; }; compdef _command bc
|
bc() { unbuffer "$@" | bat; }; compdef _command bc
|
||||||
|
|
||||||
|
# compdef
|
||||||
|
compdef -a '_git; _git-commit' gdc # todo
|
||||||
|
compdef '_files -g "*.md"' md
|
||||||
|
|
||||||
# git aliases
|
# 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 gs="git status"
|
||||||
alias gc="git commit"
|
alias gc="git commit"
|
||||||
alias gca="git commit --amend --no-edit"
|
alias gca="git commit --amend --no-edit"
|
||||||
alias gp="git push"
|
alias gp="git push"
|
||||||
alias gl="git log"
|
|
||||||
alias ga="git add"
|
alias ga="git add"
|
||||||
alias gck="git checkout"
|
alias gck="git checkout"
|
||||||
alias gb="git branch"
|
alias gb="git branch"
|
||||||
alias gd="git diff"
|
alias gd="git diff"
|
||||||
alias gr="git restore"
|
alias gr="git restore"
|
||||||
|
alias gr="git reset"
|
||||||
alias gcl="git clone"
|
alias gcl="git clone"
|
||||||
alias gds="gd --staged"
|
alias gds="gd --staged"
|
||||||
|
|
||||||
|
@ -113,12 +115,8 @@ alias dc="docker compose"
|
||||||
alias docker!="DOCKER_HOST=ssh://docker /usr/bin/docker"
|
alias docker!="DOCKER_HOST=ssh://docker /usr/bin/docker"
|
||||||
alias dc!="docker! compose"
|
alias dc!="docker! compose"
|
||||||
|
|
||||||
# tmux aliases
|
# tmux stuff
|
||||||
tn() {
|
tn() { tmux new-session -s "${1-"$(basename "$(pwd)")"}" }
|
||||||
tmux new-session -s "${1-"$(basename "$(pwd)")"}"
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
alias ta="tmux a -t"
|
alias ta="tmux a -t"
|
||||||
|
|
||||||
# disable xon controll chars
|
# disable xon controll chars
|
||||||
|
|
11
.gitconfig
11
.gitconfig
|
@ -1,3 +1,5 @@
|
||||||
|
[core]
|
||||||
|
pager = delta
|
||||||
[user]
|
[user]
|
||||||
email = me@wzray.ru
|
email = me@wzray.ru
|
||||||
name = Arthur Khachaturov
|
name = Arthur Khachaturov
|
||||||
|
@ -5,3 +7,12 @@
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
|
[interactive]
|
||||||
|
diffFilter = delta --color-only
|
||||||
|
[delta]
|
||||||
|
navigate = true
|
||||||
|
syntax-theme = OneHalfDark
|
||||||
|
[merge]
|
||||||
|
conflictstyle = diff3
|
||||||
|
[diff]
|
||||||
|
colorMoved = default
|
||||||
|
|
|
@ -44,10 +44,10 @@ case "$1" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ "$#" -lt "1" ]; then
|
if [ "$#" -lt "1" ]; then
|
||||||
die "Missing commit message!"
|
die "Missing date!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export GIT_AUTHOR_DATE="${date}"
|
export GIT_AUTHOR_DATE="${date}"
|
||||||
export GIT_COMMITTER_DATE="${date}"
|
export GIT_COMMITTER_DATE="${date}"
|
||||||
|
|
||||||
git commit -m "$@"
|
git commit "$@"
|
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
: "${1:?Missing filename!}"
|
: "${1:?Missing filename!}"
|
||||||
|
[ ! -f "$1" ] && { echo "Wrong filename!" >&2; exit 1; }
|
||||||
|
|
||||||
FILENAME="$(mktemp)"
|
FILENAME="$(mktemp)"
|
||||||
|
|
||||||
|
@ -11,16 +12,18 @@ cleanup() {
|
||||||
trap 'cleanup' INT HUP TRAP
|
trap 'cleanup' INT HUP TRAP
|
||||||
|
|
||||||
shift_header() {
|
shift_header() {
|
||||||
read -r line < "$1"
|
local counter=1
|
||||||
|
while read -r line; do
|
||||||
if [[ "$line" = "# "* ]]; then
|
(( counter+=1 ))
|
||||||
echo "---"
|
if [[ "$line" = "# "* ]]; then
|
||||||
echo "title: ${line#"# "}"
|
echo "---"
|
||||||
echo "---"
|
echo "title: ${line#"# "}"
|
||||||
tail -n +2 "$1"
|
echo "---"
|
||||||
else
|
tail -n +"$counter" < "$1"
|
||||||
cat "$1"
|
return
|
||||||
fi
|
fi
|
||||||
|
done < "$1"
|
||||||
|
cat "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue