Skip to content

Installation

pwnlog edited this page Jan 14, 2024 · 1 revision

Categories

Automated vs Manual

Automated:

  • Recommended for Kali Linux only
  • Prone to errors

Manual:

  • Recommended for any other Debian-based distribution
  • See the errors as they appear for your specific distribution

Automated Installation

Clone the repo into your home directory (this is required and cannot be installed elsewhere):

git clone https://github.com/pwnlog/Minima /home/$USER/Minima

Run the install.sh script from the Minima directory:

cd /home/$USER/Minima && ./install.sh

Important

This script must be executed from the Minima directory /home/$USER/Minima/.

Warning

Do NOT run this script as root.

Do NOT run this script with sudo.

Manual Installation

Clone the Minima repo:

git clone https://github.com/pwnlog/Minima 

Update APT mirrors:

sudo apt-get update

Upgrade the system (required depending on the distribution):

sudo apt upgrade -y

Note

Upgrading the system can take more than 30 minutes and might "break" packages or dependencies.

It's recommended to upgrade the system APT mirror source list:

/etc/apt/sources.list.d/parrot.list

Note

The source list could be updated during the upgrade depending on the distribution.

A "safer" upgrade alternative can be the following:

sudo apt dist-ugprade -y

Note

Information about upgrades can be found in the man page.

Clone the repo into your home directory (this is required):

git clone https://github.com/pwnlog/Minima /home/$USER/Minima

Install the core utilities:

sudo apt-get install -y wmctrl zstd zsh aptitude thunar xclip coreutils flameshot lxappearance papirus-icon-theme pip open-vm-tools-desktop

Note

The package names may be different for your Linux distribution. It's recommended to consult the distribution's package tracker or the documentation of the specific program/software.

If possible upgrade the dpkg to at least version 1.21.18 to support zstd for Debian packages (not required):

sudo apt install --only-upgrade dpkg

Download and install BAT debian package:

wget https://github.com/sharkdp/bat/releases/download/v0.24.0/bat_0.24.0_amd64.deb -O bat.deb && sudo dpkg -i bat.deb || sudo apt install bat

Download and install LSD debian package:

wget https://github.com/lsd-rs/lsd/releases/download/v1.0.0/lsd_1.0.0_amd64.deb -O lsd.deb && sudo dpkg -i lsd.deb || sudo apt install lsd || echo "Recompressing lsd"; ar -x lsd.deb; zstd -d control.tar.zst; zstd -d data.tar.zst; xz control.tar; xz data.tar; rm lsd.deb; ar -rc lsd.deb debian-binary control.tar.xz data.tar.xz; sudo dpkg -i lsd.deb

Note

The package names may be different for your Linux distribution. It's recommended to consult the distribution's package tracker or the documentation of the specific program/software. In some distributions, it's recommended to upgrade the system and the mirrors to find the latest package names.

Download and install Alacritty debian package:

wget https://github.com/barnumbirr/alacritty-debian/releases/download/v0.10.0-rc4-1/alacritty_0.10.0-rc4-1_amd64_bullseye.deb && sudo dpkg -i alacritty_0.10.0-rc4-1_amd64_bullseye.deb

Install the bspwm dependencies:

sudo apt-get install -y libxcb-xinerama0-dev libxcb-icccm4-dev libxcb-randr0-dev libxcb-util0-dev libxcb-ewmh-dev libxcb-keysyms1-dev libxcb-shape0-dev

Note

The package names may be different for your Linux distribution. It's recommended to consult the distribution's package tracker or the documentation of the specific program/software. Also the dependencies may change depending on the bspwm version.

Clone bspwm from source:

git clone https://github.com/baskerville/bspwm.git

Clone sxhkd from source:

git clone https://github.com/baskerville/sxhkd.git

Install bspwm:

cd bspwm && make && sudo make install

Install sxhkd:

cd ../sxhkd && make && sudo make install

Add bspwm to xsessions (login screen):

sudo cp /usr/local/share/xsessions/bspwm.desktop /usr/share/xsessions/bspwm.desktop

Install the font manager:

sudo apt install -y font-manager

Download and install Iosevka font:

wget https://github.com/ryanoasis/nerd-fonts/releases/download/v2.3.1/Iosevka.zip -O Iosevka.zip && sudo unzip -o Iosevka.zip -d /usr/share/fonts/

