Màj diverses

This commit is contained in:
Breizh 2021-12-11 17:25:35 +01:00
parent edce6ff4c9
commit 3ff0a185f6
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. # Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly. # 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 config_reader_min_version=2
fields=0 48 17 18 113 38 39 40 119 111 2 46 47 49 1 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 sort_direction=-1
tree_sort_key=0 tree_sort_key=46
tree_sort_direction=1 tree_sort_direction=-1
hide_kernel_threads=1 hide_kernel_threads=1
hide_userland_threads=1 hide_userland_threads=1
shadow_other_users=1 shadow_other_users=1
@ -21,7 +21,7 @@ highlight_changes_delay_secs=5
find_comm_in_cmdline=1 find_comm_in_cmdline=1
strip_exe_from_cmdline=1 strip_exe_from_cmdline=1
show_merged_command=1 show_merged_command=1
tree_view=1 tree_view=0
tree_view_always_by_pid=0 tree_view_always_by_pid=0
all_branches_collapsed=0 all_branches_collapsed=0
header_margin=1 header_margin=1

View file

@ -42,4 +42,3 @@ prefetch-playlist=yes
# YTDL # 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" 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
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) mp.register_event("shutdown", delete)

View file

@ -1,6 +1,5 @@
-o "%(title)s.%(ext)s" -o "%(title)s.%(ext)s"
--embed-subs --embed-subs
--write-auto-sub
--sub-lang fr,en --sub-lang fr,en
-i -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" -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" color="#747369"
if [ ! -f /dev/shm/claws_offline ] if [ ! -f /dev/shm/claws_offline ]
then then
swaymsg -q -- exec claws-mail --offline #swaymsg -q -- exec claws-mail --offline
touch /dev/shm/claws_offline touch /dev/shm/claws_offline
fi fi
elif ping -c 1 1.1.1.1 -W 1 &>/dev/null || ping -c 1 8.8.8.8 -W 1 &>/dev/null 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" color="#F2777A"
if [ ! -f /dev/shm/claws_offline ] if [ ! -f /dev/shm/claws_offline ]
then then
swaymsg -q -- exec claws-mail --offline #swaymsg -q -- exec claws-mail --offline
touch /dev/shm/claws_offline touch /dev/shm/claws_offline
color="#FFCC66" color="#FFCC66"
fi fi

View file

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

View file

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