アルクシン


Last edit: June 20th 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

  • • Standalone so free of any constraints
  • • Continuously updated (rolling release)
  • • Incredibly rock solid for a rolling distro
  • • No systemd, meaning no tentacular mess full of vulnerabilities
  • • XBPS is very complete and extremely fast
  • • No potentially dangerous third party packages like AUR...
  • • ...and devs gladly add requests to official repos
  • • Building personal packages is relatively easy
  • • You have control over everything, nothing is imposed
  • • Community is very friendly, and so far no elitism like what some Arch users do
  • • LibreSSL replaces OpenSSL (remember Heartbleed?)
  • • A musl version is available (in addition to the glibc one)
  • • European roots (Spain, Germany)
  • • System is very responsive from start to shutdown

Cons

  • • Standalone so less information and help online
  • • A rolling distro still can explode without any warning
  • • No systemd, meaning no automated management of some components
  • • XBPS' syntax is unnecessarily complicated (unlike APT or DNF which are crystal clear: "xxx install", "xxx update", etc.)
  • • Small team so Void could disappear at anytime...
  • • ...it also means fewer packages than Debian/Ubuntu/Arch+AUR
  • • Difficult to set up because you have to do almost everything from scratch
  • • Very small community, and some devs are sometimes a bit harsh in my opinion
  • • Documentation is more than sparse, fortunately Arch's wiki is often helpful

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 06/18/19
⇒ Download my files - updated 06/18/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".

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 fix the missing fonts on websites, all you have to do is install popular web fonts and some that are metrically compatible with the Microsoft ones, then create proper configuration files:

Substitute/additional fonts:

sudo xbps-install -S google-fonts-ttf

Firefox (about:config):

gfx.font_rendering.fontconfig.max_generic_substitutions = 127

Rules symlinks:

sudo ln -s /usr/share/fontconfig/conf.avail/10-hinting-slight.conf /etc/fonts/conf.d/
sudo ln -s /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d/
sudo ln -s /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d/
sudo ln -s /usr/share/fontconfig/conf.avail/50-user.conf /etc/fonts/conf.d/
sudo ln -s /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.d/

Fonts configuration:


~/.config/fontconfig/fonts.conf - executable: no
<?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>
	</match>
</fontconfig>

~/.Xresources - executable: no
Xft.antialias:	1
Xft.hinting:	1
Xft.autohint:	0
Xft.hintstyle:	hintslight
Xft.rgba:	rgb
Xft.lcdfilter:	lcddefault

Force "Infinality" v38 rendering (optional):


/etc/profile.d/freetype2.sh - executable: no
# Subpixel hinting mode can be chosen by setting the right TrueType interpreter
# version. The available settings are:
#
# truetype:interpreter-version=35 # Classic mode (default in 2.6)
# truetype:interpreter-version=38 # Infinality mode
# truetype:interpreter-version=40 # Minimal mode (default in 2.7)
#
# There are more properties that can be set, separated by whitespace. Please
# refer to the FreeType documentation for details.

# Uncomment and configure below

export FREETYPE_PROPERTIES="truetype:interpreter-version=38"

I also went a bit further by calculating and forcing my DPI. With a 24 inches screen having a resolution of 1920x1080, according to this online tool ideal DPI should be around 92 for my monitor. Another important thing is that it's telling me that 531x299mm is the size of my screen (active surface), which is true. Calculate your own values and add this data in relevant files:


~/.Xresources - executable: no
...(other rules)...
Xft.dpi:	92

~/.config/fontconfig/fonts.conf - executable: no
...(other rules)...
	<match target="pattern">
		<edit mode="assign" name="dpi">
			<double>92</double>
		</edit>
	</match>

/etc/X11/xorg.conf.d/20-monitor.conf - executable: no
Section "Monitor"
    Identifier    "HDMI-A-1"
    DisplaySize    531 299
EndSection

Firefox (about:config):

layout.css.dpi = 92

