Skip to content

Instantly share code, notes, and snippets.

@sandrocarval
Last active October 14, 2023 19:54
Show Gist options
  • Save sandrocarval/a65c70beb25c3634390b2911bedf3d7e to your computer and use it in GitHub Desktop.
Save sandrocarval/a65c70beb25c3634390b2911bedf3d7e to your computer and use it in GitHub Desktop.
Ubuntu 23.10 setup
# Initial setup and updates. Reboot after the update!
sudo apt update
sudo apt install flatpak gnome-software-plugin-flatpak -y
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo apt update -y
# Base packages
sudo apt install curl wget git net-tools apt-transport-https software-properties-common gpg gnupg xz-utils unzip fonts-roboto fonts-roboto-slab fonts-inter fonts-hack fonts-firacode fonts-jetbrains-mono fonts-jetbrains-mono gnome-tweaks gnome-shell-extension-manager -y
# Base dev packages
sudo apt install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev libffi-dev zlib1g-dev libbz2-dev libncursesw5-dev tk-dev libxmlsec1-dev liblzma-dev coreutils dirmngr gawk jq -y
# Install bash-it - https://github.com/Bash-it/bash-it
# Install asdf - https://asdf-vm.com/guide/getting-started.html - and needed plugins
# Git
git config --global color.ui true
git config --global user.name "YOUR NAME"
git config --global user.email "YOUR EMAIL"
ssh-keygen -t ed25519 -C "YOUR EMAIL"
# Font setup
mkdir -p ~/.config/fontconfig/
tee -a ~/.config/fontconfig/fonts.conf <<-EOF
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias binding="same">
<family>Helvetica</family>
<prefer>
<family>Liberation Sans</family>
</prefer>
</alias>
<alias binding="same">
<family>system-ui</family>
<prefer>
<family>Roboto</family>
</prefer>
</alias>
<alias binding="same">
<family>sans</family>
<prefer>
<family>Roboto</family>
</prefer>
</alias>
<alias binding="same">
<family>sans-serif</family>
<prefer>
<family>Roboto</family>
</prefer>
</alias>
<alias binding="same">
<family>serif</family>
<prefer>
<family>Roboto Slab</family>
</prefer>
</alias>
<alias binding="same">
<family>monospace</family>
<prefer>
<family>JetBrains Mono</family>
</prefer>
</alias>
<match target="font">
<edit name="antialias" mode="assign">
<bool>true</bool>
</edit>
<edit name="autohint" mode="assign">
<bool>false</bool>
</edit>
<edit name="hinting" mode="assign">
<bool>true</bool>
</edit>
<edit name="hintstyle" mode="assign">
<const>hintslight</const>
</edit>
<edit name="lcdfilter" mode="assign">
<const>lcddefault</const>
</edit>
<edit name="rgba" mode="assign">
<const>rgb</const>
</edit>
</match>
</fontconfig>
EOF
fc-cache -f -v
# Audio improvements
mkdir -p ~/.config/pulse/
tee -a ~/.config/pulse/daemon.conf <<-EOF
deferred-volume-safety-margin-usec = 1
default-sample-format = float32le
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 2
default-fragment-size-msec = 125
resample-method = soxr-vhq
remixing-produce-lfe = no
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 9
rlimit-rtprio = 9
daemonize = no
EOF
# Increase max_user_watches
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
# And do a final reboot!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment