Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

28 рядки
762 B

6 роки тому
7 роки тому
6 роки тому
8 роки тому
6 роки тому
6 роки тому
8 роки тому
6 роки тому
  1. #!/bin/bash
  2. # Set source and target directories
  3. powerline_fonts_dir="$( cd "$( dirname "$0" )" && pwd )"
  4. # if an argument is given it is used to select which fonts to install
  5. prefix="$1"
  6. if test "$(uname)" = "Darwin" ; then
  7. # MacOS
  8. font_dir="$HOME/Library/Fonts"
  9. else
  10. # Linux
  11. font_dir="$HOME/.local/share/fonts"
  12. mkdir -p $font_dir
  13. fi
  14. # Copy all fonts to user fonts directory
  15. echo "Copying fonts..."
  16. find "$powerline_fonts_dir" \( -name "$prefix*.[ot]tf" -or -name "$prefix*.pcf.gz" \) -type f -print0 | xargs -0 -n1 -I % cp "%" "$font_dir/"
  17. # Reset font cache on Linux
  18. if which fc-cache >/dev/null 2>&1 ; then
  19. echo "Resetting font cache, this may take a moment..."
  20. fc-cache -f "$font_dir"
  21. fi
  22. echo "Powerline fonts installed to $font_dir"