Registered Member
|
Ok After some thoughts about whilst watching films doing presentations, KDE has a feature to pop and make and a sound for when notifications occur for any given application.
You can use below script - but you must first visit notifications and disable all the tick boxes for audio and popup for ALL fields in ALL application you wish to control, the script below is generic and moves ALL configs created out of the way and kills knotify which then picks up new config. It moves out of the way to enable originial config aka notification.sh start It puts back your config which disables all notifications you disabled aka notification.sh stop
so in the code for watching-film.sh you can obviously first save this script lets say notify.sh in scripts folder. then in the bit that it disables screen saver add one line /home/user/scripts/notify.sh stop and when screen saver is re-enabled you can do /home/user/scripts/notify.sh start I have been testing script and it works I run ./notify.sh stop and then pull out power cable and knotify4 stops alerting the audio and actual pop up message of power cable being pulled out I then run ./notify.sh and pull out cable again and it pops up and makes noise
Last edited by vahid on Sat Jul 04, 2009 11:46 am, edited 2 times in total.
|
Registered Member
|
View This script for automated powerdevil notification disabler.
The article explains how you can convert any RC file to a one line shell script variable which can then be used on any KDE machine. The thing with notification is that you first need to edit notification settings from system settings - this then generates the specific RC file with your specific settings which in all cases will be null values for popup and sound in the config. This means on any new machine you setup you also need to re-tweek the notifications. Using this script from this post if you first setup one machine exactly as you want it with all notifications disabled then run the script this will generated all the variables for ALL notifications once you have the shell script you can either post the generated notification script to the other post or re-use it yourself on any other KDE desktop. I hope it makes better sense
Last edited by vahid on Sat Jul 04, 2009 11:40 am, edited 2 times in total.
|
KDE Developer
|
Just some ideas for improvements:
- don't assume a certain home directory or only do it if $HOME is not set - check kde4-config --localprefix and the first directory in kde4-config --path config Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
thanks I have updated the above script it is a lot easier and will work perfectly.
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot]