Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > PocketBook > PocketBook Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 01:54 PM   #1
neil_swann80
0000000000101010
neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.neil_swann80 ought to be getting tired of karma fortunes by now.
 
neil_swann80's Avatar
 
Posts: 5,952
Karma: 13079945
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
Hide user app section from app drawer

I'm not a fan of a cluttered app drawer!

We can already hide, rename, move between sections and change the icons for system apps by editing view.json
(We can also move apps from the "Users" section by adding them to view.json - and also assign icons etc)

I still have plenty of third party apps and scripts I use regularly that I don't want to permanently see in the app drawer; previously I manually moved them to a sub-folder and back as needed, rebooting my device to see the changes. Cumbersome.

After a bit of trial and error I noticed that extensions would still show in the drawer if capitalized (.APP rather than .app) which allows them to be differentiated. Also restarting the system bookshelf.app refreshes the app drawer view without a reboot.

I wrote some shell commands to automate the process and added it to my reboot script.
Simply rename any user app extension (.app to .APP) that you wish to be able to toggle visibility of.
Reboot script is viewable in the spoiler section below and as zip attachment...

Spoiler:

Code:
#!/bin/sh
user_prompt=/ebrmain/cramfs/bin/dialog

restart_device() {
iv2sh SetActiveTask $$
/ebrmain/bin/run_script -clear_screen -bitmap=pocketbook_logo_software
iv2sh reboot
}

restart_bookshelf() {
iv2sh CloseTask bookshelf.app
sleep 1
iv2sh SetActiveTask `pidof bookshelf.app`
exit 0
}

rename_apps() {
for file in ./*$ext1; do
  [ -f "$file" ] || continue
  new_file="${file%$ext1}$ext2"
  mv "$file" "$new_file"
done
}

toggle_user_apps() {
cd /mnt/ext1/applications
ext1=.hidden
ext2=.APP
for file in ./*.APP; do
    [ -f "$file" ] || continue
    ext1=.APP
    ext2=.hidden
    break
done
rename_apps
restart_bookshelf
}

get_user_input() {
$user_prompt 2 "" "Restart Device?" "YES" "NO" "TOGGLE"
answer=$?
if [ $answer = 1 ]; then restart_device
elif [ $answer = 2 ]; then restart_bookshelf
elif [ $answer = 3 ]; then toggle_user_apps
else get_user_input
fi
}

get_user_input
exit 0

If you just want the toggle ability you'll only need the toggle_user_apps and rename_apps functions.
I find having the reboot script as a permanent app (with own icon via view.json) far more convenient than running the script by PBTerm.

Initiating a reboot via the script should display a pocketbook logo during the process. You can add your own reboot splash screen by creating the file:
/mnt/ext1/system/resources/Line/pocketbook_logo_software.bmp
(Take a screenshot of a image from your gallery app to guarantee correct BMP format)
Attached Thumbnails
Click image for larger version

Name:	example.gif
Views:	7
Size:	308.7 KB
ID:	226354  
Attached Files
File Type: zip reboot.zip (629 Bytes, 0 views)

Last edited by neil_swann80; Today at 03:00 PM.
neil_swann80 is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove icons from PocketBook desktop and app drawer jrw174 PocketBook Developer's Corner 87 06-04-2025 01:28 PM
EPUB of manual seems to hide everything from section 1.1.1 to section 2 halloleo Calibre 9 07-17-2021 01:45 AM
Free Amazon App Bundles | App Deals | $5 App/Game Credit DreamWriter Deals and Resources (No Self-Promotion or Affiliate Links) 0 12-23-2013 05:06 PM
Totally stupid question: where's my app drawer? maxbookworm Nook Developer's Corner 6 01-26-2011 10:13 PM
iLiad Hide toolbar and pagebar in a Java app ? ouais32 iRex Developer's Corner 5 01-18-2008 04:04 AM


All times are GMT -4. The time now is 03:46 PM.


MobileRead.com is a privately owned, operated and funded community.