Download and install JetBrainsMono font:

wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/JetBrainsMono.zip -O JetBrainsMono.zip && sudo unzip -o JetBrainsMono.zip -d /usr/share/fonts/

Download and install Roboto font:

wget https://fonts.google.com/download?family=Roboto -O Roboto.zip && sudo unzip -o Roboto.zip -d /usr/share/fonts/

Download and install Material fonts:

install_path="/usr/share/fonts/material-design-icons"
url_prefix="https://raw.githubusercontent.com/google/material-design-icons/master/font"
fonts="MaterialIcons-Regular.ttf MaterialIconsOutlined-Regular.otf MaterialIconsRound-Regular.otf"
fonts="$fonts MaterialIconsSharp-Regular.otf MaterialIconsTwoTone-Regular.otf"

for font in $fonts
do
	sudo wget \
		--no-verbose \
		--directory-prefix="$install_path" \
		--output-document="$font" \
		"$url_prefix/$font"
done

Install picom dependencies:

sudo apt install -y libxext-dev libxcb1-dev libxcb-damage0-dev libxcb-dpms0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-render-util0-dev libxcb-render0-dev libxcb-randr0-dev libxcb-composite0-dev libxcb-image0-dev libxcb-present-dev libxcb-xinerama0-dev libxcb-glx0-dev libpixman-1-dev libdbus-1-dev libconfig-dev libgl-dev libegl-dev libpcre2-dev libevdev-dev uthash-dev libev-dev libx11-xcb-dev libpcre3-dev libxcb-sync-dev meson

Note

The package names may be different for your Linux distribution. It's recommended to consult the distribution's package tracker or the documentation of the specific program/software. Also the dependencies may change depending on the picom version.

Download and install picom:

wget "https://github.com/yshui/picom/archive/refs/tags/v9.1.zip" -O picomv9.1.zip && unzip -o picomv9.1.zip  && cd picom-9.1 ;\
meson setup --buildtype=release . build && ninja -C build && sudo ninja -C build install

Note

Other versions of picom may cause graphical issues with this configuration.

Download and install the dependencies for rofi:

sudo apt-get install -y bison flex check libgdk-pixbuf-2.0-dev libstartup-notification0-dev libxkbcommon-dev libglib2.0-dev libxcb-xkb-dev libxkbcommon-x11-dev libxcb-cursor-dev libpango1.0-dev

Note

The package names may be different for your Linux distribution. It's recommended to consult the distribution's package tracker or the documentation of the specific program/software. Also the dependencies may change depending on the rofi version.

Download and install rofi:

wget https://github.com/davatorium/rofi/releases/download/1.7.5/rofi-1.7.5.tar.gz -O rofi-1.7.5.tar.gz
tar -xvf rofi-1.7.5.tar.gz
cd rofi-1.7.5
rm -rf build 2>/dev/null
mkdir build 
cd build 
../configure 
make 
sudo make install 
cd ..
rm -rf build

Note

Other versions of rofi may cause graphical issues with this configuration.

Install polybar:

sudo apt install -y polybar

Note

The dependencies may change depending on the polybar version. The polybar version must be 3.6.3 or above.

Alternative way to install polybar:

pip install sphinx || pip3 install sphinx
sudo apt install -y sphinx build-essential git cmake cmake-data pkg-config python3-packaging libuv1-dev libcairo2-dev libxcb1-dev libxcb-util0-dev libxcb-randr0-dev libxcb-composite0-dev python3-xcbgen xcb-proto libxcb-image0-dev libxcb-ewmh-dev libxcb-icccm4-dev libpulse-dev libiw-dev libxcb-xkb-dev libxcb-xrm-dev libxcb-cursor-dev libasound2-dev libjsoncpp-dev libmpdclient-dev libnl-genl-3-dev
wget https://github.com/polybar/polybar/releases/download/3.6.3/polybar-3.6.3.tar.gz -O polybar-3.6.3.tar.gz
echo "f25758573567208fc7b6f4d4115a6117a87389cbcc094cf605d079775be95fa5 polybar-3.6.3.tar.gz" | sha256sum -c
if [ $? != 0 ]; then
    echo "[-] Error: Failed to download polybar-3.6.3.tar.gz correctly!"
    echo "[i] Removing the polybar-3.6.3.tar.gz due to invalid checksum"
    rm polybar-3.6.3.tar.gz 
    exit
