Explorar o código

Monitor the frontmost app

Zachary Kotlarek %!s(int64=13) %!d(string=hai) anos
pai
achega
a98f88b418
Modificáronse 4 ficheiros con 4 adicións e 2 borrados
  1. 1 1
      dmx/reset.sh
  2. 1 0
      dmx/state.pl
  3. 1 0
      frontApp/.gitignore
  4. 1 1
      frontApp/frontApp.m

+ 1 - 1
dmx/reset.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 
-PROCS="amplifierPower.pl audio.pl bias.pl color.pl debug.pl fan.pl garage.pl leds.pl overhead.pl projectorPower.pl rave.pl rifftrax.pl rope.pl"
+PROCS="amplifierPower.pl audio.pl bias.pl color.pl debug.pl fan.pl garage.pl leds.pl overhead.pl projectorPower.pl rave.pl rifftrax.pl rope.pl frontApp"
 
 # Find the PID for each named process
 PIDS=""

+ 1 - 0
dmx/state.pl

@@ -80,6 +80,7 @@ if ($HOST =~ /loki/i) {
 	$MON_FILES{'FAN_CMD'} = 'EXISTS-ON';
 
 	# OS State
+	$MON_FILES{'FRONT_APP'}   = 'VALUE';
 	$MON_FILES{'COLOR'}       = 'VALUE';
 	$MON_FILES{'AUDIO'}       = 'VALUE';
 	$MON_FILES{'AUDIO_STATE'} = 'VALUE';

+ 1 - 0
frontApp/.gitignore

@@ -0,0 +1 @@
+frontApp

+ 1 - 1
frontApp/frontApp.m

@@ -39,7 +39,7 @@ int main(int argc, const char * argv[]) {
 		[appController setOutfile:str];
 	} else {
 		NSString *tmpDir = NSTemporaryDirectory();
-		[appController setOutfile:[NSString stringWithFormat:@"%@plexMonitor/frontApp", tmpDir]];
+		[appController setOutfile:[NSString stringWithFormat:@"%@plexMonitor/FRONT_APP", tmpDir]];
 	}
 
 	// Force an update at init