アルクシン

{ SUMMARY }

Last edit: May 24th 2019

Introduction

Void Linux is an independent distribution created in 2008 by the Spaniard Juan Romero Pardines.

Pardines (aka "xtraeme"), a former NetBSD executive, wanted to test a new package manager for GNU/Linux: XBPS ("X Binary Package System"). Like many components constituting Void, XBPS is heavily inspired by what we can find in BSD systems; Void is probably the closest Linux distro to the BSD experience. Even if it was initially built as a testbed for XBPS, Void is slowly becoming more popular (among advanced users) and the new team (Pardines disappeared early 2018) has redoubled its efforts to push it to the fore.

Thus, closely following Unix and BSD philosophies, Void is very conservative. But it doesn't keep it from bringing some innovation. For example, while it has been using "runit" since 2015 as its init system, Void was one of the first to include the massive and controversial "systemd" in June 2011, only 8 months after the flagship Fedora.

Void is often compared to Arch, because the package manager, minimalism, and difficulty are quite similar. However, imho the "KISS" ("Keep It Stupid Simple") design principle is way more respected by Void than by Arch.

Pros

Cons


There we can see that some pros are cons too, it depends of your point of view...

Post-install

Preconfigured "live" versions are available at official website, but I don't recommend them even if they seem to make life easier, as they have some bugs and obviously won't totally match your criteria about what you want to have installed/configured on your machine. And to be honest, I don't see the point of installing Void if you don't set it up yourself.

⇒ Download ISO image (take "void-live-x86_64-YYYYMMDD.iso")
⇒ Installation handbook (sections: 3.2.1, 3.2.2, 3.2.3, 3.2.4)