fi
tar -xvf polybar-3.6.3.tar.gz
cd polybar-3.6.3
rm -rf build 2>/dev/null
mkdir build
cd build
cmake ..
if [ $? != 0 ]; then
    echo "[-] Command: $RED 'cmake ..' $RESET has failed"
    exit
fi
make -j$(nproc)
sudo make install

Install feh:

sudo apt install -y feh

Install neovim dependencies:

sudo apt-get install -y ninja-build gettext cmake unzip curl python3-venv cargo npm

Install neovim from source:

cd /home/$USER/Minima
git clone https://github.com/neovim/neovim
cd neovim && make CMAKE_BUILD_TYPE=RelWithDebInfo
cd build && cpack -G DEB && sudo dpkg -i --force-overwrite nvim-linux64.deb
cd /home/$USER/Minima

Install NvChad from source:

cd /home/$USER/Minima
git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1
nvim --headless +qa
cp -r config/nvim ~/.config/

Install Powerlevel10K zsh:

git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k 

Install xeventbind:

git clone https://github.com/ritave/xeventbind.git
cd xeventbind
make
sudo cp xeventbind /usr/local/bin 
cd /home/$USER/Minima

Install i3lock-fancy:

git clone https://github.com/meskarune/i3lock-fancy.git
cd i3lock-fancy
sudo make install
cd /home/$USER/Minima

Install nsxiv:

sudo apt install -y libimlib2-dev libexif-dev || sudo aptitude install -y libdeflate0 libdeflate-dev libimlib2-dev
sudo apt install -y libexif-dev
git clone https://github.com/nsxiv/nsxiv
cd nsxiv
sudo make install-all
cd /home/$USER/Minima

Warning

The commands above may not work correctly in some distributions such as ParrotOS.

In ParrotOS you may need to interact with aptitude such as the following output and answers:

~/nsxiv master 5s
❯ sudo aptitude install libdeflate0 libdeflate-dev libimlib2-dev
libdeflate0 is already installed at the requested version (1.10-2~bpo11+1)
libdeflate0 is already installed at the requested version (1.10-2~bpo11+1)
The following NEW packages will be installed:
  libbz2-dev{a} libdeflate-dev{b} libgif-dev{a} libid3tag0-dev{a} libimlib2-dev libjbig-dev{a} libjpeg-dev{a} libjpeg62-turbo-dev{a}
  liblzma-dev{a} libtiff-dev{a} libtiffxx5{a} libwebp-dev{a}
0 packages upgraded, 12 newly installed, 0 to remove and 177 not upgraded.
Need to get 1,889 kB of archives. After unpacking 5,661 kB will be used.
The following packages have unmet dependencies:
 libdeflate-dev : Depends: libdeflate0 (= 1.7-1) but 1.10-2~bpo11+1 is installed
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libdeflate-dev [Not Installed]
2)     libimlib2-dev [Not Installed]
3)     libtiff-dev [Not Installed]



Accept this solution? [Y/n/q/?] n


The following actions will resolve these dependencies:

     Downgrade the following packages:
1)     libdeflate0 [1.10-2~bpo11+1 (now, parrot-backports) -> 1.7-1 (parrot)]



Accept this solution? [Y/n/q/?] Y


The following packages will be DOWNGRADED:
  libdeflate0
The following NEW packages will be installed:
  libbz2-dev{a} libdeflate-dev libgif-dev{a} libid3tag0-dev{a} libimlib2-dev libjbig-dev{a} libjpeg-dev{a} libjpeg62-turbo-dev{a}
  liblzma-dev{a} libtiff-dev{a} libtiffxx5{a} libwebp-dev{a}
0 packages upgraded, 12 newly installed, 1 downgraded, 0 to remove and 177 not upgraded.
Need to get 1,942 kB of archives. After unpacking 5,624 kB will be used.


Do you want to continue? [Y/n/?] Y

Install pywal:

sudo apt install -y imagemagick
git clone https://github.com/dylanaraps/pywal
cd pywal
pip3 install --user .
sudo cp $HOME/.local/bin/wal /usr/local/bin/wal
sudo chmod 755 /usr/local/bin/wal

Install tmux:

cd /home/$USER/
sudo apt install -y libevent-dev ncurses-dev build-essential bison pkg-config tmux
sudo rm -rf .tmux 2>/dev/null
git clone https://github.com/gpakosz/.tmux.git 
ln -s -f .tmux/.tmux.conf 
cp .tmux/.tmux.conf.local . 
sed -ie 's/tmux_conf_theme=enabled/tmux_conf_theme=disabled/g' $HOME/.tmux.conf.local
cd /home/$USER/Minima

Install fzf:

sudo apt install -y fzf

Create a script to run these commands:

# Elevate 
sudo test

# Install the configuration files
cp -r config/* ~/.config/

# Install home configuration files
cp home/.fehbg ~/
cp home/.xmodmaprc ~/
cp home/.zshrc ~/
cp home/.p10k.zsh ~/

# Init xmodmaprc
xmodmap ~/.xmodmaprc

# Zsh Plugins
git clone --depth 1 https://github.com/unixorn/fzf-zsh-plugin.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/fzf-zsh-plugin
if [ -d "$HOME/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/" ]
then
    echo "$HOME/.oh-my-zsh/custom/plugins/fzf-zsh-plugin/ found."
else
    exit 1
fi

if [ -d "/usr/share/zsh-autosuggestions" ]
then
    echo "/usr/share/zsh-autosuggestions found."
else
    sudo git clone https://github.com/zsh-users/zsh-autosuggestions /usr/share/zsh-autosuggestions
fi

if [ -d "/usr/share/zsh-syntax-highlighting" ]
then
    echo "/usr/share/zsh-syntax-highlighting found."
else
    sudo git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /usr/share/zsh-syntax-highlighting
fi

if [ -d "/usr/share/zsh-completions" ]
then
    echo "/usr/share/zsh-completions found."
else
    sudo git clone https://github.com/zsh-users/zsh-completions /usr/share/zsh-completions
fi

# Fix insecure zsh
sudo chown -R root:root /usr/local/share/zsh/site-functions/_bspc &>/dev/null && sudo chmod -R 755 /usr/local/share/zsh/site-functions/_bspc &>/dev/null

# Change default shell
sudo chsh $USER -s $(which zsh) 
sudo chsh root -s $(which zsh) 

# Install the scripts
sudo cp scripts/aesthetics/* /usr/local/bin/
sudo cp scripts/network/* /usr/local/bin/
sudo cp scripts/system/* /usr/local/bin/
sudo cp scripts/themes/colors/* /usr/local/bin/
sudo cp scripts/themes/enablers/* /usr/local/bin/

Example:

cd /home/$USER/Minima && bash script.sh

Warning

This script must be executed from the Minima directory.

Install video dependencies:

sudo apt-get install -y ffmpeg pcregrep mplayer mpv xorg-dev build-essential libx11-dev x11proto-xext-dev libxrender-dev libxext-dev 

Note

The package names may be different for your Linux distribution. It's recommended to consult the distribution's package tracker or the documentation of the specific program/software.

Install xwinwrap:

git clone https://github.com/mmhobi7/xwinwrap.git 
cd xwinwrap 
make 
sudo make install
cd /home/$USER/Minima

Create a script to assign the permissions and wallpapers:

# Current User Group
USER_GROUP=$(id -gn $USER) 

# Elevate
sudo test

# BSPWM Permissions
chmod +x ~/.config/bspwm/bspwmrc 
chmod +x ~/.config/bspwm/resize 
chmod +x ~/.config/bspwm/sxhkdrc 

# Polybar permissions
chmod -R 755 ~/.config/polybar 

# Feh permissinons
chmod +x ~/.fehbg

# Nsxiv permissions
chmod +x ~/.config/nsxiv/exec/key-handler 

# Aesthetics Scripts
sudo chown $USER:$USER_GROUP /usr/local/bin/wallpaper-changer 
sudo chmod +x /usr/local/bin/wallpaper-changer 

sudo chown $USER:$USER_GROUP /usr/local/bin/wallpaper-scheduler 
sudo chmod +x /usr/local/bin/wallpaper-scheduler 

sudo chown $USER:$USER_GROUP /usr/local/bin/default-wallpaper
sudo chmod +x /usr/local/bin/default-wallpaper

sudo chown $USER:$USER_GROUP /usr/local/bin/default-polybar
sudo chmod +x /usr/local/bin/default-polybar

sudo chown $USER:$USER_GROUP /usr/local/bin/change-corners
sudo chmod +x /usr/local/bin/change-corners

sudo chown $USER:$USER_GROUP /usr/local/bin/pywal
sudo chmod +x /usr/local/bin/pywal

sudo chown $USER:$USER_GROUP /usr/local/bin/shadows
sudo chmod +x /usr/local/bin/shadows

sudo chown $USER:$USER_GROUP /usr/local/bin/video-wallpaper
sudo chmod +x /usr/local/bin/video-wallpaper

sudo chown $USER:$USER_GROUP /usr/local/bin/move-polybar
sudo chmod +x /usr/local/bin/move-polybar

# System Scripts
sudo chown $USER:$USER_GROUP /usr/local/bin/powermenu
sudo chmod +x /usr/local/bin/powermenu

sudo chown $USER:$USER_GROUP /usr/local/bin/install-tools
sudo chmod +x /usr/local/bin/install-tools

sudo chown $USER:$USER_GROUP /usr/local/bin/polybar-wm
sudo chmod +x /usr/local/bin/polybar-wm

# Network Scripts
sudo chown $USER:$USER_GROUP /usr/local/bin/ethernet-status
sudo chmod +x /usr/local/bin/ethernet-status

sudo chown $USER:$USER_GROUP /usr/local/bin/vpn-status
sudo chmod +x /usr/local/bin/vpn-status

sudo chown $USER:$USER_GROUP /usr/local/bin/copy-ethernet
sudo chmod +x /usr/local/bin/copy-ethernet

sudo chown $USER:$USER_GROUP /usr/local/bin/copy-vpn
sudo chmod +x /usr/local/bin/copy-vpn

sudo chown $USER:$USER_GROUP /usr/local/bin/hack-target
sudo chmod +x /usr/local/bin/hack-target

sudo chown $USER:$USER_GROUP /usr/local/bin/copy-target
sudo chmod +x /usr/local/bin/copy-target

# Theme Scripts
sudo chown $USER:$USER_GROUP /usr/local/bin/enable-colorful-theme
sudo chmod +x /usr/local/bin/enable-colorful-theme

sudo chown $USER:$USER_GROUP /usr/local/bin/colorful-theme
sudo chmod +x /usr/local/bin/colorful-theme

sudo chown $USER:$USER_GROUP /usr/local/bin/enable-light-theme
sudo chmod +x /usr/local/bin/enable-light-theme

sudo chown $USER:$USER_GROUP /usr/local/bin/light-theme
sudo chmod +x /usr/local/bin/light-theme

sudo chown $USER:$USER_GROUP /usr/local/bin/enable-dark-theme
sudo chmod +x /usr/local/bin/enable-dark-theme

sudo chown $USER:$USER_GROUP /usr/local/bin/dark-theme
sudo chmod +x /usr/local/bin/dark-theme

# Target File
echo "" > ~/.config/target

# Install wallpapers
mkdir -p ~/Pictures/Wallpapers 
cp wallpaper/* ~/Pictures/Wallpapers 

# Fix wallpaper for other usernames
sed -ie "s/kali/$USER/g" ~/.fehbg

# Fix thunar
sed -ie "s/kali/$USER/g" ~/.config/gtk-3.0/bookmarks

# Generate wal cache
wal -i "$HOME/Pictures/Wallpapers/pwning.png" -q -n

Warning

This script must be executed from the Minima directory.

Example:

cd /home/$USER/Minima && bash script.sh

Activate the themes:

/usr/local/bin/pywal ~/Pictures/Wallpapers/pwning.png 2>/dev/null 

Reboot the host to apply the changes:

reboot || sudo systemctl reboot || sudo shutdown -r now

After the reboot, select bspwm in the login screen and log in.

Wallpapers

Wallpapers must be stored in the following directory:

/home/$USER/Pictures/Wallpapers/

Python Virtual Environment

Install the python environment for py2 and py3 zsh aliases:

sudo apt install -y build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git
curl https://pyenv.run | bash
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc
echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n  eval "$(pyenv init --path)"\nfi' >> ~/.zshrc
$HOME/.pyenv/bin/pyenv install 2.7.18
$HOME/.pyenv/bin/pyenv install 3.11
$HOME/.pyenv/bin/pyenv versions

Contributing

If you want to add or improve the installation script/s, feel free to contribute to this project.