TROMjaro Forum

TROMjaro 2022.09.01 (Chaotic-Beta)

This time we have a very special release that will stay in Beta for a few months time until we make sure all works good. Any TROMjaro user can “upgrade” to this Beta following the steps bellow. Before that, let me tell you why this release is important:

Using the Chaotic AUR repo

Currently any TROMjaro user has access to 3 main “repos” or locations for applications: manjaro’s repos, AUR, and flatpak (via flathub). This way, from the get-go, you have access to pretty much any application that exists in Linux, from the Add/Remove software. How cool!

The AUR contains the most of these apps, but AUR merely tells your computer to “build” the apps/packages for you. Thus, many times, you need to wait minutes, and at times hours, to build a single app. Ungoogled Chromium takes many hours to build and gets constant updates, which means every update will take several hours…this is insanity. Yes, only rarely you’ll see such long build times, but even installing a desktop theme may take several minutes in certain cases.

Because of that we thought about adding the chaotic-aur repo to TROMjaro. This is a repository that automatically builds AUR packages, thousands of them. Some daily, some weekly, some hourly. This means, their server will build Ungoogled Chromium and when you install it, you grab it directly built. To install it from their repo takes seconds…compare that with several hours. Installing 40 themes from AUR may take an hour or so. 40 themes from Chaotic will take a minute perhaps. So yeah, the difference is MASSIVE.

You won’t really see any difference in the Add/Remove Software…so is all like before.

The major difference is that in the “Repositories” you get a lot more apps. Like it is shown in the screenshot, the priority that we recommend is: first see if you can find that package in Repositories since that’s the fastest and most reliable. If not search in AUR. And lastly in Flatpak.

And in the “Repositories” you can quickly see which package belongs to which repo. Everything is Manjaro’s, except chaotic-aur and TROMrepo.

Another advantage is that I do not have to maintain some 30 packages for the TROMrepo, since they are now packaged by Chaotic. It took me a lot of time to keep an eye on 30 packages, test, add to our repo, update, etc… Chaotic builds them automatically. I actually contacted the people behind Chaotic (they are very friendly) and I told them about TROMjaro and such. Anyone can recommend new package from AUR to them, here, and so we started to recommend a shit load of them. We prioritize our TROMjaro’s App Library. And so far they have added so many of our requests. This is awesome!

In all

The chaotic-aur repository helps us and you tremendously. And the more packages are added, the better. We will work on providing a few mirrors for them in the near future.

But the thing is that we do not know yet if it will conflict a bit with the Manjaro’s repos and such. For instance Chaotic will build Ungoogled Chromium against the AUR repository, and if the browser needs the LIBRARY 3.0 package, then is built against that. Then you find it in your Add/Remove Software and install it, but in the Manjaro’s repos the LIBRARY package is at version 2.0. Will Ungoogled Chromium work? I would say yes, but I cannot guarantee. This is at worst an issue with some rare packages and a temporary once until Manjaro updates their repos, and they do it monthly or so.

This is why this release is labeled as “beta”.

Implement it

If you already use TROMjaro, simply update your system then search for the following packages and install them: chaotic-keyring chaotic-mirrorlist powerpill.

Then go to the file /etc/pacman.conf, open as root (right click the file), and at the very bottom of it (very important) add this:

[chaotic-aur]
Include = /etc/pacman.d/chaotic-mirrorlist

Open Add/Remove Software.

Refresh your database:

Close Add/Remove Software, Open again. Then check to see if you can access the repository. For example if you search for Ungoogled Chromium you should be able to find it in Repositories.

If not try to do this command in the terminal: sudo pacman-key --populate chaotic

A few packages have changed

We are using slightly different packages now. We recommend you do the same. Remove one, install the other. rustdesk-bin to rustdesk, vala-panel-appmenu-registrar to vala-panel-appmenu-registrar-git and czkawka-gui-bin to czkawka-gui

We’ve also added these fonts as packages now (before were added in .fonts folder):

    ttf-dejavu
    ttf-ubuntu-font-family
    ttf-comfortaa
    ttf-aller
    audiowide-font
    ttf-bangers
    ttf-djb-zora-prints-fonts
    ttf-geosans-light
    fonts-kalam
    ttf-pacifico

