TROMjaro Forum

TROMjaro Beta 2021.11.16

Added a few packages:

  • removed riseup-vpn-git and replaced with riseup-vpn.
  • added: gnome-calculator, evince, and gtkhash-thunar

A few other changes:

  • We have created some template files, so that when you right click in the File Manager you can create a new LibreOffice Spreadsheet, Document, and so forth. It is a handy little thing. Basically we added these files, to the Templates folder.
  • We improved a bit the code for the Global Menu toggle. Here is the new code:
    #! /bin/bash
    FILE1=/usr/lib/vala-panel/appmenu-registrar
    FILE2=/usr/lib/vala-panel/appmenu-registrar.OFF
    if [ -f "$FILE1" ]; then
        ## Disable Global Menu
        sudo -A mv "$FILE1" "$FILE2" || exit
        xfconf-query -c xfce4-panel -p /plugins/plugin-3/plugins/plugin-3/compact-mode -n -t bool -s true
        killall appmenu-registrar
        ## Reset panels and windows
        xfce4-panel -r &
        xfwm4 --replace &
        xfce4-panel &
        sleep 4 && notify-send 'Top menu DISABLED !' 'Restart your computer in order for this to work properly!'

    elif [ -f "$FILE2" ]; then
        ## Enable Global Menu
        sudo -A mv "$FILE2" "$FILE1" || exit
        xfconf-query -c xfce4-panel -p /plugins/plugin-3/plugins/plugin-3/compact-mode -n -t bool -s false
        ## Reset panels and windows
        xfce4-panel -r &
        xfwm4 --replace &
        xfce4-panel &
        sleep 4 && notify-send 'The top menu ENABLED !' 'Restart your computer in order for this to work properly!'

    else
        notify-send 'ERROR: is the Global Menu installed ?'
    fi

Copy this into the file .local/bin/global_menu_toggle

  • Muted the mic by default

  • Added a few new packages for the Settings Manager and inserted them into that cluster of settings. The packages are: antimicrox for game controllers, and guvcview for webcam control. To add such “apps” to the Settings Manager right click the Apps menu, then click “Edit Applications”. Find them, and move them to the Settings category. Now go to the folder .local/share/applications/ and find the .desktop file of that particular app. For example, for guvcview that file is called guvcview.desktop. Right click and edit it with the Text Editor. To the Category section add “X-XFCE-SettingsDialog;X-XFCE-HardwareSettings;” for the Hardware category. “X-XFCE-PersonalSettings;” for Personal Settings, “X-XFCE-SystemSettings;” for System, and “X-XFCE-OtherSettings;” for Other. All of them have to have the “X-XFCE-SettingsDialog;” too, so keep that in mind! Now you know how to add apps to the Settings Manager!

  • We added no opacity to the left side menu when hovering it, so that the icons are more visible. To do that right click the panel, then go to Panel Preferences. There in the Appearance tab select 100 for “Enter”.

  • We replaced Parole Media Player with SMplayer, simply because SMplayer is faster and works better overall. Remove the parole package and install these: smplayer, smplayer-skins, smplayer-themes. Now if you want a quick way to make all audio and video files open with smplayer, edit the file .config/mimeapps.list and under “[Added Associations]” remove all lines that start with audio or video with these:

audio/vnd.dts=smplayer.desktop;
audio/mp4=smplayer.desktop;
video/3gpp=smplayer.desktop;
video/3gpp2=smplayer.desktop;
video/annodex=smplayer.desktop;
video/dv=smplayer.desktop;
video/isivideo=smplayer.desktop;
video/mj2=smplayer.desktop;
video/mp2t=smplayer.desktop;
video/mp4=smplayer_enqueue.desktop;smplayer.desktop;
video/ogg=smplayer.desktop;
video/vnd.mpegurl=smplayer.desktop;
video/vnd.vivo=smplayer.desktop;
video/wavelet=smplayer.desktop;
video/x-anim=smplayer.desktop;
video/x-flic=smplayer.desktop;
video/x-matroska-3d=smplayer.desktop;
video/x-mng=smplayer.desktop;
video/x-msvideo=smplayer_enqueue.desktop;smplayer.desktop;
video/x-nsv=smplayer.desktop;
video/x-ogm+ogg=smplayer.desktop;
video/x-sgi-movie=smplayer.desktop;
x-content/video-bluray=smplayer.desktop;
x-content/video-dvd=smplayer.desktop;
x-content/video-hddvd=smplayer.desktop;
x-content/video-svcd=smplayer.desktop;
x-content/video-vcd=smplayer.desktop;
audio/amr=smplayer.desktop;
audio/amr-wb=smplayer.desktop;
audio/annodex=smplayer.desktop;
audio/basic=smplayer.desktop;
audio/midi=smplayer.desktop;
audio/mp2=smplayer.desktop;
audio/mpeg=smplayer.desktop;
audio/prs.sid=smplayer.desktop;
audio/usac=smplayer.desktop;
audio/vnd.audible.aax=smplayer.desktop;
audio/vnd.dts.hd=smplayer.desktop;
audio/webm=smplayer.desktop;
audio/x-aifc=smplayer.desktop;
audio/x-aiff=smplayer.desktop;
audio/x-amzxml=smplayer.desktop;
audio/x-ape=smplayer.desktop;
audio/x-gsm=smplayer.desktop;
audio/x-iriver-pla=smplayer.desktop;
audio/x-it=smplayer.desktop;
audio/x-m4b=smplayer_enqueue.desktop;smplayer.desktop;
audio/x-minipsf=smplayer.desktop;
audio/x-mo3=smplayer.desktop;
audio/x-mod=smplayer.desktop;
audio/x-ms-asx=smplayer.desktop;
audio/x-musepack=smplayer.desktop;
audio/x-pn-audibleaudio=smplayer.desktop;
audio/x-pn-realaudio-plugin=smplayer.desktop;
audio/x-psf=smplayer.desktop;
audio/x-riff=smplayer.desktop;
audio/x-s3m=smplayer.desktop;
audio/x-scpls=smplayer.desktop;
audio/x-speex=smplayer.desktop;
audio/x-stm=smplayer.desktop;
audio/x-voc=smplayer.desktop;
audio/x-tta=smplayer.desktop;
audio/x-wav=smplayer.desktop;
audio/x-wavpack=smplayer.desktop;
audio/x-wavpack-correction=smplayer.desktop;
audio/x-xi=smplayer.desktop;
audio/x-xm=smplayer.desktop;
audio/x-xmf=smplayer.desktop;
x-content/audio-cdda=smplayer.desktop;
x-content/audio-dvd=smplayer.desktop;
x-content/audio-player=smplayer.desktop;
application/ogg=smplayer.desktop;
application/mxf=smplayer.desktop;
application/vnd.adobe.flash.movie=smplayer.desktop;
application/octet-stream=smplayer.desktop;

Then under “[Default Applications]” do the same, and then add:

audio/vnd.dts=smplayer.desktop
video/3gpp=smplayer.desktop
video/3gpp2=smplayer.desktop
video/annodex=smplayer.desktop
video/dv=smplayer.desktop
video/isivideo=smplayer.desktop
video/mj2=smplayer.desktop
video/mp2t=smplayer.desktop
video/mp4=smplayer.desktop
video/ogg=smplayer.desktop
video/vnd.mpegurl=smplayer.desktop
video/vnd.vivo=smplayer.desktop
video/wavelet=smplayer.desktop
video/x-anim=smplayer.desktop
video/x-flic=smplayer.desktop
video/x-matroska-3d=smplayer.desktop
video/x-mng=smplayer.desktop
video/x-msvideo=smplayer.desktop
video/x-nsv=smplayer.desktop
video/x-ogm+ogg=smplayer.desktop
video/x-sgi-movie=smplayer.desktop
x-content/video-bluray=smplayer.desktop
x-content/video-dvd=smplayer.desktop
x-content/video-hddvd=smplayer.desktop
x-content/video-svcd=smplayer.desktop
x-content/video-vcd=smplayer.desktop
audio/amr=smplayer.desktop
audio/amr-wb=smplayer.desktop
audio/annodex=smplayer.desktop
audio/basic=smplayer.desktop
audio/midi=smplayer.desktop
audio/mp2=smplayer.desktop
audio/mp4=smplayer.desktop
audio/mpeg=smplayer.desktop
audio/prs.sid=smplayer.desktop
audio/usac=smplayer.desktop
audio/vnd.audible.aax=smplayer.desktop
audio/vnd.dts.hd=smplayer.desktop
audio/webm=smplayer.desktop
audio/x-aifc=smplayer.desktop
audio/x-aiff=smplayer.desktop
audio/x-amzxml=smplayer.desktop
audio/x-ape=smplayer.desktop
audio/x-gsm=smplayer.desktop
audio/x-iriver-pla=smplayer.desktop
audio/x-it=smplayer.desktop
audio/x-m4b=smplayer.desktop
audio/x-minipsf=smplayer.desktop
audio/x-mo3=smplayer.desktop
audio/x-mod=smplayer.desktop
audio/x-ms-asx=smplayer.desktop
audio/x-musepack=smplayer.desktop
audio/x-pn-audibleaudio=smplayer.desktop
audio/x-pn-realaudio-plugin=smplayer.desktop
audio/x-psf=smplayer.desktop
audio/x-riff=smplayer.desktop
audio/x-s3m=smplayer.desktop
audio/x-scpls=smplayer.desktop
audio/x-speex=smplayer.desktop
audio/x-stm=smplayer.desktop
audio/x-voc=smplayer.desktop
audio/x-tta=smplayer.desktop
audio/x-wav=smplayer.desktop
audio/x-wavpack=smplayer.desktop
audio/x-wavpack-correction=smplayer.desktop
audio/x-xi=smplayer.desktop
audio/x-xm=smplayer.desktop
audio/x-xmf=smplayer.desktop
x-content/audio-cdda=smplayer.desktop
x-content/audio-dvd=smplayer.desktop
x-content/audio-player=smplayer.desktop
application/ogg=smplayer.desktop
application/mxf=smplayer.desktop

