From The Compiler, 5 Years ago, written in Bash.
Embed
  1. #!/bin/bash
  2. # vim: set fileencoding=utf-8 ts=4 sts=4 sw=4 tw=80 expandtab :
  3.  
  4. # Copyright (C) 2012 Florian Bruhin <me@the-compiler.org>
  5.  
  6. # This file is part of panel2
  7. #
  8. # panel2 is free software: you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation, either version 3 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # panel2 is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with panel2  If not, see <http://www.gnu.org/licenses/>.
  20.  
  21. [[ $0 == /* ]] && script="$0" || script="${PWD}/${0#./}"
  22. panelfolder=${script%/*}
  23. trap 'herbstclient emit_hook quit_panel' TERM
  24. herbstclient pad 0 24
  25.  
  26. cat | dzen2 -h 1 -x 24 -bg '#afdf87' &
  27. pids+=($!)
  28.  
  29. "$panelfolder/tray.sh" &
  30. pids+=($!)
  31.  
  32. "$panelfolder/tags.sh" &
  33. pids+=($!)
  34.  
  35. conky -c "$panelfolder/conkyrc" &
  36. pids+=($!)
  37.  
  38. herbstclient --wait '^(quit_panel|reload).*'
  39. kill -TERM "${pids[@]}" >/dev/null 2>&1
  40. exit 0