Compare commits
5 Commits
3aa8bd8ff1
...
00ba9863bc
| Author | SHA1 | Date | |
|---|---|---|---|
|
00ba9863bc
|
|||
|
374d4a6100
|
|||
|
ce2181f9c2
|
|||
|
621572a3db
|
|||
|
73eaef8411
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -41,7 +41,7 @@ tmux/*
|
|||||||
!git
|
!git
|
||||||
git/*
|
git/*
|
||||||
!git/config
|
!git/config
|
||||||
!git/gitignore
|
!git/ignore
|
||||||
!git/aflabs
|
!git/aflabs
|
||||||
|
|
||||||
# ghostty
|
# ghostty
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
[user]
|
|
||||||
name = Matej Janežič
|
|
||||||
email = matej.janezic@aflabs.si
|
|
||||||
52
git/config
52
git/config
@@ -1,18 +1,56 @@
|
|||||||
|
[includeIf "gitdir:~/Desktop/git/git.aflabs.org/"]
|
||||||
|
path = ~/.config/git/config.d/aflabs.conf
|
||||||
|
|
||||||
|
[includeIf "gitdir:~/Desktop/git/gitlab.com/flarenetwork"]
|
||||||
|
path = ~/.config/git/config.d/aflabs.conf
|
||||||
|
|
||||||
|
[includeIf "gitdir:~/Desktop/git/gitlab.com/flare-foundation"]
|
||||||
|
path = ~/.config/git/flare
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
name = Matej Janežič
|
name = Matej Janežič
|
||||||
email = janezic.mj@gmail.com
|
email = janezic.mj@gmail.com
|
||||||
|
|
||||||
[core]
|
[core]
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
excludesfile = ~/.config/git/gitignore
|
|
||||||
editor = nvim
|
editor = nvim
|
||||||
[include]
|
|
||||||
path = ~/.config/git/alias
|
[user]
|
||||||
[include]
|
signingkey = AF349EECC849D87B790E88FF6318FFB7DB374B7D
|
||||||
path = ~/.config/git/commitsign
|
|
||||||
[includeIf "gitdir:~/Desktop/git/git.aflabs.org/"]
|
[commit]
|
||||||
path = ~/.config/git/aflabs
|
gpgsign = true
|
||||||
|
|
||||||
|
; NOTE:(@janezicmatej) github/gitlab don't support these
|
||||||
|
; [push]
|
||||||
|
; gpgsign = true
|
||||||
|
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = main
|
defaultBranch = main
|
||||||
|
|
||||||
[alias]
|
[alias]
|
||||||
blame = "!f() { [ -f .git-blame-ignore-revs ] && git blame --ignore-revs-file .git-blame-ignore-revs \"$@\" || git blame \"$@\"; }; f"
|
blame = "!f() { [ -f .git-blame-ignore-revs ] && git blame --ignore-revs-file .git-blame-ignore-revs \"$@\" || git blame \"$@\"; }; f"
|
||||||
|
|
||||||
|
[diff]
|
||||||
|
tool = "nvimdiff"
|
||||||
|
|
||||||
|
[difftool]
|
||||||
|
prompt = true
|
||||||
|
|
||||||
|
[difftool "nvimdiff"]
|
||||||
|
cmd = nvim -d "$LOCAL" "$REMOTE"
|
||||||
|
|
||||||
|
[maintenance]
|
||||||
|
auto = true
|
||||||
|
strategy = incremental
|
||||||
|
|
||||||
|
[merge]
|
||||||
|
tool = "nvimdiff"
|
||||||
|
|
||||||
|
[mergetool]
|
||||||
|
prompt = true
|
||||||
|
keepBackup = false
|
||||||
|
writeToTemp = true
|
||||||
|
|
||||||
|
[mergetool "nvimdiff"]
|
||||||
|
layout = "LOCAL,BASE,REMOTE / MERGED"
|
||||||
|
|||||||
@@ -1,10 +1,6 @@
|
|||||||
# mac files
|
# mac files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# i usually make test.* files for local testing
|
|
||||||
# test.*
|
|
||||||
# test
|
|
||||||
|
|
||||||
# i don't like pushing .vscode and .idea folders, i will force add if needed
|
# i don't like pushing .vscode and .idea folders, i will force add if needed
|
||||||
.vscode
|
.vscode
|
||||||
.idea
|
.idea
|
||||||
@@ -12,6 +8,10 @@
|
|||||||
# pyenv
|
# pyenv
|
||||||
.python-version
|
.python-version
|
||||||
|
|
||||||
|
# nix venv hook
|
||||||
|
.nix-venv
|
||||||
|
.dev
|
||||||
|
|
||||||
# i use .ignore for nvim
|
# i use .ignore for nvim
|
||||||
.ignore
|
.ignore
|
||||||
|
|
||||||
@@ -7,6 +7,8 @@ set -g set-clipboard on
|
|||||||
|
|
||||||
set -s escape-time 0
|
set -s escape-time 0
|
||||||
|
|
||||||
|
set -g update-environment "SSH_AUTH_SOCK SSH_CONNECTION SSH_TTY DISPLAY"
|
||||||
|
|
||||||
unbind C-b
|
unbind C-b
|
||||||
set-option -g prefix C-s
|
set-option -g prefix C-s
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
alias z="exec zsh"
|
alias z="exec zsh"
|
||||||
alias t="tmux a || ~/.config/tmux/tmux-sessionizer ~"
|
alias t=tmux_attach
|
||||||
alias n=nvim_ve
|
alias n=nvim_ve
|
||||||
# alias vim=nvim_ve
|
# alias vim=nvim_ve
|
||||||
alias s="ssh-menu"
|
alias s="ssh-menu"
|
||||||
|
|
||||||
|
# docker
|
||||||
|
alias dp="docker ps --format 'table {{.Names}}\t{{.Ports}}'"
|
||||||
|
alias dcp="docker compose ps --format 'table {{.Name}}\t{{.Ports}}'"
|
||||||
|
|
||||||
# navigation
|
# navigation
|
||||||
alias cdgit="cd $GGROOT"
|
alias cdgit="cd $GGROOT"
|
||||||
alias icloud="cd $HOME/Library/Mobile\ Documents/com\~apple\~CloudDocs"
|
alias icloud="cd $HOME/Library/Mobile\ Documents/com\~apple\~CloudDocs"
|
||||||
@@ -16,6 +20,7 @@ alias accentoff="defaults write -g ApplePressAndHoldEnabled -bool false"
|
|||||||
# git
|
# git
|
||||||
alias gros="git reset origin/$(git_current_branch) --soft"
|
alias gros="git reset origin/$(git_current_branch) --soft"
|
||||||
alias gcan="git commit -v --amend --no-edit"
|
alias gcan="git commit -v --amend --no-edit"
|
||||||
|
alias glogaa="git log --oneline --graph --all --pretty=format:\"%C(auto)%h %C(blue)(%aL/%cL)%C(auto)%(decorate) %s%Creset\""
|
||||||
|
|
||||||
# unsorted
|
# unsorted
|
||||||
alias ci="glab ci list"
|
alias ci="glab ci list"
|
||||||
@@ -24,7 +29,7 @@ alias grow="~/.local/bin/cbonsai -liWC -M 15 -t 2 -w 60 -s $(date +%s)"
|
|||||||
alias clean_ds_store='find . -name ".DS_Store" -type f -delete -print'
|
alias clean_ds_store='find . -name ".DS_Store" -type f -delete -print'
|
||||||
|
|
||||||
# ruff
|
# ruff
|
||||||
alias ruffme="ruff format && ruff check --fix"
|
alias ruffme="ruff check --fix && ruff format"
|
||||||
|
|
||||||
# clipboard
|
# clipboard
|
||||||
alias xcp="xclip -selection c"
|
alias xcp="xclip -selection c"
|
||||||
|
|||||||
@@ -79,3 +79,19 @@ function tssh {
|
|||||||
ssh -t "$@" "command -v tmux && (tmux a || tmux new-session -s gorazd -c ~) || bash"
|
ssh -t "$@" "command -v tmux && (tmux a || tmux new-session -s gorazd -c ~) || bash"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function tmux_attach {
|
||||||
|
tmux_running=$(pgrep tmux)
|
||||||
|
|
||||||
|
if ! [[ -z ${TMUX} ]]; then
|
||||||
|
echo "already attached; refreshing env"
|
||||||
|
source <(tmux show-environment | sed -n 's/^\(.*\)=\(.*\)$/export \1="\2"/p')
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $tmux_running ]]; then
|
||||||
|
~/.config/tmux/tmux-sessionizer ~
|
||||||
|
else
|
||||||
|
tmux a
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ EOF
|
|||||||
export -f _ssh_menu_preview
|
export -f _ssh_menu_preview
|
||||||
|
|
||||||
function ssh-menu {
|
function ssh-menu {
|
||||||
selected="$(rg -N --no-heading 'Host .*' ~/.ssh \
|
selected="$(rg -N --no-heading '^Host .*' ~/.ssh \
|
||||||
| sed 's/Host \(.*\)/\1/' \
|
| sed 's/Host \(.*\)/\1/' | sort \
|
||||||
| SHELL=$(which bash) fzf --cycle \
|
| SHELL=$(which bash) fzf --cycle \
|
||||||
--bind 'tab:toggle-up,btab:toggle-down' \
|
--bind 'tab:toggle-up,btab:toggle-down' \
|
||||||
--delimiter ':' \
|
--delimiter ':' \
|
||||||
|
|||||||
Reference in New Issue
Block a user