Skip to content

Instantly share code, notes, and snippets.

@joaomarcos96
Last active February 13, 2023 21:18
Show Gist options
  • Save joaomarcos96/c5bcd7e1e8febd93540812a431e637f4 to your computer and use it in GitHub Desktop.
Save joaomarcos96/c5bcd7e1e8febd93540812a431e637f4 to your computer and use it in GitHub Desktop.
Manjaro Post Install

Manjaro post install

Update mirrors:

sudo pacman-mirrors --geoip && sudo pacman -Syyu

Enable parallel downloads:

https://wiki.archlinux.org/title/Pacman#Enabling_parallel_downloads

Check Pacman updates:

checkupdates

List packages installed as dependencies and not required by any package (may be removed)

pacman -Qdt
# Remove all of them (the extra -q option is to show less info like package number)
sudo pacman -Rns $(pacman -Qqdt)

Remove / clear pacman cache

# "remove, keep 2" meaning: keep the past 2 versions
paccache -rk2

Remove / clear yay cache

yay -Sc --aur

Install and configure Zsh:

sudo pacman -Syu zsh
zsh /usr/share/zsh/functions/Newuser/zsh-newuser-install -f
chsh -s $(which zsh)

Install Yay (AUR packages):

sudo pacman -Syu yay

Uniform look for Qt and GTK (Breeze Dark)

Source: https://wiki.archlinux.org/title/Uniform_look_for_Qt_and_GTK_applications#Breeze

After the command below, go to System Settings > Appearance > Application Style > Configure GNOME/GTK Application Style and select Breeze (or Breeze Dark if any).

sudo pacman -Syu breeze-gtk kde-gtk-config

Chrome:

yay -Syu google-chrome

VSCode:

yay -Syu visual-studio-code-bin

Git:

sudo pacman -Syu git

Tilix:

sudo pacman -Syu tilix

Dependencies:

sudo pacman -Syu --needed base-devel libffi libyaml openssl zlib

General dependencies:

sudo pacman -Syu autoconf bison curl gettext re2c oniguruma unzip autoconf bison curl gettext re2c oniguruma unzip gnome-keyring

ASDF Install:

git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.7.8

ASDF Update:

asdf update

ASDF Ruby:

asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git
asdf list-all ruby
asdf install ruby <version>
asdf global ruby <version>

ASDF PHP:

asdf plugin-add php https://github.com/asdf-community/asdf-php.git
asdf list-all php
asdf install php <version>
asdf global php <version>

ASDF Node:

asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
bash ~/.asdf/plugins/nodejs/bin/import-release-team-keyring
asdf list-all nodejs
asdf install nodejs <version>
asdf global nodejs <version>

ASDF Python:

asdf plugin-add python
asdf list-all python
asdf install python <version>
asdf global python <version>
  • After every Python package installed with pip, you have to run asdf reshim python

GVim:

sudo pacman -Syu gvim

Dotfiles:

sh -c "`curl -fsSL https://raw.githubusercontent.com/skwp/dotfiles/master/install.sh `"
rake update

Set Hack 12 font and gruvbox colorscheme in YADR appearance:

vim ~/.yadr/vim/settings/yadr-appearance.vim

Use login shell instead of interactive shell:

  1. Enter vimrc_after.vim:
    vim ~/.yadr/vim/after/plugin/vimrc_after.vim
    
  2. Append this:
    " use login Shell instead of interactive shell
    if executable('zsh')
    set shell=/usr/bin/zsh\ -l
    endif

Jetbrains Toolbox:

yay -Syu jetbrains-toolbox

Set Jetbrains Toolbox correct icon path:

sudo vim /usr/share/applications/jetbrains-toolbox.desktop
Icon=/opt/jetbrains-toolbox/jetbrains-toolbox.svg

TTF Fonts:

sudo pacman -Syu ttf-hack ttf-ms-fonts

OpenJDK:

sudo pacman -Syu jre8-openjdk jdk8-openjdk

Generate SSH key:

ssh-keygen -t rsa -b 4096 -C "user@pc-name"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

Flutter:

yay -Rns flutter
sudo rm -rf /opt/flutter
yay -Syu flutter
sudo groupadd flutterusers
sudo gpasswd -a <your_user> flutterusers
sudo chown -R :flutterusers /opt/flutter
newgrp flutterusers
sudo chmod -R g+w /opt/flutter
sudo setfacl -m u:<your_user>:rwx -R /opt/flutter

