<?xml 
version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="https://www.momh.fr/spip.php?page=backend.xslt" ?>
<rss version="2.0" 
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:atom="http://www.w3.org/2005/Atom"
>

<channel xml:lang="fr">
	<title>momh</title>
	<link>https://momh.fr/</link>
	<description>My Own Memory Hole se veut une sorte de &#171;&#160;vitrine&#160;&#187; de mon parcours et de mon exp&#233;rience mais aussi de mes centres d'int&#233;r&#234;t et constitue donc en quelque sorte ma m&#233;moire en ligne, m&#233;moire virtuelle d&#233;localis&#233;e mais ordonn&#233;e et index&#233;e&#8230;</description>
	<language>fr</language>
	<generator>SPIP - www.spip.net</generator>
	<atom:link href="https://www.momh.fr/spip.php?id_mot=12&amp;page=backend" rel="self" type="application/rss+xml" />




<item xml:lang="fr">
		<title>Du nouveau dans mon terminal</title>
		<link>https://www.momh.fr/du-nouveau-dans-mon-terminal</link>
		<guid isPermaLink="true">https://www.momh.fr/du-nouveau-dans-mon-terminal</guid>
		<dc:date>2026-09-12T19:59:02Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>bricebou@momh.fr</dc:creator>


		<dc:subject>terminal</dc:subject>
		<dc:subject>Linux</dc:subject>

		<description>
&lt;p&gt;Apr&#232;s avoir exp&#233;riment&#233; divers terminaux, jongl&#233; entre &lt;span class=&#034;caps&#034;&gt;ZSH&lt;/span&gt; et Fish sur plusieurs ordinateurs, test&#233; Oh My Posh puis Starship comme &#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;d&#233;corateur&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187; de prompt, me voil&#224; je crois d&#233;sormais bien satisfait de ma configuration actuelle. &lt;br class='autobr' /&gt; Ainsi, j'ai fini par d&#233;finitivement opter pour Alacritty comme terminal, pr&#233;f&#233;rant &#224; des solutions plus riches en fonctionnalit&#233;s mais aussi plus &#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;lourdes&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187; &#224; l'usage sa simplicit&#233; et sa r&#233;activit&#233;, ce que les d&#233;veloppeur&#8901;euses r&#233;sument tr&#232;s bien ainsi sur le&#160;(&#8230;)&lt;/p&gt;


-
&lt;a href="https://www.momh.fr/blog" rel="directory"&gt;Blog&lt;/a&gt;

