...
 
Commits (2)
......@@ -451,3 +451,66 @@ tags
# End of https://www.gitignore.io/api/tex,linux,vim,python
sway_sut.pdf
# Created by https://www.gitignore.io/api/ruby
# Edit at https://www.gitignore.io/?templates=ruby
### Ruby ###
*.gem
*.rbc
/.config
/coverage/
/InstalledFiles
/pkg/
/spec/reports/
/spec/examples.txt
/test/tmp/
/test/version_tmp/
/tmp/
# Used by dotenv library to load environment variables.
# .env
# Ignore Byebug command history file.
.byebug_history
## Specific to RubyMotion:
.dat*
.repl_history
build/
*.bridgesupport
build-iPhoneOS/
build-iPhoneSimulator/
## Specific to RubyMotion (use of CocoaPods):
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
# vendor/Pods/
## Documentation cache and generated files:
/.yardoc/
/_yardoc/
/doc/
/rdoc/
## Environment normalization:
/.bundle/
/vendor/bundle
/lib/bundler/man/
# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# Gemfile.lock
# .ruby-version
# .ruby-gemset
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
### Ruby Patch ###
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
# .rubocop-https?--*
# End of https://www.gitignore.io/api/ruby
= Personal Honza's Blog
Jan Uhlík <[email protected]>
:icons: font
:homapage: https://uhlik.me
:homapage: https://blog.uhlik.me
// For themes see: https://github.com/darshandsoni/asciidoctor-skins
Welcome in my personal blog repository. Maybe you are asking what you can find here? Well I am not sure yet...
The idea is write short and simple articles about Linux related things such as _Arch_, _Vim_, _TeX_, _Python_, _Sway_ and much more.
......@@ -10,6 +11,11 @@ The new articles will be published *irregularly*, so do not expect that every we
I also have not decided about the language of the articles. Likely, I will switch between English and Czech with higher focus on Czech language.
The reason is pretty simple, the purpose of these articles is introduce some ideas to the Czech audience.
Used technology:
* link:https://asciidoctor.org/[Asciidoctor]
* link:https://github.com/asciidoctor/asciidoctor-reveal.js[Asciidoctor RevealJS]
* link:https://github.com/asciidoctor/docker-asciidoctor[Asciidoctor Docker Container]
== Latest articles
Tue Mar 26 14:14:26 NZDT 2019 <<czech/moving_to_sway#, Moving to Sway (czech)>>
Tue Mar 26 14:14:26 NZDT 2019 <<czech/moving_to_sway/article#, Moving to Sway (czech)>>
= Přechod na Sway (Moving to Sway)
Jan Uhlík <[email protected]>
:homapage: https://uhlik.me
:imagesdir: imgs_moving_to_sway
:homapage: https://blog.uhlik.me
:imagesdir: images
:source-highlighter: rouge
:icons: font
:toc:
......@@ -146,7 +146,7 @@ exec swayidle -w \
for_window [app_id="firefox"] inhibit_idle fullscreen
----
Alternativně lze využít link:https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor[Idle Inhibitor Module] lišty <<waybar,Waybar>>.
Alternativně lze využít link:https://github.com/Alexays/Waybar/wiki/Module:-Idle-Inhibitor[Idle Inhibitor Module] lišty <<Waybar,Waybar>>.
====
=== link:https://github.com/swaywm/swaybg[`swaybg`] - Background
......@@ -158,6 +158,7 @@ Od verze `1.1` byla správa nastavení pozadí plochy vyčleněna do samostanéh
exec swaybg --image ~/Pictures/f29.png --mode fill
----
[#Waybar]
=== link:https://github.com/Alexays/Waybar[`waybar`] - Alternative Sway bar
Výchozí lišta sway je prakticky totožná s lištou, kterou známe z i3. Je zde však možnost přejít k alternativní, modulární a široce konfigurovatelné liště `waybar`. Veškeré nastavení nalezneme v adresáři `~/.config/waybar`.
......@@ -228,7 +229,6 @@ bindsym Print exec bash -c "grim \"/home/juhlik/Pictures/Screenshot-$(date +%s).
Vše lze elegantně zabalit do skriptu, který bude volán klávesou `Print Screen`. Více informací lze vyčíst z link:https://gitlab.com/juhlik/dotfiles[Dotfiles].
====
[#waybar]
=== link:https://github.com/ammen99/wf-recorder[`wf-recorder`] - Screen recorder
Pro natáčení obrazovky pak slouží utilita `wf-recorder`.
......@@ -238,7 +238,6 @@ Sway aktuálně link:https://github.com/swaywm/sway/issues/1666[nepodporuje scre
Pokud je z nějakého důvodu (příkladem budiž seminář právě o Sway) toto řešení nedostatečné, lze využít `wf-recorder` spolu s Kernel modulem link:https://github.com/umlaeute/v4l2loopback[v4l2loopback]. Ukázkové použití lze najít v link:https://gitlab.com/juhlik/dotfiles[Dotfiles].
====
[#waybar]
=== link:https://github.com/emersion/slurp[`slurp`] - Select a region
Nedílnou součástí `grim` a `wf-recorder` je pak `slurp`, který uživately dovolí zvolit geometrii zachycované obrazovky. Například:
......@@ -247,8 +246,6 @@ Nedílnou součástí `grim` a `wf-recorder` je pak `slurp`, který uživately d
$ grim -g "$(slurp)" screenshot.png
----
[#waybar]
=== link:https://github.com/emersion/kanshi[`kanshi`] - Dynamic display configuration
Nástroj pro automatickou detekci připojeného monitoru. Syntaxe konfigurace je pak podobná jako pro `sway`. Soubor se při detekci změny prochází od shora dolů a aplikuje se první nastavení, které se shoduje s detekovanou konfigurací.
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" height="167px" width="566px" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 566 167">
<path fill="#4D4D4D" d="m179.53 51.949c-8.07-0.013-14.77 1.642-17.36 2.545l-2.67 14.401c0 0.053 13.28-3.542 19.13-3.33 9.68 0.348 10.58 3.702 10.41 8.229 0.16 0.265-2.5-4.091-10.88-4.237-10.58-0.182-25.49 3.743-25.47 19.701-0.29 17.952 13.4 23.232 22.73 23.322 8.38-0.15 12.32-3.17 14.47-4.79 2.83-2.96 6.07-5.93 9.15-9.502-2.92 5.312-5.45 8.982-8.09 11.782v2.38l12.75-2.15 0.09-34.641c-0.13-4.903 2.81-23.665-24.26-23.711v0.001zm-1.83 30.161c5.29 0.072 11.35 2.676 11.35 8.944 0.03 5.7-7.14 8.765-11.8 8.717-4.66-0.049-10.85-3.666-10.88-9.223 0.09-4.968 5.84-8.566 11.33-8.438zm34.49-26.959l-0.09 57.369 14.85-2.86 0.02-32.527c0.01-4.843 6.93-10.503 15.6-10.412 1.85-3.333 5.31-11.851 6.15-13.789-19.39-0.046-19.63 5.574-23.01 8.338-0.03-5.274-0.01-8.439-0.01-8.439l-13.51 2.322v-0.002zm83.55 7.532c-0.14-0.068-7.74-8.89-23.02-8.959-14.31-0.238-30.36 5.31-30.62 29.308 0.13 21.098 15.42 29.348 30.7 29.508 16.36 0.17 22.86-10.23 23.25-10.49-1.95-1.69-9.26-8.931-9.26-8.931s-4.56 6.501-13.42 6.583c-8.86 0.084-16.56-6.847-16.67-16.519-0.11-9.671 7.08-14.911 16.74-15.335 8.36-0.001 13.18 5.397 13.18 5.397l9.12-10.562zm18.72-27.611l-14.02 3.295 0.1 74.723 13.81-2.49 0.16-35.166c0.03-3.687 5.33-9.349 14.19-9.17 8.47 0.088 10.36 5.644 10.34 6.346l0.24 40.71 13.62-2.41 0.05-43.164c0.09-4.154-9.1-12.927-23.87-12.989-7.01 0.012-10.9 1.6-12.88 2.772-3.38 2.614-7.25 5.119-11.05 8.316 3.51-4.514 6.46-7.634 9.34-9.955l-0.03-20.816v-0.002z"/>
<path fill="#1793D1" d="m364.76 37.017l6.38-1.583-0.77 75.336-6.48 1.09 0.87-74.843zm16.97 22.482l5.61-2.467-0.72 54.018-5.4 1.11 0.51-52.661zm-1.05-19.478l4.55-3.647 3.67 4.129-4.55 3.744-3.67-4.226zm17.12 18.495l6.38-1.29-0.13 11.293c-0.01 0.485 3.67-12.616 20.51-12.324 16.36 0.09 18.86 12.675 18.73 15.496l-0.37 39.709-5.59 1.2 0.53-39.219c0.08-1.146-2.4-10.832-13.96-10.868-11.55-0.034-19.68 8.342-19.74 13.693l-0.4 34.554-6.48 1.68 0.52-53.925v0.001zm100.63 53.164l-6.38 1.29 0.13-11.29c0.01-0.48-3.67 12.62-20.51 12.33-16.36-0.1-18.85-12.68-18.73-15.502l0.37-39.711 6.78-1.356-0.46 39.224c-0.01 1.072 1.14 10.985 12.7 11.025 11.55 0.03 19.75-6.92 19.95-17.385l0.36-30.948 6.32-1.596-0.53 53.919zm13.23-53.61l-4.51 3.47 16.78 22.245-18.6 25.705 4.68 3.49 17.49-23.872 17.35 24.432 4.43-3.47-18.6-26.122 15.43-21.126-4.59-3.911-14.07 19.549-15.79-20.39zm-427.85-57.445c-7.397 18.134-11.858 29.997-20.093 47.593 5.049 5.352 11.246 11.584 21.311 18.624-10.82-4.453-18.2-8.924-23.717-13.562-10.539 21.992-27.052 53.32-60.561 113.53 26.338-15.2 46.753-24.58 65.78-28.15-0.817-3.52-1.281-7.32-1.25-11.28l0.031-0.85c0.418-16.87 9.195-29.845 19.593-28.964s18.478 15.284 18.058 32.154c-0.07 3.18-0.43 6.23-1.06 9.06 18.82 3.68 39.02 13.03 65 28.03-5.12-9.43-9.7-17.93-14.06-26.03-6.88-5.33-14.05-12.27-28.69-19.78 10.06 2.62 17.26 5.63 22.88 9-44.4-82.668-47.993-93.651-63.223-129.37l0.001-0.00519zm473.68 107.75v-4.66h-1.74v-0.62h4.19v0.62h-1.75v4.66h-0.7zm3.18 0v-5.28h1.05l1.25 3.74c0.12 0.35 0.2 0.61 0.25 0.78 0.06-0.19 0.16-0.47 0.29-0.84l1.26-3.68h0.94v5.28h-0.67v-4.42l-1.54 4.42h-0.63l-1.53-4.5v4.5h-0.67zm-392.94 43.61v-4.55h-1.7v-0.61h4.09v0.61h-1.71v4.55h-0.68zm3.1 0v-5.16h1.03l1.22 3.66c0.12 0.34 0.2 0.59 0.25 0.76 0.06-0.19 0.15-0.46 0.28-0.83l1.23-3.59h0.92v5.16h-0.66v-4.32l-1.5 4.32h-0.61l-1.5-4.39v4.39h-0.66z"/>
</svg>
\ No newline at end of file
= Title Slide
== Slide One
* Foo
* Bar
* World
== Slide Two
A Great Story
[.notes]
--
* tell anecdote
* make a point
--
demo.pdf
*.fls
*.acn
*.acr
*.alg
*.aux
*.bbl
*.blg
*.dvi
*.fdb_latexmk
*.glg
*.glo
*.gls
*.idx
*.ilg
*.ind
*.ist
*.lof
*.log
*.lot
*.maf
*.mtc
*.mtc0
*.nav
*.nlo
*.out
*.pdfsync
*.ps
*.snm
*.synctex.gz
*.toc
*.vrb
*.xdy
*.tdo
SRC = demo.tex
PDF = demo.pdf
AUX = demo.aux
TEXC := xelatex
TEXC_OPTS += -shell-escape
TEXMFHOME = $(shell kpsewhich -var-value=TEXMFHOME)
INSTALL_DIR = $(TEXMFHOME)/tex/latex/utopia
.PHONY: clean install
all: $(PDF)
$(AUX):
$(TEXC) $(TEXC_OPTS) $(SRC)
$(PDF): beamerthemeutopia.sty $(AUX) $(SRC)
$(TEXC) $(TEXC_OPTS) $(SRC)
clean:
@rm -f $(PDF)
@git clean -xf
install:
mkdir -p $(INSTALL_DIR)
cp *.sty $(INSTALL_DIR)
% Beamer theme utopia, originally mtheme
% Xavier Olive, 2015
% Original notice
%
% Copyright 2014 Matthias Vogelgesang
% Licensed under CC-BY-SA 4.0 International.
%
% The initial template comes from the HSRM beamer theme by Benjamin Weiss, which
% you can find at https://github.com/hsrmbeamertheme/hsrmbeamertheme.
%
\ProvidesPackage{beamercolorthemeutopia}
%}}}
%{{{ --- Options ----------------------
\newif\if@[email protected]@blockbg
\@[email protected]@blockbgfalse
\DeclareOptionBeamer{blockbg}{\@[email protected]@blockbgtrue}
\DeclareOptionBeamer*{%
\PackageWarning{beamercolorthemeutopia}{Unknown option `\CurrentOption'}%
}
\ProcessOptionsBeamer
%}}}
%{{{ --- Colors ---------------------
% http://paletton.com/#uid=7050t0kkJkJsntwoyp6gYgoddc4
\definecolor{mDarkBrown}{HTML}{604c38}
\definecolor{mDarkTeal}{HTML}{23373b}
\definecolor{mLightBrown}{HTML}{EB811B}
\definecolor{mMediumBrown}{HTML}{C87A2F}
\definecolor{urlColor}{HTML}{2F3E70}
\definecolor{mLightGreen}{HTML}{255A66}
\hypersetup{colorlinks,
linkcolor=urlColor,citecolor=urlColor,
filecolor=black,urlcolor=urlColor
}
\setbeamercolor{palette primary}{fg=mDarkTeal, bg=black!2}
\setbeamercolor{palette secondary}{fg=white, bg=mDarkTeal}
\setbeamercolor{palette quaternary}{fg=mDarkBrown}
\setbeamercolor{palette tertiary}{fg=white, bg=mMediumBrown}
\setbeamercolor{title}{parent=palette primary}
\setbeamercolor{subtitle}{parent=palette primary}
\setbeamercolor{author}{parent=palette primary}
\setbeamercolor{date}{parent=palette primary}
\setbeamercolor{institute}{parent=palette primary}
\setbeamercolor{section title}{parent=palette primary}
\setbeamercolor{frametitle}{parent=palette secondary}
\setbeamercolor{background canvas}{parent=palette primary}
\setbeamercolor{structure}{fg=mDarkTeal}
\setbeamercolor{normal text}{fg=black!97}
\setbeamercolor{alerted text}{fg=mLightBrown}
\setbeamercolor{example text}{fg=mLightGreen}
\setbeamercolor{footnote}{fg=mDarkTeal!50}
\setbeamercolor{footnote mark}{fg=.}
\setbeamercolor{page number in head/foot}{fg=mDarkTeal}
\if@[email protected]@blockbg
\setbeamercolor{block title}{parent=palette primary,bg=palette primary.bg!80!fg}
\setbeamercolor{block title alerted}{use=alerted text,parent=palette primary,fg=alerted text.fg}
\setbeamercolor{block title example}{use=example text,parent=palette primary,fg=example text.fg}
\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg}
\setbeamercolor{block body alerted}{parent=normal text,use=block title alerted,bg=block title alerted.bg}
\setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg}
\fi
\mode<all>
% Beamer theme utopia, originally mtheme
% Xavier Olive, 2015
% Original notice
%
% Copyright 2014 Matthias Vogelgesang
% Licensed under CC-BY-SA 4.0 International.
%
% The initial template comes from the HSRM beamer theme by Benjamin Weiss, which
% you can find at https://github.com/hsrmbeamertheme/hsrmbeamertheme.
%
\ProvidesPackage{beamerfontthemeutopia}
\RequirePackage[no-math]{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\setsansfont[BoldFont={Fira Sans}]{Fira Sans Light}
\setmonofont[Scale=0.9]{Fira Mono}
\newfontfamily\ExtraLight{Fira Sans ExtraLight}
\newfontfamily\Light{Fira Sans Light}
\newfontfamily\Book{Fira Sans}
\newfontfamily\Medium{Fira Sans Medium}
\AtBeginEnvironment{tabular}{\setsansfont[BoldFont={Fira Sans}, Numbers={Monospaced}]{Fira Sans Light}}
\setbeamerfont{title}{family=\Book, size=\Large}
\setbeamerfont{author}{family=\ExtraLight, size=\small}
\setbeamerfont{date}{family=\ExtraLight, size=\small}
\setbeamerfont{alerted text}{family=\Book}
\setbeamerfont{section title}{family=\Book, size=\Large}
\setbeamerfont{block title}{family=\Book, size=\normalsize}
\setbeamerfont{block title alerted}{family=\Book,size=\normalsize}
\setbeamerfont{subtitle}{family=\Light, size=\fontsize{12}{14}}
\setbeamerfont{frametitle}{family=\Book, series=\scshape, size=\large}
\setbeamerfont{caption}{size=\small}
\setbeamerfont{caption name}{family=\Book}
\setbeamerfont{description item}{family=\Book}
\setbeamerfont{page number in head/foot}{size=\scriptsize}
\linespread{1.15}
This diff is collapsed.
$texprefix = 'demo';
$pdf_mode = 1;
$dvi_mode = $postscript_mode = 0;
$pdflatex = 'lualatex --shell-escape %O %S';
\ No newline at end of file
\documentclass[10pt, compress, aspectratio=169]{beamer}
\usetheme{utopia}
\usepackage{booktabs}
\usepackage[scale=2]{ccicons}
\usepackage{minted}
\usepackage{graphicx}
\graphicspath{ {./images/} }
\usepackage{hyperref}
\usepgfplotslibrary{dateplot}
\usemintedstyle{trac}
\title{Sway --- tiling Wayland compositor}
\subtitle{}
\date{\today}
\author{Jan Uhlík <\href{mailto:[email protected]}{\texttt{[email protected]}}>}
\institute{AdminsSH --- Sillicon Hill}
\begin{document}
\maketitle
\begin{frame}
\frametitle{Table of Contents}
\tableofcontents
\end{frame}
\begin{frame}[fragile]
\frametitle{Let Us Begin}
\begin{figure}
\centering
\includegraphics[width=\textwidth,height=0.7\textheight,keepaspectratio]{cautionary}
\caption{Source: \href{https://xkcd.com/456/}{xkcd.com}.}
\end{figure}
\end{frame}
\section{Graphical User Interface on OS Linux}
\begin{frame}[fragile]
\frametitle{Graphical User Interface on Linux OS}
\begin{center}
\includegraphics[width=\textwidth,height=0.8\textheight,keepaspectratio]{gui}
\end{center}
\end{frame}
\begin{frame}[fragile]
\frametitle{X.Org Server}
\begin{figure}
\centering
\includegraphics[width=\textwidth,height=0.7\textheight,keepaspectratio]{x11}
\caption{Source: \href{https://en.wikipedia.org/wiki/Display_server#/media/File:X11_display_server_protocol.svg}{wikipedia.org}.}
\end{figure}
\end{frame}
\begin{frame}[fragile]
\frametitle{Wayland}
\begin{figure}
\centering
\includegraphics[width=\textwidth,height=0.7\textheight,keepaspectratio]{wayland}
\caption{Source: \href{https://en.wikipedia.org/wiki/Display_server#/media/File:Wayland_display_server_protocol.svg}{wikipedia.org}.}
\end{figure}
\end{frame}
\begin{frame}[fragile]
\frametitle{Wayland}
\begin{itemize}
\item \textbf{Architecture} --- The composition manager is a separate, additional feature in X, while Wayland merges display server and compositor as a single function. Also, it incorporates some of the tasks of the window manager, which in X is a separate client-side process.
\item \textbf{Composition} --- Compositing is optional in X, but mandatory in Wayland. Compositing in X is "active"; that is, the compositor must fetch all pixel data, which introduces latency. In Wayland, compositing is "passive", which means the compositor receives pixel data directly from clients.
\end{itemize}
% Source: \href{https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)}{wikipedia.org}
\end{frame}
\begin{frame}[fragile]
\frametitle{Wayland}
\begin{itemize}
\item \textbf{Rendering} --- The X server itself is able to perform rendering, although it can also be instructed to display a rendered window sent by a client. In contrast, Wayland does not expose any API for rendering, but delegates to clients such tasks (including the rendering of fonts, widgets, etc.). Window decorations can be rendered on the client side (e.g., by a graphics toolkit) or on the server side (by the compositor).
\item \textbf{Security} --- Wayland isolates the input and output of every window, achieving confidentiality, integrity and availability in both cases; the original X design lacks these important security features, although some extensions have been developed trying to mitigate it. Also, with the vast majority of the code running in the client, less code needs to run with root privileges, improving security, although multiple popular Linux distributions now allow X to be run without root privileges.
\end{itemize}
% Source: \href{https://en.wikipedia.org/wiki/Wayland_(display_server_protocol)}{wikipedia.org}
\end{frame}
\begin{frame}[fragile]
\frametitle{Authorization}
\begin{figure}
\centering
\includegraphics[width=\textwidth,height=0.7\textheight,keepaspectratio]{authorization}
\caption{Source: \href{https://xkcd.com/1200/}{xkcd.com}.}
\end{figure}
\end{frame}
\section{Sway}
\begin{frame}[fragile]
\frametitle{Sway}
TODO: Přepsat \href{https://juhlik.gitlab.io/blog/czech/moving_to_sway.html}{Honza's blog}.
A nebo ne. Prostě prezentuj podle toho článku.
\end{frame}
\section{Conclusion}
\plain{Questions?}
\end{document}
#!/usr/bin/env bash
REVEALJS_VERSION="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.8.0"
# Create public folder
mkdir -p public/czech public/english 2> /dev/null
# Set nullglob
shopt -s nullglob
# Functions
# Article to HTML
adoc2html() {
input_file="$1"
output_file="public/${input_file%%.adoc}.html"
filename="$(basename $file)"
echo -n Converting file: \'"$input_file"\'
echo -n Converting article: \'"$input_file"\'
asciidoctor -o "$output_file" "$input_file"
echo ' [DONE]'
}
# Presentaion to HTML
adoc2revealjs() {
input_file="$1"
output_file="public/${input_file%%.adoc}.html"
filename="$(basename $file)"
echo -n Converting presentation: \'"$input_file"\'
asciidoctor-revealjs -a revealjsdir="$REVEALJS_VERSION" -o "$output_file" "$input_file"
echo ' [DONE]'
}
# Convert all articles
for file in {czech,english}/*.adoc; do
for file in {czech,english}/*/article.adoc; do
adoc2html "$file"
done
# Convert all presentation
for file in {czech,english}/*/presentation.adoc; do
adoc2revealjs "$file"
done
# Copy images
for dir in {czech,english}/*; do
for dir in {czech,english}/*/images; do
[ -d "$dir" ] || continue
echo -n Copying directory: \'"$dir"\'
......