sync-dirs 265 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. START_EMACS=0
  3. if [[ $1 == '-s' ]] ; then
  4. START_EMACS=1
  5. shift
  6. fi
  7. cd
  8. CDIR=$(pwd)
  9. for DIR in "$@" ; do
  10. cd $DIR
  11. mr sync
  12. cd $CDIR
  13. done
  14. if [[ $START_EMACS -eq 1 ]] ; then
  15. i3-run \
  16. i3-workspace-layout emacs-here 1
  17. fi
  18. _alarm