another bla
This commit is contained in:
29
chap/X11.tex
29
chap/X11.tex
@@ -12,6 +12,14 @@ $ fc-list | awk -F ":" '{print $1}' | sort -u
|
||||
|
||||
Comment faire pour visualiser la plénitude des formes de mes fontes ?
|
||||
|
||||
\begin{verbatim}
|
||||
tth@debian:~/Devel/TetaTricks$ man fontimage
|
||||
No manual entry for fontimage
|
||||
See 'man 7 undocumented' for help when manual pages are not available.
|
||||
tth@debian:~/Devel/TetaTricks$
|
||||
\end{verbatim}
|
||||
|
||||
Wtf\index{Wtf} ?
|
||||
|
||||
%-------------------------------------------------------------------
|
||||
\section{Xephyr}
|
||||
@@ -74,29 +82,31 @@ protocole de X11. \textsl{Big win, bro !}
|
||||
|
||||
La démarche d'utilisation n'étant pas immédiate, nous allons
|
||||
commencer par un petit exemple : déplacer un Xlogo sur l'écran.
|
||||
Et comme un petit script vaut mieux qu'un long discours~:
|
||||
|
||||
\lstinputlisting[language=sh]{code/move-xlogo.sh}
|
||||
|
||||
La première étape est le lancement de la cible en arrière-plan.
|
||||
La seconde est la récupération de l'indentifiant
|
||||
(interne à X11) de la fenêtre concernée.
|
||||
|
||||
|
||||
\begin{verbatim}
|
||||
$ xlogo &
|
||||
[3] 2674
|
||||
$ WIN=$(xdotool search -name xlogo)
|
||||
$ echo $WIN
|
||||
69206019
|
||||
$
|
||||
\end{verbatim}
|
||||
|
||||
Voilà\footnote{en français dans le texte}, nous savons maintenant
|
||||
Voilà\footnote{En français dans le texte.}, nous savons maintenant
|
||||
à quelle fenêtre causer : par son numéro d'identification.
|
||||
Le problême des multiples fenêtres du même nom sera abordé
|
||||
ultérieurement.
|
||||
|
||||
Déplaçons donc notre widget\dots
|
||||
ultérieurement. Nous pouvons maintenant déplacer notre widget
|
||||
avec vigueur\dots
|
||||
|
||||
\begin{verbatim}
|
||||
$ xdotool windowmove $WIN 10 10
|
||||
$
|
||||
\end{verbatim}
|
||||
|
||||
C'est simple, non ?
|
||||
@@ -110,6 +120,13 @@ Vous avez pratiqué la \textsl{Xlib} ? Avez-vous aimé ?
|
||||
Si vous ne savez pas quoi répondre, vous n'avez pas compris
|
||||
la question.
|
||||
|
||||
|
||||
\begin{quote}
|
||||
The X protocol C-language Binding (XCB) is a replacement for Xlib
|
||||
featuring a small footprint, latency hiding, direct access to the
|
||||
protocol, improved threading support, and extensibility.
|
||||
\end{quote}
|
||||
|
||||
%
|
||||
% https://xcb.freedesktop.org/tutorial/basicwindowsanddrawing/
|
||||
%
|
||||
|
||||
@@ -31,32 +31,15 @@ Voici un exemple concret
|
||||
qui montre l'essentiel pour bien débuter. C'est une fonction
|
||||
écrite en bash\index{bash} qui rajoute un texte sur une image. :
|
||||
|
||||
\begin{verbatim}
|
||||
function tagpic
|
||||
{
|
||||
infile="$1"
|
||||
outfile="$2"
|
||||
texte="$3"
|
||||
txtfont=" -font Utopia "
|
||||
fontsize=" -pointsize 96 -kerning 6 "
|
||||
color=" -fill Gray20 -stroke White "
|
||||
txtopts=" -antialias -alpha off $txtfont "
|
||||
convert $infile \
|
||||
${txtopts} \
|
||||
${txtfont} ${fontsize} \
|
||||
${color} \
|
||||
-gravity South \
|
||||
-annotate +0+85 "${texte}" \
|
||||
$outfile
|
||||
}
|
||||
\end{verbatim}
|
||||
\lstinputlisting[language=sh]{code/tagpic.sh}
|
||||
|
||||
Quelques explications semblent nécessaires, parce que certaines
|
||||
options sont un peu ésotériques...
|
||||
options sont un peu ésotériques et parfois inter-dépendantes\dots
|
||||
|
||||
\begin{itemize}
|
||||
\item{txtfont}
|
||||
\item{fontsize}
|
||||
\item{kerning}
|
||||
\item{colors}
|
||||
\item{txtopts}
|
||||
\item{-gravity}
|
||||
|
||||
@@ -34,7 +34,7 @@ condimentum ante in metus iaculis quis congue diam commodo.
|
||||
%-------------------------------------------------------------
|
||||
|
||||
\section{roff}
|
||||
\index{roff}
|
||||
\index{roff}\label{roff}
|
||||
|
||||
\textbf{Roff} est l'outil qui a permis à quelques hackers légendaire
|
||||
de justifier auprès de leur hiérarchie le développement d'une machine
|
||||
|
||||
Reference in New Issue
Block a user