You can find your monitor's ID with xrandr --props | grep 'connected' | grep -v 'dis'. Change DPI in your DE settings too. After reboot, check that these values are correctly applied with "/var/log/Xorg.0.log" file and xdpyinfo | grep -B1 resolution command.

‧‧‧

Now I have a pixel perfect text rendering. Of course these settings are what I find comfortable and readable, feel free to use other hinting than "slight" or grayscale rendering instead of RGB.

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)

#!/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 --icon='system-software-update' --title='XBPS - update'"

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)
#!/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

clear

### Delete obsolete packages and clean cache
printf "Cleaning cache and obsolete packages...\n\n"
sudo xbps-remove -Oo

clear

### Check and purge old kernels
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
      printf "Cancelled" && sleep 1s
    fi
fi

clear

### End script
printf "System updated!\n"
read -p "Press ENTER to close. "
exit 0

### End script alt
#notify-send --icon=system-software-update "System update complete."
#exit 0

‧‧‧

It's important to edit the number attributed to "genmon" in the second script (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.

Bashrc file

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

  • change-theme -> call "THEMESEL" function to toggle light/dark themes
  • boost -> call "GAMEMODE" function to enable high performance
  • vchup -> give number of available updates (VCHUP: Void CHeck UPdates)
  • vpu -> shortcut to update packages (VPU: Void Packages Update)
  • vpi -> shortcut to install package(s) (VPI: Void Packages Install)
  • vpr -> shortcut to remove package(s) (VPR: Void Packages Remove)
  • vpq -> shortcut to search package (VPQ: Void Packages Query)
  • vpc -> shortcut to clean packages cache (VPC: Void Packages Clean)
  • genmon-refresh -> refresh Xfce updates plugin
  • notes -> edit notes shown in Conky
  • void-gtk -> install/update custom GTK theme
  • void-ico -> install/update custom icon theme
  • ls -> add colors to "ls" and sort folders first
  • grep -> add colors to "grep"

~/.bashrc - executable: no
# .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
      cat > ~/.gtkrc-2.0 << EOF
gtk-icon-theme-name = "Papirus"
gtk-theme-name = "Plata-Compact"
gtk-font-name = "Ubuntu 11"
gtk-cursor-theme-name = "Vanilla-DMZ"
EOF
      cat > ~/.config/gtk-3.0/settings.ini << EOF
[Settings]
gtk-icon-theme-name = Papirus
gtk-theme-name = Plata-Compact
gtk-font-name = Ubuntu 11
gtk-cursor-theme-name = Vanilla-DMZ
gtk-recent-files-enabled=0
EOF
      xfconf-query -c xsettings -p /Net/IconThemeName -s Papirus
      xfconf-query -c xsettings -p /Net/ThemeName -s Plata-Compact
      xfconf-query -c xfwm4 -p /general/theme -s Plata-Compact
      xfconf-query -c xsettings -p /Gtk/CursorThemeName -s Vanilla-DMZ
      sed -i 's/DMZ-AA/DMZ/g' ~/.Xresources
      cp ~/.xfce-wireframe-mouse-dark.png ~/.face
      #sed -i 's/grayscale-dark/grayscale-light/g' ~/.config/xfce4/panel/whiskermenu-1.rc
      sed -i 's/start-black/start-white/g' ~/.config/xfce4/panel/whiskermenu-1.rc
      sed -i 's/111111/f5f5f5/g' ~/.genmonup-icon.svg
    elif [ "$a" = "2" ]; then
      cat > ~/.gtkrc-2.0 << EOF
gtk-icon-theme-name = "Papirus-Dark"
gtk-theme-name = "Plata-Noir-Compact"
gtk-font-name = "Ubuntu 11"
gtk-cursor-theme-name = "Vanilla-DMZ"
EOF
      cat > ~/.config/gtk-3.0/settings.ini << EOF
