WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Do the popup and popask utilities have any commandline options?  (Read 4543 times)

Offline Paulo

  • Full Member
  • ***
  • Posts: 139
Hi

Can anyone tell me if the popup and popask utilities (in /tmp/tcloop/Xprogs/usr/local/bin) have any options available, like switching off beep?

Thanks.
« Last Edit: March 21, 2013, 04:47:22 AM by Paulo »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11040
Re: Do the popup and popask utilities have any commandline options?
« Reply #1 on: March 21, 2013, 04:52:50 AM »
No, they don't.

They are a part of the TC FLTK utils, so their source is available at http://git.tinycorelinux.net/index.cgi?url=fltk_projects
The only barriers that can stop you are the ones you create yourself.

Offline Paulo

  • Full Member
  • ***
  • Posts: 139
Re: Do the popup and popask utilities have any commandline options?
« Reply #2 on: March 21, 2013, 05:02:09 AM »
Thanks curaga.
That is a pity, as the beep very quickly gets very annoying.
I am surprised that the developer/s never included a -nobeep or similar switch.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11040
Re: Do the popup and popask utilities have any commandline options?
« Reply #3 on: March 21, 2013, 05:27:40 AM »
You can disable all beeps by blacklisting the pc speaker module.

In some older versions, it wasn't even included since we preferred no beeps at all, but some users requested it.
The only barriers that can stop you are the ones you create yourself.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Do the popup and popask utilities have any commandline options?
« Reply #4 on: March 21, 2013, 05:40:33 AM »
Linux without beep? God forbid, but if you must, short from blacklisting the module (systemwide) as mentioned, check the b (bell) options of 'xset' for X apps.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Paulo

  • Full Member
  • ***
  • Posts: 139
Re: Do the popup and popask utilities have any commandline options?
« Reply #5 on: March 21, 2013, 06:06:36 AM »
 ;D Thanks tinypoodle

Code: [Select]
xset b off
xset b 0 0 0
« Last Edit: March 21, 2013, 06:13:27 AM by Paulo »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Do the popup and popask utilities have any commandline options?
« Reply #6 on: March 21, 2013, 06:51:10 AM »
Now if you really wanted only very specific apps not to beep, you could probably write a wrapper script for each, which would use xset to turn bell off, then call the app and turn bell on again after app exits.
Placing the script into .local/bin under same name as app would let it preceed in path. 
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Paulo

  • Full Member
  • ***
  • Posts: 139
Re: Do the popup and popask utilities have any commandline options?
« Reply #7 on: March 21, 2013, 07:42:02 AM »
A good idea tinypoodle, but I'm having trouble reinstating beep for some reason.
I suspect it's a HID problem, Human Interface Dunce.  ;)

Offline Paulo

  • Full Member
  • ***
  • Posts: 139
Re: Do the popup and popask utilities have any commandline options?
« Reply #8 on: March 21, 2013, 11:28:32 AM »
OK got it now.

Code: [Select]
#!/bin/sh

xset b 0 0 0
popup "Some Text To Display"
xset b on

Or for some fun:

Code: [Select]
#!/bin/sh
alias beep='echo -en "\007"'
xset b 50 40 1000
beep
sleep 1
xset b 50 80 1000
beep
sleep 1
xset b 50 160 1000
beep
sleep 1
xset b 50 320 1000
beep
sleep 1
xset b 50 640 1000
beep
sleep 1
xset b 50 1280 1000
beep
sleep 1
xset b 50 2560 1000
beep
sleep 1
xset b 50 5120 1000
beep
sleep 1
xset 50 400 100

Those with a musical inclination could change it to play "chip tunes" and bug everyone at the office  :)
There is a beep app available with more options, but I couldn't get it to compile.

« Last Edit: March 21, 2013, 11:39:38 AM by Paulo »