/ 
&lt;a href="https://www.momh.fr/terminal" rel="tag"&gt;terminal&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/linux" rel="tag"&gt;Linux&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Apr&#232;s avoir exp&#233;riment&#233; divers terminaux, jongl&#233; entre &lt;span class=&#034;caps&#034;&gt;ZSH&lt;/span&gt; et Fish sur plusieurs ordinateurs, test&#233; &lt;a href=&#034;https://ohmyposh.dev/&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;Oh My Posh&lt;/a&gt; puis &lt;a href=&#034;https://starship.rs/&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;Starship&lt;/a&gt; comme &#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;d&#233;corateur&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187; de prompt, me voil&#224; je crois d&#233;sormais bien satisfait de ma configuration actuelle.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Ainsi, j'ai fini par d&#233;finitivement opter pour &lt;a href=&#034;https://alacritty.org/&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;Alacritty&lt;/a&gt; comme terminal, pr&#233;f&#233;rant &#224; des solutions plus riches en fonctionnalit&#233;s mais aussi plus &#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;lourdes&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187; &#224; l'usage sa simplicit&#233; et sa r&#233;activit&#233;, ce que les d&#233;veloppeur&#8901;euses r&#233;sument tr&#232;s bien ainsi sur le &lt;a href=&#034;https://github.com/alacritty/alacritty#faq&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;Github du projet&lt;/a&gt;&#160;:&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;This means you won't find things like tabs or splits (which are best left to a window manager or terminal multiplexer) nor niceties like a &lt;span class=&#034;caps&#034;&gt;GUI&lt;/span&gt; config editor.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Et je me suis alors lanc&#233; &#224; la recherche d'un multiplexeur de terminal, m'&#233;tant lass&#233; si l'on peut dire de tmux que j'ai utilis&#233; durant de longues ann&#233;es&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;; et c'est ainsi que j'ai d&#233;couvert &lt;a href=&#034;https://zellij.dev/&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;Zellij&lt;/a&gt; qui m'a v&#233;ritablement s&#233;duit par sa simplicit&#233; (dans sa gestion des onglets et des panneaux), par la possibilit&#233; de faire flotter un panneau, par l'affichage permanent des raccourcis...&lt;/p&gt;
&lt;p&gt;Pour ce qui est du shell, je suis revenu finalement &#224; &lt;span class=&#034;caps&#034;&gt;ZSH&lt;/span&gt;, d&#233;laissant Oh My Posh ou Starship pour retourner au premier th&#232;me que j'avais utilis&#233; lors de ma d&#233;couverte de &lt;span class=&#034;caps&#034;&gt;ZSH&lt;/span&gt;, &lt;a href=&#034;https://github.com/romkatv/powerlevel10k&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;Powerlevel10k&lt;/a&gt;, celui-ci g&#233;rant beaucoup mieux les gros d&#233;p&#244;ts &lt;span class=&#034;caps&#034;&gt;GIT&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Voici pour ma configuration de &lt;span class=&#034;caps&#034;&gt;ZSH&lt;/span&gt;&#160;:&lt;/p&gt;
&lt;ul class=&#034;spip&#034; role=&#034;list&#034;&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;.zshrc&lt;/code&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre class='spip_code spip_code_block' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;# ## Powerlevel10k instant prompt &#8212; DOIT rester tout en haut du fichier, ## avant tout le reste (compinit, antidote, etc.). C'est ce qui permet ## d'afficher un prompt instantan&#233;ment pendant que le reste se charge ## en arri&#232;re-plan. # if [[ -r &#034;${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh&#034; ]]; then source &#034;${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh&#034; fi # ## Compl&#233;tion &#8212; mise en cache pour &#233;viter de refaire l'audit de s&#233;curit&#233; ## &#224; chaque lancement # zstyle ':completion:*' use-cache on zstyle ':completion:*' cache-path &#034;${XDG_CACHE_HOME:-$HOME/.cache}/zsh/compcache&#034; autoload -Uz compinit zcd=&#034;${ZDOTDIR:-$HOME}/.zcompdump&#034; if [[ -n ${zcd}(#qN.mh+24) ]]; then compinit else compinit -C fi unset zcd # ## Historique &#8212; absent par d&#233;faut en zsh nu (contrairement &#224; bash), ## n&#233;cessaire pour la persistance entre sessions et pour que ## zsh-autosuggestions ait quelque chose &#224; sugg&#233;rer. # HISTFILE=&#034;${ZDOTDIR:-$HOME}/.zsh_history&#034; HISTSIZE=50000 SAVEHIST=50000 setopt EXTENDED_HISTORY # horodatage de chaque commande setopt HIST_EXPIRE_DUPS_FIRST # purge les doublons en premier si besoin de place setopt HIST_IGNORE_DUPS # ignore les doublons cons&#233;cutifs imm&#233;diats setopt HIST_IGNORE_ALL_DUPS # supprime l'ancienne occurrence d'un doublon setopt HIST_FIND_NO_DUPS setopt HIST_IGNORE_SPACE # une commande pr&#233;c&#233;d&#233;e d'un espace n'est pas enregistr&#233;e setopt HIST_SAVE_NO_DUPS setopt HIST_VERIFY setopt SHARE_HISTORY # historique partag&#233; en temps r&#233;el entre tous les panes/onglets ouverts setopt APPEND_HISTORY setopt INC_APPEND_HISTORY_TIME # ## D&#233;sactive le check de mise &#224; jour d'Oh My Zsh (on utilise juste sa ## couche de compatibilit&#233; via getantidote/use-omz, pas le framework ## complet &#8212; ce check tournait &#224; chaque d&#233;marrage pour rien). # zstyle ':omz:update' mode disabled # ## Lazy-load antidote and generate the static load file only when needed # zsh_plugins=${ZDOTDIR:-$HOME}/.zsh_plugins if [[ ! ${zsh_plugins}.zsh -nt ${zsh_plugins}.txt ]]; then ( source &#034;/usr/share/zsh-antidote/antidote.zsh&#034; antidote bundle &lt;${zsh_plugins}.txt &gt;${zsh_plugins}.zsh ) fi source ${zsh_plugins}.zsh # ## fzf-tab &#8212; r&#233;glages recommand&#233;s # zstyle ':completion:*:git-checkout:*' sort false zstyle ':completion:*:descriptions' format '[%d]' zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} zstyle ':completion:*' menu no zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath' zstyle ':fzf-tab:*' switch-group ',' '.' # ## Paths # path=( $path &#034;${ZDOTDIR:-$HOME}/bin/&#034; &#034;${ZDOTDIR:-$HOME}/.composer/vendor/bin/&#034; &#034;${ZDOTDIR:-$HOME}/.local/bin/&#034; ) # ## Lazy load SSH agent # function _load_ssh_agent() { if [ -z &#034;$SSH_AUTH_SOCK&#034; ]; then eval &#034;$(ssh-agent -s)&#034; &gt; /dev/null fi } autoload -U add-zsh-hook add-zsh-hook precmd _load_ssh_agent # # Load other dotfiles # declare -a DOTFILES_TO_LOAD=( &#034;${ZDOTDIR:-$HOME}/.zaliases&#034; &#034;${ZDOTDIR:-$HOME}/spip-cli/bin/spip_console_autocomplete&#034; ) for i in ${DOTFILES_TO_LOAD[*]}; do if [ -f &#034;$i&#034; ]; then source &#034;$i&#034; &amp;&gt; /dev/null fi done # ## Titre du terminal &#8212; &#233;quivalent l&#233;ger de zsh-tab-title, sans le co&#251;t ## mesur&#233; au zprof. Snippet officiel de l'auteur de Powerlevel10k (MIT), ## voir https://github.com/romkatv/powerlevel10k/issues/1092 # function set-term-title() { emulate -L zsh if [[ -t 1 ]]; then print -rn -- $'\e]0;'${(V)1}$'\a' elif [[ -w $TTY ]]; then print -rn -- $'\e]0;'${(V)1}$'\a' &gt;$TTY fi } function set-term-title-preexec() { set-term-title $1 } function _term_title_path() { emulate -L zsh local path=&#034;${PWD/#$HOME/~}&#034; local -a parts parts=(&#034;${(s:/:)path}&#034;) if (( ${#parts} &gt; 3 )); then print -rn -- &#034;&#8230;/${(j:/:)parts[-3,-1]}&#034; else print -rn -- &#034;$path&#034; fi } function set-term-title-precmd() { set-term-title &#034;$(_term_title_path)&#034; } add-zsh-hook preexec set-term-title-preexec add-zsh-hook precmd set-term-title-precmd # # https://github.com/voronkovich/symfony-complete.plugin.zsh # compdef _symfony_complete symfony compdef _symfony_complete console compdef _symfony_complete artisan compdef _symfony_complete phpstan # ## Powerlevel10k &#8212; config g&#233;n&#233;r&#233;e/personnalis&#233;e # [[ ! -f ${ZDOTDIR:-$HOME}/.p10k.zsh ]] || source ${ZDOTDIR:-$HOME}/.p10k.zsh &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;.p10k.zsh&lt;/code&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre class='spip_code spip_code_block' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;# Config Powerlevel10k &#8212; palette gruvbox dark, sans modules de langage. # Ce fichier ne couvre que l'essentiel ; lancez `p10k configure` &#224; tout # moment pour ouvrir l'assistant interactif et affiner ic&#244;nes/s&#233;parateurs # au-del&#224; de ce qui est fix&#233; ici &#8212; il r&#233;g&#233;n&#233;rera ce fichier en conservant # la structure ci-dessous si vous relancez ensuite ce script par-dessus. 'builtin' 'local' '-a' 'p10k_config_opts' [[ ! -o 'aliases' ]] || p10k_config_opts+=('aliases') [[ ! -o 'sh_glob' ]] || p10k_config_opts+=('sh_glob') [[ ! -o 'no_brace_expand' ]] || p10k_config_opts+=('no_brace_expand') 'builtin' 'setopt' 'no_aliases' 'no_sh_glob' 'brace_expand' () { emulate -L zsh -o extended_glob # Segments affich&#233;s &#224; gauche, dans l'ordre. typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs) # Segments affich&#233;s &#224; droite. typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time time) typeset -g POWERLEVEL9K_MODE=nerdfont-complete typeset -g POWERLEVEL9K_ICON_PADDING=moderate typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true # Style powerline avec s&#233;parateurs en chevrons (angles), comme oh-my-posh. typeset -g POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL=$'\uE0B0' typeset -g POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR=$'\uE0B0' typeset -g POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR=$'\uE0B1' typeset -g POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL=$'\uE0B2' typeset -g POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR=$'\uE0B2' typeset -g POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR=$'\uE0B3' # ## Palette gruvbox dark (m&#234;mes couleurs que votre starship.toml) # local fg0='#fbf1c7' local bg1='#3c3836' local bg3='#665c54' local blue='#458588' local aqua='#689d6a' local green='#98971a' local orange='#d65d0e' local red='#cc241d' local yellow='#d79921' # OS icon typeset -g POWERLEVEL9K_OS_ICON_FOREGROUND=$fg0 typeset -g POWERLEVEL9K_OS_ICON_BACKGROUND=$orange # Directory typeset -g POWERLEVEL9K_DIR_FOREGROUND=$fg0 typeset -g POWERLEVEL9K_DIR_BACKGROUND=$yellow typeset -g POWERLEVEL9K_SHORTEN_STRATEGY=truncate_to_last typeset -g POWERLEVEL9K_SHORTEN_DIR_LENGTH=3 typeset -g POWERLEVEL9K_SHORTEN_DELIMITER='&#8230;/' # Git (vcs) &#8212; couleur unique quel que soit l'&#233;tat, comme votre config # Starship actuelle (aqua). Changez *_BACKGROUND ci-dessous si vous # pr&#233;f&#233;rez une couleur diff&#233;rente pour &#034;propre&#034; vs &#034;modifi&#233;&#034;. typeset -g POWERLEVEL9K_VCS_FOREGROUND=$fg0 typeset -g POWERLEVEL9K_VCS_CLEAN_FOREGROUND=$fg0 typeset -g POWERLEVEL9K_VCS_MODIFIED_FOREGROUND=$fg0 typeset -g POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND=$fg0 typeset -g POWERLEVEL9K_VCS_CLEAN_BACKGROUND=$aqua typeset -g POWERLEVEL9K_VCS_MODIFIED_BACKGROUND=$aqua typeset -g POWERLEVEL9K_VCS_UNTRACKED_BACKGROUND=$aqua typeset -g POWERLEVEL9K_VCS_BRANCH_ICON=$'\uf126 ' typeset -g POWERLEVEL9K_VCS_GIT_ICON='' # Filet de s&#233;curit&#233; pour les tr&#232;s gros repos (le souci qu'on avait avec # Starship/libgit2) : au-del&#224; de ce nombre de fichiers modifi&#233;s, affiche # un indicateur approximatif plut&#244;t que de tout compter pr&#233;cis&#233;ment. typeset -g POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY=4000 # Indicateurs d'&#233;tat en caract&#232;res simples plut&#244;t qu'en ic&#244;nes rondes # qui se ressemblent trop entre elles. typeset -g POWERLEVEL9K_VCS_STAGED_ICON='+' typeset -g POWERLEVEL9K_VCS_UNSTAGED_ICON='!' typeset -g POWERLEVEL9K_VCS_UNTRACKED_ICON='?' typeset -g POWERLEVEL9K_VCS_CONFLICTED_ICON='&#10008;' typeset -g POWERLEVEL9K_VCS_COMMITS_AHEAD_ICON='&#8673;' typeset -g POWERLEVEL9K_VCS_COMMITS_BEHIND_ICON='&#8675;' typeset -g POWERLEVEL9K_VCS_STASH_ICON='*' typeset -g POWERLEVEL9K_VCS_INCOMING_CHANGES_ICON='' typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON='' # Status (code de sortie de la derni&#232;re commande) typeset -g POWERLEVEL9K_STATUS_OK_FOREGROUND=$green typeset -g POWERLEVEL9K_STATUS_OK_BACKGROUND=$bg1 typeset -g POWERLEVEL9K_STATUS_ERROR_FOREGROUND=$red typeset -g POWERLEVEL9K_STATUS_ERROR_BACKGROUND=$bg1 typeset -g POWERLEVEL9K_STATUS_OK=false typeset -g POWERLEVEL9K_STATUS_ERROR=true # Dur&#233;e de la derni&#232;re commande (n'appara&#238;t que si &gt; 3s) typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND=$fg0 typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_BACKGROUND=$bg3 # Heure typeset -g POWERLEVEL9K_TIME_FOREGROUND=$fg0 typeset -g POWERLEVEL9K_TIME_BACKGROUND=$bg1 typeset -g POWERLEVEL9K_TIME_FORMAT='%D{%H:%M}' # Caract&#232;re de prompt (&#233;quivalent du [character] Starship) typeset -g POWERLEVEL9K_PROMPT_CHAR_OK_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=$green typeset -g POWERLEVEL9K_PROMPT_CHAR_ERROR_{VIINS,VICMD,VIVIS,VIOWR}_FOREGROUND=$red typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VIINS_CONTENT_EXPANSION='&#10095;' typeset -g POWERLEVEL9K_PROMPT_CHAR_{OK,ERROR}_VICMD_CONTENT_EXPANSION='&#10094;' # R&#233;duit le bruit affich&#233; par le mode &#034;instant prompt&#034; au d&#233;marrage typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet typeset -g POWERLEVEL9K_DISABLE_HOT_RELOAD=true } (( ${#p10k_config_opts} )) &amp;&amp; setopt ${p10k_config_opts[@]} 'builtin' 'unset' 'p10k_config_opts' &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;.zsh_plugins.txt&lt;/code&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre class='spip_code spip_code_block' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;# Th&#232;me &#8212; doit &#234;tre charg&#233; t&#244;t, avant les autres plugins romkatv/powerlevel10k # ## Using Oh My Zsh plugins # getantidote/use-omz # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/aliases ohmyzsh/ohmyzsh path:plugins/aliases # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/fzf ohmyzsh/ohmyzsh path:plugins/fzf # https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git ohmyzsh/ohmyzsh path:plugins/git # https://github.com/unixorn/git-extra-commands?tab=readme-ov-file#antigen unixorn/git-extra-commands # https://github.com/MichaelAquilina/zsh-you-should-use &#034;MichaelAquilina/zsh-you-should-use&#034; # https://github.com/wintermi/zsh-lsd wintermi/zsh-lsd # https://github.com/voronkovich/symfony-complete.plugin.zsh voronkovich/symfony-complete.plugin.zsh # fzf-tab &#8212; remplace le menu de compl&#233;tion standard par une interface fzf. # Doit &#234;tre charg&#233; apr&#232;s compinit (d&#233;j&#224; le cas, compinit tourne en tout # d&#233;but de .zshrc) et AVANT les plugins qui enveloppent les widgets ZLE # ci-dessous. Aloxaf/fzf-tab # Ces trois-l&#224; doivent &#234;tre charg&#233;s en dernier : ils enveloppent les # widgets ZLE d&#233;finis par les plugins pr&#233;c&#233;dents. zdharma-continuum/fast-syntax-highlighting kind:defer zsh-users/zsh-autosuggestions kind:defer zsh-users/zsh-history-substring-search kind:defer &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;.config/zellij/config.kdl&lt;/code&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre class='spip_code spip_code_block' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;// // THIS FILE WAS AUTOGENERATED BY ZELLIJ, THE PREVIOUS FILE AT THIS LOCATION WAS COPIED TO: /home/bricebou/.config/zellij/config.kdl.bak.1 // keybinds clear-defaults=true { locked { bind &#034;Ctrl g&#034; { SwitchToMode &#034;normal&#034;; } } pane { bind &#034;left&#034; { MoveFocus &#034;left&#034;; } bind &#034;down&#034; { MoveFocus &#034;down&#034;; } bind &#034;up&#034; { MoveFocus &#034;up&#034;; } bind &#034;right&#034; { MoveFocus &#034;right&#034;; } bind &#034;c&#034; { SwitchToMode &#034;renamepane&#034;; PaneNameInput 0; } bind &#034;d&#034; { NewPane &#034;down&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;e&#034; { TogglePaneEmbedOrFloating; SwitchToMode &#034;locked&#034;; } bind &#034;f&#034; { ToggleFocusFullscreen; SwitchToMode &#034;locked&#034;; } bind &#034;h&#034; { MoveFocus &#034;left&#034;; } bind &#034;i&#034; { TogglePanePinned; SwitchToMode &#034;locked&#034;; } bind &#034;j&#034; { MoveFocus &#034;down&#034;; } bind &#034;k&#034; { MoveFocus &#034;up&#034;; } bind &#034;l&#034; { MoveFocus &#034;right&#034;; } bind &#034;n&#034; { NewPane; SwitchToMode &#034;locked&#034;; } bind &#034;p&#034; { SwitchToMode &#034;normal&#034;; } bind &#034;r&#034; { NewPane &#034;right&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;s&#034; { NewPane &#034;stacked&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;w&#034; { ToggleFloatingPanes; SwitchToMode &#034;locked&#034;; } bind &#034;x&#034; { CloseFocus; SwitchToMode &#034;locked&#034;; } bind &#034;z&#034; { TogglePaneFrames; SwitchToMode &#034;locked&#034;; } bind &#034;tab&#034; { SwitchFocus; } } tab { bind &#034;left&#034; { GoToPreviousTab; } bind &#034;down&#034; { GoToNextTab; } bind &#034;up&#034; { GoToPreviousTab; } bind &#034;right&#034; { GoToNextTab; } bind &#034;1&#034; { GoToTab 1; SwitchToMode &#034;locked&#034;; } bind &#034;2&#034; { GoToTab 2; SwitchToMode &#034;locked&#034;; } bind &#034;3&#034; { GoToTab 3; SwitchToMode &#034;locked&#034;; } bind &#034;4&#034; { GoToTab 4; SwitchToMode &#034;locked&#034;; } bind &#034;5&#034; { GoToTab 5; SwitchToMode &#034;locked&#034;; } bind &#034;6&#034; { GoToTab 6; SwitchToMode &#034;locked&#034;; } bind &#034;7&#034; { GoToTab 7; SwitchToMode &#034;locked&#034;; } bind &#034;8&#034; { GoToTab 8; SwitchToMode &#034;locked&#034;; } bind &#034;9&#034; { GoToTab 9; SwitchToMode &#034;locked&#034;; } bind &#034;[&#034; { BreakPaneLeft; SwitchToMode &#034;locked&#034;; } bind &#034;]&#034; { BreakPaneRight; SwitchToMode &#034;locked&#034;; } bind &#034;b&#034; { BreakPane; SwitchToMode &#034;locked&#034;; } bind &#034;h&#034; { GoToPreviousTab; } bind &#034;j&#034; { GoToNextTab; } bind &#034;k&#034; { GoToPreviousTab; } bind &#034;l&#034; { GoToNextTab; } bind &#034;n&#034; { NewTab; SwitchToMode &#034;locked&#034;; } bind &#034;r&#034; { SwitchToMode &#034;renametab&#034;; TabNameInput 0; } bind &#034;s&#034; { ToggleActiveSyncTab; SwitchToMode &#034;locked&#034;; } bind &#034;t&#034; { SwitchToMode &#034;normal&#034;; } bind &#034;x&#034; { CloseTab; SwitchToMode &#034;locked&#034;; } bind &#034;tab&#034; { ToggleTab; } } resize { bind &#034;left&#034; { Resize &#034;Increase left&#034;; } bind &#034;down&#034; { Resize &#034;Increase down&#034;; } bind &#034;up&#034; { Resize &#034;Increase up&#034;; } bind &#034;right&#034; { Resize &#034;Increase right&#034;; } bind &#034;+&#034; { Resize &#034;Increase&#034;; } bind &#034;-&#034; { Resize &#034;Decrease&#034;; } bind &#034;=&#034; { Resize &#034;Increase&#034;; } bind &#034;H&#034; { Resize &#034;Decrease left&#034;; } bind &#034;J&#034; { Resize &#034;Decrease down&#034;; } bind &#034;K&#034; { Resize &#034;Decrease up&#034;; } bind &#034;L&#034; { Resize &#034;Decrease right&#034;; } bind &#034;h&#034; { Resize &#034;Increase left&#034;; } bind &#034;j&#034; { Resize &#034;Increase down&#034;; } bind &#034;k&#034; { Resize &#034;Increase up&#034;; } bind &#034;l&#034; { Resize &#034;Increase right&#034;; } bind &#034;r&#034; { SwitchToMode &#034;normal&#034;; } } move { bind &#034;left&#034; { MovePane &#034;left&#034;; } bind &#034;down&#034; { MovePane &#034;down&#034;; } bind &#034;up&#034; { MovePane &#034;up&#034;; } bind &#034;right&#034; { MovePane &#034;right&#034;; } bind &#034;h&#034; { MovePane &#034;left&#034;; } bind &#034;j&#034; { MovePane &#034;down&#034;; } bind &#034;k&#034; { MovePane &#034;up&#034;; } bind &#034;l&#034; { MovePane &#034;right&#034;; } bind &#034;m&#034; { SwitchToMode &#034;normal&#034;; } bind &#034;n&#034; { MovePane; } bind &#034;p&#034; { MovePaneBackwards; } bind &#034;tab&#034; { MovePane; } } scroll { bind &#034;Alt left&#034; { MoveFocusOrTab &#034;left&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;Alt down&#034; { MoveFocus &#034;down&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;Alt up&#034; { MoveFocus &#034;up&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;Alt right&#034; { MoveFocusOrTab &#034;right&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;e&#034; { EditScrollback; SwitchToMode &#034;locked&#034;; } bind &#034;f&#034; { SwitchToMode &#034;entersearch&#034;; SearchInput 0; } bind &#034;Alt h&#034; { MoveFocusOrTab &#034;left&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;Alt j&#034; { MoveFocus &#034;down&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;Alt k&#034; { MoveFocus &#034;up&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;Alt l&#034; { MoveFocusOrTab &#034;right&#034;; SwitchToMode &#034;locked&#034;; } bind &#034;s&#034; { SwitchToMode &#034;normal&#034;; } } search { bind &#034;c&#034; { SearchToggleOption &#034;CaseSensitivity&#034;; } bind &#034;n&#034; { Search &#034;down&#034;; } bind &#034;o&#034; { SearchToggleOption &#034;WholeWord&#034;; } bind &#034;p&#034; { Search &#034;up&#034;; } bind &#034;w&#034; { SearchToggleOption &#034;Wrap&#034;; } } session { bind &#034;a&#034; { LaunchOrFocusPlugin &#034;zellij:about&#034; { floating true move_to_focused_tab true } SwitchToMode &#034;locked&#034; } bind &#034;c&#034; { LaunchOrFocusPlugin &#034;configuration&#034; { floating true move_to_focused_tab true } SwitchToMode &#034;locked&#034; } bind &#034;d&#034; { Detach; } bind &#034;l&#034; { LaunchOrFocusPlugin &#034;zellij:layout-manager&#034; { floating true move_to_focused_tab true } SwitchToMode &#034;locked&#034; } bind &#034;o&#034; { SwitchToMode &#034;normal&#034;; } bind &#034;p&#034; { LaunchOrFocusPlugin &#034;plugin-manager&#034; { floating true move_to_focused_tab true } SwitchToMode &#034;locked&#034; } bind &#034;s&#034; { LaunchOrFocusPlugin &#034;zellij:share&#034; { floating true move_to_focused_tab true } SwitchToMode &#034;locked&#034; } bind &#034;w&#034; { LaunchOrFocusPlugin &#034;session-manager&#034; { floating true move_to_focused_tab true } SwitchToMode &#034;locked&#034; } } shared_among &#034;normal&#034; &#034;locked&#034; { bind &#034;Alt left&#034; { MoveFocusOrTab &#034;left&#034;; } bind &#034;Alt down&#034; { MoveFocus &#034;down&#034;; } bind &#034;Alt up&#034; { MoveFocus &#034;up&#034;; } bind &#034;Alt right&#034; { MoveFocusOrTab &#034;right&#034;; } bind &#034;Alt +&#034; { Resize &#034;Increase&#034;; } bind &#034;Alt -&#034; { Resize &#034;Decrease&#034;; } bind &#034;Alt =&#034; { Resize &#034;Increase&#034;; } bind &#034;Alt [&#034; { PreviousSwapLayout; } bind &#034;Alt ]&#034; { NextSwapLayout; } bind &#034;Alt f&#034; { ToggleFloatingPanes; } bind &#034;Alt h&#034; { MoveFocusOrTab &#034;left&#034;; } bind &#034;Alt i&#034; { MoveTab &#034;left&#034;; } bind &#034;Alt j&#034; { MoveFocus &#034;down&#034;; } bind &#034;Alt k&#034; { MoveFocus &#034;up&#034;; } bind &#034;Alt l&#034; { MoveFocusOrTab &#034;right&#034;; } bind &#034;Alt n&#034; { NewPane; } bind &#034;Alt o&#034; { MoveTab &#034;right&#034;; } bind &#034;Alt p&#034; { TogglePaneInGroup; } bind &#034;Alt Shift p&#034; { ToggleGroupMarking; } } shared_except &#034;locked&#034; &#034;renametab&#034; &#034;renamepane&#034; { bind &#034;Ctrl g&#034; { SwitchToMode &#034;locked&#034;; } bind &#034;Ctrl q&#034; { Quit; } } shared_except &#034;locked&#034; &#034;entersearch&#034; { bind &#034;enter&#034; { SwitchToMode &#034;locked&#034;; } } shared_except &#034;locked&#034; &#034;entersearch&#034; &#034;renametab&#034; &#034;renamepane&#034; { bind &#034;esc&#034; { SwitchToMode &#034;locked&#034;; } } shared_except &#034;locked&#034; &#034;entersearch&#034; &#034;renametab&#034; &#034;renamepane&#034; &#034;move&#034; { bind &#034;m&#034; { SwitchToMode &#034;move&#034;; } } shared_except &#034;locked&#034; &#034;entersearch&#034; &#034;search&#034; &#034;renametab&#034; &#034;renamepane&#034; &#034;session&#034; { bind &#034;o&#034; { SwitchToMode &#034;session&#034;; } } shared_except &#034;locked&#034; &#034;tab&#034; &#034;entersearch&#034; &#034;renametab&#034; &#034;renamepane&#034; { bind &#034;t&#034; { SwitchToMode &#034;tab&#034;; } } shared_among &#034;normal&#034; &#034;resize&#034; &#034;tab&#034; &#034;scroll&#034; &#034;prompt&#034; &#034;tmux&#034; { bind &#034;p&#034; { SwitchToMode &#034;pane&#034;; } } shared_among &#034;normal&#034; &#034;resize&#034; &#034;search&#034; &#034;move&#034; &#034;prompt&#034; &#034;tmux&#034; { bind &#034;s&#034; { SwitchToMode &#034;scroll&#034;; } } shared_except &#034;locked&#034; &#034;resize&#034; &#034;pane&#034; &#034;tab&#034; &#034;entersearch&#034; &#034;renametab&#034; &#034;renamepane&#034; { bind &#034;r&#034; { SwitchToMode &#034;resize&#034;; } } shared_among &#034;scroll&#034; &#034;search&#034; { bind &#034;PageDown&#034; { PageScrollDown; } bind &#034;PageUp&#034; { PageScrollUp; } bind &#034;left&#034; { PageScrollUp; } bind &#034;down&#034; { ScrollDown; } bind &#034;up&#034; { ScrollUp; } bind &#034;right&#034; { PageScrollDown; } bind &#034;Ctrl b&#034; { PageScrollUp; } bind &#034;Ctrl c&#034; { ScrollToBottom; SwitchToMode &#034;locked&#034;; } bind &#034;d&#034; { HalfPageScrollDown; } bind &#034;Ctrl f&#034; { PageScrollDown; } bind &#034;h&#034; { PageScrollUp; } bind &#034;j&#034; { ScrollDown; } bind &#034;k&#034; { ScrollUp; } bind &#034;l&#034; { PageScrollDown; } bind &#034;u&#034; { HalfPageScrollUp; } } entersearch { bind &#034;Ctrl c&#034; { SwitchToMode &#034;scroll&#034;; } bind &#034;esc&#034; { SwitchToMode &#034;scroll&#034;; } bind &#034;enter&#034; { SwitchToMode &#034;search&#034;; } } renametab { bind &#034;esc&#034; { UndoRenameTab; SwitchToMode &#034;tab&#034;; } } shared_among &#034;renametab&#034; &#034;renamepane&#034; { bind &#034;Ctrl c&#034; { SwitchToMode &#034;locked&#034;; } } renamepane { bind &#034;esc&#034; { UndoRenamePane; SwitchToMode &#034;pane&#034;; } } } // Plugin aliases - can be used to change the implementation of Zellij // changing these requires a restart to take effect plugins { about location=&#034;zellij:about&#034; compact-bar location=&#034;zellij:compact-bar&#034; configuration location=&#034;zellij:configuration&#034; filepicker location=&#034;zellij:strider&#034; { cwd &#034;/&#034; } plugin-manager location=&#034;zellij:plugin-manager&#034; session-manager location=&#034;zellij:session-manager&#034; status-bar location=&#034;zellij:status-bar&#034; strider location=&#034;zellij:strider&#034; tab-bar location=&#034;zellij:tab-bar&#034; welcome-screen location=&#034;zellij:session-manager&#034; { welcome_screen true } } // Plugins to load in the background when a new session starts // eg. &#034;file:/path/to/my-plugin.wasm&#034; // eg. &#034;https://example.com/my-plugin.wasm&#034; load_plugins { zellij:link } web_client { font &#034;monospace&#034; } // Use a simplified UI without special fonts (arrow glyphs) // Options: // - true // - false (Default) // // simplified_ui true // Enable OSC8 hyperlink output // Options: // - true (Default) // - false // // osc8_hyperlinks true // Choose the theme that is specified in the themes section. // Default: default // theme &#034;gruber-darker&#034; // Theme to use when the host terminal reports a dark color palette. // Requires `theme_light` to also be set; otherwise `theme` is used. // // theme_dark &#034;dracula&#034; // Theme to use when the host terminal reports a light color palette. // Requires `theme_dark` to also be set; otherwise `theme` is used. // // theme_light &#034;solarized-light&#034; // Choose the base input mode of zellij. // Default: normal // default_mode &#034;locked&#034; // Choose the path to the default shell that zellij will use for opening new panes // Default: $SHELL // // default_shell &#034;fish&#034; // Choose the path to override cwd that zellij will use for opening new panes // // default_cwd &#034;/tmp&#034; // The name of the default layout to load on startup // Default: &#034;default&#034; // // default_layout &#034;compact&#034; // The folder in which Zellij will look for layouts // (Requires restart) // // layout_dir &#034;/tmp&#034; // The folder in which Zellij will look for themes // (Requires restart) // // theme_dir &#034;/tmp&#034; // Toggle enabling the mouse mode. // On certain configurations, or terminals this could // potentially interfere with copying text. // Options: // - true (default) // - false // // mouse_mode false // Toggle having pane frames around the panes // Options: // - true (default, enabled) // - false // // pane_frames false // When attaching to an existing session with other users, // should the session be mirrored (true) // or should each user have their own cursor (false) // (Requires restart) // Default: false // // mirror_session true // Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP // eg. when terminal window with an active zellij session is closed // (Requires restart) // Options: // - detach (Default) // - quit // on_force_close &#034;quit&#034; // Configure the scroll back buffer size // This is the number of lines zellij stores for each pane in the scroll back // buffer. Excess number of lines are discarded in a FIFO fashion. // (Requires restart) // Valid values: positive integers // Default value: 10000 // // scroll_buffer_size 10000 // Provide a command to execute when copying text. The text will be piped to // the stdin of the program to perform the copy. This can be used with // terminal emulators which do not support the OSC 52 ANSI control sequence // that will be used by default if this option is not set. // Examples: // // copy_command &#034;xclip -selection clipboard&#034; // x11 // copy_command &#034;wl-copy&#034; // wayland // copy_command &#034;pbcopy&#034; // osx // // copy_command &#034;pbcopy&#034; // Choose the destination for copied text // Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. // Does not apply when using copy_command. // Options: // - system (default) // - primary // // copy_clipboard &#034;primary&#034; // Enable automatic copying (and clearing) of selection when releasing mouse // Default: true // // copy_on_select true // Path to the default editor to use to edit pane scrollbuffer // Default: $EDITOR or $VISUAL // scrollback_editor &#034;/usr/bin/vim&#034; // A fixed name to always give the Zellij session. // Consider also setting `attach_to_session true,` // otherwise this will error if such a session exists. // Default: &lt;RANDOM&gt; // // session_name &#034;My singleton session&#034; // When `session_name` is provided, attaches to that session // if it is already running or creates it otherwise. // Default: false // // attach_to_session true // Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible // Options: // - true (default) // - false // // auto_layout false // Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected // Options: // - true (default) // - false // // session_serialization false // Whether pane viewports are serialized along with the session, default is false // Options: // - true // - false (default) // // serialize_pane_viewport false // Scrollback lines to serialize along with the pane viewport when serializing sessions, 0 // defaults to the scrollback size. If this number is higher than the scrollback size, it will // also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true. // // scrollback_lines_to_serialize 10000 // Enable or disable the rendering of styled and colored underlines (undercurl). // May need to be disabled for certain unsupported terminals // (Requires restart) // Default: true // // styled_underlines false // How often in seconds sessions are serialized // // serialization_interval 10000 // Enable or disable writing of session metadata to disk (if disabled, other sessions might not know // metadata info on this session) // (Requires restart) // Default: false // // disable_session_metadata false // Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it) // (Requires restart) // Default: true (if the host terminal supports it) // support_kitty_keyboard_protocol false // Whether to make sure a local web server is running when a new Zellij session starts. // This web server will allow creating new sessions and attaching to existing ones that have // opted in to being shared in the browser. // When enabled, navigate to http://127.0.0.1:8082 // (Requires restart) // // Note: a local web server can still be manually started from within a Zellij session or from the CLI. // If this is not desired, one can use a version of Zellij compiled without // `web_server_capability` // // Possible values: // - true // - false // Default: false // // web_server false // Whether to allow sessions started in the terminal to be shared through a local web server, assuming one is // running (see the `web_server` option for more details). // (Requires restart) // // Note: This is an administrative separation and not intended as a security measure. // // Possible values: // - &#034;on&#034; (allow web sharing through the local web server if it // is online) // - &#034;off&#034; (do not allow web sharing unless sessions explicitly opt-in to it) // - &#034;disabled&#034; (do not allow web sharing and do not permit sessions started in the terminal to opt-in to it) // Default: &#034;off&#034; // // web_sharing &#034;off&#034; // A path to a certificate file to be used when setting up the web client to serve the // connection over HTTPs // // web_server_cert &#034;/path/to/cert.pem&#034; // A path to a key file to be used when setting up the web client to serve the // connection over HTTPs // // web_server_key &#034;/path/to/key.pem&#034; /// Whether to enforce https connections to the web server when it is bound to localhost /// (127.0.0.0/8) /// /// Note: https is ALWAYS enforced when bound to non-local interfaces /// /// Default: false // // enforce_https_for_localhost false // Whether to stack panes when resizing beyond a certain size // Default: true // // stacked_resize false // Whether to show tips on startup // Default: true // show_startup_tips false // Whether to show release notes on first version run // Default: true // // show_release_notes false // Whether to enable mouse hover effects and pane grouping functionality // default is true // advanced_mouse_actions false // Whether to enable mouse hover visual effects (frame highlight and help text) // default is true // mouse_hover_effects false // Whether to show visual bell indicators (pane/tab frame flash and [!] suffix) // default is true // visual_bell true // Whether to focus panes on mouse hover // default is false // focus_follows_mouse false // Whether clicking a pane to focus it also sends the click into the pane // default is false // mouse_click_through false // The ip address the web server should listen on when it starts // Default: &#034;127.0.0.1&#034; // (Requires restart) // web_server_ip &#034;127.0.0.1&#034; // The port the web server should listen on when it starts // Default: 8082 // (Requires restart) // web_server_port 8082 // A command to run (will be wrapped with sh -c and provided the RESURRECT_COMMAND env variable) // after Zellij attempts to discover a command inside a pane when resurrecting sessions, the STDOUT // of this command will be used instead of the discovered RESURRECT_COMMAND // can be useful for removing wrappers around commands // Note: be sure to escape backslashes and similar characters properly // post_command_discovery_hook &#034;echo $RESURRECT_COMMAND | sed &lt;your_regex_here&gt;&#034; // Number of async worker tasks to spawn per active client. // // Allocating few tasks may result in resource contention and lags. Small values (around 4) should // typically work best. Set to 0 to use the number of (physical) CPU cores. // Note: This only applies to web clients at the moment. // client_async_worker_tasks 4 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt; &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;.config/alacritty/alacritty.toml&lt;/code&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre class='spip_code spip_code_block' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;[font] size=9.5 [terminal.shell] program = &#034;/usr/bin/zellij&#034; args = [&#034;attach&#034;, &#034;-c&#034;, &#034;main&#034;] &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>mycli&#160;: autocompl&#233;tion et coloration syntaxique pour MySQL</title>
		<link>https://www.momh.fr/mycli-autocompletion-et-coloration-syntaxique-pour-mysql</link>
		<guid isPermaLink="true">https://www.momh.fr/mycli-autocompletion-et-coloration-syntaxique-pour-mysql</guid>
		<dc:date>2021-04-20T05:27:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Brice Boucard</dc:creator>


		<dc:subject>webdev</dc:subject>
		<dc:subject>terminal</dc:subject>

		<description>
