Update stuff for st

master
Jonathan Hodgson 7 years ago
parent 001570c3b6
commit 56a3b9959a
  1. 3
      config/i3/configWork
  2. 2
      config/oh-my-zsh/aliases.zsh
  3. 42
      config/oh-my-zsh/functions.zsh
  4. 6
      config/oh-my-zsh/promptconfig.zsh
  5. 2
      config/vim
  6. 2
      zprofile

@ -43,7 +43,8 @@ floating_modifier $mod
# start a terminal # start a terminal
# bindsym $mod+Return exec xfce4-terminal # bindsym $mod+Return exec xfce4-terminal
# bindsym $mod+Return exec konsole # bindsym $mod+Return exec konsole
bindsym $mod+Return exec termite # bindsym $mod+Return exec termite
bindsym $mod+Return exec /usr/local/bin/st
# kill focused window # kill focused window
bindsym $mod+q kill bindsym $mod+q kill

@ -33,7 +33,7 @@ alias mkdir='mkdir -p'
alias perms='wp rewrite flush' alias perms='wp rewrite flush'
#Clear terminal and screenfetch #Clear terminal and screenfetch
alias cls='clear; screenfetch' alias cls='clear; neofetch'
#An alias for my standard less configuration #An alias for my standard less configuration
#I don't set it to lessc because sometimes I don't use this config and I always forget how to ignore an alias #I don't set it to lessc because sometimes I don't use this config and I always forget how to ignore an alias