[Settings]
gtk-icon-theme-name = Papirus-Dark
gtk-theme-name = Plata-Noir-Compact
gtk-font-name = Ubuntu 11
gtk-cursor-theme-name = Vanilla-DMZ
gtk-recent-files-enabled=0
EOF
      xfconf-query -c xsettings -p /Net/IconThemeName -s Papirus-Dark
      xfconf-query -c xsettings -p /Net/ThemeName -s Plata-Noir-Compact
      xfconf-query -c xfwm4 -p /general/theme -s Plata-Noir-Compact
      xfconf-query -c xsettings -p /Gtk/CursorThemeName -s Vanilla-DMZ
      sed -i 's/DMZ-AA/DMZ/g' ~/.Xresources
      cp ~/.xfce-wireframe-mouse-light.png ~/.face
      #sed -i 's/grayscale-dark/grayscale-light/g' ~/.config/xfce4/panel/whiskermenu-1.rc
      sed -i 's/start-black/start-white/g' ~/.config/xfce4/panel/whiskermenu-1.rc
      sed -i 's/111111/f5f5f5/g' ~/.genmonup-icon.svg
    elif [ "$a" = "3" ]; then
      cat > ~/.gtkrc-2.0 << EOF
gtk-icon-theme-name = "Papirus-Light"
gtk-theme-name = "Plata-Lumine-Compact"
gtk-font-name = "Ubuntu 11"
gtk-cursor-theme-name = "Vanilla-DMZ-AA"
EOF
      cat > ~/.config/gtk-3.0/settings.ini << EOF
[Settings]
gtk-icon-theme-name = Papirus-Light
gtk-theme-name = Plata-Lumine-Compact
gtk-font-name = Ubuntu 11
gtk-cursor-theme-name = Vanilla-DMZ-AA
gtk-recent-files-enabled=0
EOF
      xfconf-query -c xsettings -p /Net/IconThemeName -s Papirus-Light
      xfconf-query -c xsettings -p /Net/ThemeName -s Plata-Lumine-Compact
      xfconf-query -c xfwm4 -p /general/theme -s Plata-Lumine-Compact
      xfconf-query -c xsettings -p /Gtk/CursorThemeName -s Vanilla-DMZ-AA
      sed -i 's/DMZ/DMZ-AA/g' ~/.Xresources
      cp ~/.xfce-wireframe-mouse-dark.png ~/.face
      #sed -i 's/grayscale-light/grayscale-dark/g' ~/.config/xfce4/panel/whiskermenu-1.rc
      sed -i 's/start-white/start-black/g' ~/.config/xfce4/panel/whiskermenu-1.rc
      sed -i 's/f5f5f5/111111/g' ~/.genmonup-icon.svg
    elif [ "$a" = "0" ]; then
      exit 0
    fi
  xfce4-panel -r
  printf "\nDone! You may have to login again to apply changes."
  sleep 2s
  clear
}

GAMEMODE() {
  clear
  printf "Select a mode:\n  0) Cancel\n  1) Normal CPU/GPU\n  2) Maximal CPU/GPU\n  3) Compositor only\n\n"
  read -p "Option: " a
    if [ "$a" = "1" ]; then
      sudo cpupower -c all frequency-set -g schedutil
      #echo 'balanced' | sudo tee /sys/class/drm/card0/device/power_dpm_state ### performance seems to be default
      echo 'auto' | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level
      xfconf-query -c xfwm4 -p /general/use_compositing -s true
    elif [ "$a" = "2" ]; then
      sudo cpupower -c all frequency-set -g performance
      #echo 'performance' | sudo tee /sys/class/drm/card0/device/power_dpm_state ### performance seems to be default
      echo 'high' | sudo tee /sys/class/drm/card0/device/power_dpm_force_performance_level
      xfconf-query -c xfwm4 -p /general/use_compositing -s false
    elif [ "$a" = "3" ]; then
      xfconf-query -c xfwm4 -p /general/use_compositing -T
    elif [ "$a" = "0" ]; then
      exit 0
    fi
  printf "\nDone! CPU/GPU changes will revert after reboot."
  sleep 2s
  clear
}

## Change themes to standard or dark or light
alias change-theme='THEMESEL'