&lt;p&gt;Qu'il est laborieux de saisir des commandes MySQL dans son terminal, sans coloration syntaxique et surtout sans autocompl&#233;tion... La solution&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;? mycli&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;! &lt;br class='autobr' /&gt; &#201;crit en Python, mycli est une interface en ligne de commandes &lt;br class='autobr' /&gt;
pour MySQL ou MariaDB notamment qui facilite grandement la saisie gr&#226;ce &#224; la coloration syntaxique et gr&#226;ce surtout &#224; l'autocompl&#233;tion. &lt;br class='autobr' /&gt;
Pour l'installer, rien de plus simple sous Debian&#160;: sudo apt install mycli &lt;br class='autobr' /&gt;
Il est aussi possible d'utiliser l'utilitaire Python pip&#160;:&#160;(&#8230;)&lt;/p&gt;


-
&lt;a href="https://www.momh.fr/blog" rel="directory"&gt;Blog&lt;/a&gt;

/ 
&lt;a href="https://www.momh.fr/webdev" rel="tag"&gt;webdev&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/terminal" rel="tag"&gt;terminal&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Qu'il est laborieux de saisir des commandes MySQL dans son terminal, sans coloration syntaxique et surtout sans autocompl&#233;tion... La solution&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;? mycli&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;!&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;&#201;crit en Python, &lt;a href=&#034;https://www.mycli.net/&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;mycli&lt;/a&gt; est une interface en ligne de commandes &lt;br class='autobr' /&gt;
pour MySQL ou MariaDB notamment qui facilite grandement la saisie gr&#226;ce &#224; la coloration syntaxique et gr&#226;ce surtout &#224; l'autocompl&#233;tion.&lt;/p&gt;
&lt;div class='spip_document_110 spip_document spip_documents spip_document_image spip_documents_center spip_document_center spip_document_avec_legende' data-legende-len=&#034;55&#034; data-legende-lenx=&#034;x&#034;
&gt;
&lt;figure class=&#034;spip_doc_inner&#034;&gt; &lt;img src='https://www.momh.fr/local/cache-vignettes/L500xH362/main-e4bf9685-a06ae.png?1788865804' width='500' height='362' alt='' /&gt;
&lt;figcaption class='spip_doc_legende'&gt; &lt;div class='spip_doc_titre '&gt;&lt;strong&gt;D&#233;monstration de mycli
&lt;/strong&gt;&lt;/div&gt; &lt;div class='spip_doc_credits '&gt;&lt;a href=&#034;https://github.com/dbcli/mycli&#034; class=&#034;spip_url spip_out auto&#034; rel=&#034;nofollow external&#034;&gt;https://github.com/dbcli/mycli&lt;/a&gt;
&lt;/div&gt;
&lt;/figcaption&gt;&lt;/figure&gt;
&lt;/div&gt;
&lt;p&gt;Pour l'installer, rien de plus simple sous Debian&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;sudo apt install mycli &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Il est aussi possible d'utiliser l'utilitaire Python &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;pip&lt;/code&gt;&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;sudo pip install -U mycli &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Pour le lancer, il suffit de lancer la commande &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;mycli&lt;/code&gt; avec pour argument une base de donn&#233;e, un utilisateur... Exemples&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;mycli my_database mycli -u user mycli -u user -h host my_database &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>ncspot, un client ncurse pour Spotify</title>
		<link>https://www.momh.fr/ncspot-un-client-ncurse-pour-spotify</link>
		<guid isPermaLink="true">https://www.momh.fr/ncspot-un-client-ncurse-pour-spotify</guid>
		<dc:date>2020-10-03T09:22:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Brice Boucard</dc:creator>


		<dc:subject>Linux</dc:subject>
		<dc:subject>Raspberry Pi</dc:subject>
		<dc:subject>terminal</dc:subject>
		<dc:subject>Spotify</dc:subject>
		<dc:subject>LastFM</dc:subject>

		<description>
