fix: streamdeck new config format

This commit is contained in:
Patrick 2024-07-02 23:18:17 +02:00
parent b5676aa2aa
commit 33cd733ff8
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
2 changed files with 111 additions and 111 deletions

View file

@ -16,7 +16,7 @@ in {
home-manager.sharedModules = [ home-manager.sharedModules = [
({config, ...}: let ({config, ...}: let
cfg = settingsFormat.generate "config.json" { cfg = settingsFormat.generate "config.json" {
streamdeck_ui_version = 1; streamdeck_ui_version = 2;
state = config.programs.streamdeck-ui.settings; state = config.programs.streamdeck-ui.settings;
}; };
preStart = pkgs.writeShellScript "streamdeck-setup-config" '' preStart = pkgs.writeShellScript "streamdeck-setup-config" ''

View file

@ -3,125 +3,125 @@
enable = true; enable = true;
settings = { settings = {
# Device ID # Device ID
state = { "AL31H1B01852" = {
"AL31H1B01852" = { # fuck you streamdeck?
buttons = { # why no distinction between settings and state????
# Page number rotation = 0;
"0" = { buttons = {
# button number # Page number
"5" = { "0" = {
state = 0; # button number
states = { "5" = {
"0" = { state = 0;
# keyInput to press states = {
keys = "ctrl+F7"; "0" = {
# Text shown on button # keyInput to press
#text = "mute"; keys = "ctrl+F7";
icon = config.images.images."mic.png"; # Text shown on button
# Text position #text = "mute";
text_vertical_align = "middle-bottom"; icon = config.images.images."mic.png";
background_color = "#7289DA"; # Text position
}; text_vertical_align = "middle-bottom";
}; background_color = "#7289DA";
};
"0" = {
state = 0;
states = {
"0" = {
keys = "ctrl+F9";
icon = config.images.images."wallpaper.png";
background_color = "#7289DA";
};
};
};
"6" = {
state = 0;
states = {
"0" = {
keys = "ctrl+F8";
icon = config.images.images."heads.png";
background_color = "#7289DA";
};
};
};
"14" = {
state = 0;
states = {
"0" = {
keys = "cmd+F12";
icon = config.images.images."screenshot.png";
text_vertical_align = "middle";
background_color = config.lib.stylix.colors.withHashtag.base09;
};
};
};
"9" = {
state = 0;
states = {
"0" = {
keys = "cmd+F11";
icon = config.images.images."screenshot.png";
text = "SAVE";
text_vertical_align = "middle";
font = "${config.stylix.fonts.serif.package}/share/fonts/truetype/DejaVuSerif.ttf";
background_color = config.lib.stylix.colors.withHashtag.base09;
};
};
};
"4" = {
state = 0;
states = {
"0" = {
keys = "cmd+F10";
icon = config.images.images."screenshot.png";
text = "QR";
text_vertical_align = "middle";
background_color = config.lib.stylix.colors.withHashtag.base09;
};
};
};
"3" = {
state = 0;
states = {
"0" = {
keys = "cmd+F9";
icon = config.images.images."screenshot.png";
text = "OCR";
text_vertical_align = "middle";
background_color = config.lib.stylix.colors.withHashtag.base09;
};
};
};
"13" = {
state = 0;
states = {
"0" = {
icon = config.images.images."player.png";
switch_page = 2;
};
}; };
}; };
}; };
"1" = { "0" = {
"0" = { state = 0;
state = 0; states = {
states = { "0" = {
"0" = { keys = "ctrl+F9";
icon = config.images.images."back.png"; icon = config.images.images."wallpaper.png";
switch_page = 1; background_color = "#7289DA";
background_color = config.lib.stylix.colors.withHashtag.base0C; };
}; };
};
"6" = {
state = 0;
states = {
"0" = {
keys = "ctrl+F8";
icon = config.images.images."heads.png";
background_color = "#7289DA";
};
};
};
"14" = {
state = 0;
states = {
"0" = {
keys = "cmd+F12";
icon = config.images.images."screenshot.png";
text_vertical_align = "middle";
background_color = config.lib.stylix.colors.withHashtag.base09;
};
};
};
"9" = {
state = 0;
states = {
"0" = {
keys = "cmd+F11";
icon = config.images.images."screenshot.png";
text = "SAVE";
text_vertical_align = "middle";
font = "${config.stylix.fonts.serif.package}/share/fonts/truetype/DejaVuSerif.ttf";
background_color = config.lib.stylix.colors.withHashtag.base09;
};
};
};
"4" = {
state = 0;
states = {
"0" = {
keys = "cmd+F10";
icon = config.images.images."screenshot.png";
text = "QR";
text_vertical_align = "middle";
background_color = config.lib.stylix.colors.withHashtag.base09;
};
};
};
"3" = {
state = 0;
states = {
"0" = {
keys = "cmd+F9";
icon = config.images.images."screenshot.png";
text = "OCR";
text_vertical_align = "middle";
background_color = config.lib.stylix.colors.withHashtag.base09;
};
};
};
"13" = {
state = 0;
states = {
"0" = {
icon = config.images.images."player.png";
switch_page = 2;
};
};
};
};
"1" = {
"0" = {
state = 0;
states = {
"0" = {
icon = config.images.images."back.png";
switch_page = 1;
background_color = config.lib.stylix.colors.withHashtag.base0C;
}; };
}; };
}; };
}; };
page = 0; # The startup page
brightness = 99; # brighness value between 0 and 99
display_timeout = 0; # dimmer timeout in seconds
brightness_dimmed = 99; # dimmed brighness
}; };
page = 0; # The startup page
brightness = 99; # brighness value between 0 and 99
display_timeout = 0; # dimmer timeout in seconds
brightness_dimmed = 99; # dimmed brighness
}; };
streamdeck_ui_version = 2;
}; };
}; };
} }