## Change CPU/GPU perfs and toggle compositor
alias boost='GAMEMODE'

## 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'

## Run RKhunter and read log file
alias rk-run='sudo rkhunter -c --noappend-log'
alias rk-log='sudo cat /var/log/rkhunter.log | grep -i "warning"'

## 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)\]"

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 <1.22.2 and KDE Plasma environments aren't supported by upstream GTK theme.


/usr/local/bin/void-scripts/plata-custom-void.sh - executable: yes (chmod +x)
#!/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 make ImageMagick inkscape optipng gdk-pixbuf-devel glib-devel libxml2 sassc parallel pkg-config 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

  #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 --disable-gnome --disable-cinnamon --disable-mate --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-Compact,Plata-Lumine,Plata-Lumine-Compact,Plata-Noir,Plata-Noir-Compact}/xfwm4/maximize-toggled-active.png
  sudo mogrify -flop /usr/share/themes/{Plata,Plata-Compact,Plata-Lumine,Plata-Lumine-Compact,Plata-Noir,Plata-Noir-Compact}/xfwm4/maximize-toggled-inactive.png
  sudo mogrify -flop /usr/share/themes/{Plata,Plata-Compact,Plata-Lumine,Plata-Lumine-Compact,Plata-Noir,Plata-Noir-Compact}/xfwm4/maximize-toggled-prelight.png
  sudo mogrify -flop /usr/share/themes/{Plata,Plata-Compact,Plata-Lumine,Plata-Lumine-Compact,Plata-Noir,Plata-Noir-Compact}/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)
#!/bin/bash
# https://alkusin.net/voidlinux

echo "Installing Papirus from source..."

  sudo xbps-remove -Ry papirus-icon-theme papirus-folders
  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/1D1D1D/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.

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)
#!/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)
#!/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 schedutil
For some Intel processors, it's better to set "powersave" instead of "ondemand/schedutil".

Changes will reset at shutdown. However you can add this command in "/etc/rc.local" file to run it 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 add these commands in "/etc/rc.local" file to run 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

Other tips and tricks

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 following file:


/etc/resolv.conf.head - executable: no
### CleanBrowsing Security
#nameserver 185.228.168.9
#nameserver 185.228.169.9

### 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)

To update DNS without rebooting:
sudo resolvconf -u

To go further we can also use DNSCrypt to enhance security between client and resolver. In this case, don't create the "/etc/resolv.conf.head" file above, instead follow these steps:

sudo xbps-install -S dnscrypt-proxy


/etc/resolvconf.conf - executable: no
# Configuration for resolvconf(8)
# See resolvconf.conf(5) for details

resolv_conf=/etc/resolv.conf
# If you run a local name server, you should uncomment the below line and
# configure your subscribers configuration files below.
name_servers=127.0.0.1
resolv_conf_options=edns0

In file "/etc/dnscrypt-proxy.toml" at the server_names line we put the resolver we want, for example Quad9: server_names = ['quad9-dnscrypt-ip4-filter-pri', 'quad9-dnscrypt-ip4-filter-alt']. All compatible resolvers are listed in "/etc/public-resolvers.md". Then enable the service:

sudo ln -s /etc/sv/dnscrypt-proxy /var/service/

To update DNS without rebooting:
sudo resolvconf -u

Check your DNS settings at this website and for a more exhaustive diagnostic consult this one .

Finally we can improve Firefox security in "about:config":

network.trr.mode = 2
network.trr.uri = https://dns.quad9.net/dns-query
network.security.esni.enabled = true

‧‧‧

Easy to manage firewall

If "iptables" gives you headaches, you can use "UFW" with some simple rules:

sudo xbps-install -S ufw
sudo ln -s /etc/sv/ufw /var/service/
sudo ufw default deny
sudo ufw allow from 192.168.0.0/24
sudo ufw logging off
sudo ufw enable

Documentation is here . Now as I write, graphical interface "GUFW" doesn't work in Void.

‧‧‧

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.

‧‧‧

Install a virtual machine manager

