From 30e973fea9ab6f9c3e7ee14eacec992049b8b403 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 14 Dec 2020 09:15:23 +0100 Subject: [PATCH] . --- .idea/workspace.xml | 35 ++++++++++++----------------------- scripts/lib/pc.php | 7 ++++++- scripts/lib/scenes.php | 28 ++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 24 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ecd02cd..5752476 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,11 +3,8 @@ - - + - - diff --git a/scripts/lib/pc.php b/scripts/lib/pc.php index ab75dfc..e30f41f 100644 --- a/scripts/lib/pc.php +++ b/scripts/lib/pc.php @@ -22,11 +22,16 @@ function sleepPC($device) { $s = 'device_' . $device . '_awake'; if (getState($s) == '0') { - echo 'already sleeping '.$device.' :: '.$s; + echo 'already sleeping ' . $device . ' :: ' . $s; return; } setState($s, '0'); $res = sshCommand('"C:\Program Files\Scripts\sleep.bat"', $device, false); setState($s, '0'); return $res; +} + +function pcScreensProfile($profile, $device) +{ + sshCommand('"C:\Program Files (x86)\DisplayFusion\DisplayFusionCommand.exe" -monitorloadprofile "' . $profile . '"', $device, false,true); } \ No newline at end of file diff --git a/scripts/lib/scenes.php b/scripts/lib/scenes.php index 0a03301..f4a2658 100644 --- a/scripts/lib/scenes.php +++ b/scripts/lib/scenes.php @@ -394,6 +394,12 @@ $scenes = [ 'bureau/sleeppc' => [ ['type' => 'function', 'function' => 'sleepPC', 'args' => ['avion']], ], + 'bureau/screens/off' => [ + ['type' => 'function', 'function' => 'pcScreensProfile', 'args' => ['Games', 'avion']] + ], + 'bureau/screens/on' => [ + ['type' => 'function', 'function' => 'pcScreensProfile', 'args' => ['Tortuga', 'avion']] + ], 'bureau/auto' => [ ['type' => 'function', 'function' => 'bureauAuto', 'args' => [true]], ], @@ -405,81 +411,103 @@ $scenes = [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'SdXwtZu5PCDjK2h'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'lumineux'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/veilleuse' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'ooQq4Jfbf1CleDy'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'veilleuse'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/flowers' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'mJ-AVlYFyL5x1cN'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'flowers'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], + ], + 'bureau/videogames' => [ + ['type' => 'hue', 'group' => $bureau, 'scene' => 'ooQq4Jfbf1CleDy'], + ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'veilleuse'], + ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/off'], ], 'bureau/tchernobyl' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'KoByn2ehWHDdchu'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'tchernobyl'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/outrun' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => '9TzWQt6f7-EgVtm'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'outrun'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/boreal' => [ ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'boreal'], ['type' => 'hue', 'group' => $bureau, 'scene' => 'dJaWFQBb0APEgtL'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/tropical' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'biXLpKpIZYDlxen'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'tropical'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/lounge' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'vvE8WAMdNpgswrw'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'lounge'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/focus' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'yPYgG-zQWuAA13d'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'space'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/tonic' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'S-YiVWKsEKipL0G'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'tonic'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/lecture' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'Hjr7rfz4LC9xVoB'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'lecture'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/chillout' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => '-UOMTUG6z-hMbRA'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'chillout'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/tamise' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => '8fgGg2ylE4aO3t3'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'tamise'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/beach' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => '0mPAKOl-Kw8Fwb1'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'beach'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/jellyfish' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'VhHVIcN-nKLwP9E'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'jellyfish'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/sharks' => [ ['type' => 'hue', 'group' => $bureau, 'scene' => 'VhHVIcN-nKLwP9E'], ['type' => 'state', 'key' => 'bureau_gradient', 'value' => 'sharks'], ['type' => 'scene', 'scene' => 'bureau/base/on'], + ['type' => 'scene', 'scene' => 'bureau/screens/on'], ], 'bureau/off' => [ ['type' => 'function', 'function' => 'bureauAuto', 'args' => [false]], -- 2.39.5