***Deprecated*** 3.12 has independent volume control. ------------------------------------------- PAUSE playing songs when headphone get unplugged. You can set icon color you like in dconf-editor GS3.8 ✔ GS3.10 support delayed due to my laptop always crash while install it. Can anyone test the code in dev branch on the GIthub Homepage below?
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
Version | Status |
---|---|
11 | Active |
10 | Active |
9 | Active |
8 | Active |
7 | Rejected |
6 | Active |
5 | Rejected |
4 | Active |
3 | Inactive |
2 | Rejected |
1 | Rejected |
There is no inotify for procfs, that's why the GFileMonitor doesn't work. But... what about using PulseAudio instead? It has builtin jack detection. (I'm not actually confident to let a shell extension mess with /proc...)
@gcampax Thanks for your reply But how can I import PulseAudio API ? I can't find them in local /usr/share/gir-1.0/ , Seed online document or even Google. Is it possible that you send me a sample?
You can't use PulseAudio directly, as that is not introspectable. But you can use GnomeVolumeControl, which is a copylib included in gnome-shell. There is no official documentation, but you can read the sources here: http://git.gnome.org/browse/gnome-shell/tree/src/gvc
Yeah, no.
@magcius @gcampax I haven't found any relative api in Gvc source that can indicate the status of the headphone Jack, can you guys point it out for me? Thanks! Besides, I found an Ubuntu developer who already made a programe name hda-jack-sense-test and it works fine, however it needs root right to write some binary code into memory.
AFAIK, jacks are called ports in PulseAudio terminlogy. Look at gvc_mixer_stream_set_port() and friends.
@gcampax Well, unfortunately, it won't work, when I tried to get _output.get_port(), there was a "null" returned, which is tesetd on my laptop Lenovo X200s even along with pulseaudio 2.0(official said it has Jack detection) and every model configuration combinations of this sound card. It might be my hardware issue, as I don't have spare pc to run Gnome to continue test, appearantly I have to postpone its developement.