diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex | 146 |
1 files changed, 145 insertions, 1 deletions
diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex index c6d706417a9..0e39796c76c 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-listings.tex @@ -1,4 +1,4 @@ -% proflycee-tools-piton.tex +% proflycee-tools-listings.tex % Copyright 2023 Cédric Pierquet % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -330,4 +330,148 @@ #2 } +%%------FakeTerm +%couleurs (inspirées par termsim !) +\definecolor{PLmpurple}{RGB}{48,10,36} +\definecolor{PLmgray}{RGB}{70,72,67} +\definecolor{PLogray}{RGB}{148,147,141} +\definecolor{PLoorange}{RGB}{233,101,56} +\definecolor{PLterminal}{RGB}{80,78,70} +\definecolor{PLlinux}{RGB}{0,39,51} +\definecolor{PLwinblue}{HTML}{1883D7} +\definecolor{PLosxgray}{HTML}{D8D6D9} + +%WINDOWS +\tcbset{PLfaketermwin/.style={% + enhanced,boxrule=1pt,sharp corners,before skip=12pt,after skip=12pt,% + colframe=PLwinblue,colback=black,colbacktitle=white,colupper=white,coltitle=black,% + titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=2pt,% + fonttitle=\bfseries\small\sffamily + } +} + +\setKVdefault[fakeTERMwin]{Titre={Terminal Windows}} + +\newcommand\PLcommandeswin{% + \begin{tikzpicture}[thick,scale=0.66] + \draw (0,0)--(1em,0) ; \draw (2em,0) rectangle (3em,1em) ; \draw (4em,1em)--(5em,0) (4em,0)--(5em,1em) ; + \end{tikzpicture}% +} + +\newcommand\termwintitre[1][]{% + \restoreKV[fakeTERMwin] + \setKV[fakeTERMwin]{#1} + \begin{tblr}{colsep=0pt,rowsep=0pt,width=\linewidth,colspec={X[l]r}} + {\footnotesize\faTerminal}~~\useKV[fakeTERMwin]{Titre} & \PLcommandeswin \\ % + \end{tblr} +} + +\DeclareTCBListing{TerminalWin}{ O{\linewidth} m !O{} }{%<taille> puis {Titre=...} puis [option] + PLfaketermwin,title={\termwintitre[#2]},% + listing only,listing engine=listings,% + listing options={style=tcblatex,language={},basicstyle=\footnotesize\ttfamily},% + width=#1,#3 +} + +%LINUX +\newcommand{\PLUbuntuWhite}{% + \begin{tikzpicture}[thick,anchor=base,baseline] + \filldraw[PLmgray] (0,0.25em) circle[radius=0.5em] ; + \end{tikzpicture}% +} +\newcommand{\PLUbuntuMin}{% + \begin{tikzpicture}[thick,anchor=base,baseline] + \filldraw[color=PLogray!50!white] (0,0.25em) circle[radius=0.5em]; + \draw[PLterminal](-0.35em,0.25em)--(0.35em,0.25em); + \end{tikzpicture}% +} +\newcommand{\PLUbuntuClose}{% + \begin{tikzpicture}[thick,anchor=base,baseline] + \filldraw[color=PLoorange!70!white] (0,0.25em) circle[radius=0.5em]; + \draw[PLterminal] (-0.32em,-0.07em)--(0.32em,0.57em); + \draw[PLterminal] (-0.32em,0.57em)--(0.32em,-0.07em); + \end{tikzpicture}% +} +\newcommand{\PLUbuntuMax}{% + \begin{tikzpicture}[thick,anchor=base,baseline] + \filldraw[color=PLogray!50!white] (0,0.25em) circle[radius=0.5em]; + \draw[PLterminal] (-0.32em,0.5em) rectangle (0.32em,0); + \end{tikzpicture}% +} + +\tcbset{PLtermlinux/.style={% + enhanced,boxrule=1pt,arc=4pt,before skip=12pt,after skip=12pt,% + colframe=PLmgray,colback=PLmpurple,colbacktitle=PLmgray,colupper=white,coltitle=white,% + titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=2pt,% + fonttitle=\bfseries\small\sffamily + } +} + +\setKVdefault[fakeTERMnux]{Titre={Terminal UNiX}} + +\newcommand\termnuxtitre[1][]{% + \restoreKV[fakeTERMnux] + \setKV[fakeTERMnux]{#1} + \begin{tblr}{colsep=0pt,rowsep=0pt,width=\linewidth,colspec={lX[c]r}} + \PLUbuntuWhite~~\PLUbuntuWhite~~\PLUbuntuWhite & \vphantom{p}\useKV[fakeTERMnux]{Titre} & \PLUbuntuMin~~\PLUbuntuMax~~\PLUbuntuClose \\ + \end{tblr} +} + +\DeclareTCBListing{TerminalUnix}{ O{\linewidth} m !O{} }{%<taille> puis {Titre=...} puis [option] + PLtermlinux,title={\termnuxtitre[#2]},% + listing only,listing engine=listings,% + listing options={style=tcblatex,language={},basicstyle=\footnotesize\ttfamily},% + width=#1,#3 +} + +%OSX +\tcbset{PLfaketermosx/.style={% + enhanced,boxrule=1pt,arc=6pt,before skip=12pt,after skip=12pt,% + colframe=PLosxgray,colback=lightgray!15,colbacktitle=PLosxgray,colupper=black,coltitle=black,% + titlerule=0.4pt,left=2pt,top=2pt,bottom=2pt,right=2pt,middle=2pt,% + fonttitle=\bfseries\small\sffamily + } +} + +\newcommand{\PLOSXRed}{% + \begin{tikzpicture}[thick,anchor=base,baseline] + \filldraw[red] (0,0.25em) circle[radius=0.45em] ; + \end{tikzpicture}% +} + +\newcommand{\PLOSXOrange}{% + \begin{tikzpicture}[thick,anchor=base,baseline] + \filldraw[orange] (0,0.25em) circle[radius=0.45em] ; + \end{tikzpicture}% +} + +\newcommand{\PLOSXGreen}{% + \begin{tikzpicture}[thick,anchor=base,baseline] + \filldraw[ForestGreen] (0,0.25em) circle[radius=0.45em] ; + \end{tikzpicture}% +} + +\newcommand{\PLOSXLG}{% + \begin{tikzpicture}[thick,anchor=base,baseline] + \filldraw[PLosxgray] (0,0.25em) circle[radius=0.45em] ; + \end{tikzpicture}% +} + +\setKVdefault[fakeTERMosx]{titre={Terminal OSX}} + +\newcommand\termosxtitre[1][]{% + \restoreKV[fakeTERMosx] + \setKV[fakeTERMosx]{#1} + \begin{tblr}{colsep=0pt,rowsep=0pt,width=\linewidth,colspec={lX[c]r}} + \PLOSXRed~\PLOSXOrange~\PLOSXGreen & \vphantom{p}\useKV[fakeTERMosx]{Titre} & \PLOSXLG~\PLOSXLG~\PLOSXLG \\ + \end{tblr} +} + +\DeclareTCBListing{TerminalOSX}{ O{\linewidth} m !O{} }{%<taille> puis {Titre=...} puis [option] + PLfaketermosx,title={\termosxtitre[#2]},% + listing only,listing engine=listings,% + listing options={style=tcblatex,language={},basicstyle=\footnotesize\ttfamily},% + width=#1,#3 +} + \endinput
\ No newline at end of file |