&lt;p&gt;Si mes recherches pour utiliser Spotify depuis mon Raspverry Pi sous Raspbian Buster m'ont tout d'abord conduit &#224; la prise en charge des &lt;span class=&#034;caps&#034;&gt;DRM&lt;/span&gt; pour utiliser le client web open.spotify.com puis au client Spotify Connect raspotify, j'ai enfin d&#233;couvert un client Spotify ne n&#233;cessitant pas de serveur X&#160;: ncspot est ainsi un client ncurse pour Spotify &#233;crit en Rust et hautement inspir&#233; des clients ncmpc ou ncmpcpp pour &lt;span class=&#034;caps&#034;&gt;MPD&lt;/span&gt;. &lt;br class='autobr' /&gt; Installation &lt;br class='autobr' /&gt;
On commence par installer les d&#233;pendances&#160;: bash sudo&#160;(&#8230;)&lt;/p&gt;


-
&lt;a href="https://www.momh.fr/blog" rel="directory"&gt;Blog&lt;/a&gt;

/ 
&lt;a href="https://www.momh.fr/linux" rel="tag"&gt;Linux&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/raspberry-pi" rel="tag"&gt;Raspberry Pi&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/terminal" rel="tag"&gt;terminal&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/spotify" rel="tag"&gt;Spotify&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/lastfm" rel="tag"&gt;LastFM&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Si mes recherches pour utiliser Spotify depuis mon Raspverry Pi sous Raspbian Buster m'ont tout d'abord conduit &#224; &lt;a href='https://www.momh.fr/spip.php?page=article&amp;id_article=35'&gt;la prise en charge des &lt;span class=&#034;caps&#034;&gt;DRM&lt;/span&gt;&lt;/a&gt; pour utiliser le client web open.spotify.com puis au &lt;a href='https://www.momh.fr/raspbian-spotify-et-pulseaudio' class=&#034;spip_in&#034;&gt;client Spotify Connect raspotify&lt;/a&gt;, j'ai enfin d&#233;couvert un client Spotify ne n&#233;cessitant pas de serveur X&#160;: &lt;a href=&#034;https://github.com/hrkfdn/ncspot&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;ncspot&lt;/a&gt; est ainsi un client ncurse pour Spotify &#233;crit en Rust et hautement inspir&#233; des clients ncmpc ou ncmpcpp pour &lt;span class=&#034;caps&#034;&gt;MPD&lt;/span&gt;.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;h2 class=&#034;spip&#034;&gt;Installation&lt;/h2&gt;
&lt;p&gt;On commence par installer les d&#233;pendances&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;sudo apt install libncursesw5-dev libdbus-1-dev libpulse-dev libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;On installe ensuite une &#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;instance&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187; de Rust, gr&#226;ce au script &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;rustup&lt;/code&gt;&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;avant de lancer l'installation &#224; proprement parler de ncspot&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;cargo install ncspot &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 class=&#034;spip&#034;&gt;Usage et configuration&lt;/h2&gt;
&lt;p&gt;Il suffit alors de lancer la commande &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;ncspot&lt;/code&gt; et l'on peut alors naviguer entre trois &#233;crans gr&#226;ce aux touches &lt;kbd&gt;F1&lt;/kbd&gt;, &lt;kbd&gt;F2&lt;/kbd&gt; et &lt;kbd&gt;F3&lt;/kbd&gt;&#160;: queue, recherche, biblioth&#232;que.&lt;/p&gt;
&lt;p&gt;Pour en savoir plus, il suffit d'acc&#233;der &#224; l'&#233;cran d'aide avec la touche &lt;kbd&gt;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;?&lt;/kbd&gt;.&lt;/p&gt;
&lt;p&gt;La configuration se fait dans le fichier &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;~/.config/ncspot/config.toml&lt;/code&gt; avec a possibilit&#233; de d&#233;finir soi-m&#234;me des raccourcis clavier au sein d'une section &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;[keybindings]&lt;/code&gt; et un th&#232;me au sein d'une section &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;[theme]&lt;/code&gt; (&lt;a href=&#034;https://ncspot-theme-generator.vaa.red/&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;un g&#233;n&#233;rateur&lt;/a&gt; vous en facilite la cr&#233;ation)&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;toml&#034; class='spip_code spip_code_block language-toml' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;backend = &#034;pulseaudio&#034; [saved_state] volume = 70 repeat = &#034;no&#034; shuffle = true [keybindings] &#034;Shift+p&#034; = &#034;pause&#034; [theme] background = &#034;black&#034; primary = &#034;green&#034; secondary = &#034;cyan&#034; title = &#034;magenta&#034; playing = &#034;black&#034; playing_selected = &#034;blue&#034; playing_bg = &#034;magenta&#034; highlight = &#034;black&#034; highlight_bg = &#034;green&#034; error = &#034;white&#034; error_bg = &#034;red&#034; statusbar = &#034;magenta&#034; statusbar_progress = &#034;magenta&#034; statusbar_bg = &#034;black&#034; cmdline = &#034;cyan&#034; cmdline_bg = &#034;light black&#034; &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 class=&#034;spip&#034;&gt;Scrobbling&lt;/h2&gt;
&lt;p&gt;Si l'on souhaite scrobbler ce que l'on &#233;coute avec ncspot, il convient d'installer &lt;a href=&#034;https://github.com/InputUsername/rescrobbled&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;&lt;code class='spip_code spip_code_inline' dir='ltr'&gt;rescrobbled&lt;/code&gt;&lt;/a&gt;, &#233;crit lui aussi en Rust&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;wget https://github.com/InputUsername/rescrobbled/archive/v0.2.0.tar.gz tar xvzf v0.2.0.tar.gz cd rescrobbled-0.2.0/ cargo install --path . &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;La configuration se fait &#224; travers le fichier &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;~/.config/rescrobbled/config.toml&lt;/code&gt; mais n&#233;cessite d'avoir g&#233;n&#233;r&#233; au pr&#233;alable un couple cl&#233;-secret via &lt;a href=&#034;https://www.last.fm/api/account/create&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;cette page de Last.fm&lt;/a&gt;&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;mkdir ~/.config/rescrobbled/ nano ~/.config/rescrobbled/config.toml &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;toml&#034; class='spip_code spip_code_block language-toml' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;lastfm-key = &#034;Last.fm API key&#034; lastfm-secret = &#034;Last.fm API secret&#034; #listenbrainz-token = &#034;ListenBrainz API token&#034; enable-notifications = false min-play-time = 0 # in seconds player-whitelist = [ &#034;ncspot&#034; ] # if empty or ommitted, will allow all players &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Il faut ensuite lancer la commande &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;rescrobbled&lt;/code&gt; alors que le lecteur ncspot fonctionne&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;; il vous sera alors demander votre identifiant et votre mot de passe.&lt;br class='autobr' /&gt;
Pour lancer le service en tant que d&#233;mon, il faut placer le fichier &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;~/rescrobbled-0.2.0/rescrobbled.service&lt;/code&gt; dans votre r&#233;pertoire &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;~/.config/systemd/user/&lt;/code&gt;&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;mkdir -p ~/.config/systemd/user cp ~/rescrobbled-0.2.0/rescrobbled.service ~/.config/systemd/user/ &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Lancez ensuite la commande suivante pour lancer rescrobbled au d&#233;marrage&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;systemctl --user enable rescrobbled.service &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;et pour le lancer sans avoir &#224; red&#233;marrer&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;systemctl --user start rescrobbled.service &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>R&#233;encoder des fichiers en UTF-8</title>
		<link>https://www.momh.fr/reencoder-des-fichiers-en-utf-8</link>
		<guid isPermaLink="true">https://www.momh.fr/reencoder-des-fichiers-en-utf-8</guid>
		<dc:date>2020-03-24T18:28:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Brice Boucard</dc:creator>


		<dc:subject>Linux</dc:subject>
		<dc:subject>Raspberry Pi</dc:subject>
		<dc:subject>terminal</dc:subject>
		<dc:subject>script</dc:subject>
		<dc:subject>sous-titres</dc:subject>

		<description>
