mirror of
https://github.com/LukeSmithxyz/voidrice.git
synced 2026-03-20 01:37:45 +01:00
sudo su logs you in as the current user with sudo privileges, it prevents loading current user environment variables, even when running su -l to login as root, it's not loading root user enviroment variables either because it's logging in as root under sudo privileges instead as root, this relates to [question about su #334](https://github.com/LukeSmithxyz/LARBS/issues/334) aliasing pacman to always prepend sudo to the command, causes the pacman -Qs libxft-bgra command from .config/shell/profile to run a sudo login prompt right after logging in as the user on SSH, and even sometimes on the desktop itself. try sourcing .config/shell/profile after your logged in, it will ask for your sudo password ..
51 lines
1.3 KiB
Bash
51 lines
1.3 KiB
Bash
#!/bin/sh
|
|
|
|
# Use neovim for vim if present.
|
|
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
|
|
|
|
# Use $XINITRC variable if file exists.
|
|
[ -f "$XINITRC" ] && alias startx="startx $XINITRC"
|
|
|
|
# sudo not required for some system commands
|
|
for x in mount umount updatedb; do
|
|
alias $x="sudo $x"
|
|
done
|
|
|
|
# Verbosity and settings that you pretty much just always are going to want.
|
|
alias \
|
|
cp="cp -iv" \
|
|
mv="mv -iv" \
|
|
rm="rm -vI" \
|
|
bc="bc -ql" \
|
|
mkd="mkdir -pv" \
|
|
yt="youtube-dl --add-metadata -i" \
|
|
yta="yt -x -f bestaudio/best" \
|
|
ffmpeg="ffmpeg -hide_banner"
|
|
|
|
# Colorize commands when possible.
|
|
alias \
|
|
ls="ls -hN --color=auto --group-directories-first" \
|
|
grep="grep --color=auto" \
|
|
diff="diff --color=auto" \
|
|
ccat="highlight --out-format=ansi"
|
|
|
|
# These common commands are just too long! Abbreviate them.
|
|
alias \
|
|
ka="killall" \
|
|
g="git" \
|
|
trem="transmission-remote" \
|
|
YT="youtube-viewer" \
|
|
sdn="sudo shutdown -h now" \
|
|
e="$EDITOR" \
|
|
v="$EDITOR" \
|
|
p="sudo pacman" \
|
|
xi="sudo xbps-install" \
|
|
xr="sudo xbps-remove -R" \
|
|
xq="xbps-query" \
|
|
z="zathura"
|
|
|
|
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" \
|
|
weath="less -S ${XDG_DATA_HOME:-$HOME/.local/share}/weatherreport"
|