Compare commits

..

2 commits

Author SHA1 Message Date
c201f75fe8 Mises à jour diverses 2022-11-10 00:55:04 +01:00
3e6aaec8b5 Mise à jour du gestionnaire de notifications MPD 2022-11-10 00:54:47 +01:00
11 changed files with 40 additions and 33 deletions

View file

@ -58,7 +58,8 @@ XTerm*reverseVideo: on
XTerm*selectToClipboard: true
!URxvt.font: xft:IBM Plex Mono:pixelsize=14,xft:DejaVu Sans Mono:pixelsize=14,xft:Noto Sans Mono:pixelsize=14
URxvt.font: xft:xos4 Terminus:pixelsize=14,xft:DejaVu Sans Mono:antialias=false:pixelsize=14,xft:Noto Sans Mono:pixelsize=14:antialias=false
!URxvt.font: xft:xos4 Terminus:pixelsize=14,xft:DejaVu Sans Mono:antialias=false:pixelsize=14,xft:Noto Sans Mono:pixelsize=14:antialias=false
URxvt.font: xft:xos4 Terminus:size=12,xft:DejaVu Sans Mono:antialias=false:size=12,xft:Noto Sans Mono:size=12:antialias=false
!URxvt.letterSpace: 0
!URxvt.depth: 32
!URxvt.background: [100]#000000

View file

