Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- ### Used sources:
- # 1. https://archlinux.org.ru/forum/topic/16691/
- # 2. http://www.pivpav.com/post/183
- # 3. https://github.com/sidaf/dotfiles/blob/master/init/50_linux_gnome_config.sh
- #
- # Install the required fonts from repos
- sudo pacman -S wget ttf-bitstream-vera ttf-croscore ttf-dejavu ttf-ubuntu-font-family ttf-inconsolata ttf-liberation ttf-roboto cpio noto-fonts noto-fonts-emoji noto-fonts-extra --noconfirm
- # Install the required fonts from AUR
- yay -S ttf-carlito ttf-caladea ttf-droid-sans-mono-slashed-powerline-git otf-san-francisco --noconfirm
- # Choose subpixel hinting mode /etc/profile.d/freetype2.sh
- sudo sed -i -e 's/#export FREETYPE_PROPERTIES="truetype:interpreter-version=40"/export FREETYPE_PROPERTIES="truetype:interpreter-version=38"/' /etc/profile.d/freetype2.sh
- # Create local.conf file
- cd /etc/fonts/ && sudo wget -O local.conf https://pastebin.com/raw/QkLErPEw
- # Open /etc/fonts/conf.d, delete all links and create new ones
- sudo rm -rf /etc/fonts/conf.d/*
- sudo ln -s /etc/fonts/conf.avail/10-hinting-slight.conf /etc/fonts/conf.d
- sudo ln -s /etc/fonts/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d
- sudo ln -s /etc/fonts/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d
- sudo ln -s /etc/fonts/conf.avail/69-unifont.conf /etc/fonts/conf.d
- sudo ln -s /etc/fonts/conf.avail/70-yes-bitmaps.conf /etc/fonts/conf.d
- # Create & merge a ~/.Xresource file
- cat << EOF > ~/.Xresources
- Xft.dpi: 96
- Xft.antialias: true
- Xft.hinting: true
- Xft.rgba: rgb
- Xft.autohint: false
- Xft.hintstyle: hintslight
- Xft.lcdfilter: lcddefault
- EOF
- xrdb -merge ~/.Xresources
- # Install gnome.settings-daemon
- sudo pacman -S gnome-settings-daemon --noconfirm
- # Change fonts
- gsettings set org.gnome.desktop.interface document-font-name 'SF Pro Text 11'
- gsettings set org.gnome.desktop.interface font-name 'SF Pro Display 10'
- gsettings set org.gnome.desktop.interface monospace-font-name 'Ubuntu Mono 12'
- gsettings set org.gnome.desktop.wm.preferences titlebar-font 'SF Pro Display Medium 10'
- # Set font antialiasing and hinting
- gsettings set org.gnome.settings-daemon.plugins.xsettings antialiasing 'rgba'
- gsettings set org.gnome.settings-daemon.plugins.xsettings rgba-order 'rgb'
- gsettings set org.gnome.settings-daemon.plugins.xsettings hinting 'slight'
- # Change autodetect encoding settings for Xed editor (as a bonus)
- gsettings set org.x.editor.preferences.encodings auto-detected "['UTF-8', 'WINDOWS-1251', 'KOI8-R', 'CURRENT', 'ISO-8859-15', 'UTF-16']"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement