Màj diverses

This commit is contained in:
Breizh 2021-12-11 17:25:35 +01:00
parent af6ff52076
commit 54ffa65088
7 changed files with 27 additions and 12 deletions

View file

@ -1,12 +1,12 @@
# 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.0
htop_version=3.1.1
config_reader_min_version=2
fields=0 48 17 18 113 38 39 40 119 111 2 46 47 49 1
sort_key=119
sort_key=46
sort_direction=-1
tree_sort_key=0
tree_sort_direction=1
tree_sort_key=46
tree_sort_direction=-1
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=1
@ -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=1
tree_view=0
tree_view_always_by_pid=0
all_branches_collapsed=0
header_margin=1

View file

@ -42,4 +42,3 @@ prefetch-playlist=yes
# YTDL
ytdl-format="((bestvideo[vcodec^=av01][height<=?1080][width<=?1920]/bestvideo[vcodec=vp9][height<=?1080][width<=?1920]/bestvideo[height<=?1080][width<=?1920]/bestvideo)+(bestaudio[acodec=opus]/bestaudio[acodec=vorbis]/bestaudio))/best"
script-opts=ytdl_hook-ytdl_path=yt-dlp

View file

@ -36,6 +36,6 @@ function delete()
end
end
mp.add_key_binding("ctrl+DEL", "delete_file", mark_delete)
mp.add_key_binding("shift+DEL", "delete_file", mark_delete)
mp.register_event("shutdown", delete)

View file

@ -1,6 +1,5 @@
-o "%(title)s.%(ext)s"
--embed-subs
--write-auto-sub
--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"

View file

@ -12,7 +12,7 @@ then
color="#747369"
if [ ! -f /dev/shm/claws_offline ]
then
swaymsg -q -- exec claws-mail --offline
#swaymsg -q -- exec claws-mail --offline
touch /dev/shm/claws_offline
fi
elif ping -c 1 1.1.1.1 -W 1 &>/dev/null || ping -c 1 8.8.8.8 -W 1 &>/dev/null
@ -27,7 +27,7 @@ else
color="#F2777A"
if [ ! -f /dev/shm/claws_offline ]
then
swaymsg -q -- exec claws-mail --offline
#swaymsg -q -- exec claws-mail --offline
touch /dev/shm/claws_offline
color="#FFCC66"
fi

View file

@ -4,9 +4,9 @@ cat | while read line
do
if [[ "$line" =~ ^/ ]]
then
echo "$line" > /run/minecraft-server.sock
echo "$line" > /run/minecraft-server.stdin
else
echo "say $line" > /run/minecraft-server.sock
echo "say $line" > /run/minecraft-server.stdin
# echo "dynmap sendtoweb $line" > /run/minecraft-server.stdin
fi
done

View file

@ -1,44 +1,60 @@
#!/bin/bash
# Sortie à la moindre erreur
set -e
shopt -s globstar
# Initialisation de la mise en forme
blue=$(tput setaf 4)
green=$(tput setaf 2)
reset=$(tput sgr0)
bold=$(tput bold)
# Répertoire source
rootdir="${HOME}/Musique/"
cd "$rootdir"
# Pour tous les sous-répertoires, à tous les niveaux
for dir in **/ .
do
# Affichage du répertoire en cours de traitement
echo "$bold$dir$reset"
# Définition du répertoire de destination
dstdir="${HOME}/Musique.opus/${dir}"
# Création de la destination
mkdir -p "${dstdir}"
# On entre dans le répertoire à traiter
cd "${rootdir}/${dir}"
# Pour chaque fichier
for file in *
do
# On ignore les dossiers
if [[ -d "${file}" ]]
then
continue
fi
# Sil sagit de FLAC ou dune vidéo
if [[ "${file}" =~ .flac$ ]] || [[ "${dir}" == "Vidéos/" && "$(file --mime-type -b -e ascii -e compress -e tar -e cdf "$file")" =~ video/ ]]
then
# Définition du fichier de destination
dstfile="$(basename -s .flac "$file").opus"
# Sil a déjà été traité on passe, pour gagner du
# temps.
if [[ -f "${dstdir}${dstfile}" ]]
then
echo "[${blue}SKIP${reset}] $file"
continue
fi
# Parrallélisation des conversions
declare -a running
running=($(jobs -p))
@ -53,6 +69,7 @@ do
echo "[${green} OK ${reset}] $file"
) &
else
# Pour les autres fichiers, les copier tel quels
echo "[${green}COPY${reset}] $file"
cp -n --reflink=auto "${file}" "${dstdir}/"
fi