"Virt-Manager" is in the repositories, but a few other steps are required to use it.

sudo xbps-install -S qemu virt-mananger
sudo usermod -aG kvm $USER
sudo usermod -aG libvirt $USER
sudo ln -s /etc/sv/libvirtd /var/service/
sudo ln -s /etc/sv/virtlogd /var/service/
sudo ln -s /etc/sv/virtlockd /var/service/

Wallpapers

Thumbnails are low quality. Click on them to download real images.
Rendering (colors, contrast) may vary depending on your monitor and its settings.

These backgrounds are my own design. Feel free to share/modify them but please credit me. External resources eventually used are copyright free. "Pexels" photographs come from the eponymous website and are copyright free too, I've simply cropped them and reduced their weight.

"Exodus" series is a total re-creation of the famous wallpaper by dpcdpc11 with Void's colors. I've got his permission via DeviantArt.

"Exodus" series


void-linux-wallpaper-exodus.png
Void-X Exodus
(3840 x 2160)

void-linux-wallpaper-exodus-day.png
Void-X Exodus Day
(3840 x 2160)

void-linux-wallpaper-exodus-night.png
Void-X Exodus Night
(3840 x 2160)

void-linux-wallpaper-exodus-noships.png
Void-X Exodus NoShips
(3840 x 2160)

void-linux-wallpaper-exodus-day-noships.png
Void-X Exodus Day NoShips
(3840 x 2160)

void-linux-wallpaper-exodus-night-noships.png
Void-X Exodus Night NoShips
(3840 x 2160)

void-linux-wallpaper-exodus-branded.png
Void-X Exodus Branded
(3840 x 2160)

void-linux-wallpaper-exodus-day-branded.png
Void-X Exodus Day Branded
(3840 x 2160)

void-linux-wallpaper-exodus-night-branded.png
Void-X Exodus Night Branded
(3840 x 2160)

void-linux-wallpaper-exodus-noships-branded.png
Void-X Exodus NoShips Branded
(3840 x 2160)

void-linux-wallpaper-exodus-day-noships-branded.png
Void-X Exodus Day NoShips Branded
(3840 x 2160)

void-linux-wallpaper-exodus-night-noships-branded.png
Void-X Exodus Night NoShips Branded
(3840 x 2160)

‧‧‧

"Basics" series


void-linux-wallpaper-polygons.png
Void Polygons
(3840 x 2160)

void-linux-wallpaper-society.png
Void Society
(3840 x 2160)

void-linux-wallpaper-space.png
Void Space
(3840 x 2160)

void-linux-wallpaper-olddwarf.png
Void OldDwarf
(3840 x 2160)

void-linux-wallpaper-youngdwarf.png
Void YoungDwarf
(3840 x 2160)

void-linux-wallpaper-irongrip.png
Void Irongrip
(3840 x 2160)

void-linux-wallpaper-shatters.png
Void Shatters
(3840 x 2160)

‧‧‧

"Supplements" series


void-linux-wallpaper-polygons-branded.png
Void-X Polygons Branded
(3840 x 2160)

void-linux-wallpaper-society-branded.png
Void-X Society Branded
(3840 x 2160)

void-linux-wallpaper-space-branded.png
Void-X Space Branded
(3840 x 2160)

void-linux-wallpaper-olddwarf-branded.png
Void-X OldDwarf Branded
(3840 x 2160)

void-linux-wallpaper-youngdwarf-branded.png
Void-X YoungDwarf Branded
(3840 x 2160)

void-linux-wallpaper-irongrip-branded.png
Void-X Irongrip Branded
(3840 x 2160)

void-linux-wallpaper-shatters-branded.png
Void-X Shatters Branded
(3840 x 2160)

void-linux-wallpaper-arcade.png
Void-X Arcade
(3840 x 2160)

void-linux-wallpaper-stripes.png
Void-X Stripes
(3840 x 2160)

void-linux-wallpaper-stripes-xfce.png
Void-X Stripes Xfce
(3840 x 2160)

