-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_bash_aliases.tmpl
More file actions
76 lines (66 loc) · 1.71 KB
/
Copy pathdot_bash_aliases.tmpl
File metadata and controls
76 lines (66 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# dotfiles (ansible + chezmoi update)
function dots {
if [ "$1" = "sync" ]; then
git -C $HOME/Projects/dotfiles pull origin master
else
{{ if eq .chezmoi.os "darwin" -}}
ansible-playbook --ask-become-pass -c local $(chezmoi source-path)/macos.yml -i $(chezmoi source-path)/hosts $@
{{ else -}}
ansible-playbook --ask-become-pass -c local $(chezmoi source-path)/local.yml -i $(chezmoi source-path)/hosts $@
{{ end -}}
chezmoi apply --force --verbose
fi
}
# chezmoi
alias cz="chezmoi"
alias czd="chezmoi diff"
alias cza="chezmoi apply -v"
# lsd
alias ls="lsd"
alias ll="lsd -l"
alias la="lsd -A"
alias lla="lsd -lA"
# bat
alias bat="bat --color=always --theme Dracula"
# git
alias gst="git status"
alias gad="git add"
alias gbr="git branch"
alias gcm="git commit"
alias gdi="git diff --color"
alias gdt="git difftool"
alias gco="git checkout"
alias glo='git log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %C(cyan)(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit'
alias gp="gist -p"
# python
alias py="python"
alias ipy="ipython"
# emacs
alias e="emacsclient -c"
# clipboard
{{ if eq .chezmoi.os "darwin" -}}
alias clip="pbcopy"
{{ else -}}
alias clip="xclip -selection clipboard"
{{ end -}}
# diceware
alias dw="diceware -d ' ' --no-caps"
# workstream — parallel AI-coding streams (see ~/.local/bin/wst)
alias wcl='wst clone'
alias wn='wst new'
alias wa='wst attach'
alias wp='wst preview'
alias wls='wst ls'
alias gtinit='wst gtinit'
# new named tmux session
function to {
if (( $# == 1 ))
then
tmux new-session -s $1
elif (( $# == 0 ))
then
to $(basename $(pwd))
else
echo "to takes only one argument: to [sessionname]"
fi
}