{ pkgs, lib, rice, user, secrets, ... }:
let
  channels = [
    "agurin"
    "asmongold"
    "Broeki"
    "Broxah"
    "Caedrel"
    "chrissyofficial"
    "EintrachtSpandau"
    "GamesDoneQuick"
    "gdolphn"
    "GRONKH"
    "handofblood"
    "HisWattson"
    "imls"
    "iskall85"
    "Jankos"
    "Karni"
    "KuruHS"
    "kutcherlol"
    "LCK"
    "LCS"
    "LEC"
    "lol_nemesis"
    "loltyler1"
    "LPL"
    "maxim"
    "NASA"
    "NNOPrime"
    "NoWay4u_Sir"
    "OfficialMikeShinoda"
    "ow_esports"
    "PrimeGaming"
    "PrimeLeague"
    "Rekkles"
    "riotgames"
    "Sola"
    "ThePrimeagen"
    "Tolkin"
    "Trick2g"
    "TSM_ImperialHal"
    "Xisuma"
    "zackrawrr"
  ];
  tabber = channel-name: {
    highlightsEnabled = true;
    splits2 = {
      data = {
        name = channel-name;
        type = "twitch";
      };
      filters = [ ];
      flexh = 1;
      flexv = 1;
      moderationMode = false;
      type = "split";
    };
  };
in
lib.mkIf (user != "tv")
{
  home.packages = with pkgs; [
    chatterino2
  ];

  home.file.".local/share/chatterino/Settings/settings.json".text = with secrets.chatterino; ''
  {
      "accounts": {
          "current": "${username}",
          "uid189594946": {
              "clientID": "${clientID}",
              "oauthToken": "${oauthToken}",
              "userID": "${userID}",
              "username": "${username}"
          }
      },
      "appearance": {
          "boldScale": 63.0,
          "currentFontFamily": "${rice.font.base.name}",
          "currentFontSize": 12,
          "messages": {
              "alternateMessageBackground": true,
              "lastMessageColor": "#ff7f0002",
              "lastMessagePattern": 10,
              "separateMessages": true,
              "showTimestamps": false,
              "timestampFormat": "h =mm",
              "usernameDisplayMode": 1
          },
          "splitheader": {
              "showGame": true,
              "showTitle": true,
              "showUptime": true,
              "showViewerCount": true
          },
          "tabVisibility": 1,
          "theme": {
              "name": "Black"
          }
      },
      "behaviour": {
          "pauseOnHoverDuration": 5.0,
          "showJoins": false,
          "usernameRightClickBehavior": 0,
          "usernameRightClickBehaviorWithModifier": 1
      },
      "emotes": {
          "removeSpacesBetweenEmotes": false,
          "showUnlistedSevenTVEmotes": true
      },
      "highlighting": {
          "badges": [
              {
                  "alert": false,
                  "color": "#7f7f3f49",
                  "displayName": "Broadcaster",
                  "name": "broadcaster",
                  "showInMentions": false,
                  "sound": false,
                  "soundUrl": ""
              },
              {
                  "alert": false,
                  "color": "#7f7f3f49",
                  "displayName": "Admin",
                  "name": "admin",
                  "showInMentions": false,
                  "sound": false,
                  "soundUrl": ""
              },
              {
                  "alert": false,
                  "color": "#7f7f3f49",
                  "displayName": "Staff",
                  "name": "staff",
                  "showInMentions": false,
                  "sound": false,
                  "soundUrl": ""
              },
              {
                  "alert": false,
                  "displayName": "Moderator",
                  "name": "moderator",
                  "showInMentions": false,
                  "sound": false,
                  "soundUrl": ""
              },
              {
                  "alert": false,
                  "color": "#7f7f3578",
                  "displayName": "VIP",
                  "name": "vip",
                  "showInMentions": false,
                  "sound": false,
                  "soundUrl": ""
              }
          ],
          "selfMessageHighlight": {
              "color": "#73008cff",
              "enabled": true
          }
      },
      "hotkeys": {
          "addedDefaults": [
              "change channel",
              "close popup window",
              "create clip",
              "delete",
              "emote picker",
              "focus down",
              "focus left",
              "focus right",
              "focus up",
              "go to end of input",
              "go to end of input with selection",
              "go to start of input",
              "go to start of input with selection",
              "new popup window",
              "new popup window from tab",
              "new split",
              "new tab",
              "next message",
              "open debug popup",
              "open quick switcher",
              "open settings",
              "popup accept",
              "popup focus search box",
              "popup reject",
              "popup scroll down",
              "popup scroll up",
              "popup select last tab",
              "popup select next tab",
              "popup select previous tab",
              "popup select tab #1",
              "popup select tab #2",
              "popup select tab #3",
              "popup select tab #4",
              "popup select tab #5",
              "popup select tab #6",
              "popup select tab #7",
              "popup select tab #8",
              "previous message",
              "reconnect",
              "reload emotes",
              "remove tab",
              "reopen split",
              "scroll page down",
              "scroll page up",
              "scroll to bottom",
              "scroll to top",
              "select last tab",
              "select next tab",
              "select previous tab",
              "select tab #1",
              "select tab #2",
              "select tab #3",
              "select tab #4",
              "select tab #5",
              "select tab #6",
              "select tab #7",
              "select tab #8",
              "send message",
              "send message and keep text",
              "show global search",
              "show search",
              "toggle live tabs only",
              "toggle local r9k",
              "toggle tab visibility",
              "zoom in",
              "zoom out",
              "zoom reset"
          ],
          "change channel": {
              "action": "changeChannel",
              "arguments": [],
              "category": "split",
              "keySequence": "Ctrl+R"
          },
          "close popup window": {
              "action": "delete",
              "arguments": [],
              "category": "popupWindow",
              "keySequence": "Esc"
          },
          "create clip": {
              "action": "createClip",
              "arguments": [],
              "category": "split",
              "keySequence": "Alt+X"
          },
          "delete": {
              "action": "delete",
              "arguments": [],
              "category": "split",
              "keySequence": "Ctrl+W"
          },
          "emote picker": {
              "action": "openEmotesPopup",
              "arguments": [],
              "category": "splitInput",
              "keySequence": "Ctrl+E"
          },
          "focus down": {
              "action": "focus",
              "arguments": [
                  "down"
              ],
              "category": "split",
              "keySequence": "Alt+Down"
          },
          "focus left": {
              "action": "focus",
              "arguments": [
                  "left"
              ],
              "category": "split",
              "keySequence": "Alt+Left"
          },
          "focus right": {
              "action": "focus",
              "arguments": [
                  "right"
              ],
              "category": "split",
              "keySequence": "Alt+Right"
          },
          "focus up": {
              "action": "focus",
              "arguments": [
                  "up"
              ],
              "category": "split",
              "keySequence": "Alt+Up"
          },
          "go to end of input": {
              "action": "cursorToEnd",
              "arguments": [
                  "withoutSelection"
              ],
              "category": "splitInput",
              "keySequence": "End"
          },
          "go to end of input with selection": {
              "action": "cursorToEnd",
              "arguments": [
                  "withSelection"
              ],
              "category": "splitInput",
              "keySequence": "Shift+End"
          },
          "go to start of input": {
              "action": "cursorToStart",
              "arguments": [
                  "withoutSelection"
              ],
              "category": "splitInput",
              "keySequence": "Home"
          },
          "go to start of input with selection": {
              "action": "cursorToStart",
              "arguments": [
                  "withSelection"
              ],
              "category": "splitInput",
              "keySequence": "Shift+Home"
          },
          "new popup window": {
              "action": "popup",
              "arguments": [
                  "split"
              ],
              "category": "window",
              "keySequence": "Ctrl+N"
          },
          "new popup window from tab": {
              "action": "popup",
              "arguments": [
                  "window"
              ],
              "category": "window",
              "keySequence": "Ctrl+Shift+N"
          },
          "new split": {
              "action": "newSplit",
              "arguments": [],
              "category": "window",
              "keySequence": "Ctrl+T"
          },
          "new tab": {
              "action": "newTab",
              "arguments": [],
              "category": "window",
              "keySequence": "Ctrl+Shift+T"
          },
          "next message": {
              "action": "nextMessage",
              "arguments": [],
              "category": "splitInput",
              "keySequence": "Down"
          },
          "open debug popup": {
              "action": "debug",
              "arguments": [],
              "category": "split",
              "keySequence": "F10"
          },
          "open quick switcher": {
              "action": "openQuickSwitcher",
              "arguments": [],
              "category": "window",
              "keySequence": "Ctrl+K"
          },
          "open settings": {
              "action": "openSettings",
              "arguments": [],
              "category": "window",
              "keySequence": "Ctrl+P"
          },
          "popup accept": {
              "action": "accept",
              "arguments": [],
              "category": "popupWindow",
              "keySequence": "Return"
          },
          "popup focus search box": {
              "action": "search",
              "arguments": [],
              "category": "popupWindow",
              "keySequence": "Ctrl+F"
          },
          "popup reject": {
              "action": "reject",
              "arguments": [],
              "category": "popupWindow",
              "keySequence": "Esc"
          },
          "popup scroll down": {
              "action": "scrollPage",
              "arguments": [
                  "down"
              ],
              "category": "popupWindow",
              "keySequence": "PgDown"
          },
          "popup scroll up": {
              "action": "scrollPage",
              "arguments": [
                  "up"
              ],
              "category": "popupWindow",
              "keySequence": "PgUp"
          },
          "popup select last tab": {
              "action": "openTab",
              "arguments": [
                  "last"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+9"
          },
          "popup select next tab": {
              "action": "openTab",
              "arguments": [
                  "next"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+Tab"
          },
          "popup select previous tab": {
              "action": "openTab",
              "arguments": [
                  "previous"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+Shift+Tab"
          },
          "popup select tab #1": {
              "action": "openTab",
              "arguments": [
                  "0"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+1"
          },
          "popup select tab #2": {
              "action": "openTab",
              "arguments": [
                  "1"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+2"
          },
          "popup select tab #3": {
              "action": "openTab",
              "arguments": [
                  "2"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+3"
          },
          "popup select tab #4": {
              "action": "openTab",
              "arguments": [
                  "3"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+4"
          },
          "popup select tab #5": {
              "action": "openTab",
              "arguments": [
                  "4"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+5"
          },
          "popup select tab #6": {
              "action": "openTab",
              "arguments": [
                  "5"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+6"
          },
          "popup select tab #7": {
              "action": "openTab",
              "arguments": [
                  "6"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+7"
          },
          "popup select tab #8": {
              "action": "openTab",
              "arguments": [
                  "7"
              ],
              "category": "popupWindow",
              "keySequence": "Ctrl+8"
          },
          "previous message": {
              "action": "previousMessage",
              "arguments": [],
              "category": "splitInput",
              "keySequence": "Up"
          },
          "reconnect": {
              "action": "reconnect",
              "arguments": [],
              "category": "split",
              "keySequence": "Ctrl+F5"
          },
          "reload emotes": {
              "action": "reloadEmotes",
              "arguments": [],
              "category": "split",
              "keySequence": "F5"
          },
          "remove tab": {
              "action": "removeTab",
              "arguments": [],
              "category": "window",
              "keySequence": "Ctrl+Shift+W"
          },
          "reopen split": {
              "action": "reopenSplit",
              "arguments": [],
              "category": "window",
              "keySequence": "Ctrl+G"
          },
          "scroll page down": {
              "action": "scrollPage",
              "arguments": [
                  "down"
              ],
              "category": "split",
              "keySequence": "PgDown"
          },
          "scroll page up": {
              "action": "scrollPage",
              "arguments": [
                  "up"
              ],
              "category": "split",
              "keySequence": "PgUp"
          },
          "scroll to bottom": {
              "action": "scrollToBottom",
              "arguments": [],
              "category": "split",
              "keySequence": "Ctrl+End"
          },
          "scroll to top": {
              "action": "scrollToTop",
              "arguments": [],
              "category": "split",
              "keySequence": "Ctrl+Home"
          },
          "select last tab": {
              "action": "openTab",
              "arguments": [
                  "last"
              ],
              "category": "window",
              "keySequence": "Ctrl+9"
          },
          "select next tab": {
              "action": "openTab",
              "arguments": [
                  "next"
              ],
              "category": "window",
              "keySequence": "Ctrl+Tab"
          },
          "select previous tab": {
              "action": "openTab",
              "arguments": [
                  "previous"
              ],
              "category": "window",
              "keySequence": "Ctrl+Shift+Tab"
          },
          "select tab #1": {
              "action": "openTab",
              "arguments": [
                  "0"
              ],
              "category": "window",
              "keySequence": "Ctrl+1"
          },
          "select tab #2": {
              "action": "openTab",
              "arguments": [
                  "1"
              ],
              "category": "window",
              "keySequence": "Ctrl+2"
          },
          "select tab #3": {
              "action": "openTab",
              "arguments": [
                  "2"
              ],
              "category": "window",
              "keySequence": "Ctrl+3"
          },
          "select tab #4": {
              "action": "openTab",
              "arguments": [
                  "3"
              ],
              "category": "window",
              "keySequence": "Ctrl+4"
          },
          "select tab #5": {
              "action": "openTab",
              "arguments": [
                  "4"
              ],
              "category": "window",
              "keySequence": "Ctrl+5"
          },
          "select tab #6": {
              "action": "openTab",
              "arguments": [
                  "5"
              ],
              "category": "window",
              "keySequence": "Ctrl+6"
          },
          "select tab #7": {
              "action": "openTab",
              "arguments": [
                  "6"
              ],
              "category": "window",
              "keySequence": "Ctrl+7"
          },
          "select tab #8": {
              "action": "openTab",
              "arguments": [
                  "7"
              ],
              "category": "window",
              "keySequence": "Ctrl+8"
          },
          "send message": {
              "action": "sendMessage",
              "arguments": [],
              "category": "splitInput",
              "keySequence": "Return"
          },
          "send message and keep text": {
              "action": "sendMessage",
              "arguments": [
                  "keepInput"
              ],
              "category": "splitInput",
              "keySequence": "Ctrl+Return"
          },
          "show global search": {
              "action": "showGlobalSearch",
              "arguments": [],
              "category": "split",
              "keySequence": "Ctrl+Shift+F"
          },
          "show search": {
              "action": "showSearch",
              "arguments": [],
              "category": "split",
              "keySequence": "Ctrl+F"
          },
          "toggle live tabs only": {
              "action": "setTabVisibility",
              "arguments": [
                  "toggleLiveOnly"
              ],
              "category": "window",
              "keySequence": "Ctrl+Shift+L"
          },
          "toggle local r9k": {
              "action": "toggleLocalR9K",
              "arguments": [],
              "category": "window",
              "keySequence": "Ctrl+H"
          },
          "toggle tab visibility": {
              "action": "setTabVisibility",
              "arguments": [
                  "toggle"
              ],
              "category": "window",
              "keySequence": "Ctrl+U"
          },
          "zoom in": {
              "action": "zoom",
              "arguments": [
                  "in"
              ],
              "category": "window",
              "keySequence": "Ctrl++"
          },
          "zoom out": {
              "action": "zoom",
              "arguments": [
                  "out"
              ],
              "category": "window",
              "keySequence": "Ctrl+-"
          },
          "zoom reset": {
              "action": "zoom",
              "arguments": [
                  "reset"
              ],
              "category": "window",
              "keySequence": "Ctrl+0"
          }
      },
      "misc": {
          "currentVersion": "2.5.1",
          "lockNotebookLayout": false
      },
      "similarity": {
          "hideSimilar": false,
          "hideSimilarMaxDelay": 30,
          "hideSimilarMaxMessagesToCheck": 5,
          "similarityEnabled": false
      },
      "ui": {
          "lastSelectChannelTab": 0,
          "lastSelectIrcConn": -1
      }
    }
  '';
  # home.file.".local/share/chatterino/Settings/settings.json".text = builtins.toJSON {
  #   hotkeys = {
  #     addedDefaults = [
  #       "change channel"
  #       "close popup window"
  #       "create clip"
  #       "delete"
  #       "emote picker"
  #       "focus down"
  #       "focus left"
  #       "focus right"
  #       "focus up"
  #       "go to end of input"
  #       "go to end of input with selection"
  #       "go to start of input"
  #       "go to start of input with selection"
  #       "new popup window"
  #       "new popup window from tab"
  #       "new split"
  #       "new tab"
  #       "next message"
  #       "open debug popup"
  #       "open quick switcher"
  #       "open settings"
  #       "popup accept"
  #       "popup focus search box"
  #       "popup reject"
  #       "popup scroll down"
  #       "popup scroll up"
  #       "popup select last tab"
  #       "popup select next tab"
  #       "popup select previous tab"
  #       "popup select tab #1"
  #       "popup select tab #2"
  #       "popup select tab #3"
  #       "popup select tab #4"
  #       "popup select tab #5"
  #       "popup select tab #6"
  #       "popup select tab #7"
  #       "popup select tab #8"
  #       "previous message"
  #       "reconnect"
  #       "reload emotes"
  #       "remove tab"
  #       "reopen split"
  #       "scroll page down"
  #       "scroll page up"
  #       "scroll to bottom"
  #       "scroll to top"
  #       "select last tab"
  #       "select next tab"
  #       "select previous tab"
  #       "select tab #1"
  #       "select tab #2"
  #       "select tab #3"
  #       "select tab #4"
  #       "select tab #5"
  #       "select tab #6"
  #       "select tab #7"
  #       "select tab #8"
  #       "send message"
  #       "send message and keep text"
  #       "show global search"
  #       "show search"
  #       "toggle live tabs only"
  #       "toggle local r9k"
  #       "toggle tab visibility"
  #       "zoom in"
  #       "zoom out"
  #       "zoom reset"
  #     ];
  #     "close popup window" = {
  #       action = "delete";
  #       keySequence = "Esc";
  #       category = "popupWindow";
  #       arguments = [ ];
  #     };
  #     "popup accept" = {
  #       action = "accept";
  #       keySequence = "Return";
  #       category = "popupWindow";
  #       arguments = [ ];
  #     };
  #     "popup focus search box" = {
  #       action = "search";
  #       keySequence = "Ctrl+F";
  #       category = "popupWindow";
  #       arguments = [ ];
  #     };
  #     "popup reject" = {
  #       action = "reject";
  #       keySequence = "Esc";
  #       category = "popupWindow";
  #       arguments = [ ];
  #     };
  #     "popup scroll down" = {
  #       action = "scrollPage";
  #       keySequence = "PgDown";
  #       category = "popupWindow";
  #       arguments = [
  #         "down"
  #       ];
  #     };
  #     "popup scroll up" = {
  #       action = "scrollPage";
  #       keySequence = "PgUp";
  #       category = "popupWindow";
  #       arguments = [
  #         "up"
  #       ];
  #     };
  #     "popup select last tab" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+9";
  #       category = "popupWindow";
  #       arguments = [
  #         "last"
  #       ];
  #     };
  #     "popup select next tab" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+Tab";
  #       category = "popupWindow";
  #       arguments = [
  #         "next"
  #       ];
  #     };
  #     "popup select previous tab" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+Shift+Tab";
  #       category = "popupWindow";
  #       arguments = [
  #         "previous"
  #       ];
  #     };
  #     "popup select tab #1" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+1";
  #       category = "popupWindow";
  #       arguments = [
  #         "0"
  #       ];
  #     };
  #     "popup select tab #2" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+2";
  #       category = "popupWindow";
  #       arguments = [
  #         "1"
  #       ];
  #     };
  #     "popup select tab #3" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+3";
  #       category = "popupWindow";
  #       arguments = [
  #         "2"
  #       ];
  #     };
  #     "popup select tab #4" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+4";
  #       category = "popupWindow";
  #       arguments = [
  #         "3"
  #       ];
  #     };
  #     "popup select tab #5" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+5";
  #       category = "popupWindow";
  #       arguments = [
  #         "4"
  #       ];
  #     };
  #     "popup select tab #6" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+6";
  #       category = "popupWindow";
  #       arguments = [
  #         "5"
  #       ];
  #     };
  #     "popup select tab #7" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+7";
  #       category = "popupWindow";
  #       arguments = [
  #         "6"
  #       ];
  #     };
  #     "popup select tab #8" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+8";
  #       category = "popupWindow";
  #       arguments = [
  #         "7"
  #       ];
  #     };
  #     "change channel" = {
  #       action = "changeChannel";
  #       keySequence = "Ctrl+R";
  #       category = "split";
  #       arguments = [ ];
  #     };
  #     "create clip" = {
  #       action = "createClip";
  #       keySequence = "Alt+X";
  #       category = "split";
  #       arguments = [ ];
  #     };
  #     delete = {
  #       action = "delete";
  #       keySequence = "Ctrl+W";
  #       category = "split";
  #       arguments = [ ];
  #     };
  #     "focus down" = {
  #       action = "focus";
  #       keySequence = "Alt+Down";
  #       category = "split";
  #       arguments = [
  #         "down"
  #       ];
  #     };
  #     "focus left" = {
  #       action = "focus";
  #       keySequence = "Alt+Left";
  #       category = "split";
  #       arguments = [
  #         "left"
  #       ];
  #     };
  #     "focus right" = {
  #       action = "focus";
  #       keySequence = "Alt+Right";
  #       category = "split";
  #       arguments = [
  #         "right"
  #       ];
  #     };
  #     "focus up" = {
  #       action = "focus";
  #       keySequence = "Alt+Up";
  #       category = "split";
  #       arguments = [
  #         "up"
  #       ];
  #     };
  #     "open debug popup" = {
  #       action = "debug";
  #       keySequence = "F10";
  #       category = "split";
  #       arguments = [ ];
  #     };
  #     reconnect = {
  #       action = "reconnect";
  #       keySequence = "Ctrl+F5";
  #       category = "split";
  #       arguments = [ ];
  #     };
  #     "reload emotes" = {
  #       action = "reloadEmotes";
  #       keySequence = "F5";
  #       category = "split";
  #       arguments = [ ];
  #     };
  #     "scroll page down" = {
  #       action = "scrollPage";
  #       keySequence = "PgDown";
  #       category = "split";
  #       arguments = [
  #         "down"
  #       ];
  #     };
  #     "scroll page up" = {
  #       action = "scrollPage";
  #       keySequence = "PgUp";
  #       category = "split";
  #       arguments = [
  #         "up"
  #       ];
  #     };
  #     "scroll to bottom" = {
  #       action = "scrollToBottom";
  #       keySequence = "Ctrl+End";
  #       category = "split";
  #       arguments = [ ];
  #     };
  #     "scroll to top" = {
  #       action = "scrollToTop";
  #       keySequence = "Ctrl+Home";
  #       category = "split";
  #       arguments = [ ];
  #     };
  #     "show global search" = {
  #       action = "showGlobalSearch";
  #       keySequence = "Ctrl+Shift+F";
  #       category = "split";
  #       arguments = [ ];
  #     };
  #     "show search" = {
  #       action = "showSearch";
  #       keySequence = "Ctrl+F";
  #       category = "split";
  #       arguments = [ ];
  #     };
  #     "emote picker" = {
  #       action = "openEmotesPopup";
  #       keySequence = "Ctrl+E";
  #       category = "splitInput";
  #       arguments = [ ];
  #     };
  #     "go to end of input" = {
  #       action = "cursorToEnd";
  #       keySequence = "End";
  #       category = "splitInput";
  #       arguments = [
  #         "withoutSelection"
  #       ];
  #     };
  #     "go to end of input with selection" = {
  #       action = "cursorToEnd";
  #       keySequence = "Shift+End";
  #       category = "splitInput";
  #       arguments = [
  #         "withSelection"
  #       ];
  #     };
  #     "go to start of input" = {
  #       action = "cursorToStart";
  #       keySequence = "Home";
  #       category = "splitInput";
  #       arguments = [
  #         "withoutSelection"
  #       ];
  #     };
  #     "go to start of input with selection" = {
  #       action = "cursorToStart";
  #       keySequence = "Shift+Home";
  #       category = "splitInput";
  #       arguments = [
  #         "withSelection"
  #       ];
  #     };
  #     "next message" = {
  #       action = "nextMessage";
  #       keySequence = "Down";
  #       category = "splitInput";
  #       arguments = [ ];
  #     };
  #     "previous message" = {
  #       action = "previousMessage";
  #       keySequence = "Up";
  #       category = "splitInput";
  #       arguments = [ ];
  #     };
  #     "send message" = {
  #       action = "sendMessage";
  #       keySequence = "Return";
  #       category = "splitInput";
  #       arguments = [ ];
  #     };
  #     "send message and keep text" = {
  #       action = "sendMessage";
  #       keySequence = "Ctrl+Return";
  #       category = "splitInput";
  #       arguments = [
  #         "keepInput"
  #       ];
  #     };
  #     "new popup window" = {
  #       action = "popup";
  #       keySequence = "Ctrl+N";
  #       category = "window";
  #       arguments = [
  #         "split"
  #       ];
  #     };
  #     "new popup window from tab" = {
  #       action = "popup";
  #       keySequence = "Ctrl+Shift+N";
  #       category = "window";
  #       arguments = [
  #         "window"
  #       ];
  #     };
  #     "new split" = {
  #       action = "newSplit";
  #       keySequence = "Ctrl+T";
  #       category = "window";
  #       arguments = [ ];
  #     };
  #     "new tab" = {
  #       action = "newTab";
  #       keySequence = "Ctrl+Shift+T";
  #       category = "window";
  #       arguments = [ ];
  #     };
  #     "open quick switcher" = {
  #       action = "openQuickSwitcher";
  #       keySequence = "Ctrl+K";
  #       category = "window";
  #       arguments = [ ];
  #     };
  #     "open settings" = {
  #       action = "openSettings";
  #       keySequence = "Ctrl+P";
  #       category = "window";
  #       arguments = [ ];
  #     };
  #     "remove tab" = {
  #       action = "removeTab";
  #       keySequence = "Ctrl+Shift+W";
  #       category = "window";
  #       arguments = [ ];
  #     };
  #     "reopen split" = {
  #       action = "reopenSplit";
  #       keySequence = "Ctrl+G";
  #       category = "window";
  #       arguments = [ ];
  #     };
  #     "select last tab" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+9";
  #       category = "window";
  #       arguments = [
  #         "last"
  #       ];
  #     };
  #     "select next tab" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+Tab";
  #       category = "window";
  #       arguments = [
  #         "next"
  #       ];
  #     };
  #     "select previous tab" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+Shift+Tab";
  #       category = "window";
  #       arguments = [
  #         "previous"
  #       ];
  #     };
  #     "select tab #1" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+1";
  #       category = "window";
  #       arguments = [
  #         "0"
  #       ];
  #     };
  #     "select tab #2" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+2";
  #       category = "window";
  #       arguments = [
  #         "1"
  #       ];
  #     };
  #     "select tab #3" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+3";
  #       category = "window";
  #       arguments = [
  #         "2"
  #       ];
  #     };
  #     "select tab #4" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+4";
  #       category = "window";
  #       arguments = [
  #         "3"
  #       ];
  #     };
  #     "select tab #5" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+5";
  #       category = "window";
  #       arguments = [
  #         "4"
  #       ];
  #     };
  #     "select tab #6" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+6";
  #       category = "window";
  #       arguments = [
  #         "5"
  #       ];
  #     };
  #     "select tab #7" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+7";
  #       category = "window";
  #       arguments = [
  #         "6"
  #       ];
  #     };
  #     "select tab #8" = {
  #       action = "openTab";
  #       keySequence = "Ctrl+8";
  #       category = "window";
  #       arguments = [
  #         "7"
  #       ];
  #     };
  #     "toggle live tabs only" = {
  #       action = "setTabVisibility";
  #       keySequence = "Ctrl+Shift+L";
  #       category = "window";
  #       arguments = [
  #         "toggleLiveOnly"
  #       ];
  #     };
  #     "toggle local r9k" = {
  #       action = "toggleLocalR9K";
  #       keySequence = "Ctrl+H";
  #       category = "window";
  #       arguments = [ ];
  #     };
  #     "toggle tab visibility" = {
  #       action = "setTabVisibility";
  #       keySequence = "Ctrl+U";
  #       category = "window";
  #       arguments = [
  #         "toggle"
  #       ];
  #     };
  #     "zoom in" = {
  #       action = "zoom";
  #       keySequence = "Ctrl++";
  #       category = "window";
  #       arguments = [
  #         "in"
  #       ];
  #     };
  #     "zoom out" = {
  #       action = "zoom";
  #       keySequence = "Ctrl+-";
  #       category = "window";
  #       arguments = [
  #         "out"
  #       ];
  #     };
  #     "zoom reset" = {
  #       action = "zoom";
  #       keySequence = "Ctrl+0";
  #       category = "window";
  #       arguments = [
  #         "reset"
  #       ];
  #     };
  #   };
  #   misc = {
  #     currentVersion = "2.5.1";
  #     lockNotebookLayout = false;
  #   };
  #   ui = {
  #     lastSelectChannelTab = 0;
  #     lastSelectIrcConn = -1;
  #   };
  #   appearance = {
  #     theme = {
  #       name = "Black";
  #     };
  #     tabVisibility = 1;
  #     smoothScrollingNewMessages = true;o
  #     currentFontFamily = rice.font.base.name;
  #     messages = {
  #       alternateMessageBackground = true;
  #       showTimestamps = false;
  #       timestampFormat = "h =mm";
  #       separateMessages = true;
  #       lastMessagePattern = 10;
  #       lastMessageColor = "#ff7f0002";
  #       usernameDisplayMode = 1;
  #     };
  #     currentFontSize = 12;
  #     splitheader = {
  #       showUptime = true;
  #       showViewerCount = true;
  #       showGame = true;
  #       showTitle = true;
  #     };
  #     boldScale = 63.0;
  #   };
  #   accounts = secrets.chatterino.accounts;
  #   behaviour = {
  #     pauseOnHoverDuration = 5.0;
  #     usernameRightClickBehavior = 0;
  #     usernameRightClickBehaviorWithModifier = 1;
  #     showJoins = false;
  #   };
  #   highlighting = {
  #     selfMessageHighlight = {
  #       enabled = true;
  #       color = "#73008cff";
  #     };
  #     badges = [
  #       {
  #         name = "broadcaster";
  #         displayName = "Broadcaster";
  #         showInMentions = false;
  #         alert = false;
  #         sound = false;
  #         soundUrl = "";
  #         color = "#7f7f3f49";
  #       }
  #       {
  #         name = "admin";
  #         displayName = "Admin";
  #         showInMentions = false;
  #         alert = false;
  #         sound = false;
  #         soundUrl = "";
  #         color = "#7f7f3f49";
  #       }
  #       {
  #         name = "staff";
  #         displayName = "Staff";
  #         showInMentions = false;
  #         alert = false;
  #         sound = false;
  #         soundUrl = "";
  #         color = "#7f7f3f49";
  #       }
  #       {
  #         name = "moderator";
  #         displayName = "Moderator";
  #         showInMentions = false;
  #         alert = false;
  #         sound = false;
  #         soundUrl = "";
  #       }
  #       {
  #         name = "vip";
  #         displayName = "VIP";
  #         showInMentions = false;
  #         alert = false;
  #         sound = false;
  #         soundUrl = "";
  #         color = "#7f7f3578";
  #       }
  #     ];
  #   };
  #   emotes = {
  #     removeSpacesBetweenEmotes = false;
  #     showUnlistedSevenTVEmotes = true;
  #   };
  #   similarity = {
  #     similarityEnabled = false;
  #     hideSimilar = false;
  #     hideSimilarMaxDelay = 30;
  #     hideSimilarMaxMessagesToCheck = 5;
  #   };
  # };



  home.file.".local/share/chatterino/Settings/window-layout.json".text = builtins.toJSON {
    windows = [
      {
        emotePopup = {
          x = 0;
          y = 0;
        };
        height = 569;
        state = "maximized";
        tabs = map tabber channels;
        type = "main";
        width = 943;
        x = 0;
        y = 0;
      }
    ];
  };
}
