Adds open-local to siteEnv

This commit is contained in:
Jonathan Hodgson 2019-04-17 11:11:41 +01:00
parent 1c9e21e1a6
commit 7e07712902

View file

@ -1,16 +1,22 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
source "$HOME/.dotfiles/shells/functions" source "$HOME/.dotfiles/shells/functions"
sitesDir="$HOME/Sites/" sitesDir="$HOME/Sites/"
chosen="$(ls -d ${sitesDir}*/ | sed "s+$sitesDir++g; s/\/$//" | rofi -dmenu -i -p "Site")" chosen="$(ls -d ${sitesDir}*/ | sed "s+$sitesDir++g; s/\/$//" | rofi -dmenu -i -p "Site")"
open="$(echo -n "Yes\nNo" | rofi -dmenu -i -p "Open the local site")"
siteDir="${sitesDir}${chosen}/" siteDir="${sitesDir}${chosen}/"
cd "$siteDir" cd "$siteDir"
theme theme
setsid "$TERMINAL" & setsid "$TERMINAL" &
setsid "$TERMINAL" & setsid "$TERMINAL" &
setsid "$TERMINAL" & setsid "$TERMINAL" &
@ -24,4 +30,6 @@ i3-msg "split horizontal"
setsid "$TERMINAL" & setsid "$TERMINAL" &
open-local if [ "$open" = "Yes" ]; then
open-local
fi