master
Jonathan Hodgson 7 years ago
parent 81dce313ad
commit d3bae53bd7
  1. 12
      bin/php-swap
  2. 4
      config/oh-my-zsh/promptconfig.zsh
  3. 2
      zshrc

@ -1,12 +1,13 @@
#!/usr/bin/bash #!/usr/bin/bash
line=$(php --version | grep "PHP" -m 1) line=$(php --version | grep "PHP" -m 1)
libphp="/opt/lampp/modules/libphp7.1.so"
case "$1" in case "$1" in
5) 5)
file="/opt/lampp/etc/extra/httpd-xampp-php5.conf" file="/opt/lampp/etc/extra/httpd-xampp-php5.conf"
phpexe=$(ls /opt/lampp/bin/php-5.6.*) phpexe=$(ls /opt/lampp/bin/php-5.*)
phpcgi=$(ls /opt/lampp/bin/php-cgi-5.6.*) phpcgi=$(ls /opt/lampp/bin/php-cgi-5.*)
phpconfig=$(ls /opt/lampp/bin/php-config-5.6.*) phpconfig=$(ls /opt/lampp/bin/php-config-5.*)
phpize=$(ls /opt/lampp/bin/phpize-5.6.*) phpize=$(ls /opt/lampp/bin/phpize-5.*)
;; ;;
7 | 7.1) 7 | 7.1)
file="/opt/lampp/etc/extra/httpd-xampp-php7.conf" file="/opt/lampp/etc/extra/httpd-xampp-php7.conf"
@ -21,6 +22,7 @@ case "$1" in
phpcgi=$(ls /opt/lampp/bin/php-cgi-7.0.*) phpcgi=$(ls /opt/lampp/bin/php-cgi-7.0.*)
phpconfig=$(ls /opt/lampp/bin/php-config-7.0.*) phpconfig=$(ls /opt/lampp/bin/php-config-7.0.*)
phpize=$(ls /opt/lampp/bin/phpize-7.0.*) phpize=$(ls /opt/lampp/bin/phpize-7.0.*)
libphp="/opt/lampp/modules/libphp7.0.so"
;; ;;
*) *)
echo "Please specify the version you want" echo "Please specify the version you want"
@ -42,8 +44,8 @@ ln -s -f $phpexe /opt/lampp/bin/php
ln -s -f $phpcgi /opt/lampp/bin/php-cgi ln -s -f $phpcgi /opt/lampp/bin/php-cgi
ln -s -f $phpconfig /opt/lampp/bin/php-config ln -s -f $phpconfig /opt/lampp/bin/php-config
ln -s -f $phpize /opt/lampp/bin/phpize ln -s -f $phpize /opt/lampp/bin/phpize
ln -s -f $libphp /opt/lampp/modules/libphp7.so
# Also need to change /opt/lampp/modules/libphp7.so if 7.x.
$lampp startapache $lampp startapache
echo echo

@ -63,7 +63,7 @@ POWERLEVEL9K_CUSTOM_DIR_FOREGROUND="white"
# POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR="\ue0c2" # POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR="\ue0c2"
function Capslock(){ function Capslock(){
x=$(xset -q | grep Caps) x=$(xset -q | grep Caps) 2> /dev/null || exit 0
x=${x:22:1} x=${x:22:1}
if [[ $x == "n" ]]; then if [[ $x == "n" ]]; then
@ -75,7 +75,9 @@ POWERLEVEL9K_CUSTOM_CAPS_BACKGROUND="red"
POWERLEVEL9K_CUSTOM_CAPS_FOREGROUND="white" POWERLEVEL9K_CUSTOM_CAPS_FOREGROUND="white"
# Left Prompt # Left Prompt
if [[ "$(basename "/"$(ps -f -p $(cat /proc/$(echo $$)/stat | cut -d \ -f 4) | tail -1 | sed 's/^.* //'))" != "$(echo $USER)" ]]; then
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_dir rbenv vcs custom_caps) POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_dir rbenv vcs custom_caps)
fi
# Right Prompt # Right Prompt
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator time) POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status root_indicator time)

@ -85,5 +85,7 @@ source $ZSH/oh-my-zsh.sh
# alias zshconfig="mate ~/.zshrc" # alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh" # alias ohmyzsh="mate ~/.oh-my-zsh"
if [ -e "$HOME/.smartcd_config" ]; then
[ -r "$HOME/.smartcd_config" ] && ( [ -n $BASH_VERSION ] || [ -n $ZSH_VERSION ] ) && source ~/.smartcd_config [ -r "$HOME/.smartcd_config" ] && ( [ -n $BASH_VERSION ] || [ -n $ZSH_VERSION ] ) && source ~/.smartcd_config
fi

Loading…
Cancel
Save