&lt;p&gt;R&#233;guli&#232;rement, les sous-titres (t&#233;l&#233;charg&#233;s en ligne de commande) ne sont pas pris en compte par omxplayer que j'utilise sur mon Raspberry Pi&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;; la raison&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;? Ils ne sont tout simplement pas en &lt;span class=&#034;caps&#034;&gt;UTF&lt;/span&gt;-8... &lt;br class='autobr' /&gt; J'ai longtemps utilis&#233; la commande recode mais depuis une r&#233;installation compl&#232;te d'une Raspbian Buster sur mon Raspberry Pi 2, et d'une modification du montage des disques de mon &lt;span class=&#034;caps&#034;&gt;NAS&lt;/span&gt;, je rencontre des probl&#232;mes de permissions... &lt;br class='autobr' /&gt;
Du coup, gr&#226;ce &#224; deux contributions d'une m&#234;me conversation&#160;(&#8230;)&lt;/p&gt;


-
&lt;a href="https://www.momh.fr/blog" rel="directory"&gt;Blog&lt;/a&gt;

/ 
&lt;a href="https://www.momh.fr/linux" rel="tag"&gt;Linux&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/raspberry-pi" rel="tag"&gt;Raspberry Pi&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/terminal" rel="tag"&gt;terminal&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/script" rel="tag"&gt;script&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/sous-titres" rel="tag"&gt;sous-titres&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;R&#233;guli&#232;rement, les sous-titres (&lt;a href='https://www.momh.fr/spip.php?page=article&amp;id_article=52'&gt;t&#233;l&#233;charg&#233;s en ligne de commande&lt;/a&gt;) ne sont pas pris en compte par &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;omxplayer&lt;/code&gt; que j'utilise sur mon Raspberry Pi&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;; la raison&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;? Ils ne sont tout simplement pas en &lt;span class=&#034;caps&#034;&gt;UTF&lt;/span&gt;-8...&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;J'ai longtemps utilis&#233; la commande &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;recode&lt;/code&gt; mais depuis une r&#233;installation compl&#232;te d'une Raspbian Buster sur mon Raspberry Pi 2, et d'une modification du &lt;a href='https://www.momh.fr/spip.php?page=article&amp;id_article=41'&gt;montage des disques de mon &lt;span class=&#034;caps&#034;&gt;NAS&lt;/span&gt;&lt;/a&gt;, je rencontre des probl&#232;mes de permissions...&lt;/p&gt;
&lt;p&gt;Du coup, gr&#226;ce &#224; deux contributions d'une m&#234;me conversation (celles de &lt;a href=&#034;https://superuser.com/a/719319&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;Pierre Fabier&lt;/a&gt; et d'&lt;a href=&#034;https://superuser.com/a/1317744&#034; class=&#034;spip_out&#034; rel=&#034;external&#034;&gt;un inconnu&lt;/a&gt;), j'ai produit un petit script.&lt;/p&gt;
&lt;p&gt;Si ce n'est pas d&#233;j&#224; fait, on cr&#233;e un r&#233;pertoire &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;bin/&lt;/code&gt; dans notre home&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;mkdir ~/bin &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;puis on y cr&#233;e notre script&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;nano ~/bin/toutf8 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;dans lequel on ins&#232;re&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;#!/bin/bash # Find the current encoding of the file encoding=$(uchardet &#034;$1&#034;) if [ ! &#034;UTF-8&#034; == &#034;${encoding}&#034; ] then # Encodings differ, we have to encode echo &#034;recoding from ${encoding} to UTF-8 file : $1&#034; vim +'set nobomb | set fenc=utf8 | x' &#034;$1&#034; else echo &#034;Already utf8 encoding&#034; fi &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;On le rend ex&#233;cutable&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;chmod +x ~/bin/toutf8 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Pour le faire fonctionner, il convient bien d'avoir install&#233; les paquets &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;uchardet&lt;/code&gt; (plus fiable que la commande &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;file -i&lt;/code&gt; qui renvoie r&#233;guli&#232;rement des &#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;unknown-8bit&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187; impossible &#224; passer en argument de &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;recode&lt;/code&gt; ou &#224; traiter par ce script) et bien s&#251;r &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;vim&lt;/code&gt;&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;sudo apt install uchardet vim &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Ensuite, o&#249; que vous vous trouviez, vous pourrez appeler le script simplement&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;toutf8 nom_du_fichier &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>ncmpcpp, un client pour mpd</title>
		<link>https://www.momh.fr/ncmpcpp-un-client-pour-mpd</link>
		<guid isPermaLink="true">https://www.momh.fr/ncmpcpp-un-client-pour-mpd</guid>
		<dc:date>2011-09-04T14:40:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Brice Boucard</dc:creator>


		<dc:subject>Linux</dc:subject>
		<dc:subject>mpd</dc:subject>
		<dc:subject>terminal</dc:subject>

		<description>