These fonts are mostly useful for our TROM Books if anyone wants to edit them. The ttf-ubuntu-font-family is the main font that we use tho, so I recommend installing it.

Scripts move and change

I recommend that you move our custom scripts from .local/bin to /usr/bin.

Now edit the layout-switcher script. Replace all with:

#! /bin/bash
data="$HOME"/.local/share/tromjaro-layouts
icons=$data/icons
profiles=$data/profiles
enable-top-bar-integration() {
    # Enable global menus
    pacman -Qq vala-panel-appmenu-registrar-git ||
        zensu SKIP_AUTOSNAP= pacman -S --noconfirm vala-panel-appmenu-registrar-git ||
        { notify-send 'Error' 'failed installing vala-panel-appmenu-registrar-git !\nmake sure you type the correct password\nEnabling the internet connection might solve the issue'; exit; }
    pacman -Qq vala-panel-appmenu-registrar-git || exit

    # Hide window borders when maximized
    xfconf-query -c xfwm4 -p /general/borderless_maximize -n -t bool -s true &
    # Hide top bar of windows when maximized
    xfconf-query -c xfwm4 -p /general/titleless_maximize -n -t bool -s true &
    # Put window buttons on left side
    xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "CMH|" &
}
disable-top-bar-integration() {
    # Disable global menus
    ! pacman -Qq vala-panel-appmenu-registrar-git ||
        zensu SKIP_AUTOSNAP= pacman -R --noconfirm vala-panel-appmenu-registrar-git ||
        { notify-send 'Error' 'failed removing vala-panel-appmenu-registrar-git !\nmake sure you type the correct password'; exit; }
    pacman -Qq vala-panel-appmenu-registrar-git && exit
    killall appmenu-registrar &

    # Hide window borders when maximized
    xfconf-query -c xfwm4 -p /general/borderless_maximize -n -t bool -s true &
    # Don't hide top bar of windows when maximized
    xfconf-query -c xfwm4 -p /general/titleless_maximize -n -t bool -s false &
    # Put window buttons on right side
    xfconf-query -c xfwm4 -p /general/button_layout -n -t string -s "|HMC" &
}
choice=$(
yad --no-buttons --center --keep-icon-size --separator='' --use-interp --title 'Layout Switcher' --text-align=center --text 'Changing to or from any layout that has global menus, will require your admin password' --form --columns 3 \
--field=!"$icons/windows.png"!'Windows-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'Windows-Like'" \
--field=!"$icons/macos.png"!'MacOS-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'MacOS-Like'" \
--field=!"$icons/mx.png"!'MX-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'MX-Like'" \
--field=!"$icons/gnome.png"!'Gnome-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'Gnome-Like'" \
--field=!"$icons/unity.png"!'Unity-Like (default)':BTN "kill -USR1 \$YAD_PID; echo -n 'Unity-Like (default)'" \
--field=!"$icons/topx.png"!'TopX-Like':BTN "kill -USR1 \$YAD_PID; echo -n 'TopX-Like'"
)
case "$choice" in
    'Windows-Like')
        disable-top-bar-integration
        xfce4-panel-profiles load "$profiles"/Windows-Like.tar.bz2 & ;;
    'Unity-Like (default)')
        enable-top-bar-integration
        xfce4-panel-profiles load "$profiles"/Unity-Like.tar.bz2 & ;;
    'MX-Like')
        disable-top-bar-integration
        xfce4-panel-profiles load "$profiles"/MX-Like.tar.bz2 & ;;
    'MacOS-Like')
        enable-top-bar-integration
        xfce4-panel-profiles load "$profiles"/MacOS-Like.tar.bz2 & ;;
    'Gnome-Like')
        disable-top-bar-integration
        xfce4-panel-profiles load "$profiles"/Gnome-Like.tar.bz2 & ;;
    'TopX-Like')
        disable-top-bar-integration
        xfce4-panel-profiles load "$profiles"/TopX-Like.tar.bz2 & ;;
    *) exit ;;
esac

sleep 5 && notify-send "$choice layout was enabled"

