WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How to add custom icons, command lines and applications to wbar  (Read 10214 times)

Offline neogenesys

  • Newbie
  • *
  • Posts: 6
We have some applications and command line commands that want to add to the wbar, so they can be easily launched by the end user and perhaps edit some menues in the right click pop up menues for common user. Any ideas where and how can we do this?

example: add an icon that starts a rdesktop connection without opening a console window

thanks!

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: How to add custom icons, command lines and applications to wbar
« Reply #1 on: May 13, 2009, 04:17:23 AM »
For wbar, see /usr/local/tce.wbar

If you're talking about jwm, you can see .jwmrc in ~/ (and in /etc/skel)

Adding to these may need other steps depending on the setup (could create a script to append or make a pseudo-extension, or edit it directly, etc.) and perhaps what your exact needs are (change for one user, or global, etc.)

Offline junan

  • Jr. Member
  • **
  • Posts: 88
Re: How to add custom icons, command lines and applications to wbar
« Reply #2 on: May 13, 2009, 04:24:10 AM »
for menu you can look at /usr/local/tce.menu
for example we tried to create a menu for calendar from http://forum.tinycorelinux.net/index.php?topic=653.0

create a file 'calendar' inside /usr/local/tce.menu
Code: [Select]
<JWM>
<Program label="Calendar">/usr/bin/aterm -title Calendar --geometry 40x18 -e dialog --no-cancel --calendar "Use cursor keys to navigate" 0 38</Program>
</JWM>

and add inside /usr/local/tce.menu/menu
Code: [Select]
<Include>/usr/local/tce.menu/calendar</Include>don't forget to Restart Window Manager by press Alt-F1 -> Exit/Restart -> Restart Window Manager

for wbar you can find /usr/local/tce.wbar  and for the icon at /usr/local/tce.icons
i'm using parameter local=hdXY , so the change will be saved.
fun and fearless ...

Offline JoXo009

  • Full Member
  • ***
  • Posts: 152
Re: How to add custom icons, command lines and applications to wbar
« Reply #3 on: August 22, 2009, 11:25:13 AM »
junon wrote
Quote
i'm using parameter local=hdXY , so the change will be saved.

Is this the only way to make wBar changes permanent in a PPR system.

Doesn't the boot parameter 'local=hda1' convert my PPR system into a PPI system?


Offline Kingdomcome

  • Sr. Member
  • ****
  • Posts: 286
Re: How to add custom icons, command lines and applications to wbar
« Reply #4 on: August 22, 2009, 12:21:30 PM »
The above explanation will work IF you are using a PPI system.  To add extra icons to a PPR system, you can create an extension containing the necessary files.  for this example we will call our extension icontest.tce.

1) First we need to create the directory structure for our new extension
Code: [Select]
cd /tmp && mkdir -p usr/local/tce.menu usr/local/tce.icons   (note: a menu file is necessary for the icon to load, even if you leave the menu file blank)

2) Pick out a 48x48 .png icon and place it in /tmp/usr/local/tce.icons (we will call it testicon.png)

3) Using your favorite editor create the icon file (note: the name of the icon file must be the basename of the extension)
Code: [Select]
nano /tmp/usr/local/tce.icons/icontest    the layout of the icon file is:
Code: [Select]
i: /usr/local/tce.icon/testicon.png
t: Test Icon
c: <full path to executable here>

   (note: the icon file must have a new line at the end so that it doesnt get clobbered by another extension, nano does this automatically)
If you wish to add multiple icons to wbar, simply add the other png's to /tmp/usr/local/tce.icons and repeat the 3 lines again in the icon file

4) If you do not wish to create a menu entry for the executables, just touch the menu file
Code: [Select]
touch /tmp/usr/local/tce.menu/icontest
Otherwise the layout of the menu file is
Code: [Select]
<JWM>
<Program label="Icon Test"> full path to executable here </Program>
</JWM>

5) Create the extension
Code: [Select]
find usr/ -not -type d > icontest.list
tar czf icontest.tce -T icontest.list

6) Try it out!
Code: [Select]
tce-load /tmp/icontest.tce
If your icons did not appear, double check you icon file and make sure there is a menu file.

7) Move the new extension to your tce/  directory
Code: [Select]
mv /tmp/icontest.tce $(cat /opt/.tce_dir)
Hope this helps

Offline JoXo009

  • Full Member
  • ***
  • Posts: 152
Re: How to add custom icons, command lines and applications to wbar
« Reply #5 on: August 23, 2009, 10:40:00 AM »
Thx very much Kingdomecome,

great tutorial.

Once you are trained it's easy.

Just create that mirror folder structure with the necessary files.

Then zip / tarbal the whole into a single compressed container.

That's your new extension.

Test it, put it into the tce-directory, restart and it's working.

Wonderful.



That's when you are trained. If it's your first time, it might be slightly different.

There are a lot of possibilities for these nice typos, I'm addicted to. So maybe you have to debug half a day before you get through.

Offline ozyrys

  • Newbie
  • *
  • Posts: 6
Re: How to add custom icons, command lines and applications to wbar
« Reply #6 on: July 02, 2011, 01:23:30 PM »
Hello,

Maybe someone create tutorial for TinyCore 3.7 installed on Flash Drive ?

Best Regards
ozyrys