Rearrange aliases, add WSL-specific clipboard aliases, reformat

This commit is contained in:
2024-11-07 15:11:12 -06:00
parent 86544ac385
commit 2bcb58f7e6

View File

@@ -1,20 +1,36 @@
# Controlled by chezmoi
alias gpt='chatgpt'
alias copilot='gh copilot'
alias suggest='gh copilot suggest -t shell'
alias cha='chezmoi apply --interactive'
alias nano='micro'
alias ch='chezmoi'
alias copy='xsel -ib'
alias cdp='cd $(xsel -b)'
alias spt='spotify_player'
alias lg='lazygit'
alias vim='nvim'
alias gitalias='alias | grep "git "'
alias mousefix='sudo udevadm trigger'
# Core aliases
alias ll='ls -AlFh'
alias la='ls -Ah'
alias l='ls -CF'
alias nano='micro'
alias lg='lazygit'
alias vim='nvim'
alias chlg='lazygit --path ~/.local/share/chezmoi'
# Chezmoi
alias cha='chezmoi apply --interactive'
alias ch='chezmoi'
# Other aliases
alias gpt='chatgpt'
alias copilot='gh copilot'
alias suggest='gh copilot suggest -t shell'
alias spt='spotify_player'
alias gitalias='alias | grep "git "'
alias mousefix='sudo udevadm trigger' # helped with mouse issues on laptop
# Clipboard aliases
{{ if not .wsl -}}
alias copy='xsel -ib'
alias paste='xsel -b'
alias cdp='cd $(xsel -b)'
{{- else -}}
alias copy='clip.exe'
alias paste='powershell.exe -noprofile Get-Clipboard'
alias cdp='cd $(xsel -b)'
{{- end }}
# fast chmod execute alias
function chfix() {
@@ -45,10 +61,6 @@ function chcode() {
chezmoi edit $@
}
function chlg() {
lazygit --path ~/.local/share/chezmoi
}
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
@@ -88,7 +100,7 @@ function lastRuns () {
# Touches a file while also creating the parent directory (and any other necessary directories) in order to do so.
function mktouch() {
mkdir -p $(dirname $1) && touch $1;
mkdir -p $(dirname $1) && touch $1
}
# When in the appropriate KiTTy terminal, use the SSH kitten