Need a script to autopause clementine on skype call


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Need a script to autopause clementine on skype call
# 1  
Old 02-05-2017
Linux Need a script to autopause clementine on skype call

I am a linux user (PcLinuxOs desktop 64bit kde5). I am looking for a script (bash or python) to autopause clementine (a music player) on skype call. VLC works: autopause on skype call and at the end resume). Clementine automute, but not autopause, on skype call.
I am absolute beginner with the scripts, so I need your help.
Bash comman to pause clementine is "clementine --pause", but witch command for "if" or "when" or "while"?

Thank you
Duns
# 2  
Old 02-05-2017
I believe that under Skype settings -> Notifications you can execute a script on a number of events, why not create a script to do clementine --pause under the incoming call Notification:

Image
This User Gave Thanks to Chubler_XL For This Post:
# 3  
Old 02-07-2017
Linux it works: solved!!

Thank you very much
# 4  
Old 02-08-2017
Linux fine tuning

Your help solved the bulk of the problem, but remain some things to perfect, i.e. how don't start clementine if before the skype call was stopped. How i.e. resume only if paused and not if stopped.
Now I put this script after the call:
Code:
#!/bin/bash
if pgrep -x "clementine" > /dev/null
then
    clementine --play
fi

Could you help me (another bash script)?
Tried with fg, but don't works.
# 5  
Old 02-08-2017
In what way does it not work? What happens? What do you want to happen? What were you expecting fg to do? I don't understand its use here.
# 6  
Old 02-08-2017
Linux fg don't work

Clementine paused is not seen as a job suspended, so I get a error message:
Code:
$ fg %clementine
bash: fg: %clementine: no such job

.
I want resume music paused, if paused and do nothing if stopped.
# 7  
Old 02-08-2017
Oh, you want it to do nothing if the music is stopped. OK. You'll need to ask clementine whether it's paused or not somehow. That's not something pgrep or fg can tell you, since clementine isn't actually "stopped" in a program sense, just a "not playing" sense.

Does clementine show any status information? I don't have any way to test it on this end.

Last edited by Corona688; 02-08-2017 at 12:15 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Ubuntu

Webcam and Skype not working properly

I recently bought a new HP Spectre x360 laptop and installed Ubuntu 15.10. (I originally went with a later version but I was encountering lots of bugs. This version seems to be more stable for my system). Things are mostly working okay, but not my webcam. If I go to a website to test it, it's... (0 Replies)
Discussion started by: twelth_hour
0 Replies

2. Shell Programming and Scripting

Call a Perl script within a bash script and store the ouput in a .txt file

I'm attempting to write a bash script that will create a network between virtual machines. It accepts three arguments: an RSpec that describes the network topology, and two list of machines (servers and clients). I have a (working) Perl script that I want to call. This Perl script takes an RSpec... (6 Replies)
Discussion started by: mecaka
6 Replies

3. Shell Programming and Scripting

Shell script to call Oracle archive backup script when file system reaches threshold value

Hello All, I need immediate help in creating shell script to call archivebkup.ksh script when archive file system capacity reaches threshold value or 60% Need to identify the unique file system that reaches threshold value. ex: capacity ... (4 Replies)
Discussion started by: sasikanthdba
4 Replies

4. Shell Programming and Scripting

Script to call a menu script and redirect each option to a text file

Hello, I want to design a script that will call an existing menu script and select options one by one and redirict the out put to a file. For example;- In the script MENU.sh there are 10 options i want to design a script MENU2.sh that will select option 2 3 4 6 7 10 and redirict the output... (4 Replies)
Discussion started by: spradha
4 Replies

5. Slackware

Skype on Slackware 64

Hi! I've downloaded the static version (skype_static-2.1.0.81.tar.bz2) and extracted it. Then I tried to start the Skype executable file (./skype) via the terminal but nothing happens. root@xxx:~# ls skype_static-2.1.0.81/ skype_static-2.1.0.81.tar.bz2 root@xxx:~# cd skype_static-2.1.0.81... (2 Replies)
Discussion started by: intelfan
2 Replies

6. Shell Programming and Scripting

how to run script? call other script? su to another user? make a cron?

Good morning. I am searching for "how-to"'s for some particular questions: 1. How to write a script in HP-UX 11. 2. How to schedule a script. 3. How to "call" scripts from the original script. 4. How to su to another user from within a script. This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies
Login or Register to Ask a Question