From 514a358deb17c26f5f98a749ca01aed80f051b7e Mon Sep 17 00:00:00 2001 From: lara Date: Mon, 18 Mar 2024 23:18:01 +0100 Subject: [PATCH] update configs (sorry) --- aliases | 2 +- bin/playvideo | 4 +++- config/pipe-viewer/pipe-viewer.conf | 14 +++++++++----- config/qutebrowser/greasemonkey/nitter_redirect.js | 2 +- vimrc | 6 ++++++ zshrc | 6 ++++++ 6 files changed, 26 insertions(+), 8 deletions(-) diff --git a/aliases b/aliases index feae189..a4aae03 100644 --- a/aliases +++ b/aliases @@ -57,7 +57,7 @@ alias -g .......='../../../../../..' alias -g ........='../../../../../../..' # Hackish tweaks alias steam-wine="WINEDEBUG=-all wine $WINEPREFIX/drive_c/Program\ Files\ \(x86\)/Steam/Steam.exe -no-dwrite -no-cef-sandbox &" -alias minecraft='java -jar $HOME/.minecraft/launcher.jar' +alias minecraft='prismlauncher' alias rot13="tr '[A-Za-z]' '[N-ZA-Mn-za-m]'" alias shuffle='mpv --shuffle --display-tags= --no-audio-display' alias steam="LD_PRELOAD='/usr/\$LIB/libstdc++.so.6 /usr/\$LIB/libgcc_s.so.1 /usr/\$LIB/libxcb.so.1 /usr/\$LIB/libgpg-error.so' /usr/bin/steam" diff --git a/bin/playvideo b/bin/playvideo index 3df5915..e3fdc76 100755 --- a/bin/playvideo +++ b/bin/playvideo @@ -15,4 +15,6 @@ if [ "$1" = "-l" ]; then quality=360 fi -mpv --ytdl-format="bestvideo[height<=?$quality]+bestaudio/best" "$@" 2>&1 | grep 'ERROR:' | notify_err +# https://github.com/mpv-player/mpv/issues/4241 +#mpv --ytdl-format="bestvideo[height<=?$quality]+bestaudio/best" "$@" 2>&1 | grep 'ERROR:' | notify_err +mpv --ytdl-format="bestvideo[height<=?$quality][fps<=?30][vcodec!=?vp9]+bestaudio/best[height<=?$quality]" "$@" 2>&1 | grep 'ERROR:' | notify_err diff --git a/config/pipe-viewer/pipe-viewer.conf b/config/pipe-viewer/pipe-viewer.conf index 219a2f3..64260e8 100755 --- a/config/pipe-viewer/pipe-viewer.conf +++ b/config/pipe-viewer/pipe-viewer.conf @@ -1,11 +1,15 @@ #!/usr/bin/perl -# CLI Pipe Viewer 0.2.1 - configuration file +# CLI Pipe Viewer 0.4.5 - configuration file + +use utf8; our $CONFIG = { api_host => "auto", + audio_quality => "best", auto_captions => 0, autoplay_mode => 0, + bypass_age_gate_native => 0, bypass_age_gate_with_proxy => 0, cache_dir => "$ENV{HOME}/.cache/pipe-viewer", colors => 1, @@ -49,10 +53,12 @@ our $CONFIG = { downloads_dir => ".", env_proxy => 1, fat32safe => 0, + features => [], ffmpeg_cmd => "/usr/bin/ffmpeg", force_fallback => 0, fullscreen => 0, get_captions => 1, + get_subscriptions_in_parallel => 0, get_term_width => 1, hfr => 1, highlight_color => "bold", @@ -111,14 +117,12 @@ our $CONFIG = { srt => "--sub-file=*SUB*", }, }, - videoCaption => undef, - videoDefinition => undef, - videoDimension => undef, videoDuration => undef, - videoLicense => undef, watch_history => 1, watch_history_file => "$ENV{HOME}/.config/pipe-viewer/watched.txt", wget_cmd => "/usr/bin/wget", + youtube_channel_url => "https://www.youtube.com/channel/%s", + youtube_playlist_url => "https://www.youtube.com/playlist?list=%s", youtube_video_url => "https://www.youtube.com/watch?v=%s", ytdl => 1, ytdl_cmd => "/usr/bin/yt-dlp", diff --git a/config/qutebrowser/greasemonkey/nitter_redirect.js b/config/qutebrowser/greasemonkey/nitter_redirect.js index fccc68a..f5c11ef 100644 --- a/config/qutebrowser/greasemonkey/nitter_redirect.js +++ b/config/qutebrowser/greasemonkey/nitter_redirect.js @@ -11,5 +11,5 @@ (function () { 'use strict'; - top.location.hostname = "nitter.fdn.fr"; + top.location.hostname = "nitter.privacydev.net"; })(); diff --git a/vimrc b/vimrc index fd066c6..f215afd 100644 --- a/vimrc +++ b/vimrc @@ -71,6 +71,12 @@ if has("unix") || has("mac") Plugin 'tcbbd/detectindent' let g:detectindent_preferred_indent=4 let g:detectindent_autodetect=1 + + "[Allow writing of unwritable file with sudo, until neovim#1716 is fixed]" + if has('nvim') + Plugin 'lambdalisue/suda.vim' + let g:suda_smart_edit = 1 + endif call vundle#end() endif " Allow backspacing over everything in insert mode. diff --git a/zshrc b/zshrc index 25e02ff..8c2537f 100644 --- a/zshrc +++ b/zshrc @@ -20,6 +20,12 @@ export PATH="$PATH:$RC_PATH/bin:~/bin:/opt/cuda/bin:~/.cargo/bin:~/go/bin" # Prevent golang from littering $HOME and force it to follow XDG export GOPATH="$HOME/.local/share/go" +# Use all cores when building with cmake (using number of physical cores) +# https://unix.stackexchange.com/a/377945/248368 +# TODO Check if we should use virtual cores count instead +cores="$(cat /proc/cpuinfo | grep -c "cpu cores")" +export CMAKE_BUILD_PARALLEL_LEVEL="$cores" + # Add ruby gems to path if which ruby >/dev/null && which gem >/dev/null; then PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:$PATH"