Fix one bug with the Layout Switcher: the settings for the apps-bar won’t be saved if you switch between some profiles. Basically download the Macos and Gnome profiles and add them to .local/share/tromjaro-layouts/profiles/overwrite the old archives.

We’ve also renamed the Theme Switcher to TROMjaro Theme Switcher, you’ll see later why. Is not that important but so you know. Now update the TROMjaro Theme Switcher - in /usr/bin/theme-switcher with this

#!/bin/bash
icons="$HOME"/.local/share/Theme-Switcher

set_icon_theme() {
    # Change icon theme in XFCE
    xfconf-query -c xsettings -p /Net/IconThemeName -n -t string -s "$1"
    # Change icon theme in qt5ct configuration
    sed -i "s/^icon_theme=.*$/icon_theme=$1/" "$HOME"/.config/qt5ct/qt5ct.conf
}

set_theme() {
    if [ "${1##*-}" = 'Light' ]; then
        yad --image "dialog-question" --title '' --buttons-layout=center --text-align=center --button='DARK':1 --button='LIGHT':0 --text "Select the panels theme\n\nNote: dark panels may result in light icons over a light theme"
        case $? in
            1)
                # Enable dark panels
                xfconf-query -c xfce4-panel -p /panels/dark-mode -n -t bool -s true
                # Use the dark icon theme
                set_icon_theme zafiro-dark
                ;;
            0)
                # Disable dark panels
                xfconf-query -c xfce4-panel -p /panels/dark-mode -n -t bool -s false
                # Use the light icon theme
                set_icon_theme zafiro
                ;;
            *) exit ;;
        esac
    else
        # Use the dark icon theme
        set_icon_theme zafiro-dark
    fi
    # Change the main theme to the chosen one
    xfconf-query -c xsettings -p /Net/ThemeName -n -t string -s "Skeuos-$1"
    xfconf-query -c xfwm4 -p /general/theme -n -t string -s "Skeuos-$1-XFWM"
    gsettings set org.gnome.desktop.interface gtk-theme "Skeuos-$1"
    notify-send "Skeuos-$1 theme was enabled"
}

export -f set_icon_theme set_theme

yad --no-buttons --center --keep-icon-size --use-interp --title 'TROMjaro Theme Switcher' --text-align=center --text "A Theme Switcher for TROMjaro's default theme-set (Skeuos) and icon-set (Zafiro)." --form --columns 5 \
--field=!"$icons/Blue-Dark.png"!'Blue-Dark':FBTN "set_theme 'Blue-Dark'" \
--field=!"$icons/Violet-Dark.png"!'Violet-Dark':FBTN "set_theme 'Violet-Dark'" \
--field=!"$icons/Blue-Light.png"!'Blue-Light':FBTN "set_theme 'Blue-Light'" \
--field=!"$icons/Violet-Light.png"!'Violet-Light':FBTN "set_theme 'Violet-Light'" \
--field=!"$icons/Teal-Dark.png"!'Teal-Dark':FBTN "set_theme 'Teal-Dark'" \
--field=!"$icons/Orange-Dark.png"!'Orange-Dark':FBTN "set_theme 'Orange-Dark'" \
--field=!"$icons/Teal-Light.png"!'Teal-Light':FBTN "set_theme 'Teal-Light'" \
--field=!"$icons/Orange-Light.png"!'Orange-Light':FBTN "set_theme 'Orange-Light'" \
--field=!"$icons/Green-Dark.png"!'Green-Dark (default)':FBTN "set_theme 'Green-Dark'" \
--field=!"$icons/Brown-Dark.png"!'Brown-Dark':FBTN "set_theme 'Brown-Dark'" \
--field=!"$icons/Green-Light.png"!'Green-Light':FBTN "set_theme 'Green-Light'" \
--field=!"$icons/Brown-Light.png"!'Brown-Light':FBTN "set_theme 'Brown-Light'" \
--field=!"$icons/Magenta-Dark.png"!'Magenta-Dark':FBTN "set_theme 'Magenta-Dark'" \
--field=!"$icons/Yellow-Dark.png"!'Yellow-Dark':FBTN "set_theme 'Yellow-Dark'" \
--field=!"$icons/Magenta-Light.png"!'Magenta-Light':FBTN "set_theme 'Magenta-Light'" \
--field=!"$icons/Yellow-Light.png"!'Yellow-Light':FBTN "set_theme 'Yellow-Light'" \
--field=!"$icons/Red-Dark.png"!'Red-Dark':FBTN "set_theme 'Red-Dark'" \
--field=!"$icons/Grey-Dark.png"!'Grey-Dark':FBTN "set_theme 'Grey-Dark'" \
--field=!"$icons/Red-Light.png"!'Red-Light':FBTN "set_theme 'Red-Light'" \
--field=!"$icons/Grey-Light.png"!'Grey-Light':FBTN "set_theme 'Grey-Light'"

