|
@@ -11,23 +11,24 @@ WORKSPACE=$2
|
|
|
case ${LAYOUT} in
|
|
|
define)
|
|
|
NAME=$3
|
|
|
- i3-save-tree --workspace ${WORKSPACE} > ~/.config/i3/${NAME}.json
|
|
|
- emacsclient --alternate-editor="" -n ~/.config/i3/${NAME}.json
|
|
|
+ i3-save-tree --workspace ${WORKSPACE} > ~/.config/i3/layouts/${NAME}.json
|
|
|
+ emacsclient --alternate-editor="" -n ~/.config/i3/layouts/${NAME}.json
|
|
|
;;
|
|
|
edit)
|
|
|
NAME=$3
|
|
|
- emacsclient --alternate-editor="" -n ~/.config/i3/${NAME}.json
|
|
|
+ emacsclient --alternate-editor="" -n ~/.config/i3/layouts/${NAME}.json
|
|
|
;;
|
|
|
list)
|
|
|
- for layout in ~/.config/i3/*.json ;
|
|
|
+ for layout in ~/.config/i3/layouts/*.json ;
|
|
|
do
|
|
|
echo " - $(basename -- ${layout} .json)"
|
|
|
done
|
|
|
;;
|
|
|
*)
|
|
|
- if [[ -e ~/.config/i3/${LAYOUT}.json ]] ; then
|
|
|
- i3-msg "workspace ${WORKSPACE}; append_layout ~/.config/i3/${LAYOUT}.json"
|
|
|
+ if [[ -e ~/.config/i3/layouts/${LAYOUT}.json ]] ; then
|
|
|
+ i3-msg "workspace ${WORKSPACE}; append_layout ~/.config/i3/layouts/${LAYOUT}.json"
|
|
|
+ [[ -e ~/.config/i3/layouts/${LAYOUT}.after ]] && sh ~/.config/i3/layouts/${LAYOUT}.after
|
|
|
else
|
|
|
- echo "${LAYOUT} not available"
|
|
|
+ i3-nagbar -m "${LAYOUT} not available" -t error
|
|
|
fi
|
|
|
esac
|