WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Wbar + load locally ??  (Read 1646 times)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Wbar + load locally ??
« on: October 31, 2015, 04:16:52 AM »
As i understand, Wbar is the standard programm starter for TC.

Now, i see that wbar only takes those programs which are loaded on boot and that therefore are present in ram. Is it possible to configure it in a way that the reference to the program that should be started is in some way static, i.e. wbar does the "Load app locally" AND starts the program then?


Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Wbar + load locally ??
« Reply #1 on: October 31, 2015, 04:24:28 AM »
See Apps GUI -> Apps -> Maintenance -> OnDemand Maintenence
This will create scripts in  /etc/sysconfig/tcedir/ondemand  which, if PNG images with the same name but with .img file name extension are present, will show up in wbar after login in to the desktop.
You can get the png icons from  /usr/local/share/pixmaps .
This way you can add many items to wbar without wasting your RAM.
Download a copy and keep it handy: Core book ;)

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: Wbar + load locally ??
« Reply #2 on: October 31, 2015, 06:00:20 AM »
Thanks a lot! Sounds good  :D

Offline emninger

  • Sr. Member
  • ****
  • Posts: 267
Re: Wbar + load locally ??
« Reply #3 on: November 03, 2015, 12:52:20 AM »
See Apps GUI -> Apps -> Maintenance -> OnDemand Maintenence
This will create scripts in  /etc/sysconfig/tcedir/ondemand  which, if PNG images with the same name but with .img file name extension are present, will show up in wbar after login in to the desktop.
You can get the png icons from  /usr/local/share/pixmaps .
This way you can add many items to wbar without wasting your RAM.

Tried that for gimp and abiword and it's working fine. Although: It was a bit difficult to find the real (physical) png files of the apps (and not only the symlinks). And i had to rename them to *.img. But now, they're there sitting in the wbar. Thanks again for the excellent tip. :D

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Wbar + load locally ??
« Reply #4 on: November 03, 2015, 01:23:11 AM »
Yeah, the functionality to automatically copy those icons for OnDemand items was removed at some point in the past. At least I believe to remember that some Tiny Core 4.x release still copied those icons if the extension was already loaded.

Code: [Select]
cp /usr/local/share/pixmaps/abiword.png /etc/sysconfig/tcedir/ondemand/abiword.img
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Wbar + load locally ??
« Reply #5 on: November 03, 2015, 09:56:52 AM »
For anyone interested, I made some icon eye candy for newly created OnDemand items.

Only works if the extension in question is already loaded and then added to OnDemand.
If ImageMagick is installed, a semi transparent icon will be generated, which will be used by wbar until the OnDemand item is loaded.

Code: [Select]
--- /tmp/core/usr/bin/ondemand
+++ /tmp/more/usr/bin/ondemand
@@ -117,6 +117,23 @@
 echo 'ondemand -e '"$EXTN"' "$@"' >> "$FILE"
 chmod +x "$FILE"
 
+if [ -e "$FREEDESKTOP"/"$APPNAME".desktop ]; then
+ FREEDESKICON="$(/bin/busybox awk 'BEGIN {FS = "="} {if ( $1 == "X-FullPathIcon" ) {icon = $2}} END {print icon}' "$FREEDESKTOP"/"$APPNAME".desktop)"
+fi
+if [ -z "$FREEDESKICON" ] && [ -e /usr/local/share/pixmaps/"$APPNAME".png ]; then
+ FREEDESKICON="/usr/local/share/pixmaps/$APPNAME.png"
+fi
+if [ -n "$FREEDESKICON" ]; then
+ #  convert  PNG to be semi-transparent via ImageMagick, if available.
+ if [ $(which convert) ]; then
+ convert "$FREEDESKICON" \
+ -alpha set -channel A -evaluate multiply 0.6 +channel \
+ /etc/sysconfig/tcedir/ondemand/"$APPNAME".img
+ else
+ cp "$FREEDESKICON" /etc/sysconfig/tcedir/ondemand/"$APPNAME".img
+ fi
+fi
+
 # Optional as flwm does not need a make_ondemand.
 [ $(which ${DESKTOP}_ondemand) ] && ${DESKTOP}_ondemand "$APPNAME"
 


Needs manual modification of  core.gz .
Download a copy and keep it handy: Core book ;)