void-linux-wallpaper-prophecy.png
Void-X Prophecy
(3840 x 2160)

void-linux-wallpaper-smoke.png
Void-X Smoke
(3840 x 2160)

void-linux-wallpaper-tech.png
Void-X Tech
(3840 x 2160)

void-linux-wallpaper-tech.png
Void-X Elegance
(3840 x 2160)

void-linux-wallpaper-wall.png
Void-X Wall
(3840 x 2160)

void-linux-wallpaper-cyber.png
Void-X Cyber
(3840 x 2160)

void-linux-wallpaper-radioaktivoid.png
Void-X Radioaktivoid
(3840 x 2160)

void-linux-wallpaper-nord.png
Void-X Nord
(3840 x 2160)

void-linux-wallpaper-gruvbox.png
Void-X Gruvbox
(3840 x 2160)

void-linux-wallpaper-retro.png
Void-X Retro
(3840 x 2160)

void-linux-wallpaper-draconic.png
Void-X Draconic
(3840 x 2160)

void-linux-wallpaper-cogs.png
Void-X Cogs
(3840 x 2160)

void-linux-wallpaper-waves.png
Void-X Waves
(3840 x 2160)

void-linux-wallpaper-waves-xfce.png
Void-X Waves Xfce
(3840 x 2160)

void-linux-wallpaper-abstract.png
Void-X Abstract
(3840 x 2160)

void-linux-wallpaper-abstract-xfce.png
Void-X Abstract Xfce
(3840 x 2160)

void-linux-wallpaper-embossed.png
Void-X Embossed
(3840 x 2160)

void-linux-wallpaper-embossed-xfce.png
Void-X Embossed Xfce
(3840 x 2160)

void-linux-wallpaper-camo.png
Void-X Camo
(3840 x 2160)

‧‧‧

"Tiles" series


aks-connect-tile.png
Connect
(256 x 256)

aks-classic-sw-blackswan-tile.png
Classic SW Blackswan
(256 x 256)

aks-classic-sw-roycroft-tile.png
Classic SW Roycroft
(256 x 256)

aks-classic-sw-sauge-tile.png
Classic SW Sauge
(256 x 256)

aks-classic-sw-spatial-tile.png
Classic SW Spatial
(256 x 256)

aks-classic-sw-taupe-tile.png
Classic SW Taupe
(256 x 256)

aks-classic-sw-woad-tile.png
Classic SW Woad
(256 x 256)

aks-crunchbang-asphalt-tile.png
Crunchbang Asphalt
(256 x 256)

aks-crunchbang-linen-tile.png
Crunchbang Linen
(256 x 256)

‧‧‧

"Pexels" series


pexels-11744.jpg
Pexels 11744
(1920 x 1080)

pexels-33041.jpg
Pexels 33041
(1920 x 1080)

pexels-35600.jpg
Pexels 35600
(1920 x 1080)

pexels-38136.jpg
Pexels 38136
(1920 x 1080)

pexels-301614.jpg
Pexels 301614
(1920 x 1080)

pexels-313782.jpg
Pexels 313782
(1920 x 1080)

pexels-325185.jpg
Pexels 325185
(1920 x 1080)

pexels-346529.jpg
Pexels 346529
(1920 x 1080)

pexels-459319.jpg
Pexels 459319
(1920 x 1080)

pexels-635279.jpg
Pexels 635279
(1920 x 1080)

pexels-956999.jpg
Pexels 956999
(1920 x 1080)

pexels-1033729.jpg
Pexels 1033729
(1920 x 1080)

pexels-1108701.jpg
Pexels 1108701
(1920 x 1080)

pexels-1141853.jpg
Pexels 1141853
(1920 x 1080)

pexels-1668246.jpg
Pexels 1668246
(1920 x 1080)

pexels-1809644.jpg
Pexels 1809644
(1920 x 1080)

pexels-2187605.jpg
Pexels 2187605
(1920 x 1080)

Icons

Some images of Void's logo, to use as menu buttons or graphics resources.