Sound effects question...
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Sound effects question...
I like to have sound effects enabled.
Is it to possible to add more sound effects?
Namely a sound effect when notifications are cleared.
TIA
Is it to possible to add more sound effects?
Namely a sound effect when notifications are cleared.
TIA
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
- catweazel
- Level 19
- Posts: 9763
- Joined: Fri Oct 12, 2012 9:44 pm
- Location: Australian Antarctic Territory
Re: Sound effects question...
Please post the output of this terminal command:
Code: Select all
inxi -S
[ⅽode]
and [/ⅽode]
code markers by selecting </>
from the mini toolbar above the textbox where you type your reply."There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
Re: Sound effects question...
Code: Select all
System: Host: Invex-Mint Kernel: 4.15.0-041500-generic x86_64 bits: 64
Desktop: Cinnamon 3.8.9 Distro: Linux Mint 19 Tara
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Sound effects question...
Open the Sound settings module, navigate to the Sounds tab and switch the toggle for Notification sounds on.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: Sound effects question...
Thx.
I have Notification sound on.
I'd like to add a sound effect when I click on Clear notifications.
I have Notification sound on.
I'd like to add a sound effect when I click on Clear notifications.
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Sound effects question...
That's not quite so simple....
You'll need to modify the default notification tray applet to do that.
Step 1:
Copy the default applet folder
Step 2:
Open
Navigate to line 195 - you will see a function that looks like this
Add the line
I'm sure you can also set a totally custom sound, just not quite sure how at time of writing. If I work it out I'll post back....
You'll need to modify the default notification tray applet to do that.
Step 1:
Copy the default applet folder
/usr/share/cinnamon/applets/notifications@cinnamon.org
to ~/.local/share/cinnamon/applets/notifications@cinnamon.org
Step 2:
Open
~/.local/share/cinnamon/applets/notifications@cinnamon.org/applet.js
in your favorite text editor - ideally one that supports line numbers (The default editor xed does if you turn them on in it's preferences)Navigate to line 195 - you will see a function that looks like this
Code: Select all
_clear_all() {
let count = this.notifications.length;
if (count > 0) {
for (let i = count-1; i >=0; i--) {
this._notificationbin.remove_actor(this.notifications[i].actor);
this.notifications[i].destroy(NotificationDestroyedReason.DISMISSED);
}
}
this.notifications = [];
this.update_list();
}
Main.soundManager.play('notification');
so it looks like this. Save the file. Hit Ctrl-Alt-Escape to restart Cinnamon. if it hangs for a bit just hit Ctrl-Alt-Escape again. You'll get the same notification sound on clearing notifications as you do when a new one comes in. If you want to pick a different sound the valid values are - "switch", "close", "map", "minimize", "maximize", "unmaximize", "tile", "login", "plug", "unplug", "notification"Code: Select all
_clear_all() {
let count = this.notifications.length;
if (count > 0) {
for (let i = count-1; i >=0; i--) {
this._notificationbin.remove_actor(this.notifications[i].actor);
this.notifications[i].destroy(NotificationDestroyedReason.DISMISSED);
}
}
this.notifications = [];
this.update_list();
Main.soundManager.play('notification');
}
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Sound effects question...
To add a completely custom sound for clear notifications the line to add is
e.g...
Main.soundManager.playSoundFile(0, '/path/to/soundfile');
e.g...
Main.soundManager.playSoundFile(0, '/usr/share/sounds/freedesktop/stereo/trash-empty.oga');
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: Sound effects question...
Thanks a lot.
I'm sure I didn't make a mistake when I added:
Main.soundManager.playSoundFile(0, '/usr/share/mint-artwork/sounds/clearnotification.oga');
But it didn't work. No sound effect when I click 'Clear notifications'.
I'm sure I didn't make a mistake when I added:
Main.soundManager.playSoundFile(0, '/usr/share/mint-artwork/sounds/clearnotification.oga');
But it didn't work. No sound effect when I click 'Clear notifications'.
Re: Sound effects question...
Did you restart Cinnamon?
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Sound effects question...
There isn't a
The default sound files available on a Mint 19 systems are in 3 locations.
&
&
You can find additional sound-themes in the repos to get more choices e.g.
You can also look here for more user-created sound-themes - https://www.opendesktop.org/browse/cat/316/order/latest
clearnotifications.oga
in that location. You need to provide the path to an existing sound file. That might be one that is preinstalled or might be one you have downloaded, or might be one you've created from scratch.The default sound files available on a Mint 19 systems are in 3 locations.
Code: Select all
$ ls -1 /usr/share/mint-artwork/sounds
close.oga
login.oga
logout.ogg
map.oga
maximize.oga
minimize.oga
notification.oga
plug.oga
switch.oga
tile.oga
trash.oga
unmaximize.oga
unplug.oga
volume.oga
Code: Select all
$ ls -1 /usr/share/sounds/LinuxMint/stereo
button-pressed.ogg
button-toggle-off.ogg
button-toggle-on.ogg
desktop-login.ogg
desktop-logout.ogg
dialog-error.ogg
dialog-information.ogg
dialog-question.ogg
dialog-question.wav
dialog-warning.ogg
phone-incoming-call.ogg
system-ready.ogg
window-slide.ogg
Code: Select all
$ ls -1 /usr/share/sounds/freedesktop/stereo
alarm-clock-elapsed.oga
audio-channel-front-center.oga
audio-channel-front-left.oga
audio-channel-front-right.oga
audio-channel-mono.oga
audio-channel-rear-center.oga
audio-channel-rear-left.oga
audio-channel-rear-right.oga
audio-channel-side-left.oga
audio-channel-side-right.oga
audio-test-signal.oga
audio-volume-change.oga
bell.oga
camera-shutter.oga
complete.oga
device-added.oga
device-removed.oga
dialog-error.oga
dialog-information.oga
dialog-warning.oga
message-new-instant.oga
message.oga
network-connectivity-established.oga
network-connectivity-lost.oga
onboard-key-feedback.oga
phone-incoming-call.oga
phone-outgoing-busy.oga
phone-outgoing-calling.oga
power-plug.oga
power-unplug.oga
screen-capture.oga
service-login.oga
service-logout.oga
suspend-error.oga
trash-empty.oga
window-attention.oga
window-question.oga
apt install oxygen-sounds ubuntu-sounds
You can also look here for more user-created sound-themes - https://www.opendesktop.org/browse/cat/316/order/latest
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: Sound effects question...
Thank you again.
I feel so stupid.
No, I didn't restart Cinnamon.
When I did, everything worked fine.
Thank you VERY much!
You have no idea how happy this small tweak makes me
I feel so stupid.
No, I didn't restart Cinnamon.
When I did, everything worked fine.
Thank you VERY much!
You have no idea how happy this small tweak makes me
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Sound effects question...
You are welcome - I learnt a few new things myself checking this out... , and I like having a few more sound-effects too.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: Sound effects question...
I'd like to create a script which would display notifications (the same like clicking the notification icon in the panel), display them for 1 second, delete them and exit.
I didn't get very far
I didn't get very far
Re: Sound effects question...
Not sure of the purpose, but you can use notify-send in a script or the terminal like this:
This works on Xfce, but the Ubuntu man page shows this for --expire-time: The duration, in milliseconds, for the notification to appear on screen. (Ubuntu's Notify OSD and GNOME Shell both ignore this parameter.) I'm not sure if this affects Cinnamon or not.
notify-send --expire-time=1000 My 1 second notification is better than Hello World!
This works on Xfce, but the Ubuntu man page shows this for --expire-time: The duration, in milliseconds, for the notification to appear on screen. (Ubuntu's Notify OSD and GNOME Shell both ignore this parameter.) I'm not sure if this affects Cinnamon or not.
Re: Sound effects question...
Thank you but it's not the same as clicking on the panel notification icon.
And the purpose?
I have to clear notifications many, many times a day. I'd like to bring the mouse cursor to the bottom left corner (hot corner) to execute a script which would show me notifications for 1 second and then automatically delete them (the same as clicking Clear notifications) .
And the purpose?
I have to clear notifications many, many times a day. I'd like to bring the mouse cursor to the bottom left corner (hot corner) to execute a script which would show me notifications for 1 second and then automatically delete them (the same as clicking Clear notifications) .
Re: Sound effects question...
Thank you very much.
I had no idea that the sounds are in 3 different locations.
However, how would I enable for example trash-empty.oga?
Sound/Sounds has only 13 sound effects available. No Trash Empty.
I had no idea that the sounds are in 3 different locations.
However, how would I enable for example trash-empty.oga?
Sound/Sounds has only 13 sound effects available. No Trash Empty.
smurphos wrote: ⤴Mon Sep 17, 2018 12:50 am There isn't aclearnotifications.oga
in that location. You need to provide the path to an existing sound file. That might be one that is preinstalled or might be one you have downloaded, or might be one you've created from scratch.
The default sound files available on a Mint 19 systems are in 3 locations.
&Code: Select all
$ ls -1 /usr/share/mint-artwork/sounds close.oga login.oga logout.ogg map.oga maximize.oga minimize.oga notification.oga plug.oga switch.oga tile.oga trash.oga unmaximize.oga unplug.oga volume.oga
&Code: Select all
$ ls -1 /usr/share/sounds/LinuxMint/stereo button-pressed.ogg button-toggle-off.ogg button-toggle-on.ogg desktop-login.ogg desktop-logout.ogg dialog-error.ogg dialog-information.ogg dialog-question.ogg dialog-question.wav dialog-warning.ogg phone-incoming-call.ogg system-ready.ogg window-slide.ogg
You can find additional sound-themes in the repos to get more choices e.g.Code: Select all
$ ls -1 /usr/share/sounds/freedesktop/stereo alarm-clock-elapsed.oga audio-channel-front-center.oga audio-channel-front-left.oga audio-channel-front-right.oga audio-channel-mono.oga audio-channel-rear-center.oga audio-channel-rear-left.oga audio-channel-rear-right.oga audio-channel-side-left.oga audio-channel-side-right.oga audio-test-signal.oga audio-volume-change.oga bell.oga camera-shutter.oga complete.oga device-added.oga device-removed.oga dialog-error.oga dialog-information.oga dialog-warning.oga message-new-instant.oga message.oga network-connectivity-established.oga network-connectivity-lost.oga onboard-key-feedback.oga phone-incoming-call.oga phone-outgoing-busy.oga phone-outgoing-calling.oga power-plug.oga power-unplug.oga screen-capture.oga service-login.oga service-logout.oga suspend-error.oga trash-empty.oga window-attention.oga window-question.oga
apt install oxygen-sounds ubuntu-sounds
You can also look here for more user-created sound-themes - https://www.opendesktop.org/browse/cat/316/order/latest
- smurphos
- Level 18
- Posts: 8498
- Joined: Fri Sep 05, 2014 12:18 am
- Location: Irish Brit in Portugal
- Contact:
Re: Sound effects question...
Yeah it looks like Cinnamon only implements a subset of the available sounds. Enabling trash noises I think would probably require modification to Nemo's source code which is a step above hacking some extra noise into Cinnamon applets.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Re: Sound effects question...
is there the same ' Sound settings module' for linux mint mate edition also like in Cinnemon?
there is 'Sound' in menu---> control center in mate edition but it does not have the same options like Cinnemon's one.