forked from misc/zsh-config
* Fixed lsmod calling on systems different from Linux.
* fbterm check now runs only on Linux and if lsmod is available. * Added OS and OS_RELEASE vars. * Themes now should also ends with .zsh.
This commit is contained in:
parent
cfa309ed3a
commit
da3e638cf9
5
zsh/05-vars.zsh
Normal file
5
zsh/05-vars.zsh
Normal file
@ -0,0 +1,5 @@
|
||||
# This file includes some variables that vital to all parts of
|
||||
# this configuration.
|
||||
|
||||
OS=`uname`
|
||||
OS_RELEASE=`uname -r`
|
@ -4,8 +4,8 @@ autoload -Uz promptinit
|
||||
promptinit
|
||||
|
||||
if [ "${PROMPT_THEME}" != "" ]; then
|
||||
if [ -f ${CONFIG_PATH}/zsh/prompts/${PROMPT_THEME}.zsh-theme ]; then
|
||||
source ${CONFIG_PATH}/zsh/prompts/${PROMPT_THEME}.zsh-theme
|
||||
if [ -f ${CONFIG_PATH}/zsh/prompts/${PROMPT_THEME}.zsh ]; then
|
||||
source ${CONFIG_PATH}/zsh/prompts/${PROMPT_THEME}.zsh
|
||||
else
|
||||
echo "Theme \"${PROMPT_THEME}\" could not be loaded. File does not exist or unreadable."
|
||||
fi
|
||||
|
@ -1,42 +1,5 @@
|
||||
alias screen="TERM=xterm screen"
|
||||
|
||||
# AION ^_^
|
||||
#alias aion="cd /data/Programs/aion/ && WINEPREFIX="/home/pztrn/.wine-aion" wine AWLite.exe"
|
||||
|
||||
# SVN Add all in ABUILDS
|
||||
#alias addall="cd /data/AgiliaLinux/ABUILDS && sh svnadd.sh"
|
||||
|
||||
# VirtualBox Aliases
|
||||
alias as-start='VBoxManage startvm "Arch Linux Server" --type headless'
|
||||
alias as-stop='VBoxManage controlvm "Arch Linux Server" acpipowerbutton'
|
||||
|
||||
alias x86_64-start='VBoxManage startvm "Agilia x86_64" --type headless'
|
||||
alias x86_64-stop='VBoxManage controlvm "Agilia x86_64" acpipowerbutton'
|
||||
|
||||
# QTile
|
||||
alias qtcfg="nano ~/.config/qtile/config.py"
|
||||
|
||||
# Games
|
||||
alias regnum="/data/Programs/Regnum/rolauncher"
|
||||
alias ut2004="aoss /data/Programs/UT2004/ut2004"
|
||||
|
||||
#PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
|
||||
#source /home/pztrn/.rvm/scripts/rvm
|
||||
|
||||
# Xilitra
|
||||
alias xbs="/data/XILITRA/xbs/src/xbs.py"
|
||||
alias deptracker="/data/XILITRA/xilitra-dev-tools/deptracker/deptracker"
|
||||
alias xpkg="/data/XILITRA/xpkg/src/xpkg.py"
|
||||
|
||||
# Other
|
||||
alias clocksync="sudo ntpdate 0.pool.ntp.org"
|
||||
alias got="git"
|
||||
|
||||
# Blogs
|
||||
alias crotal="/data/.pyenv/versions/2.7.6/bin/crotal"
|
||||
|
||||
#alias yasearch="yaourt -Ss"
|
||||
#alias yainstall="yaourt -S"
|
||||
#alias yadel="yaourt -Rd"
|
||||
#alias sysupdate="yaourt -Syua"
|
||||
#alias flvgrab="ffmpeg -f alsa -f x11grab -r 30 -s 1920x1080 -i :0.0 -acodec pcm_s16le -vcodec flv -sameq"
|
||||
|
@ -1,7 +1,18 @@
|
||||
# Launch fbterm on TTY login
|
||||
|
||||
# But first some pre-checks. nVidia proprietary drivers will not allow
|
||||
# us to use it, so we should disable this.
|
||||
# We should not use it on any system except linux.
|
||||
if [[ "${OS}" != "Linux" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# We should skip this file if no fbterm is installed.
|
||||
FBTERM=`whereis fmterm | cut -d ":" -f 2`
|
||||
if [[ "${FBTERM/fbterm}" == "${FBTERM}" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# nVidia proprietary drivers will not allow us to use it, so we
|
||||
# should disable this.
|
||||
|
||||
NVIDIA_POWERED=0
|
||||
lsmod | grep nvidia &> /dev/null
|
||||
|
@ -39,7 +39,7 @@ prompt_pztrn_setup () {
|
||||
|
||||
[[ -n "$WINDOW" ]] && p_win="$WINDOW"
|
||||
|
||||
if [[ $USER == "root" ]]; then
|
||||
if [[ "$USER" == "root" ]]; then
|
||||
vars['usercolor']="%{$fg[red]%}"
|
||||
else
|
||||
vars['usercolor']="%{$fg[blue]%}"
|
Loading…
Reference in New Issue
Block a user