A few other changes

  • We removed a dependency for the timeshft autosnap. Basically if you uninstalled the timeshift-autosnap-manjaro package, TROMjaro would not be able to do some updates since it tries to make a backup before doing the updates. We highly, HIGHLY, recommend that you do not remove timeshift-autosnap-manjaro from your system, but if you do, then go to /etc/pacman.d/hooks/and edit the file 00-timeshift-autosnap.hook as root. Remove the last line AbortOnFail.
    This way you can install or remove timeshift-autosnap-manjaro at your will. The updates will go through. This change means that if the backup fails, the system will still update. It is a fine compromise for most users.

A proper fix for theming…

Ok. So. Theming in Linux is not ok. But this is for a different post. Basically we made theming great on TROMjaro as it applied to: GTK, GTK + Libadwaita, QT, QT5, and flatpaks. Most of the apps out there. But there were some issues that needed to be fixed.

QT6

This is the new kind of QT and we have to fix theming for it too. Now install 2 packages: qt6ct and qt6gtk2. Next go to the .config folder and create another one called qt6ct and inside of it a file called qt6ct.conf. Inside of it add:

[Appearance]
color_scheme_path=/usr/share/qt5ct/colors/airy.conf
custom_palette=false
icon_theme=zafiro-dark
standard_dialogs=default
style=gtk2