@ -47,7 +47,12 @@ function createLetter(){
function ptheme() { function ptheme() {
public_html=${PWD%/public_html*}/public_html public_html=${PWD%/public_html*}/public_html
if [ -d $public_html ]; then if [ -d $public_html ]; then
theme=$(dirname $(wp --path="$public_html" theme path $(wp --path="$public_html" theme list | grep "parent" | awk '{print $1}'))) if [ -d $public_html/wp ]; then
wpPath=$public_html/wp;
else
wpPath=$public_html;
fi
theme=$(dirname $(wp --path="$wpPath" theme path $(wp --path="$wpPath" theme list | grep "parent" | awk '{print $1}')))
if [ -d $theme ]; then if [ -d $theme ]; then
if [ -d "$theme" ]; then if [ -d "$theme" ]; then
cd $theme cd $theme
@ -66,7 +71,12 @@ function ptheme() {
function theme() { function theme() {
public_html=${PWD%/public_html*}/public_html public_html=${PWD%/public_html*}/public_html
if [ -d $public_html ]; then if [ -d $public_html ]; then
theme=$(dirname $(wp --path="$public_html" theme path $(wp --path="$public_html" theme list | grep "active" | grep -v "inactive" | awk '{print $1}'))) if [ -d $public_html/wp ]; then
wpPath=$public_html/wp;
else
wpPath=$public_html;
fi
theme=$(dirname $(wp --path="$wpPath" theme path $(wp --path="$wpPath" theme list | grep "active" | grep -v "inactive" | awk '{print $1}')))
if [ -d $theme ]; then if [ -d $theme ]; then
cd $theme cd $theme
else else
@ -81,7 +91,12 @@ function theme() {
function js() { function js() {
public_html=${PWD%/public_html*}/public_html public_html=${PWD%/public_html*}/public_html
if [ -d $public_html ]; then if [ -d $public_html ]; then
theme=$(dirname $(wp --path="$public_html" theme path $(wp --path="$public_html" theme list | grep "active" | grep -v "inactive" | awk '{print $1}'))) if [ -d $public_html/wp ]; then
wpPath=$public_html/wp;
else
wpPath=$public_html;
fi
theme=$(dirname $(wp --path="$wpPath" theme path $(wp --path="$wpPath" theme list | grep "active" | grep -v "inactive" | awk '{print $1}')))
if [ -d $theme ]; then if [ -d $theme ]; then
if [ -d "$theme/js" ]; then if [ -d "$theme/js" ]; then
cd "$theme/js" cd "$theme/js"
@ -101,7 +116,12 @@ function js() {
function css() { function css() {
public_html=${PWD%/public_html*}/public_html public_html=${PWD%/public_html*}/public_html
if [ -d $public_html ]; then if [ -d $public_html ]; then
theme=$(dirname $(wp --path="$public_html" theme path $(wp --path="$public_html" theme list | grep "active" | grep -v "inactive" | awk '{print $1}'))) if [ -d $public_html/wp ]; then
wpPath=$public_html/wp;
else
wpPath=$public_html;
fi
theme=$(dirname $(wp --path="$wpPath" theme path $(wp --path="$wpPath" theme list | grep "active" | grep -v "inactive" | awk '{print $1}')))
if [ -d $theme ]; then if [ -d $theme ]; then
if [ -d "$theme/css" ]; then if [ -d "$theme/css" ]; then
cd "$theme/css" cd "$theme/css"
@ -121,7 +141,12 @@ function css() {
function plugins() { function plugins() {
public_html=${PWD%/public_html*}/public_html public_html=${PWD%/public_html*}/public_html
if [ -d $public_html ]; then if [ -d $public_html ]; then
cd $(wp --path="$public_html" plugin path) if [ -d $public_html/wp ]; then
wpPath=$public_html/wp;
else
wpPath=$public_html;
fi
cd $(wp --path="$wpPath" plugin path)
else else
echo " Can't find public_html folder." echo " Can't find public_html folder."
fi fi
@ -131,7 +156,12 @@ function plugins() {
function themes() { function themes() {
public_html=${PWD%/public_html*}/public_html public_html=${PWD%/public_html*}/public_html
if [ -d $public_html ]; then if [ -d $public_html ]; then
cd $(wp --path="$public_html" theme path) if [ -d $public_html/wp ]; then
wpPath=$public_html/wp;
else
wpPath=$public_html;
fi
cd $(wp --path="$wpPath" theme path)
else else
echo " Can't find public_html folder." echo " Can't find public_html folder."
fi fi

@ -10,6 +10,7 @@ function my_dir(){
magentoSiteIcon=" " magentoSiteIcon=" "
dropboxIcon="" dropboxIcon=""
seperator=" " seperator=" "
seperatorDual=" "
root="$seperator" root="$seperator"
# Gets the path. # Gets the path.
local current_path="$(print -P "%~")" local current_path="$(print -P "%~")"
@ -35,7 +36,7 @@ function my_dir(){
current_path=$(echo $current_path | sed -r -e "s/wp\-content\//wpc\//") current_path=$(echo $current_path | sed -r -e "s/wp\-content\//wpc\//")
if [[ $(tput cols) -lt 100 ]]; then if [[ $(tput cols) -lt 100 ]]; then
current_path=$(echo $current_path | sed -r -e "s/wpc\/themes\///") current_path=$(echo $current_path | sed -r -e "s/wpc\/themes\//\//")
fi fi
elif [[ -e "$ph/bin/magento" ]]; then #If magento elif [[ -e "$ph/bin/magento" ]]; then #If magento
@ -53,6 +54,9 @@ function my_dir(){
# Set the root # Set the root
current_path=$(echo $current_path | sed -r -e "s/^\//$root/g") current_path=$(echo $current_path | sed -r -e "s/^\//$root/g")
# Set the dual seperator
current_path=$(echo $current_path | sed -r -e "s/\/\//$seperatorDual/g")
# Set the seperator # Set the seperator
current_path=$(echo $current_path | sed -r -e "s/\//$seperator/g") current_path=$(echo $current_path | sed -r -e "s/\//$seperator/g")

@ -1 +1 @@
Subproject commit 3856ba8c89731e3a59ef5fccd8f91909cf7157c2 Subproject commit 3a15cd29a13ef48013ba78904cad5286eb66ed26

@ -1,5 +1,5 @@
export LANG="en_GB.UTF-8" export LANG="en_GB.UTF-8"
export TERMINAL=/usr/bin/termite export TERMINAL=/usr/local/bin/st
export TERM=xterm-256color export TERM=xterm-256color
export PATH=~/.bin:$PATH:/opt/lampp/bin:. export PATH=~/.bin:$PATH:/opt/lampp/bin:.
export EDITOR='vim' export EDITOR='vim'

Loading…
Cancel
Save