@ -262,6 +262,9 @@ colors() {
export EDITOR=vim
# Debug
export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
# fix "xdg-open fork-bomb" export your preferred browser from here
alias conf='vim $HOME/.i3/config'

View file

@ -80,9 +80,11 @@ CPU${goto 140}${if_match ${hwmon zenpower temp 1}>70}${color F2777A}$endif${hwmo
${color2}${font2}Carte graphique $hr${font}${color}
#${voffset 2}Usage${goto 140}${texeci 3 conky_radeon}%
#VRAM: ${texeci 3 conky_radeon vram mb}M${goto 140}${texeci 3 conky_radeon vram}%
Temp${goto 140}${if_match ${hwmon amdgpu temp 1}>70}${color F2777A}$endif${hwmon amdgpu temp 1}°C${color}
Temp puce${goto 140}${if_match ${hwmon amdgpu temp 1}>80}${color F2777A}$endif${hwmon amdgpu temp 1}°C${color}
Temp junction${goto 140}${if_match ${hwmon amdgpu temp 2}>90}${color F2777A}$endif${hwmon amdgpu temp 2}°C${color}
Temp mem${goto 140}${if_match ${hwmon amdgpu temp 3}>80}${color F2777A}$endif${hwmon amdgpu temp 3}°C${color}
Conso${goto 140}${if_match ${execi 5 sensors -j | jq '."amdgpu-pci-2900"."PPT"."power1_average"'}>180}${color F2777A}$endif${execi 5 sensors -j | jq '."amdgpu-pci-2900"."PPT"."power1_average"' | cut -d. -f1} W${color}
Ventilo${goto 140}${if_match ${hwmon amdgpu fan 1}>3000}${color F2777A}$endif${hwmon amdgpu fan 1} RPM${color}
Ventilo${goto 140}${if_match ${hwmon amdgpu fan 1}>2000}${color F2777A}$endif${hwmon amdgpu fan 1} RPM${color}
${color2}${font2}Système $hr$font$color${voffset 2}
Kernel${goto 140}$kernel

View file

@ -1,3 +1,3 @@
function l --description 'alias l=ls -lAh'
exa -lgHahb@ --git --time-style long-iso $argv
exa -lgHahb --git --time-style long-iso $argv
end

View file

@ -36,17 +36,17 @@ 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_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
tree_view=1
sort_key=46
tree_view=0
sort_key=111
tree_sort_key=0
sort_direction=-1
tree_sort_direction=1
tree_view_always_by_pid=0
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
.sort_key=PERCENT_CPU
.sort_key=IO_RATE
.tree_sort_key=PID
.tree_view=1
.tree_view=0
.tree_view_always_by_pid=0
.sort_direction=-1
.tree_sort_direction=1

View file

@ -42,6 +42,7 @@ title=${?chapter:${chapter-metadata/by-key/title} | }${media-title} | mpv
#osd-msg3=${media-title}${?chapter:\n ${chapter-metadata/by-key/title}}\n${time-pos} / ${playtime-remaining}
#osd-font-size=25
osc=no
screenshot-directory=~/Images/Screenshots/MPV
# 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"

View file

@ -102,7 +102,7 @@ visualizer_in_stereo = yes
#
#visualizer_fps = 60
#
#visualizer_autoscale = no
visualizer_autoscale = yes
#
#visualizer_look = ●▮
#
@ -467,7 +467,7 @@ connected_message_on_startup = no
#
#ask_before_clearing_playlists = yes
#
#clock_display_seconds = no
clock_display_seconds = yes
#
#display_volume_level = yes
#

View file

@ -34,6 +34,7 @@ aursearchsorting = hottest
displaylastupdated = yes
groupbyrepository = yes
reversesearchsorting = yes
warnaboutpackageupdates =
[misc]
sudoloopinterval = 30

View file

@ -1,8 +1,10 @@
#!/bin/bash -x
#!/bin/bash
# 1: Temps en minutes
# 2: Type dextinction
trap 'exit' INT TERM
touch /dev/shm/mccount
while true
@ -15,17 +17,20 @@ if [[ "$mcstatus" == "T" ]]
then
echo . >> /dev/shm/mccount
else
echo "Joueur(s) connecté(s), réinitialisation du compteur"
> /dev/shm/mccount
fi
time=$(wc -l /dev/shm/mccount | cut -d" " -f1)
echo "$time"/"${1:-5}"
if [[ "$time" -ge "${1:-5}" ]]
then
> /dev/shm/mccount
systemctl "${2:-suspend}"
fi
sleep 60
sleepcount -c 60
done

View file

@ -3,37 +3,31 @@
export MPD_HOST="$HOME/.mpd/socket"
DUNST_ID=$(sum <<<"mpd" | cut -d' ' -f1)
runtime="${XDG_RUNTIME_DIR}/i3blocks"
[[ ! -d "$runtime" ]] && mkdir -p "$runtime"
[[ ! -f "$runtime/mpd" ]] && touch "$runtime/mpd"
declare -- cursong prevsong
while true
do
systemctl --user is-active mpd.service &>/dev/null || exit 1
timeout 5 mpc -w current
onelineinfos="$(mpc -f '[%artist%§|%name%§]%title%|[%file%]' current)"
if [[ -f "$runtime/mpd" && "$onelineinfos" != "$(<${runtime}/mpd)" ]]
prevsong="$cursong"
cursong="$(mpc -f '[[%artist%\n|%name%\n]%title%[\n%album%]]|[%file%]' current)"
if [[ "$cursong" != "$prevsong" ]]
then
echo "$onelineinfos" > ${runtime}/mpd
echo "$(<${runtime}/mpd) " > ${runtime}/mpd-scroll
infos=$(mpc -f '[[%artist%\n|%name%\n]%title%[\n%album%]]|[%file%]' current)
if [[ -z "$infos" ]]
if [[ -z "$cursong" ]]
then
infos="<i>Arrêt</i>"
fi
artist=$(sed -n 1p <<<$infos)
title=$(sed -n 2p <<<$infos)
album=$(sed -n 3p <<<$infos)
artist="$(sed -n 1p <<<"$cursong")"
title="$(sed -n 2p <<<"$cursong")"
album="$(sed -n 3p <<<"$cursong")"
[[ -z "$title" ]] && title="$artist" && artist=""
title=$(basename "$title")
curl -s -X POST -u breizh:$(pass show Web/pleroma.breizh.pm) \
dunstify -r "$DUNST_ID" "MPD" "$cursong"
curl -s -X POST -u "breizh:$(pass show Web/pleroma.breizh.pm)" \
--data-urlencode "title=${title}" \
--data-urlencode "artist=${artist}" \
--data-urlencode "album=${album}" \
https://pleroma.breizh.pm/api/v1/pleroma/scrobble &>/dev/null &
dunstify -r $DUNST_ID "MPD" "$infos"
[[ -f ${XDG_RUNTIME_DIR}/i3blocks/mpdvol ]] && mpc volume "$(<${XDG_RUNTIME_DIR}/i3blocks/mpdvol)"
#( pidof cava && sleep 1 && pkill -USR1 cava ) &
https://pleroma.breizh.pm/api/v1/pleroma/scrobble &>/dev/null
fi
done

View file

@ -21,7 +21,7 @@ cd "$rootdir"
for dir in **/ .
do
# Ignorer les liens symboliques
if [[ -h "${rootdir}/${dir::-1}" ]]
if [[ -h "${rootdir}/${dir::-1}" && "${dir}" != "Vidéos/" ]]
then
continue
fi
@ -64,8 +64,8 @@ do
# Parrallélisation des conversions
declare -a running
running=($(jobs -p))
if [[ "${#running[@]}" -ge 10 ]]
mapfile -t running < <(jobs -p)
if [[ "${#running[@]}" -ge 12 ]]
then
wait -n
fi
@ -93,7 +93,7 @@ do
cd "${dstdir}"
shopt -s nullglob
echo "[${blue}GAIN${reset}] $dir"
loudgain -S -a -k -q -s e *.opus &>/dev/null && \
loudgain -S -a -k -q -s e -- *.opus &>/dev/null && \
echo "[${green}GAIN${reset}] $dir" || \
echo "[${red}GAIN${reset}] $dir"
shopt -u nullglob