Ask / Submit
7

Script to toggle the visibility of installed applications

asked 2016-08-30 00:07:33 +0300

ploth gravatar image

updated 2018-08-08 18:13:10 +0300

Hello, I just wrote a small script which let you toggle the visibility of installed applications (yes, also the Tutorial app) on your Sailfish OS device.

At first I thought I could write an application for that but then you would have one more icon to hide ;)

Here you will find the script. It's not nearly perfect but does it's job. Con: You need to be devel-su, because it will modify .desktop files in /usr/share/applications/

EDIT: Moved script from github to gitlab.

edit retag flag offensive close delete

Comments

Anyone tried it? Does it work? ;D

mr.upolo ( 2016-08-30 06:59:11 +0300 )edit
2

looks legit.

coderus ( 2016-08-30 19:24:33 +0300 )edit

I'm curious @ploth, how many apps do you personally hide?, I certainly like to hide the tutorial app so I made a patch to do that.

Edz ( 2018-08-09 10:21:50 +0300 )edit

you could put the ui.into jolla settings

pawel ( 2019-03-14 07:26:15 +0300 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-03-13 23:12:21 +0300

hammerhead gravatar image

updated 2019-03-13 23:19:13 +0300

I extracted the gist from your script. Thanks ;)

To hide an icon, command this as root:

# Hide the tutorial icon
grep -E '^NoDisplay=true$' /usr/share/applications/sailfish-tutorial.desktop >/dev/null || \
sed -i 's#^\(Icon=.*\)$#\1\nNoDisplay=true#g' /usr/share/applications/sailfish-tutorial.desktop

The grep just avoids inserting the line if it already exists.

To show it again:

# Make the Icon visible again
sed -i '/^NoDisplay=true$/d' /usr/share/applications/sailfish-tutorial.desktop

Note that the icon will appear on the main drawer, not in any sub folder you may have had it in previously.

Bonus: To run a the hidden application from Terminal, command this as normal user:

sed -n 's#^Exec=\(.*\)$#\1#p' /usr/share/applications/sailfish-tutorial.desktop | $SHELL
edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
4 followers

Stats

Asked: 2016-08-30 00:07:33 +0300

Seen: 519 times

Last updated: Mar 13