Dotfiles for different machines on different branches.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
439 B

  1. #!/usr/bin/env bash
  2. export FIFO_UEBERZUG="/tmp/vifm-ueberzug-${PPID}"
  3. if [ ! -f "/usr/bin/ueberzug" ]; then
  4. vifm
  5. exit
  6. fi
  7. function cleanup {
  8. rm "$FIFO_UEBERZUG" 2>/dev/null
  9. pkill -P $$ 2>/dev/null
  10. }
  11. pkill -P $$ 2>/dev/null
  12. rm "$FIFO_UEBERZUG" 2>/dev/null
  13. mkfifo "$FIFO_UEBERZUG" >/dev/null
  14. trap cleanup EXIT 2>/dev/null
  15. tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser bash 2>&1 >/dev/null &
  16. vifm "$@"
  17. cleanup