Tmux:

sudo pacman -Syu tmux

MySQL / MariaDB:

  • MariaDB server and client:
    sudo pacman -Syu mariadb mariadb-clients
    sudo mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
    sudo systemctl start mariadb
    sudo systemctl status mariadb
    
  • MySQL Workbench:
    sudo pacman -Syu mysql-workbench
    
  • DBeaver:
    sudo pacman -Syu dbeaver
    
  • MySQL/MariaDB CLI Client mycli:
    pip install -U mycli
    asdf reshim python
    
  • Connect using mycli:
    mycli -u <user> -h <host>
    

If ZSH problems:

rm -rf ~/.zcompdump*

Postman:

yay -Syu postman-bin

Enable TRIM for SSD:

sudo systemctl enable fstrim.timer

Timeshift for backup:

yay -Syu timeshift

TLP (for battery optimization):

sudo tlp start
sudo systemctl enable tlp --now

TLP UI:

sudo pacman -Syu tlpui

.NET Core and ASP.NET Core and EF Core globally:

sudo pacman -Syu dotnet-host dotnet-runtime dotnet-sdk aspnet-runtime
dotnet tool install --global dotnet-ef

Docker:

sudo pacman -Syu docker
sudo systemctl start docker
sudo systemctl enable docker
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
docker info

PostgreSQL:

  • Pull it from Docker and run it:
    $ docker pull postgres
    $ mkdir -p $HOME/docker/volumes/postgres
    $ docker run --name pg-docker -e POSTGRES_PASSWORD=docker -d -p 5432:5432 -v $HOME/docker/volumes/postgres:/var/lib/postgresql/data postgres
    
  • Install it from pacman for the psql client:
    sudo pacman -Syu postgresql
    
  • Connect using psql:
    psql -h localhost -U postgres
    
  • Install pgcli:
    pip install -U pgcli
    asdf reshim python
    

Redshift:

  • Install:
    sudo pacman -Syu redshift
    
  • Enter Redshift and add it to the startup applications

Xdebug for PHP:

  • Install:
    pecl install xdebug
    
  • Create php.ini with path /home/<user>/.asdf/installs/php/<version>/php.ini and content:
    [xdebug]
    zend_extension=/home/<user>/.asdf/installs/php/<version>/lib/php/extensions/no-debug-non-zts-<some-number>/xdebug.so
    xdebug.remote_enable=on
    xdebug.remote_host=127.0.0.1
    xdebug.remote_port=9000
    xdebug.remote_handler=dbgp
    xdebug.remote_autostart=on

Warsaw:

  • Install:
    yay -Syu warsaw-bin
    
  • Start the service:
    sudo systemctl start warsaw.service
    
    

Some command line tools / utilities

  • bat - A cat(1) clone with syntax highlighting and Git integration:
    sudo pacman -Syu bat
    
  • delta - A viewer for git and diff output:
    sudo pacman -Syu git-delta
    
  • jq - Command-line JSON processor:
    sudo pacman -Syu jq
    
  • httpie: Command-line HTTP client. JSON support, colors, sessions, downloads, plugins & more:
    sudo pacman -Syu httpie
    
  • neofetch: A command-line system information tool:
    sudo pacman -Syu neofetch
    
  • tldr: Collaborative cheatsheets for console commands (a modern man):
    sudo pacman -Syu tealdeer
    
  • cheat.sh: Cheatsheet everything (https://github.com/chubin/cheat.sh#installation):
    $ yay -S cht.sh-git
    $ # ZSH tab completion (https://github.com/chubin/cheat.sh#zsh-tab-completion)
    $ mkdir ~/.zsh.d/
    $ curl https://cheat.sh/:zsh > ~/.zsh.d/_cht
    $ echo 'fpath=(~/.zsh.d/ $fpath)' >> ~/.zshrc
    $ source ~/.zshrc
    
  • exa: A modern replacement for ls:
    sudo pacman -Syu exa
    
  • xclip: Copy/paste clipboard:
    sudo pacman -Syu xclip
    
  • ncdu: Disk usage analyzer with an ncurses interface (like KDE Filelight but CLI):
    sudo pacman -Syu ncdu
    

Replace pulseaudio with pipewire:

SimpleScreenRecorder:

sudo pacman -S simplescreenrecorder
sudo pacman -S zenity (check if needed)
yay -S ffmpeg-compat-57 (yay -Qm, check if needed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment