24 #include <tdeapplication.h>
25 #include <tdeaboutdata.h>
26 #include <tdecmdlineargs.h>
29 #include <tdeconfig.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 TDEAboutData::License_GPL,
"(C) 2011-2014 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)) {
59 const char *pidfile =
"compton-tde.pid";
60 char uidstr[
sizeof(uid_t)*8+1];
61 sprintf(uidstr,
"%d", getuid());
62 int n = strlen(P_tmpdir)+strlen(uidstr)+strlen(pidfile)+3;
63 filename = (
char*)malloc(n*
sizeof(
char)+1);
65 strcat(filename, P_tmpdir);
66 strcat(filename,
"/.");
67 strcat(filename, uidstr);
68 strcat(filename,
"-");
69 strcat(filename, pidfile);
74 pFile = fopen(filename,
"r");
77 printf(
"[kdetcompmgr] Using '%s' as compton-tde pidfile\n", filename);
79 fseek (pFile , 0 , SEEK_END);
80 unsigned long lSize = ftell (pFile);
85 kompmgrpid = atoi(buffer);
92 kill(kompmgrpid, SIGTERM);
98 config2.setGroup(
"Notification Messages" );
99 if (config2.readBoolEntry(
"UseTranslucency",
false)) {