Compare commits
No commits in common. "d8b01cdaee84276389af7aa0ba32099bad28c7a2" and "b4c1817c102ea06302a13e27b21047612e46b59f" have entirely different histories.
d8b01cdaee
...
b4c1817c10
11
README.adoc
11
README.adoc
@ -70,17 +70,6 @@ exe := A_Startup . "\eizoctltray.exe"
|
||||
}
|
||||
```
|
||||
|
||||
On macOS, the simplest way to bind keyboard shortcuts is the Shortcuts app,
|
||||
with _Run Shell Scripts_ actions:
|
||||
|
||||
```
|
||||
/Applications/eizoctltray.app/Contents/MacOS/eizoctltray -q --input HDMI
|
||||
```
|
||||
|
||||
If you have issues with entering a specific key combination, like I did
|
||||
with ^⌘F1 etc., try changing it later within _System Settings_ → _Keyboard_ →
|
||||
_Keyboard Shortcuts..._ → _Services_ → _Shortcuts_.
|
||||
|
||||
elksmart-comm
|
||||
~~~~~~~~~~~~~
|
||||
_elksmart-comm_ interfaces with ELK Smart infrared dongles EKX4S and EKX5S-T,
|
||||
|
30
eizoctl.c
30
eizoctl.c
@ -1037,10 +1037,6 @@ eizo_watch(struct eizo_monitor *m, print_fn output, print_fn error)
|
||||
}
|
||||
|
||||
static const char *usage = "Usage: %s OPTION...\n\n"
|
||||
" -l, --list\n"
|
||||
" List all connected EIZO monitors, with their serial number.\n"
|
||||
" -s, --serial SERIAL\n"
|
||||
" Only act on the monitor matching the specified serial number.\n"
|
||||
" -b, --brightness [+-]BRIGHTNESS\n"
|
||||
" Change monitor brightness; values go from 0 to 1 and may be relative.\n"
|
||||
" -i, --input NAME\n"
|
||||
@ -1061,8 +1057,6 @@ run(int argc, char *argv[], print_fn output, print_fn error)
|
||||
{
|
||||
const char *name = argv[0];
|
||||
static struct option opts[] = {
|
||||
{"list", no_argument, NULL, 'l'},
|
||||
{"serial", required_argument, NULL, 's'},
|
||||
{"brightness", required_argument, NULL, 'b'},
|
||||
{"input", required_argument, NULL, 'i'},
|
||||
{"restart", no_argument, NULL, 'r'},
|
||||
@ -1075,17 +1069,11 @@ run(int argc, char *argv[], print_fn output, print_fn error)
|
||||
|
||||
int quiet = 0;
|
||||
double brightness = NAN;
|
||||
bool list = false, relative = false, restart = false, events = false;
|
||||
const char *serial = NULL, *port = NULL;
|
||||
bool relative = false, restart = false, events = false;
|
||||
const char *port = NULL;
|
||||
int c = 0;
|
||||
while ((c = getopt_long(argc, argv, "ls:b:i:reqhV", opts, NULL)) != -1)
|
||||
while ((c = getopt_long(argc, argv, "b:i:reqhV", opts, NULL)) != -1)
|
||||
switch (c) {
|
||||
case 'l':
|
||||
list = true;
|
||||
break;
|
||||
case 's':
|
||||
serial = optarg;
|
||||
break;
|
||||
case 'b':
|
||||
relative = *optarg == '+' || *optarg == '-';
|
||||
if (sscanf(optarg, "%lf", &brightness) && isfinite(brightness))
|
||||
@ -1135,6 +1123,8 @@ run(int argc, char *argv[], print_fn output, print_fn error)
|
||||
if (quiet > 1)
|
||||
error = print_dummy;
|
||||
|
||||
// It should be possible to choose a particular monitor,
|
||||
// but it is generally more useful to operate on all of them.
|
||||
struct hid_device_info *devs = hid_enumerate(USB_VID_EIZO, 0), *p = devs;
|
||||
for (; p; p = p->next) {
|
||||
struct eizo_monitor m = {};
|
||||
@ -1143,15 +1133,6 @@ run(int argc, char *argv[], print_fn output, print_fn error)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (list)
|
||||
output("%s %s\n", m.product, m.serial);
|
||||
|
||||
// Generously assuming that different products/models
|
||||
// don't share serial numbers,
|
||||
// which would otherwise deserve another filtering option.
|
||||
if (serial && strcmp(serial, m.serial))
|
||||
goto next;
|
||||
|
||||
if (isfinite(brightness)) {
|
||||
double prev = 0.;
|
||||
if (!eizo_get_brightness(&m, &prev)) {
|
||||
@ -1196,7 +1177,6 @@ run(int argc, char *argv[], print_fn output, print_fn error)
|
||||
error("%s\n", m.error);
|
||||
}
|
||||
|
||||
next:
|
||||
eizo_monitor_close(&m);
|
||||
}
|
||||
hid_free_enumeration(devs);
|
||||
|
Loading…
x
Reference in New Issue
Block a user