summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg')
-rw-r--r--macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg117
1 files changed, 117 insertions, 0 deletions
diff --git a/macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg b/macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg
new file mode 100644
index 0000000000..fce09fcdcf
--- /dev/null
+++ b/macros/latex/contrib/bfh-ci/tex/bfh-layout-terminal.cfg
@@ -0,0 +1,117 @@
+%% This is file `bfh-layout-tabular.cfg' version 2.0.0 (2021/12/23),
+%% it is part of
+%% BFH-CI -- Corporate Design for Bern University of Applied Sciences
+%% ----------------------------------------------------------------------------
+%%
+%% Copyright (C) 2021 by
+%% Marei Peischl <marei@peitex.de>
+%% Andreas Habegger <andreas.habegger@bfh.ch>
+%%
+%% ============================================================================
+%% This work may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% http://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008/05/04 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainers of this work are
+%% Marei Peischl <bfh-ci@peitex.de>
+%% Andreas Habegger <andreas.habegger@bfh.ch>
+%%
+%% The development respository can be found at
+%% https://gitlab.ti.bfh.ch/bfh-latex/bfh-ci/
+%% Please use the issue tracker for feedback!
+%%
+%% ============================================================================
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesFile{bfh-layout-tabular.cfg}[2021/12/23 v2.0.0 terminal configuration for bfhlayout]
+
+\RequirePackage{bfhcolors}
+\RequirePackage{tcolorbox}
+\RequirePackage{url}
+
+\tcbuselibrary{skins,xparse,listings}
+
+\colorlet{ubuntu-terminalBackground}{violet!50!black}
+\colorlet{ubuntu-terminalText}{white}
+\colorlet{ubuntu-terminalFrame}{gray!65!black}
+\colorlet{ubuntu-terminalFirstBullet}{orange}
+\colorlet{ubuntu-terminalSecondBullet}{gray}
+\colorlet{ubuntu-terminalThirdBullet}{gray}
+
+%define key because we receive an error for setting them in case minted isn't loaded
+\csname @ifpackageloaded\endcsname{minted}{}{
+ \tcbset{minted options/.style={}}
+}
+
+
+\newcommand{\BFHterminalFormatLine}{%
+ \def\FancyVerbFormatLine##1{\BFHterminalPrompt{}##1}%
+}
+\newtcblisting{ubuntu}{ %
+ colback=ubuntu-terminalBackground,
+ colupper=ubuntu-terminalText,
+ colframe=ubuntu-terminalFrame,
+ listing only,
+ listing options={style=tcblatex,language=sh,escapeinside=``,},
+ listing inputencoding=utf8,
+ minted options={escapeinside=\\`\\`,autogobble,formatcom=\BFHterminalFormatLine,breaklines,breaksymbol=\quad},
+ size=small,
+ halign title=flush left,
+ title={\textcolor{ubuntu-terminalFirstBullet}{\huge{$\bullet$}}{\textcolor{ubuntu-terminalSecondBullet}{\huge{$\bullet$}}}{\textcolor{ubuntu-terminalThirdBullet}{\huge{$\bullet$}}}},
+ every listing line={\BFHterminalPrompt{}}
+} %%
+
+\newcommand{\setupLinuxPrompt}[1]{\pgfkeys{/terminal/.cd,host=ubuntu,#1}%
+ \gdef\BFHterminalPrompt{\textcolor{\TerminalColor}{\small\ttfamily\bfseries \TerminalUser\url{@}\TerminalHost{\textcolor{ubuntu-terminalText}:}\textcolor{ubuntu-terminalText}{\url{~}}{\textcolor{ubuntu-terminalText}\TerminalPromptChar}\,}}
+ \lstset{backgroundcolor=}
+ \lstset{frame=}
+ \lstset{numberstyle=}
+} %%tabular
+
+\colorlet{macosx-terminalBackground}{white}
+\colorlet{macosx-terminalText}{black}
+\colorlet{macosx-terminalFrame}{gray!25}
+\colorlet{macosx-terminalFirstBullet}{red!65}
+\colorlet{macosx-terminalSecondBullet}{orange!52!yellow}
+\colorlet{macosx-terminalThirdBullet}{green!80!black}
+
+\newtcblisting{macos}{ %
+ colback=macosx-terminalBackground,
+ colupper=macosx-terminalText,
+ colframe=macosx-terminalFrame,
+ listing only,
+ listing options={style=tcblatex,language=sh,escapeinside=``},
+ listing inputencoding=utf8,
+ size=small,
+ halign title=flush left,
+ title={\textcolor{macosx-terminalFirstBullet}{\huge\ttfamily\bfseries{$\bullet$}\textcolor{macosx-terminalSecondBullet}{\huge\ttfamily\bfseries{$\bullet$}\textcolor{macosx-terminalThirdBullet}{\huge\ttfamily\bfseries{$\bullet$}}}}},
+ every listing line={\BFHterminalPrompt{}},
+ minted options={escapeinside=\\`\\`,autogobble,formatcom=\BFHterminalFormatLine,breaklines,breaksymbol=\quad}
+}
+
+\newcommand{\setupOSXPrompt}[1]{\pgfkeys{/terminal/.cd,host=macintosh,#1}%
+ \gdef\BFHterminalPrompt{\textcolor{\TerminalColor}{\small\ttfamily\bfseries \TerminalUser\url{@}\TerminalHost{\textcolor{macosx-terminalText}:}\textcolor{macosx-terminalText}{\url{~}}{\textcolor{macosx-terminalText}\TerminalPromptChar}\,}}
+} %%
+
+
+\pgfkeys{
+ /terminal/.cd,
+ user/.code={\gdef\TerminalUser{#1}},user={},
+ host/.code={\gdef\TerminalHost{#1}},host={},
+ color/.code={\gdef\TerminalColor{#1}},color=whyite,
+ prompt char/.code={\gdef\TerminalPromptChar{#1}},
+ prompt char=\$,
+ root/.style={user=root,color=BFH-MediumRed,prompt char=\#},
+ student/.style={user=student,color=BFH-LightGreen,prompt char=\$},
+ remote/.style={user=user,host=remotehost,color=BFH-LightPurple,prompt char=\$},
+} %%
+
+\newcommand{\StartConsole}{\gdef\BFHterminalPrompt{}}
+
+\endinput \ No newline at end of file