From 7d7fa29d1635ffdbd3bb6f76d182a9ff78a3ac42 Mon Sep 17 00:00:00 2001 From: Breizh Date: Mon, 10 Jan 2022 19:37:13 +0100 Subject: [PATCH] =?UTF-8?q?M=C3=A0j=20diverses?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/htop/htoprc | 4 ++-- .config/sway/config | 2 +- .config/yt-dlp/config | 3 +++ .local/bin/music-replaygain | 10 +++++----- .local/bin/music-replaygain-solo | 5 +---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.config/htop/htoprc b/.config/htop/htoprc index b00ab90..b697bd9 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -1,6 +1,6 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. -htop_version=3.1.1 +htop_version=3.1.2 config_reader_min_version=2 fields=0 48 17 18 113 38 39 40 119 111 2 46 47 49 1 sort_key=46 @@ -21,7 +21,7 @@ highlight_changes_delay_secs=5 find_comm_in_cmdline=1 strip_exe_from_cmdline=1 show_merged_command=1 -tree_view=0 +tree_view=1 tree_view_always_by_pid=0 all_branches_collapsed=0 header_margin=1 diff --git a/.config/sway/config b/.config/sway/config index a6ec597..e58f8a2 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -290,7 +290,7 @@ for_window [class="(?i)Rail Route.x86"] border none # Assign apps to workspace assign [app_id="claws-mail"] 🖂 -assign [app_id="org.qbittorrent.qBittorrent"] 8 +assign [instance="qbittorrent"] 8 # reload the configuration file bindsym $mod+Shift+c reload diff --git a/.config/yt-dlp/config b/.config/yt-dlp/config index a38c0ed..08934f8 100644 --- a/.config/yt-dlp/config +++ b/.config/yt-dlp/config @@ -1,7 +1,10 @@ -o "%(title)s.%(ext)s" --embed-subs +--write-auto-subs --sub-lang fr,en -i -f "((bestvideo[vcodec^=av01][height<=?1440][width<=?2560]/bestvideo[vcodec=vp9][height<=?1440][width<=?2560]/bestvideo[height<=?1440][width<=?2560]/bestvideo)+(bestaudio[acodec=opus]/bestaudio[acodec=vorbis]/bestaudio))/best" --add-metadata --hls-use-mpegts +--compat-options no-keep-subs +--download-archive ".yt-dlp_archive" diff --git a/.local/bin/music-replaygain b/.local/bin/music-replaygain index 4758c6e..568365e 100755 --- a/.local/bin/music-replaygain +++ b/.local/bin/music-replaygain @@ -1,8 +1,5 @@ #!/bin/bash -# Sortie à la moindre erreur -set -e - shopt -s globstar # Initialisation de la mise en forme @@ -13,13 +10,16 @@ reset=$(tput sgr0) bold=$(tput bold) # Répertoire source -rootdir="$(realpath ${1:-${HOME}/Musique/})" +rootdir="$(realpath "${1:-${HOME}/Musique/}")" cd "$rootdir" # Pour tous les sous-répertoires, à tous les niveaux for dir in **/ . do + # Vérifie que le répertoire existe, sinon on le saute. + [[ -d "${rootdir}/${dir}" ]] || continue + # On entre dans le répertoire à traiter cd "${rootdir}/${dir}" @@ -37,7 +37,7 @@ do fi # S’il s’agit d’audio - if [[ "$(file --mime-type -b -e ascii -e compress -e tar -e cdf "$file")" =~ audio/ ]] + if [[ "$file" =~ .mp3$ || "$file" =~ .m4a$ || "$(file --mime-type -b -e ascii -e compress -e tar -e cdf "$file")" =~ audio/ ]] then todo+=("$file") fi diff --git a/.local/bin/music-replaygain-solo b/.local/bin/music-replaygain-solo index 9d44bb7..8020a5b 100755 --- a/.local/bin/music-replaygain-solo +++ b/.local/bin/music-replaygain-solo @@ -1,8 +1,5 @@ #!/bin/bash -# Sortie à la moindre erreur -set -e - shopt -s globstar # Initialisation de la mise en forme @@ -21,7 +18,7 @@ cd "$rootdir" for file in * do # S’il s’agit d’audio - if [[ "$(file --mime-type -b -e ascii -e compress -e tar -e cdf "$file")" =~ audio/ ]] + if [[ "$file" =~ .mp3$ || "$file" =~ .m4a$ || "$(file --mime-type -b -e ascii -e compress -e tar -e cdf "$file")" =~ audio/ ]] then # Parrallélisation des traitements declare -a running