WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Creating program  (Read 2221 times)

Offline gerits

  • Newbie
  • *
  • Posts: 19
    • http://gerits-r.be
Creating program
« on: June 15, 2009, 04:37:20 AM »
Hello,

this is probably going to be a stupid question but I'm going to ask it anyway...

In tc you in the upper right corner a 'X' and I've found that in .jwmrc-tray you can edit the bar. When  you press the 'x' a program opens, now my questions is how you can create a program like that?

I want to add my own button to the top bar with my own made control but I don't know what language I've to write it in..

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Creating program
« Reply #1 on: June 15, 2009, 04:50:43 AM »
I'd guess you could call both a script and a compiled application - maybe the documentation on the jwm web site could be useful?

Offline gerits

  • Newbie
  • *
  • Posts: 19
    • http://gerits-r.be
Re: Creating program
« Reply #2 on: June 15, 2009, 06:55:44 AM »
I'd guess you could call both a script and a compiled application - maybe the documentation on the jwm web site could be useful?

I know how to execute something from the bar, but I don't know in what language I should make a program like that...

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Creating program
« Reply #3 on: June 15, 2009, 07:20:13 AM »
I'm not at a tc machine at the moment, but I believe the exit dialogue launched by the jwm tray "X" is a script executable by busybox sh.

You could probably write something in C (like curaga's watcher app in the jwm tray) or bash, perl, python, etc - as long as you have the appropriate extension loaded.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Creating program
« Reply #4 on: June 15, 2009, 08:01:46 AM »
If you only need a yes/no gui:
Quote
popask "Would you like fries with that?"
The only barriers that can stop you are the ones you create yourself.