diff --git a/.config/htop/htoprc b/.config/htop/htoprc index a13c1cf..01357c6 100644 --- a/.config/htop/htoprc +++ b/.config/htop/htoprc @@ -3,7 +3,7 @@ fields=0 17 18 48 49 39 113 109 110 46 47 2 1 sort_key=46 sort_direction=1 -tree_sort_key=46 +tree_sort_key=0 tree_sort_direction=1 hide_kernel_threads=1 hide_userland_threads=1 @@ -18,7 +18,7 @@ highlight_changes_delay_secs=5 find_comm_in_cmdline=1 strip_exe_from_cmdline=1 show_merged_command=0 -tree_view=0 +tree_view=1 tree_view_always_by_pid=0 header_margin=1 detailed_cpu_time=1 diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index 75692ec..e2dc818 100644 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -31,4 +31,4 @@ slang=fr,fre,fra cache=yes demuxer-max-bytes=256MiB demuxer-readahead-secs=20 -ytdl-format="((bestvideo[container=webm][height=1080]/bestvideo[ext=webm][height=1080]/bestvideo[height=1080]/bestvideo[height>=?720]/bestvideo)+(bestaudio[container=webm]/bestaudio[ext=webm]/bestaudio))/best" +ytdl-format="((bestvideo[vcodec^=av01][height=1080]/bestvideo[vcodec=vp9][height=1080]/bestvideo[height=1080]/bestvideo[vcodec^=av01][height>=?720]/bestvideo[vcodec=vp9][height>=?720]/bestvideo[height>=?720]/bestvideo)+(bestaudio[acodec=opus]/bestaudio[acodec=vorbis]/bestaudio))/best" diff --git a/.config/redshift.conf b/.config/redshift.conf index 0a94716..86b4f81 100644 --- a/.config/redshift.conf +++ b/.config/redshift.conf @@ -1,6 +1,6 @@ [redshift] -temp-day=4500 -temp-night=3400 +temp-day=4000 +temp-night=2400 transition=1 diff --git a/.i3blocks/time b/.i3blocks/time index 6c25d86..ba1a764 100755 --- a/.i3blocks/time +++ b/.i3blocks/time @@ -1,4 +1,4 @@ #!/bin/sh date '+%x (%V) %X' -date '+%d/%m %R' +date '+%x %X' diff --git a/.i3blocks/toggle-sink b/.i3blocks/toggle-sink index 5080081..e719b66 100755 --- a/.i3blocks/toggle-sink +++ b/.i3blocks/toggle-sink @@ -1,21 +1,21 @@ #!/bin/bash -currentport=$(pacmd list-sinks | grep -Po "active port: " ]] + if [[ "$currentport" == "Active Port: analog-output-lineout" ]] then - pacmd set-sink-port "alsa_output.pci-0000_0b_00.3.analog-stereo" "analog-output-headphones" + pactl set-sink-port "alsa_output.pci-0000:0b:00.3.analog-stereo" "analog-output-headphones" echo "casque" else - pacmd set-sink-port "alsa_output.pci-0000_0b_00.3.analog-stereo" "analog-output-lineout" + pactl set-sink-port "alsa_output.pci-0000:0b:00.3.analog-stereo" "analog-output-lineout" echo "front " fi pkill -RTMIN+10 i3blocks else - if [[ "$currentport" == "active port: " ]] + if [[ "$currentport" == "Active Port: analog-output-lineout" ]] then echo "front " else diff --git a/.local/bin/auto-poweroff.sh b/.local/bin/auto-poweroff.sh new file mode 100755 index 0000000..968285f --- /dev/null +++ b/.local/bin/auto-poweroff.sh @@ -0,0 +1,29 @@ +#!/bin/bash -x + +# 1: Temps en minutes +# 2: Type d’extinction + +while true +do + +mcpid=$(systemctl show minecraft-server.service --property MainPID --value) +mcstatus=$(ps -q "${mcpid}" -o state --no-headers 2>/dev/null) + +if [[ "$mcstatus" == "T" ]] +then + echo . >> /dev/shm/mccount +else + > /dev/shm/mccount +fi + +time=$(wc -l /dev/shm/mccount | cut -d" " -f1) + +if [[ "$time" -ge "${1:-5}" ]] +then + > /dev/shm/mccount + systemctl "${2:-suspend}" +fi + +sleep 60 + +done diff --git a/.local/bin/mccmd b/.local/bin/mccmd new file mode 100755 index 0000000..ae181e8 --- /dev/null +++ b/.local/bin/mccmd @@ -0,0 +1,12 @@ +#!/bin/bash + +cat | while read line +do + if [[ "$line" =~ ^/ ]] + then + echo "$line" > /run/minecraft-server.stdin + else + echo "say $line" > /run/minecraft-server.stdin +# echo "dynmap sendtoweb $line" > /run/minecraft-server.stdin + fi +done