&lt;p&gt;ncmpcpp est un client pour &lt;span class=&#034;caps&#034;&gt;MPD&lt;/span&gt;, plus complet que ncmpc, dont il reprend le m&#233;canisme de navigation, l'interface en ncurse, apportant de nouvelles fonctionnalit&#233;s parmi lesquelles la visualisation, l'&#233;dition des tags, la recherche avec des expressions r&#233;guli&#232;res, une v&#233;ritable navigation au sein de votre collection&#8230; &lt;br class='autobr' /&gt; ncmpcpp est (bien &#233;videmment) disponible dans les d&#233;p&#244;ts&#160;: bash sudo apt install ncmpcpp &lt;br class='autobr' /&gt;
Pour le lancer, la commande suivante suffit&#160;: bash ncmpcpp &lt;br class='autobr' /&gt;
La configuration se&#160;(&#8230;)&lt;/p&gt;


-
&lt;a href="https://www.momh.fr/blog" rel="directory"&gt;Blog&lt;/a&gt;

/ 
&lt;a href="https://www.momh.fr/linux" rel="tag"&gt;Linux&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/mpd" rel="tag"&gt;mpd&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/terminal" rel="tag"&gt;terminal&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;ncmpcpp est un client pour &lt;a href='https://www.momh.fr/mpd-music-player-daemon' class=&#034;spip_in&#034;&gt;&lt;span class=&#034;caps&#034;&gt;MPD&lt;/span&gt;&lt;/a&gt;, plus complet que ncmpc, dont il reprend le m&#233;canisme de navigation, l'interface en ncurse, apportant de nouvelles fonctionnalit&#233;s parmi lesquelles la visualisation, l'&#233;dition des tags, la recherche avec des expressions r&#233;guli&#232;res, une v&#233;ritable navigation au sein de votre collection&#8230;&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;ncmpcpp est (bien &#233;videmment) disponible dans les d&#233;p&#244;ts&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;sudo apt install ncmpcpp &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Pour le lancer, la commande suivante suffit&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;ncmpcpp &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;La configuration se fait, comme pour ncmpc, &#224; la main, dans le fichier &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;~/.ncmpcpp/config&lt;/code&gt;. On commence par cr&#233;er le r&#233;pertoire &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;~/.ncmpcpp&lt;/code&gt; puis on copie le ficher d'exemple avant de l'&#233;diter&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;mkdir ~/.ncmpcpp cp /usr/share/doc/ncmpcpp/config.gz ~/.ncmpcpp/ gzip -d ~/.ncmpcpp/config.gz nano ~/.ncmpcpp/config &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Si vous avez des difficult&#233;s pour configurer ncmpcpp, penchez-vous sur la documentation&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;man ncmpcpp &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;ll faut relancer ncmpcpp pour que les modifications du fichier de configuration soient prises en compte. Rien de particulier si ce ne sont ces deux points&#160;:&lt;/p&gt;
&lt;ul class=&#034;spip&#034; role=&#034;list&#034;&gt;&lt;li&gt; pour pouvoir &#233;diter les tags depuis ncmpcpp, il vous faut imp&#233;rativement renseigner le champ mpd_music_dir (ligne 14) qui correspond au r&#233;pertoire de votre musique (celui que vous avez indiqu&#233; dans la configuration de &lt;span class=&#034;caps&#034;&gt;MPD&lt;/span&gt;)&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;;&lt;/li&gt;&lt;li&gt; pour profiter de la visualisation, il faut commencer par modifier la configuration de &lt;span class=&#034;caps&#034;&gt;MPD&lt;/span&gt; et ajouter dans la section Audio Output ces lignes&#160;:
&lt;div class=&#034;precode&#034;&gt;&lt;pre class='spip_code spip_code_block' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;audio_output { type &#034;fifo&#034; name &#034;My FIFO&#034; path &#034;/tmp/mpd.fifo&#034; format &#034;44100:16:1&#034; } &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Il faut ensuite &#233;diter certaines options dans le fichier &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;~/.ncmpcpp/config&lt;/code&gt;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;; les voici&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre class='spip_code spip_code_block' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;visualizer_fifo_path = &#034;/tmp/mpd.fifo&#034; visualizer_output_name = &#034;My MPD PulseAudio Output&#034; visualizer_sync_interval = &#034;30&#034; visualizer_type = &#034;spectrum&#034; (spectrum/wave) &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Pensez &#224; relancer mpd&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;sudo service mpd restart &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;Un fichier de configuration est t&#233;l&#233;chargeable &lt;a href='https://www.momh.fr/IMG/txt/config.txt' class=&#034;spip_in&#034; type='text/plain'&gt;ici&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		
		<enclosure url="https://www.momh.fr/IMG/txt/config.txt" length="15141" type="text/plain" />
		

	</item>
