From 33cd733ff8ea8c8ed532a20b2d7cd10cf8e1644a Mon Sep 17 00:00:00 2001 From: Patrick Date: Tue, 2 Jul 2024 23:18:17 +0200 Subject: [PATCH] fix: streamdeck new config format --- modules-hm/streamdeck.nix | 2 +- users/patrick/streamdeck.nix | 220 +++++++++++++++++------------------ 2 files changed, 111 insertions(+), 111 deletions(-) diff --git a/modules-hm/streamdeck.nix b/modules-hm/streamdeck.nix index 50cedd7..30b641c 100644 --- a/modules-hm/streamdeck.nix +++ b/modules-hm/streamdeck.nix @@ -16,7 +16,7 @@ in { home-manager.sharedModules = [ ({config, ...}: let cfg = settingsFormat.generate "config.json" { - streamdeck_ui_version = 1; + streamdeck_ui_version = 2; state = config.programs.streamdeck-ui.settings; }; preStart = pkgs.writeShellScript "streamdeck-setup-config" '' diff --git a/users/patrick/streamdeck.nix b/users/patrick/streamdeck.nix index 34744f6..4286c29 100644 --- a/users/patrick/streamdeck.nix +++ b/users/patrick/streamdeck.nix @@ -3,125 +3,125 @@ enable = true; settings = { # Device ID - state = { - "AL31H1B01852" = { - buttons = { - # Page number - "0" = { - # button number - "5" = { - state = 0; - states = { - "0" = { - # keyInput to press - keys = "ctrl+F7"; - # Text shown on button - #text = "mute"; - icon = config.images.images."mic.png"; - # 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; - }; + "AL31H1B01852" = { + # fuck you streamdeck? + # why no distinction between settings and state???? + rotation = 0; + buttons = { + # Page number + "0" = { + # button number + "5" = { + state = 0; + states = { + "0" = { + # keyInput to press + keys = "ctrl+F7"; + # Text shown on button + #text = "mute"; + icon = config.images.images."mic.png"; + # Text position + text_vertical_align = "middle-bottom"; + background_color = "#7289DA"; }; }; }; - "1" = { - "0" = { - state = 0; - states = { - "0" = { - icon = config.images.images."back.png"; - switch_page = 1; - background_color = config.lib.stylix.colors.withHashtag.base0C; - }; + "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" = { + 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; }; }; }