qdesk 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -2
- package/dist/screen-hue.js +7 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -56,7 +56,6 @@ let activeRecording;
|
|
|
56
56
|
let awaitingChordRemoval = false;
|
|
57
57
|
const toolWindowAtStartup = getActiveWindowHandleAndName() ?? undefined;
|
|
58
58
|
console.log("[info] Tool window at startup:", toolWindowAtStartup?.name ?? "(unknown)");
|
|
59
|
-
let removalReturnWindow;
|
|
60
59
|
const listener = startListening({
|
|
61
60
|
onEscape: (stopPropagating) => {
|
|
62
61
|
if (!activeRecording && !awaitingChordRemoval) {
|
|
@@ -75,6 +74,7 @@ const listener = startListening({
|
|
|
75
74
|
stopPropagating();
|
|
76
75
|
},
|
|
77
76
|
onChord: (chord, stopPropagating) => {
|
|
77
|
+
// recording
|
|
78
78
|
if (activeRecording) {
|
|
79
79
|
if ([ADD_CHORD, DROP_CHORD].includes(chord)) {
|
|
80
80
|
console.warn(`[warn] Ignoring ${chord} chord during active recording to avoid conflicts.`);
|
|
@@ -87,6 +87,7 @@ const listener = startListening({
|
|
|
87
87
|
printBindings();
|
|
88
88
|
return stopPropagating();
|
|
89
89
|
}
|
|
90
|
+
// removing
|
|
90
91
|
if (awaitingChordRemoval) {
|
|
91
92
|
awaitingChordRemoval = false;
|
|
92
93
|
setScreenHue("off");
|
|
@@ -99,6 +100,7 @@ const listener = startListening({
|
|
|
99
100
|
printBindings();
|
|
100
101
|
return stopPropagating();
|
|
101
102
|
}
|
|
103
|
+
// trigger recording
|
|
102
104
|
if (chord === ADD_CHORD) {
|
|
103
105
|
awaitingChordRemoval = false;
|
|
104
106
|
setScreenHue("off");
|
|
@@ -112,6 +114,7 @@ const listener = startListening({
|
|
|
112
114
|
}
|
|
113
115
|
return stopPropagating();
|
|
114
116
|
}
|
|
117
|
+
// trigger removing
|
|
115
118
|
if (chord === DROP_CHORD) {
|
|
116
119
|
if (activeRecording) {
|
|
117
120
|
activeRecording = undefined;
|
|
@@ -126,6 +129,7 @@ const listener = startListening({
|
|
|
126
129
|
setScreenHue("remove");
|
|
127
130
|
return stopPropagating();
|
|
128
131
|
}
|
|
132
|
+
// switching
|
|
129
133
|
const binding = bindings.get(chord);
|
|
130
134
|
if (binding) {
|
|
131
135
|
const result = activateWindowByHandle(binding.handle);
|
|
@@ -134,7 +138,8 @@ const listener = startListening({
|
|
|
134
138
|
bindings.delete(chord);
|
|
135
139
|
}
|
|
136
140
|
else if (result === "activated") {
|
|
137
|
-
|
|
141
|
+
binding.name = getActiveWindowHandleAndName()?.name ?? binding.name; // warm the cache to speed up subsequent switches
|
|
142
|
+
console.log(`[switch ${chord}] Switched to "${binding.name}"`);
|
|
138
143
|
}
|
|
139
144
|
else {
|
|
140
145
|
console.warn(`[switch ${chord}] Activation failed for "${binding.name}"`);
|
package/dist/screen-hue.js
CHANGED
|
@@ -22,7 +22,7 @@ const MagInitialize = magnification
|
|
|
22
22
|
const MagSetFullscreenColorEffect = magnification
|
|
23
23
|
? magnification.func("MagSetFullscreenColorEffect", "int", ["void *"])
|
|
24
24
|
: null;
|
|
25
|
-
let hasWarnedGammaFailure = false;
|
|
25
|
+
// let hasWarnedGammaFailure = false;
|
|
26
26
|
let hasWarnedMagFailure = false;
|
|
27
27
|
let magInitialized = false;
|
|
28
28
|
let activeHueBackend = "none";
|
|
@@ -121,10 +121,12 @@ export function setScreenHue(mode) {
|
|
|
121
121
|
activeHueBackend = "gamma";
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
|
-
if (!hasWarnedGammaFailure) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
// if (!hasWarnedGammaFailure) {
|
|
125
|
+
// hasWarnedGammaFailure = true;
|
|
126
|
+
// console.warn(
|
|
127
|
+
// "[warn] Gamma ramp unsupported on this display/driver, trying Magnification fallback.",
|
|
128
|
+
// );
|
|
129
|
+
// }
|
|
128
130
|
if (tryApplyMagnifierHue(mode)) {
|
|
129
131
|
activeHueBackend = "magnifier";
|
|
130
132
|
return;
|