154c154,155
< static void
---
> 
> static gboolean
176a178,194
> 
> 	return retval;
> }
> 
> static gboolean
> execute_custom_command(Acme *acme, char *gconf_key, gboolean sync) 
> {
>   char* command; 
> 
>   command = gconf_client_get_string (acme->conf_client, gconf_key, NULL);
> 	
>   if ((command != NULL) && (strcmp (command, "") != 0)) {
>     execute(command, sync);
>     return TRUE;
>   }
> 
>   return FALSE;
178a197
> 
347a367
> 
441c461,462
< 	return FALSE;
---
> 	//return FALSE;
> 	return TRUE;
446a468
> 
469,470c491,492
< 				unhookup_keysym (keys[i].key_code);
< 				break;
---
> 			  unhookup_keysym (keys[i].key_code);
> 			  break;
480,482c502,503
< 				grab = hookup_keysym (key_code,
< 						"XF86AudioPlay");
< 				break;
---
> 			  grab = hookup_keysym (key_code, "XF86AudioPlay");
> 			  break;
484,486c505,506
< 				grab = hookup_keysym (key_code,
< 						"XF86AudioPause");
< 				break;
---
> 			  grab = hookup_keysym (key_code, "XF86AudioPause");
> 			  break;
505c525,526
< 			if (key_code > 0 && grab == TRUE)
---
> 			//if (key_code > 0 && grab == TRUE)
> 			if (key_code >= 0)
553c574
< 			grab = hookup_keysym (keys[i].key_code,
---
> 		  grab = hookup_keysym (keys[i].key_code,
555c576
< 			break;
---
> 		  break;
557,559c578,579
< 			grab = hookup_keysym (keys[i].key_code,
< 					"XF86AudioPause");
< 			break;
---
> 		  grab = hookup_keysym (keys[i].key_code, "XF86AudioPause");
> 		  break;
578c598,599
< 		if (tmp > 0 && grab == TRUE)
---
> 		// if (tmp > 0 && grab == TRUE)
> 		if (tmp > 0)
627c648
< 			_("Multimedia keys daemon"),
---
> 			_("Multimedia keys daemon (slightly hacked)"),
1010,1011c1031
< do_action (int type, Acme *acme)
< {
---
> do_action (int type, Acme *acme){
1014a1035
> 
1023,1024c1044,1046
< 		do_exit_action (acme);
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/power_command", FALSE) == FALSE)
> 	    do_exit_action (acme);
> 	  break;
1029,1030c1051,1053
< 		do_media_action (acme);
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/media_command", FALSE) == FALSE)
> 	    do_media_action (acme);
> 	  break;
1032a1056,1057
> 	  execute_custom_command(acme, "/apps/acme/play_command", FALSE);
> 	  break;
1033a1059,1060
> 	  execute_custom_command(acme, "/apps/acme/pause_command", FALSE);
> 	  break;
1034a1062,1063
> 	  execute_custom_command(acme, "/apps/acme/stop_command", FALSE);
> 	  break;
1035a1065,1066
> 	  execute_custom_command(acme, "/apps/acme/previous_command", FALSE);
> 	  break;
1036a1068,1069
> 	  execute_custom_command(acme, "/apps/acme/next_command", FALSE);
> 	  break;
1038c1071,1072
< 		break;
---
> 	  execute_custom_command(acme, "/apps/acme/refresh_command", FALSE);
> 	  break;
1040,1041c1074,1076
< 		execute ("nautilus", FALSE);
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/home_command", FALSE) == FALSE)
>             execute("nautilus", FALSE);
> 	  break;
1043,1044c1078,1080
< 		execute ("gnome-search-tool", FALSE);
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/search_command", FALSE) == FALSE)
> 	    execute("gnome-search-tool", FALSE);
> 	  break;
1046,1047c1082,1084
< 		execute_this_or_that ("evolution mailto:", "balsa");
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/email_command", FALSE) == FALSE) 
> 	    execute_this_or_that("evolution mailto", "balsa");
> 	  break;
1049,1050c1086,1089
< 		execute_this_or_that ("apm", "xset dpms force off");
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/sleep_command", FALSE) == FALSE)
> 	    execute_this_or_that("apm", "xset dpms force off");
> 	  break;
> 
1052,1053c1091,1093
< 		execute ("xscreensaver-command -lock", FALSE);
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/screensaver_command", FALSE) == FALSE)
> 	    execute("xscreensaver-command -lock", FALSE);
> 	  break;
1055,1056c1095,1097
< 		execute ("gnucash", FALSE);
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/finance_command", FALSE) == FALSE)
> 	    execute("gnucash", FALSE);
> 	  break;
1058,1059c1099,1101
< 		execute ("yelp", FALSE);
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/help_command", FALSE) == FALSE)
> 	    execute("yelp", FALSE);
> 	  break;
1061,1062c1103,1105
< 		do_www_action (acme, NULL);
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/www_command", FALSE) == FALSE)
> 	    do_www_action (acme, NULL);
> 	  break;
1064,1065c1107,1109
< 		do_www_action (acme, "http://www.gnomedesktop.org");
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/groups_command", FALSE) == FALSE)
> 	    do_www_action (acme, "http://www.gnomedesktop.org");
> 	  break;
1067,1068c1111,1113
< 		execute ("gnome-calculator", FALSE);
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/calculator_command", FALSE) == FALSE)
> 	    execute("gnome-calculator", FALSE);
> 	  break;
1070,1071c1115,1117
< 		execute ("gnome-sound-recorder", FALSE);
< 		break;
---
> 	  if (execute_custom_command(acme, "/apps/acme/record_command", FALSE) == FALSE)
> 	    execute("gnome-sound-recorder", FALSE);
> 	  break;
1139c1185,1187
< 				return GDK_FILTER_CONTINUE;
---
> 			  acme->current_screen = event_screen;
> 			  do_action (keys[i].key_type, acme);
> 			  return GDK_FILTER_CONTINUE;
1143c1191
< 
---
> 			