Installing a core Void Linux is pretty simple thanks to semi-automated steps, but it is only for base system and a few components. Everything else must be done manually, it's why I've made a post-install script to quickly run some commands and download my configuration files. IMPORTANT: Feel free to take inspiration from both script and archive, but please keep in mind that everything is specifically tailored to my needs and my computer (for example there is no wifi by default; if you don't have AMD graphics then you'll have to remove "/etc/X11/xorg.conf.d/20-amdgpu.conf" or Xorg won't start; some other files contain settings dedicated to my own use).

⇒ Download my script - updated 05/11/19
⇒ Download my files - updated 05/24/19

Think about showing hidden files (Ctrl + H) if you explore my archive, or "/etc/skel" folder will be empty.

This is how I download and run the script from Void console:
(after initial installation using official tool "void-installer")
sudo xpbs-install -S wget
wget https://alkusin.net/voidlinux/void-install.sh
chmod +x void-install.sh
./void-install.sh
Then I make some tea...

This way I get a ready to use Xfce desktop, activation of required services, a finely-tuned system, and some stuff that I've created. Among other peculiarities, I don't use a session manager like LightDM, I login directly from console, my ~/.xinitrc and ~/.bash_profile launch the graphical session automatically. There's also an Openbox session, everything is already set, the only thing to do is switch the two last lines of ~/.xinitrc. Note that what I share in following chapters is already included.

⇒ Screenshot of final result

I'm pretty sure that someone interested by Void already knows Linux quite well and will be able to easily adapt everything for their own use. If you don't have a server to host your script and files, you can use GitHub or a cloud service like Dropbox for example, on condition that it allows direct download through "wget".

Void-Wizard

Don't launch scripts with "sh" prefix, some commands won't work because of the default shell.
(sudo) sh /path/to/script.sh -> is wrong
(sudo) /path/to/script.sh -> is right
cd /path/to/ && (sudo) ./script.sh -> is right

I've made this script to easily and quickly maintain my Void installation. All you have to do is type the number of the desired option then validate with "Enter". These are the tasks that Wizard can do:

⇒ Screenshot of a terminal running Void-Wizard

I heavily suggest you to read and modify the code of this script, especially at "gaming mode", to get more details about everything and make changes fitting your software/hardware better. Required packages: cpufrequtils cpupower git lynx.

Script

/usr/local/bin/void-scripts/void-wizard.sh - executable : yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux ### Required packages: sudo xbps-install -S cpufrequtils cpupower git lynx readonly CHKUPD=$(xbps-install -nuM | wc -l) spell1() { printf "Known manual interventions:\n\n" if [ $(lynx -dump -nolist https://voidlinux.org/news/archive.html | grep -i "intervention" | wc -l) -eq 0 ]; then printf "None" && sleep 1s else lynx -dump -nolist https://voidlinux.org/news/archive.html | grep -i "intervention" printf "\n" read -p "Visit news page for more details? [Y/n] " a if [ "$a" = "Y" ] || [ "$a" = "y" ]; then lynx https://voidlinux.org/news/archive.html fi fi clear sudo xbps-install -Su } spell2() { printf "Kernels marked for deletion:\n" if [ $(vkpurge list | wc -l) -eq 0 ]; then printf "None" && sleep 1s else vkpurge list printf "\n" read -p "Purge? [Y/n] " a if [ "$a" = "Y" ] || [ "$a" = "y" ]; then sudo vkpurge rm all else clear printf "Cancelled" && sleep 1s fi fi } spell3() { sudo xbps-remove -Oo } spell4() { rm -rfv ~/.thumbnails/ rm -rfv ~/.cache/thumbnails/ } spell5() { rm -rfv ~/.cache/ } spell6() { if [ $(xbps-query -l | grep "^uu" | wc -l) -eq 0 ]; then printf "None" && sleep 1s else xbps-query -l | grep "^uu" printf "\n" read -p "Reconfigure? [Y/n] " a if [ "$a" = "Y" ] || [ "$a" = "y" ]; then sudo xbps-reconfigure -a printf "\nDone" && sleep 1s else clear printf "Cancelled" && sleep 1s fi fi } spell7() { sudo xbps-pkgdb -a printf "\n" read -p "Press ENTER to close " } spell8() { printf "All source packages will be downloaded in 'github-void' hidden folder.\n" printf "\n" read -p "Continue? [y/n] " a if [ "$a" = "Y" ] || [ "$a" = "y" ]; then if [ ! -d $HOME/.github-void/void-packages/ ]; then printf "\nLocal repository 'void-packages' doesn't exist.\nInitializing... (git clone)\n\n" mkdir $HOME/.github-void/ cd $HOME/.github-void/ git clone git://github.com/void-linux/void-packages.git cd $HOME else printf "\nLocal repository 'void-packages' already exists.\nUpdating... (git pull)\n\n" cd $HOME/.github-void/void-packages/ git pull cd $HOME fi clear printf "\nAvailable restricted packages:\n(https://docs.voidlinux.org/xbps/repositories/restricted.html)\n\n" grep -rl '^restricted=' $HOME/.github-void/void-packages/srcpkgs/ | cut -d '/' -f 7 | sort -n printf "\n" read -p "Press ENTER to close " else clear printf "Cancelled" && sleep 1s fi } spell9() { printf "\n \e[1mG A M I N G M O D E\e[0m\n |\n |------------ ON -> 1\n |----------- OFF -> 2\n |---------- INFO -> 3\n |--------- ABORT -> 0\n |\n |\n" read -p " |__________ Option: " a if [ "$a" = "1" ]; then clear #printf "\n\nStop Conky...\n" #killall conky #printf "\n\nStop Redshift...\n" #killall redshift && killall redshift-gtk printf "\n\nDisable compositor...\n" xfconf-query -c xfwm4 -p /general/use_compositing -s false ## Xfwm only, adapt to other compositors or comment this line printf "\n\nBoost CPU perfs...\n" sudo cpupower -c all frequency-set -g performance ## Should work with any AMD or Intel CPUs printf "\n\nBoost GPU perfs...\n" echo 'performance' | sudo tee /sys/class/drm/card0/device/power_dpm_state ## Recent AMD GPUs only (RX and Vega series) echo 'high' | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level ## Recent AMD GPUs only (RX and Vega series) #printf "Set swap threshold to optimized 90%...\n" #sudo sysctl vm.swappiness=10 && sudo swapoff -a && sudo swapon -a ## Swappiness should always be set on "10" with "sudo mkdir /etc/sysctl.d/ && echo 'vm.swappiness=10' | sudo tee /etc/sysctl.d/99-swappiness.conf" printf "\n\nDone!" printf "\nPS: CPU and GPU settings will revert to default after reboot." && sleep 2s ## Swappiness too elif [ "$a" = "2" ]; then clear #printf "\n\nLaunch Conky...\n" #conky -q #printf "\n\nLaunch Redshift...\n" #redshift-gtk printf "\n\nEnable compositor...\n" xfconf-query -c xfwm4 -p /general/use_compositing -s true ## Xfwm only, adapt to other compositors or comment this line printf "\n\nReset CPU perfs...\n" sudo cpupower -c all frequency-set -g ondemand ## Should work with any AMD or Intel CPUs; Recent Intel CPUs should use "powersave" instead of "ondemand" printf "\n\nReset GPU perfs...\n" echo 'balanced' | sudo tee /sys/class/drm/card0/device/power_dpm_state ## Recent AMD GPUs only (RX and Vega series) echo 'auto' | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level ## Recent AMD GPUs only (RX and Vega series) #printf "Set swap threshold to default 40%...\n" #sudo sysctl vm.swappiness=60 && sudo swapoff -a && sudo swapon -a ## Swappiness should always be set on "10" with "sudo mkdir /etc/sysctl.d/ && echo 'vm.swappiness=10' | sudo tee /etc/sysctl.d/99-swappiness.conf" printf "\n\nDone!" && sleep 1s elif [ "$a" = "3" ]; then clear printf "This function disables compositor then enables CPU and GPU max frequencies;\nIt will only work with: Xfwm + AMD or Intel CPUs + recent AMD GPUs;\nLook at the script' source code (spell9) for more details.\n\n" read -p "Press ENTER to close " else clear printf "Cancelled" && sleep 1s fi } spell0() { exit 0 } clear while [ 1 ];do clear cat << "EOF" _ _ __ __ _ _ /\ /\___ (_) __| / / /\ \ (_)______ _ _ __ __| | \ \ / / _ \| |/ _` \ \/ \/ / |_ / _` | '__/ _` | \ V / (_) | | (_| |\ /\ /| |/ / (_| | | | (_| | \_/ \___/|_|\__,_| \/ \/ |_/___\__,_|_| \__,_| EOF printf "\n \e[1m\e[35m1\e[0m \e[2m=>\e[0m \e[1mRun system update\e[0m ($CHKUPD available) \e[1m\e[35m2\e[0m \e[2m=>\e[0m \e[1mClean old kernels\e[0m \e[1m\e[35m3\e[0m \e[2m=>\e[0m \e[1mClean obsolete packages\e[0m \e[1m\e[35m4\e[0m \e[2m=>\e[0m \e[1mClean thumbnails cache\e[0m \e[1m\e[35m5\e[0m \e[2m=>\e[0m \e[1mClean global user cache\e[0m \e[1m\e[35m6\e[0m \e[2m=>\e[0m \e[1mCheck misconfigured packages\e[0m \e[1m\e[35m7\e[0m \e[2m=>\e[0m \e[1mCheck installed packages errors\e[0m \e[1m\e[35m8\e[0m \e[2m=>\e[0m \e[1mList restricted source packages\e[0m \e[1m\e[35m9\e[0m \e[2m=>\e[0m \e[1mToggle gaming mode\e[0m \e[1m\e[35m0\e[0m \e[2m=>\e[0m \e[1mQuit\e[0m \e[2m_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\e[0m \n" printf " \e[1m\e[35mOPTION:\e[0m " read _cast case $_cast in 1) clear spell1 sleep 1s ;; 2) clear spell2 sleep 1s ;; 3) clear spell3 sleep 1s ;; 4) clear spell4 sleep 1s ;; 5) clear spell5 sleep 1s ;; 6) clear spell6 sleep 1s ;; 7) clear spell7 sleep 1s ;; 8) clear spell8 sleep 1s ;; 9) clear spell9 sleep 1s ;; 0) clear spell0 break ;; esac done

Launcher

(To have a shortcut in your applications menu - change "Exec" path if necessary.)

/usr/local/share/applications/void-wizard.desktop - executable : yes (chmod +x)
Show/Hide [Desktop Entry] Type=Application Name=Void Wizard Comment=Helper for Void maintenance Exec=/usr/local/bin/void-scripts/void-wizard.sh Icon=void-wizard Terminal=true Categories=System;

PS: there's an icon available here, and Papirus icon theme provides one too.

Void-Updater

Don't launch scripts with "sh" prefix, some commands won't work because of the default shell.
(sudo) sh /path/to/script.sh -> is wrong
(sudo) /path/to/script.sh -> is right
cd /path/to/ && (sudo) ./script.sh -> is right

This tool shows number of available updates and asks if you want to apply them. At first glance it looks like a duplicate of "void-wizard.sh" script detailed above, but "void-updater" was mainly created to be connected with a service which, by default, checks every six hours at every sunday then send a notification if there are new packages.

If you prefer something lighter and simpler, take a look at the next chapter, "Xfce updates plugin".

Of course you can use "octoxbps" instead which is Void's (unofficial) graphical utility in Qt to manage packages and receive notifications. OctoXBPS is available in repos and usage is the same than Manjaro's Octopi.

Required packages: lynx snooze zenity. Edit paths if you don't put your scripts at the same place than me.

Main script

Change "XTRM" variable if your terminal isn't Xfce's.

/usr/local/bin/void-scripts/void-updater.sh - executable : yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux ### Required packages: sudo xbps-install -S lynx zenity readonly AVUP=$(xbps-install -nuM | wc -l) readonly XTRM=xfce4-terminal if [ ! -d ~/.snooze/ ]; then mkdir ~/.snooze/ fi date +%c > ~/.snooze/updater if [ $AVUP -gt 0 ]; then zenity --title="Void Updates" --name="Void Updates" --question --width=280 --height=140 --ok-label="Yes" --cancel-label="No" \ --window-icon="/usr/share/icons/Papirus/64x64/apps/distributor-logo-void.svg" --icon-name="system-software-update" \ --text "$AVUP update(s) available.\nDo you want to proceed?" if [ $? = 0 ]; then $XTRM -x '/usr/local/bin/void-scripts/execute.sh' else exit 0 fi else exit 0 fi

Auxiliary script

/usr/local/bin/void-scripts/execute.sh - executable : yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux printf "Known manual interventions:\n\n" if [ $(lynx -dump -nolist https://voidlinux.org/news/archive.html | grep -i "intervention" | wc -l) -eq 0 ]; then printf "None" && sleep 1s else lynx -dump -nolist https://voidlinux.org/news/archive.html | grep -i "intervention" printf "\n" read -p "Visit news page for more details? [Y/n] " a if [ "$a" = "Y" ] || [ "$a" = "y" ]; then lynx https://voidlinux.org/news/archive.html fi fi clear sudo xbps-install -Su read -p "Done! Press ENTER to close. "

Launcher

/usr/local/share/applications/void-updater.desktop - executable : yes (chmod +x)
Show/Hide [Desktop Entry] Type=Application Name=Void Updater Comment=Updates notification Exec=/usr/local/bin/void-scripts/void-updater.sh Icon=system-software-update Terminal=false Categories=System;

Service

WARNING! It seems to work, but I don't master "snooze" yet and didn't test longer enough. You could meet some weird behaviour, it's a "Work-In-Progress". However, there shouldn't be any serious damage.

If you have some improvements or fixes to submit, please send me a message on Reddit or an email.

Don't forget to change "xfce4-session" if you don't use Xfce, and every "alex" occurencies with your username.

/etc/sv/void-updater/run - executable : yes (chmod +x)
Show/Hide #!/bin/sh if pgrep -x xfce4-session > /dev/null then export DISPLAY=:0 export XAUTHORITY="/home/alex/.Xauthority" exec snooze -w0 -H/6 -t /home/alex/.snooze/updater \ chpst -u alex:alex /usr/local/bin/void-scripts/void-updater.sh else sleep 5m sv reload void-updater fi

sudo chmod 755 /etc/sv/void-updater/run
sudo ln -s /etc/sv/void-updater /var/service/

Xfce updates plugin

In order to receive updates alert without something as big as "Void-Updater", you can use Conky, or even better a powerful plugin for Xfce panel: "genmon ". Once configured, this plugin will check every six hours if some packages can be updated. If yes, then an icon will appear in the panel with a counter above, and if you hover it a tooltip with packages list will be displayed. Just click on the icon to update your system. Open this screenshot to see how it looks like (in French - here is the english version).

Install the plugin:

sudo xbps-install -S xfce4-genmon-plugin

Add it to the panel ("Generic Monitor") and configure it like this:

Command: /usr/local/bin/void-scripts/genmonup-check.sh
Label: unticked
Periods: 21600,00
Font name and size: similar to system font

Change (parsed) script path if you want; period is in seconds, so "21600" equals to 6 hours (H x 3600 = S).

Parsed script

/usr/local/bin/void-scripts/genmonup-check.sh - executable : yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux readonly NUPD=$(xbps-install -nuM | wc -l) readonly LUPD=$(xbps-install -nuM | awk '{print $1}') readonly TEXT1="available update(s):" readonly TEXT2="Click on icon to apply." readonly TRMNL="xfce4-terminal" PANEL="<click>$TRMNL -x '/usr/local/bin/void-scripts/genmonup-launch.sh'</click>" PANEL+="<img>$HOME/.genmonup-icon.svg</img>" PANEL+="<txt><span size='9000' weight='bold' rise='17000'>$NUPD</span></txt>" TOOLTIP="<tool>" TOOLTIP+="<span size='11000' weight='bold'>$NUPD $TEXT1</span>\n" TOOLTIP+="<span size='9000'>$LUPD</span>\n\n" TOOLTIP+="<span size='9000' weight='bold'>$TEXT2</span>" TOOLTIP+="</tool>" if [ $NUPD -gt 0 ]; then echo -e "${PANEL}" echo -e "${TOOLTIP}" else echo "" fi

Change "genmonup-launch.sh" script path if you don't put it at the same place than me. You can download the dedicated icon here. Feel free to open it in a text editor and change hex color code.

Performed script

/usr/local/bin/void-scripts/genmonup-launch.sh - executable : yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux ### Check manual interventions before updating #printf "Known manual interventions:\n\n" #if [ $(lynx -dump -nolist https://voidlinux.org/news/archive.html | grep -i "intervention" | wc -l) -eq 0 ]; then # printf "None" && sleep 1s #else # lynx -dump -nolist https://voidlinux.org/news/archive.html | grep -i "intervention" # printf "\n" # read -p "Visit news page for more details? [Y/n] " a # if [ "$a" = "Y" ] || [ "$a" = "y" ]; then # lynx https://voidlinux.org/news/archive.html # fi #fi #clear sudo xbps-install -Su xfce4-panel --plugin-event=genmon-5:refresh:bool:true printf "System updated!" && sleep 1s ### Delete obsolete packages and clean cache after updating clear printf "Cleaning cache and obsolete packages...\n\n" sudo xbps-remove -Oo ### Check obsolete kernels after updating clear printf "Kernels marked for deletion:\n\n" if [ $(vkpurge list | wc -l) -eq 0 ]; then printf "None" && sleep 1s else vkpurge list printf "\n" read -p "Purge? [Y/n] " a if [ "$a" = "Y" ] || [ "$a" = "y" ]; then sudo vkpurge rm all else clear printf "Cancelled" && sleep 1s fi fi ### End script clear read -p "Done! Press ENTER to close. "

⁎⁎⁎

It's important to edit the number in second script last line (here "5") with your plugin ID, which you can find in panel preferences, "Items" tab, then hover "Generic Monitor" to get details. If you don't do this plugin won't refresh until the next period timeout.

You can uncomment second script lines between "printf" and "clear" (included) to check manual interventions before updating (requires "lynx" package). In first script change icon path if you don't use the same one, and "TRMNL" variable if your terminal isn't the one from Xfce. Also change text size (size='11000', size='9000') and counter height (rise='17000') if output isn't optimal.

Second script, besides updating packages, will clean XBPS cache and obsolete packages, and old kernels too. If you want to disable this behavior, simply comment corresponding blocks.

PS: tooltip may be slow to show, or even won't show at all if packages list is too long.

Custom themes

Don't launch scripts with "sh" prefix, some commands won't work because of the default shell.
(sudo) sh /path/to/script.sh -> is wrong
(sudo) /path/to/script.sh -> is right
cd /path/to/ && (sudo) ./script.sh -> is right

I've modified Plata GTK theme and Papirus icons set to obtain a modern (while basic) interface that suits Void's branding. Everything comes from two scripts explained here. You can take them in my archive or directly copy-paste the two following code blocks each in a ".sh" file then make them executable and launch them in a terminal.

⇒ Screenshot #1
⇒ Screenshot #2

I recommend "Ubuntu 11" and "Ubuntu Mono 13" or "Noto Sans 11" and "Noto Sans Mono 11" fonts (installable from repos).

Use these scripts to update the themes once in a while, they receive new commits regularly.

GTK script

Remark: MATE and KDE Plasma environments aren't supported by upstream GTK theme.

/usr/local/bin/void-scripts/plata-custom-void.sh - executable : yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux echo "Cleaning older versions..." sudo xbps-remove -Ry plata-theme sudo rm -rf /usr/share/themes/{Plata,Plata-Compact,Plata-Lumine,Plata-Lumine-Compact,Plata-Noir,Plata-Noir-Compact} echo "Installing requirements..." sudo xbps-install -Sy autoconf automake ImageMagick inkscape optipng gdk-pixbuf-devel glib-devel libxml2 sassc parallel pkg-config ttf-ubuntu-font-family wget xz echo "Downloading upstream..." cd /tmp wget -O - https://gitlab.com/tista500/plata-theme/-/archive/master/plata-theme-master.tar.gz | tar xz cd plata-theme-master echo "Customizing upstream..." for thirdrc in src/gtk/gtk-2.0/3rd-party*; do cat << "EOF" >> "$thirdrc" ### Xfce panel tasklist style "xfce-tasklist-style" { XfceTasklist::max-button-length = 300 XfceTasklist::ellipsize-mode = PANGO_ELLIPSIZE_END XfceTasklist::minimized-icon-lucency = 50 } class "XfceTasklist" style "xfce-tasklist-style" EOF done ### with GNOME & CINNAMON support #sed -i "s/Roboto/Ubuntu, Roboto/g" src/shell/sass/cinnamon/_common.scss #sed -i "s/Roboto/Ubuntu, Roboto/g" src/shell/sass/gnome-shell/_common.scss #sed -i 's/symbolic/regular/g' src/shell/sass/gnome-shell/_common.scss #./autogen.sh --prefix=/usr --enable-parallel --enable-plank --with-selection_color=#478061 --with-accent_color=#478061 --with-suggestion_color=#478061 --with-destruction_color=#478061 ### without GNOME & CINNAMON support ./autogen.sh --prefix=/usr --enable-parallel --enable-plank --disable-gnome --disable-cinnamon --disable-flashback --with-selection_color=#478061 --with-accent_color=#478061 --with-suggestion_color=#478061 --with-destruction_color=#478061 echo "Generating themes..." make echo "Installing themes..." sudo make install sudo cp /usr/share/themes/Plata-Noir/gtksourceview/plata-dark.xml /usr/share/gtksourceview-3.0/styles/ sudo cp /usr/share/themes/Plata-Lumine/gtksourceview/plata-light.xml /usr/share/gtksourceview-3.0/styles/ ### horizontal mirror to maximize-toggled buttons for leftside use (xfwm & openbox) sudo mogrify -flop /usr/share/themes/{Plata,Plata-Lumine,Plata-Noir}/xfwm4/maximize-toggled-active.png sudo mogrify -flop /usr/share/themes/{Plata,Plata-Lumine,Plata-Noir}/xfwm4/maximize-toggled-inactive.png sudo mogrify -flop /usr/share/themes/{Plata,Plata-Lumine,Plata-Noir}/xfwm4/maximize-toggled-prelight.png sudo mogrify -flop /usr/share/themes/{Plata,Plata-Lumine,Plata-Noir}/xfwm4/maximize-toggled-pressed.png sudo wget -qO /usr/share/themes/Plata/openbox-3/max_toggled.xbm https://alkusin.net/voidlinux/extras/themes/openbox/leftside_max_toggled.xbm sudo wget -qO /usr/share/themes/Plata-Lumine/openbox-3/max_toggled.xbm https://alkusin.net/voidlinux/extras/themes/openbox/leftside_max_toggled.xbm sudo wget -qO /usr/share/themes/Plata-Noir/openbox-3/max_toggled.xbm https://alkusin.net/voidlinux/extras/themes/openbox/leftside_max_toggled.xbm ### openbox menu with void colors sudo wget -qO /usr/share/themes/Plata/openbox-3/themerc https://alkusin.net/voidlinux/extras/themes/openbox/plata-std-ob-void sudo wget -qO /usr/share/themes/Plata-Lumine/openbox-3/themerc https://alkusin.net/voidlinux/extras/themes/openbox/plata-lte-ob-void sudo wget -qO /usr/share/themes/Plata-Noir/openbox-3/themerc https://alkusin.net/voidlinux/extras/themes/openbox/plata-drk-ob-void echo "Cleaning downloaded files..." cd .. rm -rf plata-theme-master clear echo "Plata-Custom-Void: done!"

Comment lines in « horizontal mirror » section if your window buttons are rightside.

Icons script

/usr/local/bin/void-scripts/papirus-custom-void.sh - executable : yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux echo "Installing Papirus from source..." sudo xbps-remove -Ry papirus-icon-theme wget -qO- https://raw.githubusercontent.com/PapirusDevelopmentTeam/papirus-icon-theme/master/install.sh | sh sleep 2s echo "Changing colors..." sudo find /usr/share/icons/Papirus/*/places -type f -name "*.svg" -exec sed -i "s/5294e2/478061/gI" {} \; sudo find /usr/share/icons/Papirus/*/places -type f -name "*.svg" -exec sed -i "s/4877b1/2F5440/gI" {} \; sudo find /usr/share/icons/Papirus/*/places -type f -name "*.svg" -exec sed -i "s/1d344f/333333/gI" {} \; clear echo "Papirus-Custom-Void: done!"

⁎⁎⁎

For other colors than Void's green, similar scripts are available below. If you use default Papirus or my "Void" version after these variations, you'll have to reset icons with the papirus-folders -D command.

Bashrc file

Here are my "bash settings" with some useful aliases:

~/.bashrc - executable : no
Show/Hide # .bashrc ## If not running interactively, don't do anything [[ $- != *i* ]] && return THEMESEL() { clear printf "Select a theme:\n 0) Cancel\n 1) Standard\n 2) Dark\n 3) Light\n\n" read -p "Option: " a if [ "$a" = "1" ]; then xfconf-query -c xfwm4 -p /general/theme -s Plata xfconf-query -c xsettings -p /Net/ThemeName -s Plata-Compact xfconf-query -c xsettings -p /Net/IconThemeName -s Papirus xfconf-query -c xsettings -p /Gtk/CursorThemeName -s Vanilla-DMZ sed -i 's/DMZ-AA/DMZ/g' ~/.Xresources sed -i 's/DMZ-AA/DMZ/g' ~/.gtkrc-2.0 sed -i 's/DMZ-AA/DMZ/g' ~/.config/gtk-3.0/settings.ini cp .xfce-wireframe-mouse-dark.png .face #sed -i 's/grayscale-dark/grayscale-light/g' ~/.config/xfce4/panel/whiskermenu-1.rc sed -i 's/111111/f5f5f5/g' ~/.genmonup-icon.svg elif [ "$a" = "2" ]; then xfconf-query -c xfwm4 -p /general/theme -s Plata-Noir xfconf-query -c xsettings -p /Net/ThemeName -s Plata-Noir-Compact xfconf-query -c xsettings -p /Net/IconThemeName -s Papirus-Dark xfconf-query -c xsettings -p /Gtk/CursorThemeName -s Vanilla-DMZ sed -i 's/DMZ-AA/DMZ/g' ~/.Xresources sed -i 's/DMZ-AA/DMZ/g' ~/.gtkrc-2.0 sed -i 's/DMZ-AA/DMZ/g' ~/.config/gtk-3.0/settings.ini cp .xfce-wireframe-mouse-light.png .face #sed -i 's/grayscale-dark/grayscale-light/g' ~/.config/xfce4/panel/whiskermenu-1.rc sed -i 's/111111/f5f5f5/g' ~/.genmonup-icon.svg elif [ "$a" = "3" ]; then xfconf-query -c xfwm4 -p /general/theme -s Plata-Lumine xfconf-query -c xsettings -p /Net/ThemeName -s Plata-Lumine-Compact xfconf-query -c xsettings -p /Net/IconThemeName -s Papirus-Light xfconf-query -c xsettings -p /Gtk/CursorThemeName -s Vanilla-DMZ-AA sed -i 's/DMZ/DMZ-AA/g' ~/.Xresources sed -i 's/DMZ/DMZ-AA/g' ~/.gtkrc-2.0 sed -i 's/DMZ/DMZ-AA/g' ~/.config/gtk-3.0/settings.ini cp .xfce-wireframe-mouse-dark.png .face #sed -i 's/grayscale-light/grayscale-dark/g' ~/.config/xfce4/panel/whiskermenu-1.rc sed -i 's/f5f5f5/111111/g' ~/.genmonup-icon.svg fi xfce4-panel -r printf "\nDone! You may have to login again to apply changes." sleep 2s clear } ## Change themes to standard or dark or light alias change-theme='THEMESEL' ## Number of available package updates alias vchup='xbps-install -nuM | wc -l' ## Update packages alias vpu='sudo xbps-install -Su' ## Install package <package name> alias vpi='sudo xbps-install -S' ## Remove package <package name> alias vpr='sudo xbps-remove -R' ## Search package <package name> alias vpq='xbps-query -Rs' ## Clean obsolete packages alias vpc='sudo xbps-remove -Oo' ## Refresh Xfce updates icon alias genmon-refresh='xfce4-panel --plugin-event=genmon-5:refresh:bool:true' ## Edit notes displayed in Conky alias notes='nano ~/.conkytodo' ## Install/Update custom Void gtk and icon themes alias void-gtk='/usr/local/bin/void-scripts/plata-custom-void.sh' alias void-ico='/usr/local/bin/void-scripts/papirus-custom-void.sh' ## Switch on/off Xfce compositor - could help in some games alias toggle-compositor='xfconf-query -c xfwm4 -p /general/use_compositing -T' ## Enhance some commands alias ls='ls --color=auto --group-directories-first' alias grep='grep --color=auto' ## Custom prompt export PS1="\[\033[38;5;222m\][\u@\h]\[$(tput sgr0)\]\[\033[38;5;137m\]\\$\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]"

Lock screen

When I lock my computer, I want to display time of day in big font, so I mixed together "tty-clock" and "physlock". The latter is more secure than several other lockers because it also blocks console access.

Required packages: physlock tty-clock wmctrl. You'll have to change some bits if you don't use Xfce.

/usr/local/bin/void-scripts/lock.sh - executable : yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux ### Required packages: sudo xbps-install -S physlock tty-clock wmctrl wmctrl -k on xfconf-query -c xfce4-panel -p /panels/panel-1/autohide-behavior -s 2 xfce4-terminal --fullscreen --hide-menubar --hide-scrollbar --color-bg=#000 --font='Monospace 35' -e 'tty-clock -cDC 7' && if ! pgrep -x "tty-clock" > /dev/null; then physlock -dsm xfconf-query -c xfce4-panel -p /panels/panel-1/autohide-behavior -s 0 wmctrl -k off fi exit 0

You can put the path of this script as a lock screen command in your menu, for example it's possible with "Whisker" menu of Xfce. You could keybind it too.

Press "Q" to close the screensaver then type your password once asked for.

The "wmctrl" command minimize all windows and "xfconf" command hide panel (change number "1" if it's not your panel ID), it gives more privacy especially if you set your terminal with less opacity (which provides a beautiful effect to the clock). Of course everything is restored when you quit the lock screen.

Logo in console

Don't launch scripts with "sh" prefix, some commands won't work because of the default shell.
(sudo) sh /path/to/script.sh -> is wrong
(sudo) /path/to/script.sh -> is right
cd /path/to/ && (sudo) ./script.sh -> is right

A nimble script to generate a new "/etc/issue" file in order to display Void's logo inside Linux console (TTY) - pretty nice if like me you login from it. Copy-paste below code as is, the ASCII art will be correctly applied even if layout in the script looks weird. PS: original ASCII logo comes from "neofetch", I've only transposed it.

⇒ Screenshot

voidtty.sh - executable : yes (chmod +x)
Show/Hide #!/bin/bash # https://alkusin.net/voidlinux echo -ne "\e[H\e[2J" > /etc/issue echo -ne "\e[2m" >> /etc/issue tee -a /etc/issue >/dev/null << "EOF" \s \r (\l) EOF echo -e "\e[0;32m __.;=====;.__" >> /etc/issue echo -e " _.=+==++=++=+=+===;." >> /etc/issue echo -e " -=+++=+===+=+=+++++=_" >> /etc/issue echo -e " . -=:\`\` \`--==+=++==." >> /etc/issue echo -e " _vi, \` --+=++++:" >> /etc/issue echo -e " .uvnvi. _._ -==+==+." >> /etc/issue echo -e " .vvnvnI\` .;==|==;. :|=||=|." >> /etc/issue echo -e " \e[1;32m+QmQQm\e[0;32mpvvnv; \e[1;32m_yYsyQQWUUQQQm #QmQ#\e[0;32m:\e[1;32mQQQWUV\$QQm." >> /etc/issue echo -e " -QQWQW\e[0;32mpvvo\e[1;32mwZ?.wQQQE\e[0;32m==<\e[1;32mQWWQ/QWQW.QQWW\e[0;32m(: \e[1;32mjQWQE" >> /etc/issue echo -e " -\$QQQQmmU\' jQQQ\@\e[0;32m+=<\e[1;32mQWQQ)mQQQ.mQQQC\e[0;32m+;\e[1;32mjWQQ\@'" >> /etc/issue echo -e " -\$WQ8Y\e[0;32mnI: \e[1;32mQWQQwgQQWV\e[0;32m\`\e[1;32mmWQQ.jQWQQgyyWW\@!\e[0;32m" >> /etc/issue echo -e " -1vvnvv. \`~+++\` ++|+++" >> /etc/issue echo -e " +vnvnnv, \`-|===" >> /etc/issue echo -e " +vnvnvns. . :=-" >> /etc/issue echo -e " -Invnvvnsi..___..=sv=. \`" >> /etc/issue echo -e " +Invnvnvnnnnnnnnvvnn;." >> /etc/issue echo -e " ~|Invnvnvvnvvvnnv}+\`" >> /etc/issue echo -e " -~|{*l}*|~\e[0m" >> /etc/issue echo -e "\e[0m" >> /etc/issue echo -e " " >> /etc/issue echo -e " " >> /etc/issue

sudo ./voidtty.sh

Reboot and you're done! If you don't want to get rid of boot messages once logo is shown (they can be useful to diagnose any problem), you can delete the first command but in that case remove one of the two (>) symbols from the second command (echo -ne "\e[2m" >> /etc/issue).

To avoid user prompt and directly type your password (tty1 only):
sudo sed -i "s/--noclear/--noclear\ --skip-login\ --login-options=$USER/g" /etc/sv/agetty-tty1/conf
(you still can have an user prompt after giving a wrong password)

Maximum performance

Some useful commands to make the most of a PC in a gaming usage.

For your information, everything is automatically actionable in my "Void-Wizard" script.

CPU

(tested with an AMD Ryzen5 - values may be different for another brand/model)

Check current frequencies:
sudo cpupower -c all frequency-info | grep -P 'current CPU frequency'

Boost frequencies:
sudo cpupower -c all frequency-set -g performance

Set back to defaults:
sudo cpupower -c all frequency-set -g ondemand
For some Intel processors, it's better to set "powersave" instead of "ondemand".

Changes will reset at shutdown. However you can easily create a "runit" service with similar commands to have them at boot.

GPU

(tested with an AMD RX580 - values may be different for another brand/model)

Check current frequencies:
cat /sys/class/drm/card0/device/power_dpm_state
cat /sys/class/drm/card0/device/power_dpm_force_performance_level

Boost frequencies:
echo 'performance' | sudo tee /sys/class/drm/card0/device/power_dpm_state
echo 'high' | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level

Set back to defaults:
echo 'balanced' | sudo tee /sys/class/drm/card0/device/power_dpm_state
echo 'auto' | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level

Changes will reset at shutdown. However you can easily create a "runit" service with similar commands to have them at boot.

SWAP

Virtual memory "swap" is triggered when physical memory "RAM" is charged at 40% or more. This setting is ok for servers but not for home computers. Swap can slow your hard disk drive, so if you have enough RAM you should decrease "swappiness" from 60 to 10 to only trigger swap at 90% of charged RAM.

Temporary swappiness optimization:
sudo sysctl vm.swappiness=10
sudo swapoff -a && sudo swapon -a

Changes will reset at shutdown, except if you apply the following steps:

Permanent swappiness optimization:
sudo mkdir /etc/sysctl.d/
echo 'vm.swappiness=10' | sudo tee /etc/sysctl.d/99-swappiness.conf

Programs running in background

Disable Xfwm compositor:
xfconf-query -c xfwm4 -p /general/use_compositing -s false

Disable Redshift:
killall redshift && killall redshift-gtk

Disable Conky:
killall conky

Stop a service (for example "void-updater" can be disturbing while playing):
sudo sv stop void-updater

Tips and tricks

System-wide language

To see which locales are available in your system:

locale -a

To be sure that your desired language (french here) is applied everywhere:

You have to make these changes as root.

Add or modify these lines in "/etc/locale.conf":
LANG=fr_FR.UTF-8
LC_COLLATE=fr_FR.UTF-8

Add or modify this line in "/etc/environment":
LANG=fr_FR.UTF-8

Then reboot to apply changes. To check if everything is correctly set:

locale

Remark: XBPS and some other components don't have any translations available.

⁎⁎⁎

Text optimization

In order to have better rendering, and above all fix the missing fonts issue on some websites, all you have to do is install some that are metrically compatible with the Microsoft ones then create a proper configuration file:

Substitute fonts:

sudo xbps-install -S fonts-croscore-ttf

Configuration :

~/.config/fontconfig/fonts.conf - executable : no
Show/Hide <?xml version='1.0'?> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <fontconfig> <match target="font"> <edit mode="assign" name="antialias"> <bool>true</bool> </edit> <edit mode="assign" name="hinting"> <bool>true</bool> </edit> <edit mode="assign" name="autohint"> <bool>false</bool> </edit> <edit mode="assign" name="hintstyle"> <const>hintslight</const> </edit> <edit mode="assign" name="rgba"> <const>rgb</const> </edit> <edit mode="assign" name="lcdfilter"> <const>lcddefault</const> </edit> <edit mode="assign" name="embeddedbitmap"> <bool>false</bool> </edit> <alias> <family>Arial</family> <prefer><family>Arimo</family></prefer> </alias> <alias> <family>Helvetica</family> <prefer><family>Arimo</family></prefer> </alias> <alias> <family>Times</family> <prefer><family>Tinos</family></prefer> </alias> <alias> <family>Courier</family> <prefer><family>Tinos</family></prefer> </alias> <alias> <family>Consolas</family> <prefer><family>Cousine</family></prefer> </alias> <alias> <family>Terminal</family> <prefer><family>Cousine</family></prefer> </alias> </match> </fontconfig>

⁎⁎⁎

Numpad enabled at boot

You have to make these changes as root in "/etc/rc.local" file.

Add this block:
# Numlock at boot
for tty in /dev/tty[1-6]*;
do
setleds -D +num < $tty > /dev/null
done

⁎⁎⁎

Pulseaudio

You have to make these changes as root in "/etc/pulse/daemon.conf" file.

Avoid CPU saturation because of logs:

Change "log-level" line which is set on "notice" with:
log-level = error

(and uncomment by removing the semi-colon if any)

Get better audio quality:

Change these lines with the following indicated values:
default-sample-format = s24le
default-sample-rate = 44100
alternate-sample-rate = 48000


(and uncomment by removing the semi-colon if any)

⁎⁎⁎

Change DNS

Create (as root) the "/etc/resolv.conf.head" file with this content:

### DNS Watch
#nameserver 84.200.69.80
#nameserver 84.200.70.40

### UncensoredDNS
#nameserver 91.239.100.100
#nameserver 89.233.43.71

### FrenchDataNetwork
#nameserver 80.67.169.12
#nameserver 80.67.169.40

### Quad9
#nameserver 9.9.9.9
#nameserver 149.112.112.112

### Cloudflare
#nameserver 1.1.1.1
#nameserver 1.0.0.1

### Google Public DNS
#nameserver 8.8.8.8
#nameserver 8.8.4.4


(uncomment by removing each # in front of the two "nameserver" lines of the provider you want to use)

Useful if you only kept "dhcpcd" instead of installing a GUI like NetworkManager.

⁎⁎⁎

Block crypto-currencies miners

They steal your own machine' resources to make money when you browse some websites.

Add (as root) the whole content of this file at the end of your "/etc/hosts" to prevent this situation.

Wallpapers

These backgrounds are included in the second chapter' archive.

WIP...

These backgrounds aren't included in the second chapter' archive (heavy files).

WIP...