Save the file!

Remove zombie apps

If say you install the application Peek, and then you rename it via the menu as “Desktop Recorder”, but then you will remove this app, you will still see it as “Desktop Recorder” in your apps. Living there like a zombie. This is awful and so far we could not find any solution for this. So, we had to invent one. We made a script. This is it:

#!/bin/bash
data="$HOME"/.local/share/applications/tweaked-desktop-files
detectfiles() {
	for file in "$HOME"/.local/share/applications/*.desktop; do
		[ -d "$file" ] || grep -xq "$file" "$data" && continue
		name=$(basename "$file") || continue
		[ -f /usr/share/applications/"$name" ] ||
			ls /var/lib/flatpak/app/*/current/active/files/share/applications/"$name" >/dev/null 2>&1 ||
			[ -f /var/lib/snapd/desktop/applications/"$name" ] &&
			echo "$file" >> "$data"
	done
}

fixfiles() {
	lastmod=$(stat -c "%Y" "$data")
	tmp="$(mktemp -u)"
	[ -f "$data" ] && cp "$data" "$tmp" && copied='true'
	[ "$copied" = 'true' ] && while IFS= read -r file; do
		[ -f "$file" ] || { sed -i "/^$file$/d" "$tmp" ; continue; }
		name=$(basename "$file") || continue
		[ -f /usr/share/applications/"$name" ] ||
			ls /var/lib/flatpak/app/*/current/active/files/share/applications/"$name" >/dev/null 2>&1 ||
			[ -f /var/lib/snapd/desktop/applications/"$name" ] ||
			mv "$file" "$file.bak"
	done < "$data"

	[ "$copied" = 'true' ] && [ "$(stat -c '%Y' "$data")" = "$lastmod" ] && mv "$tmp" "$data"

	for bakfile in "$HOME"/.local/share/applications/*.desktop.bak; do
		origfile="${bakfile/%.bak}"
		[ -f "$origfile" ] && continue
		name=$(basename "$origfile") || continue
		[ -f /usr/share/applications/"$name" ] ||
			ls /var/lib/flatpak/app/*/current/active/files/share/applications/"$name" >/dev/null 2>&1 ||
			[ -f /var/lib/snapd/desktop/applications/"$name" ] &&
			mv "$bakfile" "$origfile"
	done
}

pidof -q -o %PPID -x fix-tweaked-desktop-files && exit

while :; do
	local_new=$(ls -ad "$HOME"/.local/share/applications/*.desktop 2>/dev/null)
	pacman_new=$(ls -ad /usr/share/applications/*.desktop 2>/dev/null)
	flatpak_new=$(ls -ad /var/lib/flatpak/app/*/current/active/files/share/applications/*.desktop 2>/dev/null)
	snap_new=$(ls -ad /var/lib/snapd/desktop/applications/*.desktop 2>/dev/null)
	[ "$local_new" != "$local_old" ] && detectfiles
	[ "$pacman_new" != "$pacman_old" ] ||
		[ "$flatpak_new" != "$flatpak_old" ] ||
		[ "$snap_new" != "$snap_old" ] && fixfiles
	local_old=$local_new
	pacman_old=$pacman_new
	flatpak_old=$flatpak_new
	snap_old=$snap_new
	sleep 5
done

Go to the folder .local/bin and create a new text file called “fix-tweaked-desktop-files”. Add the above script to it. Save it. Close the text file. Now right click the file, got to Properties, then Permissions and select “Allow this file to run as a program”.

image

That’s it! Now we have to make it run all the time. So go to the file .profile from your home directory, and add this line at the end of whatever is there: fix-tweaked-desktop-files & . Now reboot the computer. From now on no more zombie files! And if you are to reinstall that Peek application it will even restore your custom edits, so that it will be named “Desktop Recorder” again! How cool!

1 Like

You can download now TROMjaro from:

1 Like

You should add the zombie-app-icons removal script BEFORE removing Parole. Else Parole will become a zombie app file. Basically our script won’t work with already zombie app icons. If you have these remove them manually.

1 Like