Make layout API-interface a bit simpler

Additionally, also fix a bug when creating a window, where as if the
session name was the same as a window that already existed, it would
fail, accidentally using the window rather than the session at a target.
This commit is contained in:
2012-04-25 00:25:11 +01:00
parent 36b2efd5c9
commit d2122044ee
6 changed files with 146 additions and 138 deletions

View File

@@ -24,5 +24,6 @@ if [ -f "$layout_file" ]; then
exit 1
fi
cp "$template" "$layout_file"
content="$(cat "$template")"
echo "${content/\{\{SESSION_NAME\}\}/$layout_name}" > "$layout_file"
exec "$EDITOR" "$layout_file"