≡ Menu

My life today is wonderful…

My life today is wonderful, I believe that I am needed… That’s the most important sense of life, that you are needed, that you are not just an emptiness that breathes and walks and eats something.

— Pres. Zelenskyy, via translator, asked about his living conditions in Ukraine

{ 0 comments }

L’idea…

…l’idea che mi son fatto, è che all’Università di Milano Bicocca qualcuno ha fatto fare un giro di roulette russa alla dignità. Ed è partito il colpo.

{ 0 comments }

Avete presente Matteo Salvini? (Per il quale «servirebbero quattro mesi di servizio militare per insegnare ai nostri ragazzi l’uso delle armi», per il quale contro gli immigrati «i confini ci sono e vanno difesi anche con le armi», per il quale «in Siria e in Libia serve l’intervento militare e chi dice di no è un senza palle: con i tagliagole bisogna intervenire militarmente e massicciamente», per il quale «il modello è la Svizzera dove un cittadino su due è legittimamente armato e dove ogni cittadino ha la possibilità di difendersi», per il quale – ricordo bene ‘sta dichiarazione, perché la fece ispirandosi a un fatto violento avvenuto a Frattamaggiore – per il quale, dicevo, «se io vengo aggredito o minacciato nella mia azienda, nel mio negozio, nella mia casa ho il diritto di difendermi», anche con le armi perché «la difesa è sempre legittima», per il quale «se ti trovi una o più persone in casa alle tre di notte, mascherate, sono a casa tua e violano la proprietà privata, che cosa fai prima di sparare, gli chiedi se hanno una pistola?», per il quale se spari a un rapinatore «e se il rapinatore ci rimane, nella prossima vita farà un altro lavoro», per il quale «se si ha il porto d’armi è normale andare in giro armati e difendersi»)… Ecco, sì, proprio il Matteo di cui sopra, viene a dirci, con viso preoccupato e pensoso – e già ‘sta cosa, detta così, fa ridere -, che, per aiutare l’Ucraina invasa dai carrarmati di Vladimir Putin, lui «fatica a parlare di armi con leggerezza».

{ 0 comments }

A Calendar Notification module…


#! /bin/bash

send_notification() {
	TODAY=$(date '+%-d')
	HEAD=$(cal "$1" | head -n1)
	BODY=$(cal "$1" | tail -n7 | sed -z "s|$TODAY|<u><b>$TODAY</b></u>|1")
	FOOT="\n<i>       ~ calendar</i> B. Raucci"
	dunstify -h string:x-canonical-private-synchronous:calendar \
		"$HEAD" "$BODY$FOOT" -u NORMAL
}

handle_action() {
	echo "$DIFF" > "$TMP"
	if [ "$DIFF" -ge 0 ]; then
		send_notification "+$DIFF months"
	else
		send_notification "$((-DIFF)) months ago"
	fi
}

TMP=${XDG_RUNTIME_DIR:-/tmp}/"$UID"_calendar_notification_month
touch "$TMP"

DIFF=$(<"$TMP")

case $1 in
	"curr") DIFF=0;;
	"next") DIFF=$((DIFF+1));;
	"prev") DIFF=$((DIFF-1));;
esac

handle_action

The calendar script is responsible for handling mouse events triggered by your bar, following are valid arguments:

./calendar curr # current month
./calendar next # increment month
./calendar prev # decrement month

Copy calendar to your polybar config directory. Then, in your polybar config, you can use click-left, scroll-up and scroll-down actions to invoke the script. For example:

[module/calendar]
type = custom/script
label = " "
exec = echo Calendar
click-left = ~/.config/polybar/calendar curr
scroll-up = ~/.config/polybar/calendar next
scroll-down = ~/.config/polybar/calendar prev
{ 0 comments }

C=64…

Era il 10 gennaio del 1982 e il Commodore 64 veniva presentato, per la prima volta, al Consumer Electronics Show di Las Vegas…

{ 0 comments }

Just like TikZ, Inkscape has the op­tion to ren­der the text of a fig­ure using LaTeX. For this, it ex­ports fig­ures as both a pdf and a LaTeX file. The pdf doc­u­ment con­tains the fig­ure with text stripped, and the LaTeX file con­tains the code need­ed to place the text at the cor­rect po­si­tion. For ex­am­ple, sup­pose you’re work­ing on the fol­low­ing fig­ure in Inkscape:

To in­clude this fig­ure in a LaTeX doc­u­ment, you’d go to File › Save As, se­lect ‘pdf’ as the ex­ten­sion and then press Save which makes the fol­low­ing di­a­log pop up:

Choos­ing ‘Omit text in pdf and cre­ate LaTeX file’, will save the fig­ure as pdf+LaTeX. To in­clude these Inkscape fig­ures in your LaTeX doc­u­ment, you can add the fol­low­ing code to your pre­am­ble:

\documentclass[11pt,a4paper]{scrbook}
\usepackage{import}
\usepackage{graphicx}
\usepackage{siunitx}
\usepackage{import}
\usepackage{placeins}
\usepackage{graphicx}
\usepackage[labelfont=bf]{caption}
\usepackage{subcaption}
\usepackage{enumitem}
\usepackage{calc}
\begin{document}
 
\chapter{Introduction}

As­sum­ing the fig­ure is lo­cat­ed at figure/disegno.svg, it can sim­ply be in­clud­ed with fol­low­ing code:

\begin{figure}[hbt!]
 \centering
 \begin{normalsize} 
  \def\svgscale{0.5}
  \import{figure/}{disegno.pdf_tex}
 \end{normalsize}
 \caption{Test}
 \label{fig:test}
\end{figure}

Com­pil­ing your doc­u­ment, you’d get the fol­low­ing.

As you can see, the text is ren­dered by LaTeX which makes the fig­ure blend in beau­ti­ful­ly.

{ 0 comments }