diff --git a/files/.config/pulse/daemon.conf b/files/.config/pulse/daemon.conf index 88a4bc9..a070491 100644 --- a/files/.config/pulse/daemon.conf +++ b/files/.config/pulse/daemon.conf @@ -30,8 +30,8 @@ ; lock-memory = no ; cpu-limit = no -high-priority = yes -nice-level = -11 +; high-priority = yes +; nice-level = -11 ; realtime-scheduling = yes ; realtime-priority = 5 @@ -50,7 +50,7 @@ nice-level = -11 ; log-time = no ; log-backtrace = 0 -resample-method = soxr-mq +resample-method = speex-float-3 avoid-resampling = yes ; enable-remixing = yes ; remixing-use-all-sink-channels = yes @@ -76,7 +76,7 @@ flat-volumes = no ; rlimit-rttime = 200000 ; default-sample-format = s16le -default-sample-rate = 48000 +; default-sample-rate = 44100 ; alternate-sample-rate = 48000 ; default-sample-channels = 2 ; default-channel-map = front-left,front-right diff --git a/files/.config/zsh/custom/101-function.zsh b/files/.config/zsh/custom/101-function.zsh index d546521..be87348 100644 --- a/files/.config/zsh/custom/101-function.zsh +++ b/files/.config/zsh/custom/101-function.zsh @@ -43,8 +43,8 @@ __nmap_iface() { bc -l <<<"$*" } -# start looking-glass -play-vm() { +# start game mode +gamemode() { if ! [ -S /tmp/win10.sock ]; then echo "Cannot find spice socket! Is the vm started?" else @@ -63,8 +63,7 @@ play-vm() { sudo sh -c "echo 0,4 > /proc/irq/$i/smp_affinity_list" done - echo "Starting looking-glass" - LD_PRELOAD=/usr/\$LIB/libgamemodeauto.so looking-glass-client -p 0 -c /tmp/win10.sock -K 60 -MFk $@ + LD_PRELOAD="/usr/\$LIB/libgamemodeauto.so" looking-glass-wrapper echo "Restore system" # irq diff --git a/files/.local/bin/to7zip b/files/.local/bin/to7zip index 941c28f..48be5c2 100755 --- a/files/.local/bin/to7zip +++ b/files/.local/bin/to7zip @@ -2,7 +2,7 @@ print_help() { echo "" - echo "Convert an archive to the 7zip format, or create a new archive" + echo "Convert an archive from one format to another" echo "" echo "Usage: to7zip [options] ...files" echo "" @@ -11,17 +11,19 @@ print_help() { echo " -d, --delete-old Delete converted file" echo " -f, --force Replace the file with the converted file even if the file exists" echo " -r, --rezip Extract and archive again even if the converted file is already a 7zip archive" + echo " -F, --format The format of the output" echo " -t, --thread Set the number of threads for archive extraction and creation (default: $thread_count)" echo "" } -short_args=hdfrt: -long_args=help,delete-old,force,rezip,thread: +short_args=hdfrF:t: +long_args=help,delete-old,force,rezip,format:,thread: # default rezip= delete_old= force= +zip_args= thread_count=8 params="" @@ -50,6 +52,20 @@ while true; do rezip=y shift ;; + -F|--format) + case "$2" in + 7z) + ;; + zip) + zip_args="-tzip" + output_ext="zip" + ;; + *) + echo "Unknown format: $2" + exit 1 + esac + shift 2 + ;; -t|--thread) thread_count="$2" shift 2 @@ -66,9 +82,14 @@ done out_dir="$PWD" +if [[ -z "$zip_args" ]]; then + zip_args="-t7z -m0=lzma2 -ms=on" + output_ext=7z +fi + for f in "$@"; do tmp_dir="$(mktemp -d "$PWD/to7zip.XXX")" - output="$(echo "$f" | sed -E 's/\.(zip|rar|7z)$//g').7z" + output="$(echo "$f" | sed -E 's/\.(7z|tar\.gz|zip|rar)$//g').$output_ext" backup_file="$output".backup do_backup= @@ -88,7 +109,12 @@ for f in "$@"; do fi fi - if [[ "$f" =~ \.tar|gz|bz2|zip|7z$ ]]; then + if [[ "$f" =~ \.tar[^/]*$ ]]; then + if ! tar -xf "$f" -C "$tmp_dir" >/dev/null; then + echo "$f : extract failed" + continue + fi + elif [[ "$f" =~ \.tar|gz|bz2|zip|7z$ ]]; then if ! 7z e -mmt="$thread_count" -o"$tmp_dir" "$f" >/dev/null; then echo "$f : extract failed" continue @@ -107,7 +133,7 @@ for f in "$@"; do fi pushd "$tmp_dir" >/dev/null - 7z a -t7z -m0=lzma2 -mx=9 -ms=on -mmt="$thread_count" "$out_dir/$output" >/dev/null + 7z a $zip_args -mx=9 -mmt="$thread_count" "$out_dir/$output" >/dev/null return_val=$? popd >/dev/null if [[ $return_val -eq 0 ]]; then diff --git a/files/.tmux/plugins/tpm b/files/.tmux/plugins/tpm index 476f6ca..42bb2bf 160000 --- a/files/.tmux/plugins/tpm +++ b/files/.tmux/plugins/tpm @@ -1 +1 @@ -Subproject commit 476f6ca69922c9e67c408ae92dff0eb0ccb8ee51 +Subproject commit 42bb2bf48bef881be504278cf5156371b542cf81