Diverses modifs
This commit is contained in:
parent
62004a2348
commit
2f111c4013
7 changed files with 30 additions and 33 deletions
|
@ -27,6 +27,8 @@
|
||||||
# bar_height is only used for output in "noritake" format
|
# bar_height is only used for output in "noritake" format
|
||||||
; bar_height = 32
|
; bar_height = 32
|
||||||
|
|
||||||
|
bar_width=1
|
||||||
|
|
||||||
# For SDL width and space between bars is in pixels, defaults are:
|
# For SDL width and space between bars is in pixels, defaults are:
|
||||||
; bar_width = 20
|
; bar_width = 20
|
||||||
; bar_spacing = 5
|
; bar_spacing = 5
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
for dir in /run/media/breizh/*
|
for dir in /run/media/breizh/*
|
||||||
do
|
do
|
||||||
[[ -d "$dir" ]] && echo -e "\${template3 $dir $(basename $dir)}\n\n"
|
[[ -d "$dir" ]] && echo -e "\${template3 $dir $(basename $dir)}\n"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ column_meters_0=LeftCPUs2 Blank CPU Memory Swap Blank Hostname System DateTime B
|
||||||
column_meter_modes_0=1 2 1 1 1 2 2 2 2 2 2 2 2 2 2
|
column_meter_modes_0=1 2 1 1 1 2 2 2 2 2 2 2 2 2 2
|
||||||
column_meters_1=RightCPUs2 Blank CPU Memory Swap Blank Uptime LoadAverage Tasks Blank DiskIO NetworkIO Blank PressureStallMemoryFull PressureStallIOFull
|
column_meters_1=RightCPUs2 Blank CPU Memory Swap Blank Uptime LoadAverage Tasks Blank DiskIO NetworkIO Blank PressureStallMemoryFull PressureStallIOFull
|
||||||
column_meter_modes_1=1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
column_meter_modes_1=1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
||||||
tree_view=0
|
tree_view=1
|
||||||
sort_key=46
|
sort_key=46
|
||||||
tree_sort_key=0
|
tree_sort_key=0
|
||||||
sort_direction=-1
|
sort_direction=-1
|
||||||
|
@ -46,7 +46,7 @@ all_branches_collapsed=0
|
||||||
screen:Main=PID USER PRIORITY NICE OOM M_VIRT M_RESIDENT M_SHARE M_SWAP IO_RATE STATE PERCENT_CPU PERCENT_MEM TIME Command
|
screen:Main=PID USER PRIORITY NICE OOM M_VIRT M_RESIDENT M_SHARE M_SWAP IO_RATE STATE PERCENT_CPU PERCENT_MEM TIME Command
|
||||||
.sort_key=PERCENT_CPU
|
.sort_key=PERCENT_CPU
|
||||||
.tree_sort_key=PID
|
.tree_sort_key=PID
|
||||||
.tree_view=0
|
.tree_view=1
|
||||||
.tree_view_always_by_pid=0
|
.tree_view_always_by_pid=0
|
||||||
.sort_direction=-1
|
.sort_direction=-1
|
||||||
.tree_sort_direction=1
|
.tree_sort_direction=1
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
-o "%(title)s.%(ext)s"
|
-o "%(release_date,upload_date)s.%(title)s.%(ext)s"
|
||||||
-P "temp:/tmp"
|
-P "temp:/tmp"
|
||||||
--embed-subs
|
--embed-subs
|
||||||
--write-subs
|
--write-subs
|
||||||
--write-auto-subs
|
--write-auto-subs
|
||||||
--sub-lang fr,en
|
--sub-langs fr,en,-live_chat
|
||||||
--embed-thumbnail
|
--embed-thumbnail
|
||||||
-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"
|
||||||
|
@ -11,3 +11,4 @@
|
||||||
--hls-use-mpegts
|
--hls-use-mpegts
|
||||||
--compat-options no-keep-subs
|
--compat-options no-keep-subs
|
||||||
--download-archive ".yt-dlp_archive"
|
--download-archive ".yt-dlp_archive"
|
||||||
|
--downloader axel
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
# Fonction de réinitialisation en cas de perte de la connexion
|
# Fonction de réinitialisation en cas de perte de la connexion
|
||||||
self-reset() {
|
self-reset() {
|
||||||
echo "<span foreground=\"#515151\">[--:-- --:-- --:--]</span>"
|
echo "<span foreground=\"#515151\">[--:-- --:-- --:--]</span>"
|
||||||
sleep 5
|
sleep 1
|
||||||
exec "$0"
|
exec "$0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ coproc nc -U /home/breizh/.mpd/socket
|
||||||
IN=${COPROC[1]}
|
IN=${COPROC[1]}
|
||||||
OUT=${COPROC[0]}
|
OUT=${COPROC[0]}
|
||||||
#echo "password xxx" >&"${IN}"
|
#echo "password xxx" >&"${IN}"
|
||||||
sed '/^OK/q' <&"$OUT" &>/dev/null
|
#sed '/^OK/q' <&"$OUT" &>/dev/null
|
||||||
|
|
||||||
# Initialisation des valeurs par défaut et des fonctions
|
# Initialisation des valeurs par défaut et des fonctions
|
||||||
declare -i SCROLL=50 I=0
|
declare -i SCROLL=50 I=0
|
||||||
|
@ -43,10 +43,9 @@ human_time() {
|
||||||
|
|
||||||
# Initialisation de l’état
|
# Initialisation de l’état
|
||||||
echo "status" >&"$IN"
|
echo "status" >&"$IN"
|
||||||
while read -t 1 -u "$OUT" output
|
while read -t 0.1 -u "$OUT" output
|
||||||
do
|
do
|
||||||
[[ "$output" == "OK" ]] && break
|
[[ "$output" =~ : ]] && o[${output%%:*}]="${output##*: }"
|
||||||
o[${output%%:*}]="${output##*: }"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Boucle principale
|
# Boucle principale
|
||||||
|
@ -54,7 +53,7 @@ while [[ -n "$COPROC_PID" ]]
|
||||||
do
|
do
|
||||||
# Gestion du clic, fait office de délai si aucune action (une seconde).
|
# Gestion du clic, fait office de délai si aucune action (une seconde).
|
||||||
# En cas de clic, l’actualisation de l’affichage sera instantanné.
|
# En cas de clic, l’actualisation de l’affichage sera instantanné.
|
||||||
read -t 1 BLOCK_BUTTON
|
read -t 0.75 BLOCK_BUTTON
|
||||||
|
|
||||||
case $BLOCK_BUTTON in
|
case $BLOCK_BUTTON in
|
||||||
1|3)
|
1|3)
|
||||||
|
@ -84,18 +83,16 @@ do
|
||||||
|
|
||||||
# Récupération de l’état
|
# Récupération de l’état
|
||||||
echo "status" >&"$IN" || self-reset
|
echo "status" >&"$IN" || self-reset
|
||||||
while read -t 1 -u "$OUT" output
|
while read -t 0.1 -u "$OUT" output
|
||||||
do
|
do
|
||||||
[[ "$output" == "OK" ]] && break
|
[[ "$output" =~ : ]] && o[${output%%:*}]="${output##*: }"
|
||||||
o[${output%%:*}]="${output##*: }"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Récupération des informations du morceau en cours
|
# Récupération des informations du morceau en cours
|
||||||
echo "currentsong" >&"$IN" || self-reset
|
echo "currentsong" >&"$IN" || self-reset
|
||||||
while read -t 1 -u "$OUT" output
|
while read -t 0.1 -u "$OUT" output
|
||||||
do
|
do
|
||||||
[[ "$output" == "OK" ]] && break
|
[[ "$output" =~ : ]] && o[${output%%:*}]="${output##*: }"
|
||||||
o[${output%%:*}]="${output##*: }"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Choix des couleurs selon l’état
|
# Choix des couleurs selon l’état
|
||||||
|
@ -120,7 +117,7 @@ do
|
||||||
scroll=true
|
scroll=true
|
||||||
song=" $song "
|
song=" $song "
|
||||||
else
|
else
|
||||||
scroll=false
|
unset scroll
|
||||||
song=" $song"
|
song=" $song"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -131,7 +128,7 @@ do
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Gestion du défilement
|
# Gestion du défilement
|
||||||
if "$scroll"
|
if [[ -n "$scroll" ]]
|
||||||
then
|
then
|
||||||
unset bloc1 bloc2 bloc3 bloc4
|
unset bloc1 bloc2 bloc3 bloc4
|
||||||
declare -- bloc1 bloc2 bloc3 bloc4
|
declare -- bloc1 bloc2 bloc3 bloc4
|
||||||
|
@ -190,3 +187,5 @@ do
|
||||||
# DEBUG
|
# DEBUG
|
||||||
printf '<b>%s</b>%s<b>%s</b>%s%s\n' "$bloc1" "$bloc2" "$bloc3" "$bloc4" " $status$time</span>"
|
printf '<b>%s</b>%s<b>%s</b>%s%s\n' "$bloc1" "$bloc2" "$bloc3" "$bloc4" " $status$time</span>"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,19 +8,14 @@ touch /dev/shm/mccount
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
|
||||||
mcpid=$(systemctl show minecraft-server.service --property MainPID --value)
|
mcpid="$(pgrep -nu minecraft java)"
|
||||||
mcstatus=$(ps -q "${mcpid}" -o state --no-headers 2>/dev/null)
|
mcstatus="$(ps -q "${mcpid}" -o state --no-headers 2>/dev/null)"
|
||||||
|
|
||||||
if [[ "$mcstatus" == "T" ]]
|
if [[ "$mcstatus" == "T" ]]
|
||||||
then
|
then
|
||||||
echo . >> /dev/shm/mccount
|
echo . >> /dev/shm/mccount
|
||||||
else
|
else
|
||||||
players_tmp=($(mcstatus localhost query | grep players))
|
> /dev/shm/mccount
|
||||||
players="${players_tmp[1]%%/*}"
|
|
||||||
if [[ "$players" -gt 0 ]]
|
|
||||||
then
|
|
||||||
> /dev/shm/mccount
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
time=$(wc -l /dev/shm/mccount | cut -d" " -f1)
|
time=$(wc -l /dev/shm/mccount | cut -d" " -f1)
|
||||||
|
|
|
@ -4,9 +4,9 @@ cat | while read line
|
||||||
do
|
do
|
||||||
if [[ "$line" =~ ^/ ]]
|
if [[ "$line" =~ ^/ ]]
|
||||||
then
|
then
|
||||||
echo "$line" > /run/minecraft-server.stdin
|
echo "mine $line" > /run/minecraft-server.stdin
|
||||||
else
|
else
|
||||||
echo "say $line" > /run/minecraft-server.stdin
|
echo "mine say $line" > /run/minecraft-server.stdin
|
||||||
echo "dynmap sendtoweb $line" > /run/minecraft-server.stdin
|
# echo "mine dynmap sendtoweb $line" > /run/minecraft-server.stdin
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue