%%% Convenience macros for finding labs %%%
% Needed for tthe listing boxes below

\newcommand{\labs}[1]{labs/#1}
\newcommand{\currlabs}[1]{\currfiledir\labs{#1}}
\newcommand{\courselabs}[1]{\course\labs{#1}}
\newcommand{\currcourselabs}[1]{\currfiledir\courselabs{#1}}
\newcommand{\targetlabs}[1]{\targetnick/\courselabs{#1}}
\newcommand{\currtargetlabs}[1]{\currfiledir\targetlabs{#1}}

\newcommand{\targetfile}[1]{\targetnick/#1}
\newcommand{\currtargetfile}[1]{\currfiledir\targetfile{#1}}

%%% Build on the setttings from lf-boxes %%%

\tcbsetforeverylayer{
   listing only,
   listing engine=minted,
   minted style=colorful,
   minted options={fontsize=\small,breaklines,autogobble,linenos,numbersep=3mm},
}

\newcommand{\lstfirstnumber}[1]{\tcbsetforeverylayer{minted options={fontsize=\small,breaklines,autogobble,linenos,numbersep=2mm,firstnumber=#1}}}

%%% General listing boxes %%%

% codelisting [options]{title}{language}{color}{icon}
\newtcblisting{codelst}[5]{
   minted language=#3,
   listing only,
   listing engine=minted,
   minted style=colorful,
   minted options={fontsize=\small,breaklines,autogobble,linenos,numbersep=3mm},
   colbacktitle=#4,
   colback=#4!5!white,
   colframe=#4!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[#4!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{#5}}}; },
   title={#2},#1}

% codefile [options]{title}{filename}{language}{color}{icon}
\newtcbinputlisting{codefile}[6]{
   listing file={\currfiledir#3},
   minted language=#4,
   colbacktitle={#5},
   colback=#5!5!white,
   colframe=#5!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[#5!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{#6}}}; },
   title={#2},#1}

%%% Prebuilt content listing boxes %%%

%% Kernel code listings
\newtcblisting{klst}[1][]{
   breakable=true,
   minted language=text,
   minted options={fontsize=\small\color{Sepia},breaklines,autogobble},
   colbacktitle=Sepia,
   colback=black!7.5!white,
   %%   colframe=black,
   colframe=Cyan,
   left=5mm,
   title={#1}}

\newtcblisting{cbox}[1][]{
   breakable=true,
   minted language=c,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=Sepia,
   colback=black!7.5!white,
   %%   colframe=black,
   colframe=Sepia,
   left=5mm,
   title={#1}}


% Generalized file listings
\newtcblisting{filelst}[1][]{
   minted language=text,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\filecolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\filecolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\fileicon}}}; },
   title={#1}}
\newtcbinputlisting{fromfile}[2][]{
   listing file={\currfiledir#2},
   minted language=text,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\filecolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\filecolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\fileicon}}}; },
   title={#1}}
\newcommand{\fromlabs}[2][]{\fromfile[#1]{\targetlabs{#2}}}

% C code listings
\newtcblisting{clst}[1][]{
   %%minted language=C++,
   minted language=c,
   colbacktitle=\ccolor,
   colback=\ccolor!5!white,
   colframe=\ccolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\ccolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\cicon}}}; },
   title={#1}}

\newtcbinputlisting{cfile}[2][]{
   listing file={\currfiledir#2},
   %%minted language=C++,
   minted language=c,
   colbacktitle=\ccolor,
   colback=\ccolor!5!white,
   colframe=\ccolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\ccolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\cicon}}}; },
   title={#1}}

\newtcbinputlisting{cfilebrk}[2][]{
   listing file={\currfiledir#2},
   breakable,
   %%minted language=C++,
   minted language=c,
   colbacktitle=\ccolor,
   colback=\ccolor!5!white,
   colframe=\ccolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\ccolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\cicon}}}; },
   title={#1}}

% Flattened device tree listings
\newtcblisting{fdtlst}[1][]{
   minted language=bash,
   colbacktitle=\fdtcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\fdtcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\fdticon}}}; },
   title={#1}}
\newtcbinputlisting{fdtfile}[2][]{
   listing file={\currfiledir#2},
   minted language=bash,
   colbacktitle=\fdtcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\fdtcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\fdticon}}}; },
   title={#1}}

% Latex code listings
\newtcblisting{latexlst}[1][]{
   minted language=latex,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\latexcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\latexcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\latexicon}}}; },
   title={#1}}
\newtcbinputlisting{latexfile}[2][]{
   listing file={\currfiledir#2},
   minted language=latex,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\latexcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\latexcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\latexicon}}}; },
   title={#1}}

% Makefile listings
\newtcblisting{makelst}[1][]{
   minted language=make,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\makecolor,
   colback=\makecolor!5!white,
   colframe=\makecolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\makecolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\makeicon}}}; },
   title={#1}}
\newtcbinputlisting{frommakefile}[2][]{
   listing file={\currfiledir#2},
   minted language=make,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\makecolor,
   colback=\makecolor!5!white,
   colframe=\makecolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\makecolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\makeicon}}}; },
   title={#1}}

%%% Context box listings for where things should be done %%%
% These mirror boxes of similar names in lf-boxes.
% Although these colour-syntax-highlight, they don't expand macros

% CLI listings
\newtcblisting{clilst}[1][\clititle]{
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\clicolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\clicolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\cliicon}}}; },
   title={#1}}
\newtcbinputlisting{clifile}[2][\clititle]{
   listing file={\currfiledir#2},
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\clicolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\clicolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\cliicon}}}; },
   title={#1}}

% git listings
\newtcblisting{gitlst}[1][\clititle]{
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\gitcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\clicolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\giticon}}}; },
   title={#1}}
\newtcbinputlisting{gitfile}[2][\clititle]{
   listing file={\currfiledir#2},
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\gitcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\clicolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\giticon}}}; },
   title={#1}}

% Shell file (bash) listings
\newtcblisting{shlst}[1][\shtitle]{
   minted language=bash,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\shcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[red!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\shicon}}}; },
   title={#1}}

\newtcbinputlisting{shfile}[2][\shtitle]{
   listing file={\currfiledir#2},
   minted language=bash,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\shcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[red!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\shicon}}}; },
   title={#1}}
%%%%****************
\newtcbinputlisting{shfilefootnotesize}[2][\shtitle]{
   listing file={\currfiledir#2},
   minted language=bash,
   minted options={fontsize=\footnotesize,breaklines,autogobble},
   colbacktitle=\shcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[red!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\shicon}}}; },
   title={#1}}

%%%%***************
% onlaptop listings
\newtcblisting{onlaptoplst}[1][\laptoptitle]{
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\laptopcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\laptopcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\laptopicon}}}; },
   title={#1}}
\newtcbinputlisting{onlaptopfile}[2][\laptoptitle]{
   listing file={\currfiledir#2},
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\laptopcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[red!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\laptopicon}}}; },
   title={#1}}

% onserver listings
\newtcblisting{onserverlst}[1][\servertitle]{
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\servercolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[red!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\servericon}}}; },
   title={#1}}
\newtcbinputlisting{onserverfile}[2][\servertitle]{
   listing file={\currfiledir#2},
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\servercolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[red!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\servericon}}}; },
   title={#1}}

% onvm listings
\newtcblisting{onvmlst}[1][\vmtitle]{
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\vmcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\vmcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\vmicon}}}; },
   title={#1}}
\newtcbinputlisting{onvmfile}[2][\vmtitle]{
   listing file={\currfiledir#2},
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\vmcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\vmcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\vmicon}}}; },
   title={#1}}

% onhost listings
\newtcblisting{onhostlst}[1][\hosttitle]{
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\hostcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\hostcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\hosticon}}}; },
   title={#1}}
\newtcbinputlisting{onhostfile}[2][\hosttitle]{
   listing file={\currfiledir#2},
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\hostcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\hostcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\hosticon}}}; },
   title={#1}}

% ontarget listings
\newtcblisting{ontargetlst}[1][\targettitle]{
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\targetcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\targetcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\targeticon}}}; },
   title={#1}}
\newtcbinputlisting{ontargetfile}[2][\targettitle]{
   listing file={\currfiledir#2},
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\targetcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\targetcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\targeticon}}}; },
   title={#1}}

% Serial listings
\newtcblisting{seriallst}[1][\serialtitle]{
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\serialcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\serialcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\serialicon}}}; },
   title={#1}}
\newtcbinputlisting{serialfile}[2][\serialtitle]{
   listing file={\currfiledir#2},
   minted language=console,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=\serialcolor,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\serialcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\serialicon}}}; },
   title={#1}}

%%%%%%%%%%%%%%%%%%%%%%%% YAML %%%%%%%%%%%%%%%%%%%%

\newtcblisting{yamllst}[1][]{
   minted language=yaml,
   colbacktitle=\yamlcolor,
   colback=\yamlcolor!5!white,
   colframe=\yamlcolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\yamlcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\yamlicon}}}; },
   title={#1}}
\newtcbinputlisting{yamlfile}[2][]{
   listing file={\currfiledir#2},
   minted language=yaml,
   colbacktitle=\yamlcolor,
   colback=\yamlcolor!5!white,
   colframe=\yamlcolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\yamlcolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\yamlicon}}}; },
   title={#1}}
%%%%%%%%%%%%%%%%%%%%%%%% YAML %%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%% PYTHON %%%%%%%%%%%%%%%%%%%
\newtcblisting{pythonlst}[1][\pytitle]{
   minted language=python,
   colbacktitle=\pythoncolor,
   colback=\pythoncolor!5!white,
   colframe=\pythoncolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\pythoncolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\pythonicon}}}; },
   title={#1}}
\newtcbinputlisting{pythonfile}[2][]{
   listing file={\currfiledir#2},
   minted language=python,
   colbacktitle=\pythoncolor,
   colback=\pythoncolor!5!white,
   colframe=\pythoncolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\pythoncolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\pythonicon}}}; },
   title={#1}}

%%%%%%%%%%%%%%%%%%%%%%% PYTHON %%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% JSON %%%%%%%%%%%%%%%%%%%

\newtcblisting{jsonlst}[1][]{
   minted language=json,
   colbacktitle=\jsoncolor,
   colback=\jsoncolor!5!white,
   colframe=\jsoncolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\jsoncolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\jsonicon}}}; },
   title={#1}}
\newtcbinputlisting{jsonfile}[2][]{
   listing file={\currfiledir#2},
   minted language=json,
   colbacktitle=\jsoncolor,
   colback=\jsoncolor!5!white,
   colframe=\jsoncolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\jsoncolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\jsonicon}}}; },
   title={#1}}

%%%%%%%%%%%%%%%%%%%%%%% JSON %%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%% JAVA %%%%%%%%%%%%%%%%%%%
\newtcblisting{javalst}[1][\javatitle]{
   minted language=java,
   minted options={fontsize=\small,breaklines,autogobble,linenos,numbersep=3mm},
   colbacktitle=\javacolor,
   colback=\javacolor!5!white,
   colframe=\javacolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\javacolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\javaicon}}}; },
   title={#1}}
\newtcbinputlisting{javafile}[2][]{
   listing file={\currfiledir#2},
   minted language=java,
   minted options={fontsize=\small,breaklines,autogobble,linenos,numbersep=3mm},
   colbacktitle=\javacolor,
   colback=\javacolor!5!white,
   colframe=\javacolor!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[\javacolor!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\javaicon}}}; },
   title={#1}}

%%%%%%%%%%%%%%%%%%%%%%% CONFIG FILE IN GENERAL %%%%%%%%%%%%%%%%%%%


\newtcblisting{configlst}[1][\configtitle]{
   minted language=bash,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=Sepia,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[red!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\configicon}}}; },
   title={#1}}

\newtcbinputlisting{configfile}[2][\configtitle]{
   listing file={\currfiledir#2},
   minted language=bash,
   minted options={fontsize=\small,breaklines,autogobble},
   colbacktitle=Sepia,
   colback=black!5!white,
   colframe=black!75!black,
   left=5mm,
   overlay={\begin{tcbclipinterior}\fill[red!20!black!20!white] (frame.south west)
            rectangle ([xshift=5mm]frame.north west);\end{tcbclipinterior}},
   overlay={\node[anchor=north west,outer sep=-16pt] at (frame.north west)
         {\includegraphics[width=10mm]{\icon{\configicon}}}; },
   title={#1}}
