Midnight-Lizard icon indicating copy to clipboard operation
Midnight-Lizard copied to clipboard

Color Scheme based on OS?

Open TahsinTariq opened this issue 3 years ago • 3 comments

Is it possible to have all the settings sync, but the color scheme is different on each OS? For example, when I'm on Pop-os, windows or Arch I'd like to have a Nordic theme. But on Manjaro, I prefer Apple mint and on Ubuntu, Monokai.

TahsinTariq avatar Mar 20 '21 09:03 TahsinTariq

If you set different color schemes there is not much left to sync. Mostly the Global settings tab. If you want to have different default color schemes but keep blocklist in sync I don't think it is possible without tricks since default settings will also be synced.

pavel-agarkov avatar Mar 20 '21 20:03 pavel-agarkov

@pavel-agarkov I'm using firefox. And it has this "Device name" option. Would it be possible to set color schemes based on the names? eg. If the name is PC-windows, set colors to nord. But if it's PC-ubuntu, set to monokai.

TahsinTariq avatar Mar 21 '21 06:03 TahsinTariq

You can create a side user script that checks computer name and sends a command to Midnight Lizard. Midnight Lizard has a built-in external command for changing the default color scheme. Here's how it can be called: https://github.com/Midnight-Lizard/Portal/blob/e866fef239f49f81f185dfaffe0967d249516588/app/projects/schemes/src/lib/extension/extension.service.ts#L121-L124 Where postMessage is just a DOM event dispatch: https://github.com/Midnight-Lizard/Portal/blob/e866fef239f49f81f185dfaffe0967d249516588/app/projects/schemes/src/lib/extension/chrome-runtime-port.ts#L38-L44

pavel-agarkov avatar Mar 21 '21 07:03 pavel-agarkov