[Fonts]
fixed=@Variant(\0\0\0@\0\0\0 \0U\0\x62\0u\0n\0t\0u\0 \0\x43\0o\0n\0\x64\0\x65\0n\0s\0\x65\0\x64@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
general=@Variant(\0\0\0@\0\0\0 \0U\0\x62\0u\0n\0t\0u\0 \0\x43\0o\0n\0\x64\0\x65\0n\0s\0\x65\0\x64@(\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)

[Interface]
activate_item_on_single_click=0
buttonbox_layout=0
cursor_flash_time=1000
dialog_buttons_have_icons=0
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=0
wheel_scroll_lines=3

[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\vH\0\0\0\xd8\0\0\xe*\0\0\x3\xcc\0\0\vJ\0\0\0\xf4\0\0\xe(\0\0\x3\xca\0\0\0\x1\0\0\0\0\a\x80\0\0\vJ\0\0\0\xf4\0\0\xe(\0\0\x3\xca)

[Troubleshooting]
force_raster_widgets=1
ignored_applications=@Invalid()

Now QT follows suit.

Better flatpak fix

This solution is not pretty but works…

Got to /usr/bin (open as root). Create a file called fix-flatpaks-theming. In it add:

#!/bin/sh
while :; do
rm -r ~/.themes/* 2> /dev/null
rsync -av --progress /usr/share/themes/* ~/.themes/ --exclude Windowck
rsync -av --progress ~/.local/share/themes/* ~/.themes/ --exclude Windowck-dark
sleep 600
done

Save. Right click and Permissions then “Allow this file to run as a program.”. Now in the .profile file in your Home directory add this line fix-flatpaks-theming & maybe bellow fix-tweaked-desktop-files &. Reboot.

Fix the QT updates…

So…bloody hell if the QT gets an upgrade then it breaks the theming and some packages need to be reinstalled…sucks. So let’s try to fix it for good…

Let’s create a script in /usr/bin called reinstall-for-qt. Add this to it:

#!/bin/bash
rm /var/lib/pacman/db.lck  &
pacman --noconfirm -S qt5-styleplugins qt6gtk2

Save…right click, Permissions and make it run as a program. You know the drill by now.

This will reinstall the packages that need to be reinstalled. But when? Let’s tell it!

Create a “hook”. Go to usr/share/libalpm/hooks/ and create a file reinstall-for-qt.hook and put this into it:

[Trigger]
Operation = Upgrade
Type = Package
Target = qt5-base
Target = qt6-base


[Action]
Description = Reinstalling needed packages for theming QT applications...
When = PostTransaction
Exec = /usr/bin/reinstall-for-qt

Perfect! Now whenever there is an update to QT5 or QT6 the system will automatically update the right packages and theming will automatically work for QT…

Lastly, fix XFCE

All of the work we’ve done for theming works well when you use our Theme Switcher…but we want it to work in XFCE by default when using the main tool: Appearance. This is why we renamed that as TROMjaro Theme Switcher since it now forces a theme and icon set that are default to TROMjaro. But what if you want custom themes and icons?

For that we need to sync GTK with QT, in terms of themes and icons…

Make the last script. Again, /usr/bin and create fix-theming. Add this to it:

#!/bin/sh
sync_theme() {
	# Get the current system theme
	theme=$(xfconf-query -c xsettings -p /Net/ThemeName)
	# Find the best match for the xfwm4 theme that corresponds with the current system theme
	xfwm4_theme=$(find /usr/share/themes/ /usr/local/share/themes/ "$HOME"/.themes/ "$HOME"/.local/share/themes/ -mindepth 2 -maxdepth 2 -type d -name xfwm4 -printf '%h\n' 2>/dev/null | grep -o "/${theme}[^/]*$" | sort | head -n1)
	# If a match is not found then use the Default theme
	[ -z "$xfwm4_theme" ] && xfwm4_theme='Default'
	# Apply the xfwm4 theme
	xfconf-query -c xfwm4 -p /general/theme -n -t string -s "${xfwm4_theme#/}"
	# Apply the current theme with gsettings
	gsettings set org.gnome.desktop.interface gtk-theme "$theme"
}
sync_icon_theme() {
	# Get the current icon theme
	icon_theme=$(xfconf-query -c xsettings -p /Net/IconThemeName)
	# Apply the same theme in qt5ct and qt6ct configuration
	sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt5ct/qt5ct.conf
	sed -i "s/^icon_theme=.*$/icon_theme=$icon_theme/" "$HOME"/.config/qt6ct/qt6ct.conf
}
while :; do
	# Get the current system theme
	theme_new=$(xfconf-query -c xsettings -p /Net/ThemeName)
	# Get the current icon theme
	icon_theme_new=$(xfconf-query -c xsettings -p /Net/IconThemeName)

	# Run sync_theme if the new system theme doesn't match the previous one
	[ "$theme_new" != "$theme_prev" ] && sync_theme
	# Run sync_icon_theme if the new icon theme doesn't match the previous one
	[ "$icon_theme_new" != "$icon_theme_prev" ] && sync_icon_theme

	# The new values become the previous values
	theme_prev=$theme_new
	icon_theme_prev=$icon_theme_new

	sleep 3
done

Save, do the drill again.

Now add it to start on boot. Edit the same .profile file from your Home, and add yet another line fix-theming &. Please reboot now.

My god…so many fixes for theming. But the result is harmony. And we managed to sync the icon theme too, across GTK and QT. Not the font yet…it is the last soldier to hold onto that territory…but we may overcome that too in the near future idk…

Here’s a video I made showcasing these new features:

Install a few new themes

Now that all should work great, we have access to loads more repo-apps and the theming syncs across pretty much all Linux apps, why not install a few themes?! :smiley: - and for TROMjaro Chaotic-Beta we ship with several that we tested and work great.

icons:

    mint-y-icons
    mcmojave-circle-icon-theme
    papirus-icon-theme
    surfn-icons-git

themes:

    mint-themes
    layan-gtk-theme-git
    mojave-gtk-theme-git
    sweet-gtk-theme-nova-git

cursors:

bibata-cursor-theme
    bibata-cursor-translucent
    graphite-cursor-theme-git
    capitaine-cursors

We even changed the default cursor to Bibata-Modern-Ice.

REBOOT!

That’s all for now. If you test it let me know if you find any bugs and such.

Grab it from here.