settings = {
  core = {
    real_name = "Julien Moutinho";
    user_name = "julm";
    nick = "julm";
    timestamp_format = "%H:%M   ";
    log_create_mode = "660";
    log_timestamp = "%Y-%m-%d %H:%M:%S%p ";
    settings_autosave = "no";
  };
  "irc/core" = {
    alternate_nick = "julm_";
    # Recommended by https://github.com/cryptodotis/irssi-otr/blob/master/README.md
    cmd_queue_speed = "1msec"; 
  };
  silc = {
    sign_private_messages = "yes";
    sign_channel_messages = "yes";
  };
  "fe-common/core" = {
    autolog = "yes";
    autolog_path = "~/log/irssi/$tag/$0/%Y-%m-%d.log";
    names_max_columns = "9";
    autolog_ignore_targets = "FreeNode/NickServ GeekNode/C";
    beep_msg_level = "MSGS NOTICES INVITES DCC DCCMSGS HILIGHT";
  };
  "fe-text" = {
    actlist_sort = "refnum";
    paste_join_multiline = "no";
  };
  "perl/core/scripts" = {
    awl_block = "20";
    awl_shared_sbar = "OFF";
    awl_viewer = "no";
    nicklist_width = "13";
    nickcolor_enable_prefix = "OFF";
    nickcolor_enable_truncate = "ON";
    nickcolor_truncate_value = "-13";
    title_string = "IRC: $winname$T";
  };
  #proxy = {
  #  irssiproxy_password = "";
  #  irssiproxy_ports = "GeekNode=2777 FreeNode=2778 OFTC=2779 ToileLibre=2780 IndyMedia=2781";
  #  irssiproxy_bind = "127.0.0.1";
  #};
};
chatnets = {
  FreeNode = {
    type = "IRC";
    nick = "julm";
    autosendcmd = "";
    # Cannot use dynamic password on SASL, and sasl.auth is not encrypted.
    #sasl_mechanism = "PLAIN";
    #sasl_username = "julm";
    #sasl_password = "<password:FreeNode>";
  };
  GeekNode = {
    type = "IRC";
    nick = "julm";
    autosendcmd = "passwd GeekNode msg C nick identify <password>";
  };
  ToileLibre = {
    type = "IRC";
    nick = "julm";
    autosendcmd = "";
  };
};
servers = (
  { chatnet = "FreeNode";
    address = "irc.freenode.net";
    port = "6697";
    use_ssl = "yes";
    ssl_verify = "yes";
    autoconnect = "yes";
    password = "<password:FreeNode>";
  },
  { chatnet = "GeekNode";
    address = "irc.geeknode.net";
    port = "6697";
    use_ssl = "yes";
    ssl_verify = "yes";
    autoconnect = "yes";
    # GeekNode does not use NickServ but C
    #password = "<password:GeekNode>";
  },
  { chatnet = "IndyMedia";
    address = "irc.indymedia.org";
    port = "6697";
    use_ssl = "yes";
    ssl_verify = "yes";
    autoconnect = "yes";
    password = "<password:IndyMedia>";
  },
  { chatnet = "ToileLibre";
    address = "lenine-irc.wirefull.org";
    port = "6697";
    use_ssl = "yes";
    ssl_verify = "no";
    autoconnect = "yes";
    password = "<password:ToileLibre>";
  }
  { chatnet = "OFTC";
    address = "irc.oftc.net";
    port = "6697";
    use_ssl = "yes";
    ssl_verify = "yes";
    autoconnect = "no";
  }
);
channels = (
  { chatnet = "FreeNode"; name = "haskell-docs"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "haskell-fr"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "haskell.nix"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "ilico"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "l_heureux-cyclage"; autojoin = "no"; },
  { chatnet = "FreeNode"; name = "lobsters-feed"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "nix-community"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "nixos"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "nixos-aarch64"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "nixos-chat"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "nixos-dev"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "nixos-fr"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "nixos-gnome"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "nixos-nur"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "nixos-security"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "nixos-systemd"; autojoin = "yes"; },
  { chatnet = "FreeNode"; name = "stupidities"; autojoin = "yes"; },
  { chatnet = "GeekNode"; name = "autogeree.net"; autojoin = "yes"; },
  { chatnet = "GeekNode"; name = "grenode"; autojoin = "yes"; },
  { chatnet = "GeekNode"; name = "gresille"; autojoin = "yes"; },
  { chatnet = "GeekNode"; name = "illyse"; autojoin = "no"; },
  { chatnet = "GeekNode"; name = "markas"; autojoin = "yes"; },
  { chatnet = "GeekNode"; name = "rezine"; autojoin = "yes"; },
  { chatnet = "GeekNode"; name = "sourcephile"; autojoin = "yes"; },
  { chatnet = "GeekNode"; name = "notre-root"; autojoin = "yes"; },
  { chatnet = "IndyMedia"; name = "fsb4"; autojoin = "yes"; }
  { chatnet = "ToileLibre"; name = "fsb3"; autojoin = "yes"; }
);
statusbar = {
  # formats:
  # when using {templates}, the template is shown only if it's argument isn't
  # empty unless no argument is given. for example {sb} is printed always,
  # but {sb $T} is printed only if $T isn't empty.
  items = {
    # start/end text in statusbars
    barstart = "{sbstart}";
    barend = "{sbend}";
    topicbarstart = "{topicsbstart}";
    topicbarend = "{topicsbend}";
    # treated "normally", you could change the time/user name to whatever
    time = "{sb $Z}";
    user = "%N{sbaway $A} ";
    # treated specially .. window is printed with non-empty windows,
    # window_empty is printed with empty windows
    #window = "{sb $winref:$tag/$itemname{sbmode $M}}";
    #window_empty = "{sb $winref{sbservertag $tag}}";
    #prompt = "{prompt $[.15]itemname}";
    #prompt_empty = "{prompt $winname}";
    #window = "{sb  $winref%K:%n$T%K(%n{sbmode $M}%K)%n}";
    #window_empty = "{sb  $winref{sbservertag $tag}}";
    window = "{sb %c$winref%K:%c$T{sbmode $M}}";
    window_empty = "{sb $winref{sbservertag $tag}}";
    prompt = "{sbmode $[-6]usermode} {sbnickmode $[1]cumode}%K$[-12]N %c>%N ";
    prompt_empty = "{sbmode $[-6]usermode}  %K$[-12]N %c>%N ";
    topic = " $topic";
    topic_empty = " Irssi v$J - http://www.irssi.org";
    # all of these treated specially, they're only displayed when needed
    #more = "-- more --";
    lag = "{sb %KLag%c:%K$0-}";
    act = "{sb %KAct%c:%n$0-}";
    away = "{sbaway $A}";
    more = "   -- more --";
  };

  # there's two type of statusbars. root statusbars are either at the top
  # of the screen or at the bottom of the screen. window statusbars are at
  # the top/bottom of each split window in screen.
  default = {
    # the "default statusbar" to be displayed at the bottom of the window.
    # contains all the normal items.

    window = {
      # window, root
      type = "window";
      # top, bottom
      placement = "bottom";
      # number
      position = "1";
      # active, inactive, always
      visible = "active";
      # list of items in statusbar in the display order
      items = {
        barstart = { priority = "100"; };
        time = { };
        window = { };
        window_empty = { };
        user = { };
        lag = { priority = "-1"; };
        act = { priority = "10"; };
        more = { priority = "-1"; alignment = "right"; };
        barend = { priority = "100"; alignment = "right"; };
        usercount = { priority = "100"; alignment = "right"; };
        otr = { };
      };
    };

    window_inact = {
      type = "window";
      placement = "bottom";
      position = "1";
      visible = "inactive";
      items = {
        barstart = { priority = "100"; };
        window = { };
        window_empty = { };
        more = { priority = "-1"; alignment = "right"; };
        barend = { priority = "100"; alignment = "right"; };
      };
      disabled = "yes";
    };

    # Treat input line as yet another statusbar :)
    # It's possible to add other items before or after the input line item.
    prompt = {
      type = "root";
      placement = "bottom";
      position = "100";
      visible = "always";
      items = {
        prompt = { priority = "-1"; };
        prompt_empty = { priority = "-1"; };
        # treated specially, this is the real input line.
        input = { priority = "10"; };
      };
    };

    topic = {
      type = "root";
      placement = "top";
      position = "1";
      visible = "always";
      items = {
        topicbarstart = { priority = "100"; };
        topic = { };
        topic_empty = { };
        topicbarend = { priority = "100"; alignment = "right"; };
      };
    };

    type = { disabled = "yes"; };
  };
};
hilights = (
  { text = "julm"; nick = "yes"; word = "yes"; },
  { text = "ju1m"; nick = "yes"; word = "yes"; }
);
ignores = (
  { level = "ALL"; mask = "luminux"; },
  { level = "ALL"; mask = "dameloo"; },
  { level = "NO_ACT ALL"; mask = "NixOS_GitHub"; },
  { level = "NO_ACT ALL"; mask = "nix-gsc-io`bot"; },
  { level = "NO_ACT ALL"; mask = "nix-build"; },
  { level = "NO_ACT ALL"; mask = "{^_^}"; },
  { level = "NO_ACT ALL"; mask = "{`_`}"; },
  { level = "CTCPS"; },
  {
    level = "JOINS PARTS QUITS NICKS";
    channels = (
      "#grenode",
      "#gresille",
      "#haskell",
      "#haskell-docs",
      "#haskell-fr",
      "#haskell-ide-engine",
      "#haskell.nix",
      "#ilico",
      "#lobsters-feed",
      "#ghc",
      "#nix-lang",
      "#nix-community",
      "#nixos",
      "#nixos-aarch64",
      "#nixos-chat",
      "#nixos-dev",
      "#nixos-fr",
      "#nixos-gnome",
      "#nixos-nur",
      "#nixos-security",
      "#nixos-systemd",
      "#nixops",
      "#purescript",
      "#rezine",
      "#spectrum"
    );
  }
);
windows = {
  1 = { immortal = "yes"; name = "(status)"; level = "ALL"; };
};