24 #include <kapplication.h>
25 #include <kaboutdata.h>
26 #include <kcmdlineargs.h>
34 static const char description[] =
35 I18N_NOOP(
"TDE composition manager detection utility");
37 static const char version[] =
"0.1";
44 int main(
int argc,
char **argv)
47 KAboutData::License_GPL,
"(C) 2011 Timothy Pearson", 0, 0,
"kb9vqf@pearsoncomputing.net");
48 about.addAuthor(
"Timothy Pearson", 0,
"kb9vqf@pearsoncomputing.net" );
55 config.setGroup(
"Notification Messages" );
56 if (!config.readBoolEntry(
"UseTranslucency",
false)) {
60 p = getpwuid(getuid());
64 home = getenv(
"HOME");
66 const char *configfile =
"/.kompmgr.pid";
67 int n = strlen(home)+strlen(configfile)+1;
68 filename = (
char*)malloc(n*
sizeof(
char));
70 strcat(filename, home);
71 strcat(filename, configfile);
76 pFile = fopen(filename,
"r");
79 printf(
"[kdetcompmgr] Using '%s' as kompmgr pidfile\n", filename);
81 fseek (pFile , 0 , SEEK_END);
82 unsigned long lSize = ftell (pFile);
87 kompmgrpid = atoi(buffer);
94 kill(kompmgrpid, SIGTERM);
99 KConfig config2(
"kwinrc",
true);
100 config2.setGroup(
"Notification Messages" );
101 if (config2.readBoolEntry(
"UseTranslucency",
false)) {