1
0
Fork 0

fix some aliases

This commit is contained in:
Luca Bilke 2022-07-22 13:09:59 +02:00
parent a06e97194b
commit b71c684931
1 changed files with 6 additions and 20 deletions

View File

@ -1,15 +1,8 @@
#!/bin/sh #!/bin/sh
# Use neovim for vim if present.
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
# Use $XINITRC variable if file exists. # Use $XINITRC variable if file exists.
[ -f "$XINITRC" ] && alias startx="startx $XINITRC" [ -f "$XINITRC" ] && alias startx="startx $XINITRC"
# fix ssh if using kitty as terminal
[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
# sudo not required for some system commands # sudo not required for some system commands
for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do
alias $command="sudo $command" alias $command="sudo $command"
@ -24,7 +17,7 @@ alias \
mkd="mkdir -pv" \ mkd="mkdir -pv" \
ffmpeg="ffmpeg -hide_banner" \ ffmpeg="ffmpeg -hide_banner" \
exa="exa -abghHliS" \ exa="exa -abghHliS" \
claws="claws-mail --alternate-config-dir $CLAWSRC" \ duf="duf -all" \
lock='slock -m "$(cowsay "$(fortune)" | lolcat -ft)"' lock='slock -m "$(cowsay "$(fortune)" | lolcat -ft)"'
# Colorize commands when possible. # Colorize commands when possible.
@ -37,21 +30,14 @@ alias \
# These common commands are just too long! Abbreviate them. # These common commands are just too long! Abbreviate them.
alias \ alias \
ka="killall" \ ka="killall" \
g="git" \ e="$EDITOR" \
trem="transmission-remote" \ p="pacman"
YT="youtube-viewer" \
sdn="shutdown -h now" \
e="$EDITOR" \
v="$EDITOR" \
p="pacman" \
xi="sudo xbps-install" \
xr="sudo xbps-remove -R" \
xq="xbps-query" \
z="zathura"
# Misc. # Misc.
alias \ alias \
magit="nvim -c MagitOnly" \
ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \ ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc" \
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \ weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport" \
remvirt="virt-manager -c 'qemu+ssh://luca@192.168.178.200/system'" \ remvirt="virt-manager -c 'qemu+ssh://luca@192.168.178.200/system'" \
vim="lvim" \ vim="lvim" \
wikidown='rclone sync cloud:files/luca/Notes ~/Documents/vimwiki' \
wikiup='rclone sync ~/Documents/vimwiki cloud:files/luca/Notes'