<item xml:lang="fr">
		<title>Un terminal accueillant c'est possible avec cowsay et fortune</title>
		<link>https://www.momh.fr/un-terminal-accueillant-c-est-possible-avec-cowsay-et-fortune</link>
		<guid isPermaLink="true">https://www.momh.fr/un-terminal-accueillant-c-est-possible-avec-cowsay-et-fortune</guid>
		<dc:date>2011-08-29T17:47:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Brice Boucard</dc:creator>


		<dc:subject>Linux</dc:subject>
		<dc:subject>terminal</dc:subject>

		<description>
&lt;p&gt;Bien que totalement inutile &#8211;&#160;donc totalement indispensable&#160;&#8211; votre terminal peut vous parler ou du moins afficher un air un peu moins triste lorsque vous le lancez... Je ne parle pas ici des possibilit&#233;s de configuration de l'arri&#232;re-plan ou de la couleur du texte (entre autres) mais de quelque chose de plus surprenant, comme vous pouvez le voir ci-dessous. &lt;br class='autobr' /&gt; Pour r&#233;aliser cela rien de bien compliqu&#233;&#160;: il suffit de deux petits programmes, cowsay et fortune, et d'&#233;diter le fichier&#160;(&#8230;)&lt;/p&gt;


-
&lt;a href="https://www.momh.fr/blog" rel="directory"&gt;Blog&lt;/a&gt;

