mirror of
https://github.com/Xevion/dotfiles.git
synced 2025-12-14 18:11:34 -06:00
Rearrange aliases, add WSL-specific clipboard aliases, reformat
This commit is contained in:
@@ -1,20 +1,36 @@
|
|||||||
# Controlled by chezmoi
|
# Controlled by chezmoi
|
||||||
alias gpt='chatgpt'
|
|
||||||
alias copilot='gh copilot'
|
# Core aliases
|
||||||
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'
|
|
||||||
alias ll='ls -AlFh'
|
alias ll='ls -AlFh'
|
||||||
alias la='ls -Ah'
|
alias la='ls -Ah'
|
||||||
alias l='ls -CF'
|
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
|
# fast chmod execute alias
|
||||||
function chfix() {
|
function chfix() {
|
||||||
@@ -45,10 +61,6 @@ function chcode() {
|
|||||||
chezmoi edit $@
|
chezmoi edit $@
|
||||||
}
|
}
|
||||||
|
|
||||||
function chlg() {
|
|
||||||
lazygit --path ~/.local/share/chezmoi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Add an "alert" alias for long running commands. Use like so:
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
# sleep 10; alert
|
# 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$//'\'')"'
|
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.
|
# Touches a file while also creating the parent directory (and any other necessary directories) in order to do so.
|
||||||
function mktouch() {
|
function mktouch() {
|
||||||
mkdir -p $(dirname $1) && touch $1;
|
mkdir -p $(dirname $1) && touch $1
|
||||||
}
|
}
|
||||||
|
|
||||||
# When in the appropriate KiTTy terminal, use the SSH kitten
|
# When in the appropriate KiTTy terminal, use the SSH kitten
|
||||||
Reference in New Issue
Block a user