hyprdots

my dotfiles
git clone https://git.awy.one/hyprdots.git
Log | Files | Refs | README | LICENSE

aliasrc (1714B)


      1 #!/bin/sh
      2 
      3 # Use neovim for vim if present.
      4 [ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
      5 
      6 # Use $XINITRC variable if file exists.
      7 [ -f "$XINITRC" ] && alias startx="startx $XINITRC"
      8 
      9 [ -f "$MBSYNCRC" ] && alias mbsync="mbsync -c $MBSYNCRC"
     10 
     11 # sudo not required for some system commands
     12 for command in mount umount dinitctl pacman updatedb su shutdown poweroff reboot ; do
     13 	alias $command="sudo $command"
     14 done; unset command
     15 
     16 se() {
     17 	choice="$(find ~/.local/bin -mindepth 1 -printf '%P\n' | fzf)"
     18 	[ -f "$HOME/.local/bin/$choice" ] && $EDITOR "$HOME/.local/bin/$choice"
     19 	}
     20 
     21 # Verbosity and settings that you pretty much just always are going to want.
     22 alias \
     23 	cp="cp -iv" \
     24 	mv="mv -iv" \
     25 	rm="rm -vI" \
     26 	bc="bc -ql" \
     27 	rsync="rsync -vrPlu" \
     28 	mkd="mkdir -pv" \
     29 	yt="yt-dlp --embed-metadata -i" \
     30 	yta="yt -x -f bestaudio/best" \
     31 	ytt="yt --skip-download --write-thumbnail" \
     32 	ffmpeg="ffmpeg -hide_banner"
     33 
     34 # Colorize commands when possible.
     35 alias \
     36 	ls="ls -hN --color=auto --group-directories-first" \
     37 	grep="grep --color=auto" \
     38 	diff="diff --color=auto" \
     39 	ccat="highlight --out-format=ansi" \
     40 	ip="ip -color=auto"
     41 
     42 # These common commands are just too long! Abbreviate them.
     43 alias \
     44 	ka="killall" \
     45 	g="git" \
     46 	trem="transmission-remote" \
     47 	YT="youtube-viewer" \
     48 	sdn="shutdown -h now" \
     49 	e="$EDITOR" \
     50 	v="$EDITOR" \
     51 	p="pacman" \
     52 	z="zathura" \
     53   md="monerod --prune-blockchain --fast-block-sync 1 --data-dir /mnt/ssd/monero/bitmonero"
     54 
     55 alias \
     56 	magit="nvim -c MagitOnly" \
     57 	ref="shortcuts >/dev/null; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutenvrc ; source ${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"