/ 
&lt;a href="https://www.momh.fr/linux" rel="tag"&gt;Linux&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/terminal" rel="tag"&gt;terminal&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Bien que totalement inutile &#8211;&#160;donc totalement indispensable&#160;&#8211; votre terminal peut vous parler ou du moins afficher un air un peu moins triste lorsque vous le lancez... &lt;br class='autobr' /&gt;
Je ne parle pas ici des possibilit&#233;s de configuration de l'arri&#232;re-plan ou de la couleur du texte (entre autres) mais de quelque chose de plus surprenant, comme vous pouvez le voir ci-dessous.&lt;/p&gt;
&lt;div class='spip_document_35 spip_document spip_documents spip_document_image spip_documents_center spip_document_center'&gt;
&lt;figure class=&#034;spip_doc_inner&#034;&gt; &lt;img src='https://www.momh.fr/IMG/png/cowsay.png' width=&#034;448&#034; height=&#034;428&#034; alt='' /&gt;
&lt;/figure&gt;
&lt;/div&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Pour r&#233;aliser cela rien de bien compliqu&#233;&#160;: il suffit de deux petits programmes, &lt;i&gt;cowsay&lt;/i&gt; et &lt;i&gt;fortune&lt;/i&gt;, et d'&#233;diter le fichier &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;.bashrc&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Le rappel des anniversaire est quant &#224; lui g&#233;r&#233; par &lt;i&gt;birthday&lt;/i&gt; que nous avons pr&#233;sent&#233; dans &lt;a href='https://www.momh.fr/birthday-ne-manquez-plus-d-anniversaires' class=&#034;spip_in&#034;&gt;un pr&#233;c&#233;dent article&lt;/a&gt;.&lt;/p&gt;
&lt;h2 class=&#034;spip&#034;&gt;Cowsay&lt;/h2&gt;
&lt;p&gt;Cowsay est un petit programme permettant, par d&#233;faut, d'afficher le dessin &lt;span class=&#034;caps&#034;&gt;ASCII&lt;/span&gt; d'une vache avec un message (que l'on passe en argument).&lt;/p&gt;
&lt;p&gt;Commen&#231;ons par installer cowsay&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;sudo apt install cowsay &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Maintenant nous pouvons commencer &#224; nous amuser un peu&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;cowsay Salut ! &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;nous donne un dessin &lt;span class=&#034;caps&#034;&gt;ASCII&lt;/span&gt; d'une vache qui nous salue gentiment. Bien &#233;videmment vous pouvez utiliser le texte que vous souhaitez comme argument &#224; la commande cowsay. Une pr&#233;cision cependant&#160;: si votre texte est compos&#233; de plusieurs paragraphes (avec saut de ligne donc), il vous faudra prot&#233;ger l'argument (le texte donc) avec des guillemets.&lt;/p&gt;
&lt;p&gt;Mais cowsay ne se limite pas &#224; une vache, comme vous avez pu le voir avec l'image ci-dessus. Comment donc ai-je obtenu ce pingouin&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;? Il suffit de faire un petit tour par le man de cowsay pour trouver notre bonheur&#160;:&lt;/p&gt;
&lt;blockquote class=&#034;spip&#034;&gt;
&lt;p&gt;The -f option specifies a particular cow picture file (&#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;cowfile&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187;) to use. If the cowfile spec contains '/' then it will be interpreted as a path relative to the current directory. Otherwise, cowsay will search the path specified in the &lt;span class=&#034;caps&#034;&gt;COWPATH&lt;/span&gt; environment variable. To list all cowfiles on the current &lt;span class=&#034;caps&#034;&gt;COWPATH&lt;/span&gt;, invoke cowsay with the -l switch.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;On y apprend donc que la commande &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;cowsay&lt;/code&gt; peut prendre un argument pr&#233;cisant le dessin que l'on souhaite parmi une liste que l'on conna&#238;t gr&#226;ce &#224; l'argument -l de la commande cowsay&#160;:&#160;&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;cowsay -l Cow files in /usr/share/cowsay/cows: apt beavis.zen bong bud-frogs bunny calvin cheese cock cower daemon default dragon dragon-and-cow duck elephant elephant-in-snake eyes flaming-sheep ghostbusters gnu head-in hellokitty kiss kitty koala kosh luke-koala mech-and-cow meow milk moofasa moose mutilated pony pony-smaller ren sheep skeleton snowman sodomized-sheep stegosaurus stimpy suse three-eyes turkey turtle tux unipony unipony-smaller vader vader-koala www &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;ls /usr/share/cowsay/cows/ apt.cow cock.cow elephant.cow hellokitty.cow meow.cow ren.cow suse.cow vader.cow beavis.zen.cow cower.cow elephant-in-snake.cow kiss.cow milk.cow sheep.cow three-eyes.cow vader-koala.cow bong.cow daemon.cow eyes.cow kitty.cow moofasa.cow skeleton.cow turkey.cow www.cow bud-frogs.cow default.cow flaming-sheep.cow koala.cow moose.cow snowman.cow turtle.cow bunny.cow dragon-and-cow.cow ghostbusters.cow kosh.cow mutilated.cow sodomized-sheep.cow tux.cow calvin.cow dragon.cow gnu.cow luke-koala.cow pony.cow stegosaurus.cow unipony.cow cheese.cow duck.cow head-in.cow mech-and-cow.cow pony-smaller.cow stimpy.cow unipony-smaller.cow &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Le r&#233;sultat de la commande &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;cowsay -l&lt;/code&gt; n'&#233;tant pas forc&#233;ment des plus clairs, nous avons dans un deuxi&#232;me temps list&#233; tous les &#233;l&#233;ments de &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;/usr/share/cowsay/cows/&lt;/code&gt; et nous obtenons quelque chose d'un peu plus lisible&#160;: nous avons donc ici l'ensemble des formes possibles possibles. &#192; vous de choisir le dessin qui vous pla&#238;t le plus en utilisant la commande suivante et en rempla&#231;ant &lt;i&gt;skeleton.cow&lt;/i&gt; par le mod&#232;le que vous voulez&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;cowsay -f skeleton.cow Salut! &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Avant d'en finir avec cowsay, citons ici une derni&#232;re option (pour plus d'options et de d&#233;tails consulter le man), celle permettant de g&#233;rer le nombre de colonnes (donc de caract&#232;res) par ligne de texte. Par d&#233;faut, le texte ne s'affiche que sur 40 colonnes, ce qui peut s'av&#233;rer un peu g&#234;nant dans le cas de longs discours&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;; pour y rem&#233;dier&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;cowsay -W 60 -f tux.cow Lorem ipsum dolor sit amet, consectetur adipiscing elit. &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 class=&#034;spip&#034;&gt;Fortune&lt;/h2&gt;
&lt;p&gt;Fortune est un programme simple affichant au hasard un message provenant d'une base de donn&#233;es. Ubuntu propose, outre le programme, une base de citations francophones. Installons tout cela&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;sudo apt install fortune fortunes-fr &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Pour afficher les citations, rien de plus simple&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;fortune &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Nous n'allons pas d&#233;crire les options de ce programme (tout est dans le man) mais seulement &#233;voquer la possiblit&#233; de s&#233;lectionner la ou les bases de citations &#224; utiliser. Pour conna&#238;tre les fichiers disponibles, il vous faut lister les &#233;l&#233;ments se trouvant dans &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;/usr/share/games/fortunes-fr&lt;/code&gt; (pour les fichiers de citations anglo-saxonnes, il faut regarder dans le dossier &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;/usr/share/games/fortunes/&lt;/code&gt;)&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;ls /usr/share/games/fortunes-fr/ bd.dat fr.rec.photo.dat glp.dat humour.dat litterature_francaise.dat mysoginie.dat politique.dat tolkien_fr.dat cinema.dat gcu.dat gpj.dat informatique.dat mauriceetpatapon.dat oulipo.dat proverbes.dat tribune-linuxfr.dat debian-fr.dat GDP.dat haiku.dat linuxfr-undernet.dat multidesk2.dat personnalites.dat religion.dat droit.dat gfa.dat humoristes.dat litterature_etrangere.dat multidesk.dat philosophie.dat sciences.dat &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Ensuite, il faut lancer la commande &lt;i&gt;fortune&lt;/i&gt; avec pour argument le nom du fichier (sans son extension)&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;; il est m&#234;me possible de sp&#233;cifier plusieurs fichiers comme cela&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;fortune bd humoristes humour &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 class=&#034;spip&#034;&gt;Afficher une fortune avec cowsay...&lt;/h2&gt;
&lt;p&gt;Pour afficher une citation dans la bulle fournie par cowsay, il suffit de proc&#233;der ainsi&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;fortune humoristes | cowsay &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Sans oublier bien s&#251;r les options de cowsay que nous avons vu pr&#233;c&#233;demment&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;; par exemple&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;fortune bd humoristes humour | cowsay -W 80 -f tux.cow &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 class=&#034;spip&#034;&gt;&#8230;&#224; l'ouverture d'un terminal virtuel&lt;/h2&gt;
&lt;p&gt;Pour cela, il suffit d'&#233;diter le fichier &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;~/.bashrc&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;nano ~/.bashrc &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;et d'y ajouter la commande pr&#233;c&#233;dente (enfin celle que vous avez mitonn&#233;e). Et voil&#224;, d&#232;s que vous ouvrez un terminal virtuel, vous &#234;tes chaleureusement accueilli.&lt;/p&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>
<item xml:lang="fr">
		<title>Birthday&#160;: ne manquez plus d'anniversaires&#160;!</title>
		<link>https://www.momh.fr/birthday-ne-manquez-plus-d-anniversaires</link>
		<guid isPermaLink="true">https://www.momh.fr/birthday-ne-manquez-plus-d-anniversaires</guid>
		<dc:date>2011-08-28T17:38:00Z</dc:date>
		<dc:format>text/html</dc:format>
		<dc:language>fr</dc:language>
		<dc:creator>Brice Boucard</dc:creator>


		<dc:subject>Linux</dc:subject>
		<dc:subject>terminal</dc:subject>

		<description>
&lt;p&gt;Vous &#234;tes du genre &#224; oublier de souhaiter un bon anniversaire &#224; vos amis ou parents&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;? Ce ne sera plus le cas d&#233;sormais gr&#226;ce &#224; un petit logiciel permettant d'afficher dans un terminal virtuel les anniversaires &#224; venir&#160;: birthday. &lt;br class='autobr' /&gt; Commen&#231;ons par installer birthday&#160;: bash sudo apt install birthday &lt;br class='autobr' /&gt;
Inutile de lancer le programme maintenant, il nous faut tout d'abord cr&#233;er un fichier de donn&#233;es, avec les dates que l'on souhaite se voir rappeler. bash nano&#160;/.birthdays &lt;br class='autobr' /&gt;
Les anniversaires&#160;(&#8230;)&lt;/p&gt;


-
&lt;a href="https://www.momh.fr/blog" rel="directory"&gt;Blog&lt;/a&gt;

/ 
&lt;a href="https://www.momh.fr/linux" rel="tag"&gt;Linux&lt;/a&gt;, 
&lt;a href="https://www.momh.fr/terminal" rel="tag"&gt;terminal&lt;/a&gt;

		</description>


 <content:encoded>&lt;div class='rss_chapo'&gt;&lt;p&gt;Vous &#234;tes du genre &#224; oublier de souhaiter un bon anniversaire &#224; vos amis ou parents&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;? Ce ne sera plus le cas d&#233;sormais gr&#226;ce &#224; un petit logiciel permettant d'afficher dans un terminal virtuel les anniversaires &#224; venir&#160;: &lt;i&gt;birthday&lt;/i&gt;.&lt;/p&gt;&lt;/div&gt;
		&lt;div class='rss_texte'&gt;&lt;p&gt;Commen&#231;ons par installer &lt;i&gt;birthday&lt;/i&gt;&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;sudo apt install birthday &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Inutile de lancer le programme maintenant, il nous faut tout d'abord cr&#233;er un fichier de donn&#233;es, avec les dates que l'on souhaite se voir rappeler.&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;nano ~/.birthdays &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Les anniversaires (&#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&lt;i&gt;birthdays&lt;/i&gt;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187;) doivent &#234;tre entr&#233;es sous cette forme&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre class='spip_code spip_code_block' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;noneJoe Blow=25/04/1974 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Vous pouvez &#233;galement pr&#233;ciser des &#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;anniversaires&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187; (&#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&lt;i&gt;anniversaries&lt;/i&gt;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187;) ou des &#233;v&#233;nements (&#171;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&lt;i&gt;events&lt;/i&gt;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;&#187;) gr&#226;ce aux options &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;ann&lt;/code&gt; et &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;ev&lt;/code&gt; respectivement&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre class='spip_code spip_code_block' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;Attentats du World Trade Center=11/09/2001 ann Printemps=21/03 ev &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Une fois votre fichier cr&#233;&#233; et compl&#233;t&#233;, vous pouvez lancer &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;birthday&lt;/code&gt;&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;birthday &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Cette commande vous permet d'afficher, par d&#233;faut, les anniversaires, &#233;v&#233;nements&#8230; &#224; venir dans les 21 prochains jours (comportement par d&#233;faut). Vous pouvez sp&#233;cifier le nombre de jours gr&#226;ce &#224; l'option &lt;i&gt;-W nombre_de_jour&lt;/i&gt;&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;birthday -W 7 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;ne vous affichera que les dates &#224; ne pas oublier pour les 7 prochains jours.&lt;/p&gt;
&lt;p&gt;Vous pouvez &#233;galement afficher les dates dans un calendrier gr&#226;ce &#224; l'option &lt;i&gt;-c&lt;/i&gt; et limiter le nombre de jours &#224; afficher avec l'option &lt;i&gt;-d&lt;/i&gt;&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;birthday -c -d 3 &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;C'est bien beau tout cela, mais encore faut-il se souvenir de lancer birthday de temps en temps tout de m&#234;me&#8230; C'est pas gagn&#233;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;? Pas de panique&#160;: nous allons faire en sorte de lancer &lt;i&gt;birthday&lt;/i&gt; automatiquement &#224; chaque ouverture d'un terminal virtuel&#160;: pour cela nous &#233;ditons le fichier &lt;code class='spip_code spip_code_inline' dir='ltr'&gt;~/.bashrc&lt;/code&gt;&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;nano ~/.bashrc &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;et on y ajoute tout simplement la ligne suivante&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;birthday &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;et le tour est jou&#233;&lt;small class=&#034;fine d-inline&#034;&gt;&#160;&lt;/small&gt;!&lt;/p&gt;
&lt;p&gt;Pour plus d'options et en savoir plus&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;man birthday &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&#192; noter que l'on peut concilier &lt;i&gt;birthday&lt;/i&gt; et &lt;i&gt;cowsay&lt;/i&gt; (&lt;a href='https://www.momh.fr/un-terminal-accueillant-c-est-possible-avec-cowsay-et-fortune' class=&#034;spip_in&#034;&gt;voir cet article&lt;/a&gt;)&#160;:&lt;/p&gt;
&lt;div class=&#034;precode&#034;&gt;&lt;pre data-language=&#034;bash&#034; class='spip_code spip_code_block language-bash' dir='ltr' style='text-align:left;'&gt;&lt;code&gt;birthday -W 50 | cowsay -W 30 -f tux.cow birthday -c -d 3 | cowsay -W 80 -f tux.cow &lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
		
		</content:encoded>


		

	</item>



</channel>

</rss>
