Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you update your changes in the original repo make a PR there please?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my apologies I saw you made PR to the library I will review test make a build then update this for you :)

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "librazermacos"]
path = librazermacos
url = https://github.com/stickoking/librazermacos
url = https://github.com/Logan-Harris24/librazermacos
[submodule "iohook"]
path = iohook
url = https://github.com/overcurrent/iohook
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ Accessories:

- Razer Mouse Bungee V3 Chroma
- Razer Mouse Charging Dock
- Razer Mouse Dock Pro
- Razer Thunderbolt 4 Dock Chroma

Please feel free to open pull requests for new devices you have tested.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "razer-macos",
"version": "0.4.14",
"description": "Open source color effects manager for Razer peripherals on macOS",
"version": "0.4.22",
"description": "Open source color effects manager for Razer peripherals on MacOS",
"license": "GPL-2.0-only",
"main": "src/main/index.js",
"scripts": {
Expand Down
21 changes: 21 additions & 0 deletions src/devices/basilisk_v3_pro_wired.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Razer Basilisk V3",
"productId": "0x00aa",
"mainType": "mouse",
"image": "https://m.media-amazon.com/images/I/71L-flqtTwL.__AC_SX300_SY300_QL70_FMwebp_.jpg",
"features": null,
"featuresMissing": ["oldMouseEffects", "reactive", "breathe"],
"featuresConfig": [
{
"dpi": {
"max": 30000
}
},
{
"mouseBrightness": {
"enabledLeft": false,
"enabledRight": false
}
}
]
}
21 changes: 21 additions & 0 deletions src/devices/basilisk_v3_pro_wireless.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Razer Basilisk V3",
"productId": "0x00ab",
"mainType": "mouse",
"image": "https://m.media-amazon.com/images/I/71L-flqtTwL.__AC_SX300_SY300_QL70_FMwebp_.jpg",
"features": null,
"featuresMissing": ["oldMouseEffects", "reactive", "breathe"],
"featuresConfig": [
{
"dpi": {
"max": 30000
}
},
{
"mouseBrightness": {
"enabledLeft": false,
"enabledRight": false
}
}
]
}
7 changes: 7 additions & 0 deletions src/devices/charging_pad_chroma.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Razer Charging Pad Chroma",
"productId": "0x0F26",
"mainType": "accessory",
"image": "https://dl.razerzone.com/Images/ChargingPadChroma/CPC-ProductImage.png",
"features": null
}
21 changes: 21 additions & 0 deletions src/devices/deathstalker_v2_pro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Razer Deathstalker V2 Pro",
"productId": "0x0292",
"mainType": "keyboard",
"image": "https://assets2.razerzone.com/images/pnx.assets/a54bdf79abdfc0d42a0fff19047725a3/deathstalker-v2_500x500.png",
"features": null,
"featuresConfig": [
{
"ripple": {
"rows": 6,
"cols": 22
}
},
{
"wheel": {
"rows": 6,
"cols": 22
}
}
]
}
7 changes: 7 additions & 0 deletions src/devices/firefly_v2_pro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Razer Firefly V2 Pro",
"productId": "0x0c08",
"mainType": "mousemat",
"image": "https://assets3.razerzone.com/j_4_V23s9IFZcA3PJrJP6IHAzgs=/300x300/https%3A%2F%2Fhybrismediaprod.blob.core.windows.net%2Fsys-master-phoenix-images-container%2Fh7e%2Fh48%2F9763779444766%2Ffirefly-v2-pro-black-2-500x500.png",
"features": null
}
8 changes: 8 additions & 0 deletions src/devices/goliathus_chroma_3XL.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "Razer Goliathus Chroma 3XL",
"productId": "0x0C06",
"mainType": "mousemat",
"image": "https://m.media-amazon.com/images/I/71kNXyFfspL.__AC_SX300_SY300_QL70_FMwebp_.jpg",
"features": null,
"featuresMissing": ["waveSimple"]
}
7 changes: 7 additions & 0 deletions src/devices/mouse_dock_pro.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "Razer Mouse Dock Pro",
"productId": "0x00A4",
"mainType": "accessory",
"image": "https://assets2.razerzone.com/images/pnx.assets/c547009c7f47ab631871b6c23716db93/razer-mouse-dock-pro-ogimage-1200x630-v2.jpg",
"features": null
}
21 changes: 21 additions & 0 deletions src/devices/ornata_v3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "Razer Ornata V3",
"productId": "0x02a1",
"mainType": "keyboard",
"image": "https://assets3.razerzone.com/JCRG_e1sCkQ15E6iooW22TlqP0o=/300x300/https%3A%2F%2Fmedias-p1.phoenix.razer.com%2Fsys-master-phoenix-images-container%2Fhfd%2Fh73%2F9533910810654%2Fornata-v3-4-500x500.png",
"features": null,
"featuresConfig": [
{
"ripple": {
"rows": 6,
"cols": 22
}
},
{
"wheel": {
"rows": 6,
"cols": 22
}
}
]
}
27 changes: 27 additions & 0 deletions src/main/device/razerdeviceaccessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ export class RazerDeviceAccessory extends RazerDevice {
super(addon, settingsManager, stateManager, razerProperties);
}

async init() {
this.brightness = this.addon.accessoryGetBrightness(this.internalId);
return super.init();
}

getState() {
const deviceState = super.getState();
deviceState['brightness'] = this.brightness;
return deviceState;
}

resetToState(state) {
super.resetToState(state);
if(typeof state.brightness !== 'undefined') {
this.setBrightness(state.brightness);
}
}

setModeNone() {
super.setModeNone();
this.addon.accessorySetModeNone(this.internalId);
Expand Down Expand Up @@ -34,4 +52,13 @@ export class RazerDeviceAccessory extends RazerDevice {
this.setModeState('waveExtended', directionSpeed);
this.addon.accessorySetModeWave(this.internalId, directionSpeed);
}

getBrightness() {
return this.brightness;
}

setBrightness(brightness) {
this.brightness = brightness;
this.addon.accessorySetBrightness(this.internalId, brightness);
}
}
1 change: 1 addition & 0 deletions src/main/feature/featurehelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export class FeatureHelper {
new FeatureWaveExtended(),
new FeatureSpectrum(),
new FeatureBreathe(),
new FeatureBrightness(),
];
default:
console.warn("Unknown mainType "+mainType+". Can't detect feature set.");
Expand Down
18 changes: 18 additions & 0 deletions src/main/menu/menubuilderdevice.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,24 @@ function getFeatureBrightness(application, device, feature) {
updateBrightness(0);
},
},
{
label: 'Set to 25%',
click() {
updateBrightness(25);
},
},
{
label: 'Set to 50%',
click() {
updateBrightness(50);
},
},
{
label: 'Set to 75%',
click() {
updateBrightness(75);
},
},
{
label: 'Set to 100%',
click() {
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/sections/sectionsettingbrightness.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ export class SectionSettingBrightness extends SectionSettingBlock {
if (this.brightnessFeature) {
if (this.deviceSelected.mainType === "mousemat") {
return 'MouseMat Brightness';
} else {
}
else if (this.deviceSelected.mainType === "accessory") {
return 'Accessory Brightness'
}
else {
return 'Keyboard Brightness';
}
}
Expand Down