diff options
Diffstat (limited to 'home/.local')
24 files changed, 1136 insertions, 0 deletions
diff --git a/home/.local/bin/automute b/home/.local/bin/automute new file mode 100755 index 0000000..20b04f4 --- /dev/null +++ b/home/.local/bin/automute @@ -0,0 +1,123 @@ +#!/usr/bin/env sh + +pid_file="/tmp/automutepid" + +pid_exists() { + test -r "$pid_file" +} + +is_running() { + if pid_exists; then + ps "$(cat "$pid_file")" >/dev/null 2>&1 || return 1 + else + return 1 + fi +} + +mute() { + pw-cli set-param "$1" Props '{mute: true}' +} + +unmute() { + pw-cli set-param "$1" Props '{mute: false}' +} + +pid2index() { + pw-dump | jq --argjson targetid "$1" 'map(select(.info.props."application.process.id" == $targetid and .info.params.PropInfo != null)) | .[].id' +} + +list_sink_input_ids() { + pw-dump | jq 'map(select(.info.params.PropInfo != null and .info.params.PropInfo[].id=="mute" and .info.props."application.process.id" != null)) | .[].id' +} + +unmute_all() { + for i in $(list_sink_input_ids); do + unmute "$i" + done + exit +} + +trap unmute_all INT TERM + +mute_all() { + for i in $(list_sink_input_ids); do + mute "$i" + done +} + +do_automute() { + while :; do + focus_pid="$(xdotool getwindowfocus getwindowpid)" + if [ "$focus_pid" ] && [ "$unfocus_pid" != "$focus_pid" ]; then + focus_index=$(pid2index "$focus_pid") + if [ "$unfocus_pid" ]; then + unfocus_index=$(pid2index "$unfocus_pid") + fi + if [ "$focus_index" ]; then + if [ "$unfocus_index" ]; then + mute "$unfocus_index" + else + mute_all + fi + unmute "$focus_index" + unfocus_pid="$focus_pid" + fi + fi + sleep 0.25 + done +} + +start() { + do_automute & + echo "$!" >"$pid_file" + notify-send "Automute started!" +} + +stop() { + pid_exists || exit 1 + pid="$(cat "$pid_file")" + # kill with SIGTERM, allowing finishing touches. + kill "$pid" + # even after SIGTERM, ffmpeg may still run, so SIGKILL it. + sleep 3 + is_running && kill -9 "$pid" + rm -f "$pid_file" + notify-send "Automute stopped!" +} + +toggle() { + if is_running; then + echo "Stopping automute" + stop + else + echo "Starting automute" + start + fi + echo + status +} + +status() { + if is_running; then + echo "Automuting is running with PID $(cat "$pid_file")" + else + echo "Automute inactive" + fi +} +case "$1" in + start) + start + ;; + stop) + stop + ;; + toggle) + toggle + ;; + status) + status + ;; + *) + toggle + ;; +esac diff --git a/home/.local/bin/display-setup b/home/.local/bin/display-setup new file mode 100755 index 0000000..94d5703 --- /dev/null +++ b/home/.local/bin/display-setup @@ -0,0 +1,22 @@ +#!/usr/bin/env sh + +if [ "$(uname -n)" = "hercules" ]; then + xrandr --setprovideroutputsource modesetting NVIDIA-G0 + nvidia-settings --load-config-only & + nvidia-settings -a '[gpu:0]/GPUPowerMizerMode=1' & +fi +xrandr --auto + +if [ "$(uname -n)" = "hercules" ] && xrandr --query | grep "HDMI-1 connected"; then + xrandr --output eDP-1 --off + xrandr --output HDMI-1 --primary --mode 1920x1080 --rate 144 + # xrandr --output HDMI-1 --primary --mode 1920x1080 + # xrandr --output HDMI-1 --primary --mode 2560x1080 --rate 75 + # xrandr --output HDMI-1 --primary --mode 3840x2160 + # xrandr --output HDMI-1 --mode 1920x1080 --sameas eDP-1 +elif [ "$(uname -n)" = "halley" ] && xrandr --query | grep "HDMI-1 connected"; then + xrandr --output HDMI-1 --mode 1920x1080 --same-as eDP-1 +fi + +bspc wm -r +launch-polybar diff --git a/home/.local/bin/input-setup b/home/.local/bin/input-setup new file mode 100755 index 0000000..95f7d31 --- /dev/null +++ b/home/.local/bin/input-setup @@ -0,0 +1,50 @@ +#!/usr/bin/env sh + +[ -r ~/.config/X11/Xkeymap ] && xkbcomp ~/.config/X11/Xkeymap "$DISPLAY" + +setlayout() { + ids=$(xinput --list | sed -ne '/Virtual core keyboard/{:a' -e 'n;p;ba' -e '}' | grep "$1" | sed -n 's/.*id=\([0-9]\+\).*/\1/p') + for i in $ids; do + setxkbmap -device "$i" -layout "$2" + done +} + +setmodmap() { + kbds=$(xinput --list | sed -ne '/Virtual core keyboard/{:a' -e 'n;p;ba' -e '}' | grep "$1" | sed -n 's/.*id=\([0-9]\+\).*/\1/p') + if [ "$kbds" ]; then + xmodmap ~/.config/X11/Xmodmap + fi +} + +if [ "$(uname -n)" = "halley" ]; then + setxkbmap -layout no +elif [ "$(uname -n)" = "hercules" ]; then + setxkbmap -layout es +fi + +setxkbmap -option "caps:escape" +xset r rate 250 30 + +setlayout "Kingston HyperX Alloy FPS Pro Mechanical Gaming Keyboard" us +# setlayout "SONiX USB DEVICE" us + +setlayout "SEMITEK USB-HID Gaming Keyboard" us +# setmodmap "SEMITEK USB-HID Gaming Keyboard" + +setlayout "Dierya DK61 Keyboard" us +# setmodmap "Dierya DK61 Keyboard" + +xmodmap ~/.config/X11/Xmodmap + +if [ "$(uname -n)" = "hercules" ]; then + xinput set-prop "ETPS/2 Elantech Touchpad" "libinput Tapping Enabled" 1 + xinput set-prop "ETPS/2 Elantech Touchpad" "libinput Natural Scrolling Enabled" 1 + ids=$(xinput --list | sed -ne '/Virtual core pointer/{:a' -e 'n;p;ba' -e '}' | grep "Kingsis Peripherals ZOWIE Gaming mouse" | sed -n 's/.*id=\([0-9]\+\).*/\1/p') + for i in $ids; do + xinput --set-prop "$i" 'libinput Accel Profile Enabled' 0, 1 + done +elif [ "$(uname -n)" = "halley" ]; then + xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Tapping Enabled" 1 + xinput set-prop "SynPS/2 Synaptics TouchPad" "libinput Natural Scrolling Enabled" 1 + xinput set-prop "ELAN Touchscreen" "Device Enabled" 0 +fi diff --git a/home/.local/bin/launch-polybar b/home/.local/bin/launch-polybar new file mode 100755 index 0000000..c670e56 --- /dev/null +++ b/home/.local/bin/launch-polybar @@ -0,0 +1,17 @@ +#!/usr/bin/env sh +# shellcheck source=/dev/null +[ -r ~/.config/sh/envrc ] && . ~/.config/sh/envrc + +# Terminate already running bar instances +killall -q polybar +# If all your bars have ipc enabled, you can also use +# polybar-msg cmd quit + +# Launch bars +if command -v "xrandr" >/dev/null 2>&1; then + for m in $(xrandr --query | grep " connected" | cut -d" " -f1); do + MONITOR=$m polybar --reload mybar >>/tmp/polybar.log 2>&1 & + done +else + polybar --reload mybar & +fi diff --git a/home/.local/bin/linkhandler b/home/.local/bin/linkhandler new file mode 100755 index 0000000..8b43f70 --- /dev/null +++ b/home/.local/bin/linkhandler @@ -0,0 +1,49 @@ +#!/usr/bin/env sh + +resolve_url() { + if [ -f "$1" ]; then + local_url="$1" + else + local_url="/tmp/$(echo "$1" | sed "s/.*\///")" + curl -sL "$1" >"$local_url" + fi + printf "%s" "$local_url" +} + +if [ -z "$1" ]; then + url=$(xclip -o -selection clipboard) +else + url="$1" +fi + +case "$url" in + *.mkv* | *.webm* | *.mp4* | *.mp3* | *.ogg* | *.mov* | *.ts* | *.m3u8* | *.gif* | *.m4a* | *youtube.com/watch* | *youtube.com/playlist* | *youtu.be* | *twitch.tv* | *invidio.us* | *lbry* | *streamye.com* | *streamvi.com* | *streamwo.com* | *videos.lukesmith.xyz*) + setsid mpv -quiet "$url" >/dev/null 2>&1 & + ;; + acestream://*) + setsid acestream-launcher "$url" >/dev/null 2>&1 & + ;; + *.png | *.jpg | *.jpe | *.jpeg | *.PNG | *.JGP | *.JPE | *.JPEG) + local_url="$(resolve_url "$url")" + setsid sxiv -a "$local_url" >/dev/null 2>&1 & + ;; + *.pdf | *.ps | *.epub) + local_url="$(resolve_url "$url")" + setsid zathura "$local_url" >/dev/null 2>&1 & + ;; + *rss* | *feed* | http*.xml | http*.atom) + setsid rssadd "$url" >/dev/null 2>&1 & + ;; + mailto:*) + setsid aerc "$url" >/dev/null 2>&1 & + ;; + *.dot) + setsid xdot "$url" >/dev/null 2>&1 & + ;; + http*) + librewolf "$url" >/dev/null 2>&1 & + ;; + *) + "$TERMINAL $EDITOR $1" + ;; +esac diff --git a/home/.local/bin/locknpause b/home/.local/bin/locknpause new file mode 100755 index 0000000..0fa728e --- /dev/null +++ b/home/.local/bin/locknpause @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +playerctl pause +# i3lock-fancy -t "" -- scrot -z -o +i3lock-fancy-rapid 5 2 -e -f diff --git a/home/.local/bin/record b/home/.local/bin/record new file mode 100755 index 0000000..0789769 --- /dev/null +++ b/home/.local/bin/record @@ -0,0 +1,86 @@ +#!/usr/bin/env sh + +pid_file="/tmp/recordpid" +log_file="/tmp/record.log" + +pid_exists() { + test -r "$pid_file" +} + +is_running() { + if pid_exists; then + ps "$(cat "$pid_file")" >/dev/null 2>&1 || return 1 + else + return 1 + fi +} + +start() { + ffmpeg \ + -threads 0 \ + -thread_queue_size 512 -f x11grab -s 1920x1080 -framerate 60 -i "$DISPLAY" \ + -thread_queue_size 1024 -f pulse -itsoffset 0.350 -i "alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-stereo.monitor" \ + -thread_queue_size 1024 -f pulse -itsoffset 0.350 -i "alsa_input.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-mono" \ + -c:a aac \ + -init_hw_device vaapi=va:/dev/dri/renderD128,driver=i965 -filter_hw_device va \ + -vf format=nv12,hwupload \ + -c:v h264_vaapi \ + -r:v 60 -g:v 120 -bf:v 3 -refs:v 16 \ + "$HOME/vids/$(date '+%y%m%d-%H%M-%S').mkv" >"$log_file" 2>&1 & + echo "$!" >"$pid_file" + + notify-send "Record started!" +} + +stop() { + pid_exists || exit 1 + pid="$(cat "$pid_file")" + # kill with SIGTERM, allowing finishing touches. + kill "$pid" + # even after SIGTERM, ffmpeg may still run, so SIGKILL it. + sleep 3 + is_running && kill -9 "$pid" + rm -f "$pid_file" + notify-send "Record stopped!" +} + +toggle() { + if is_running; then + echo "Stopping record" + stop + else + echo "Starting record" + start + fi + echo + status +} + +status() { + if is_running; then + echo "Recording with PID $(cat "$pid_file")" + echo "Check the logs at" + echo + echo "$log_file" + echo + else + echo "Record inactive" + fi +} +case "$1" in + start) + start + ;; + stop) + stop + ;; + toggle) + toggle + ;; + status) + status + ;; + *) + toggle + ;; +esac diff --git a/home/.local/bin/rqr b/home/.local/bin/rqr new file mode 100755 index 0000000..9621916 --- /dev/null +++ b/home/.local/bin/rqr @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +text="$(zbarcam -q -1 --raw | xclip -selection clipboard -f)" + +echo "$text" +notify-send "$text" diff --git a/home/.local/bin/stop b/home/.local/bin/stop new file mode 100755 index 0000000..993b722 --- /dev/null +++ b/home/.local/bin/stop @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +eval "$@" & +pid="$!" +echo "$pid" +kill -STOP "$pid" +tail --pid=$pid -f /dev/null diff --git a/home/.local/bin/stream b/home/.local/bin/stream new file mode 100755 index 0000000..c427a50 --- /dev/null +++ b/home/.local/bin/stream @@ -0,0 +1,94 @@ +#!/usr/bin/env sh + +pid_file="/tmp/streampid" +log_file="/tmp/stream.log" + +pid_exists() { + test -r "$pid_file" +} + +is_running() { + if pid_exists; then + ps "$(cat "$pid_file")" >/dev/null 2>&1 || return 1 + else + return 1 + fi +} + +start() { + ffmpeg \ + -threads 0 \ + -thread_queue_size 512 -f x11grab -s 1920x1080 -framerate 30 -i "$DISPLAY" \ + -thread_queue_size 512 -f v4l2 -video_size 320x240 -framerate 30 -i /dev/video0 \ + -thread_queue_size 1024 -f pulse -itsoffset 0.350 -i "alsa_output.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-stereo.monitor" \ + -thread_queue_size 1024 -f pulse -itsoffset 0.350 -i "alsa_input.usb-SteelSeries_SteelSeries_Arctis_7-00.analog-mono" \ + -c:a aac \ + -init_hw_device vaapi=va:/dev/dri/renderD128,driver=i965 -filter_hw_device va \ + -filter_complex \ + "[0:v]setpts=PTS-STARTPTS[bg]; \ + [1:v]setpts=PTS-STARTPTS[fg]; \ + [bg][fg]overlay=W-w:H-h,format=nv12,hwupload[vout]" \ + -map "[vout]" \ + -c:v h264_vaapi \ + -r:v 30 -g:v 60 -bf:v 3 -refs:v 16 \ + -filter_complex "[2:a][3:a]amerge=inputs=2[aout]" -map "[aout]" -ac 2 \ + -f flv "rtmp://live.strisemarx.com/hls/index" >"$log_file" 2>&1 & + echo "$!" >"$pid_file" + + bspc config right_padding 320 + notify-send "Stream started!" +} + +stop() { + bspc config right_padding 0 + pid_exists || exit 1 + pid="$(cat "$pid_file")" + # kill with SIGTERM, allowing finishing touches. + kill "$pid" + # even after SIGTERM, ffmpeg may still run, so SIGKILL it. + sleep 3 + is_running && kill -9 "$pid" + rm -f "$pid_file" + notify-send "Stream stopped!" +} + +toggle() { + if is_running; then + echo "Stopping stream" + stop + else + echo "Starting stream" + start + fi + echo + status +} + +status() { + if is_running; then + echo "Streaming with PID $(cat "$pid_file")" + echo "Check the logs at" + echo + echo "$log_file" + echo + else + echo "Stream inactive" + fi +} +case "$1" in + start) + start + ;; + stop) + stop + ;; + toggle) + toggle + ;; + status) + status + ;; + *) + toggle + ;; +esac diff --git a/home/.local/bin/terminal-benchmark b/home/.local/bin/terminal-benchmark new file mode 100755 index 0000000..78923a8 --- /dev/null +++ b/home/.local/bin/terminal-benchmark @@ -0,0 +1,61 @@ +#!/usr/bin/env bash + +MAX_RETRIES=100000 +START=$(date +%s.%N) +#6*42 + 48 +for i in {1..100000}; do + echo -e '\r'; + echo -e '\033[0K\033[1mBold\033[0m \033[7mInvert\033[0m \033[4mUnderline\033[0m'; + echo -e '\033[0K\033[1m\033[7m\033[4mBold & Invert & Underline\033[0m'; + echo; + echo -e '\033[0K\033[31m Red \033[32m Green \033[33m Yellow \033[34m Blue \033[35m Magenta \033[36m Cyan \033[0m'; + echo -e '\033[0K\033[1m\033[4m\033[31m Red \033[32m Green \033[33m Yellow \033[34m Blue \033[35m Magenta \033[36m Cyan \033[0m'; + echo; + echo -e '\033[0K\033[41m Red \033[42m Green \033[43m Yellow \033[44m Blue \033[45m Magenta \033[46m Cyan \033[0m'; + echo -e '\033[0K\033[1m\033[4m\033[41m Red \033[42m Green \033[43m Yellow \033[44m Blue \033[45m Magenta \033[46m Cyan \033[0m'; + echo; + echo -e '\033[0K\033[30m\033[41m Red \033[42m Green \033[43m Yellow \033[44m Blue \033[45m Magenta \033[46m Cyan \033[0m'; + echo -e '\033[0K\033[30m\033[1m\033[4m\033[41m Red \033[42m Green \033[43m Yellow \033[44m Blue \033[45m Magenta \033[46m Cyan \033[0m'; +done +END=$(date +%s.%N) +echo "Coloured output test takes: " + "$(echo "($END - $START)" | bc)" + " seconds" +COLOURED_OUPUT=$(echo "(300 * $MAX_RETRIES) / ($END - $START)" | bc) + + +START=$(date +%s.%N) +for i in {1..100000}; do + echo -e '\r'; + echo -e '๐ซ๐๐๐ฃ๐๐๐๐ณ๐๐๐ฆ๐ท๐๐๐ช๐ป๐ป๐๐๐๐ฌ๐ฝ๐๐๐๐๐๐๐๐ข๐ณ๐ก๐ค๐ฃ๐บ๐ป๐ผ๐ฝ๐พ๐ฟ๐ฎ๐๐๐ป๐ช๐๐๐ท๐ฆ๐๐ณ๐ข๐๐๐ฏ๐๐๐ผ๐ซ๐๐๐ธ๐ง๐๐ด๐ฃ๐๐๐ฐ๐๐๐ฝ๐ฌ๐๐๐น๐จ๐'; +done +END=$(date +%s.%N) +echo "Unicode output test takes: " "$(echo "($END - $START)" | bc)" " seconds" +UNICODE_OUPUT=$(echo "(139 * $MAX_RETRIES) / ($END - $START)" | bc) + + +START=$(date +%s.%N) +for i in {1..100000}; do + echo -e '\r'; + echo -e 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ'; +done +END=$(date +%s.%N) +echo "Non-unicode output test takes: " "$(echo "($END - $START)" | bc)" " seconds" +NONE_UNICODE_OUPUT=$(echo "(118 * $MAX_RETRIES) / ($END - $START)" | bc) + +test_output=''; +START=$(date +%s.%N) +for x in {1..10}; do + test_output="${test_output} a๐ซ" + for i in {1..100000}; do + echo -e '\r'; + echo -e "$test_output"; + done +done +END=$(date +%s.%N) +echo "Mixed output test takes: " "$(echo "($END - $START)" | bc)" " seconds" +MIXED_OUPUT=$(echo "(165 * $MAX_RETRIES) / ($END - $START)" | bc) + + +echo "${COLOURED_OUPUT} coloured characters per second" +echo "${UNICODE_OUPUT} unicode characters per second" +echo "${NONE_UNICODE_OUPUT} none-unicode characters per second" +echo "${MIXED_OUPUT} Mixed characters per second" diff --git a/home/.local/bin/terminal-testdrive b/home/.local/bin/terminal-testdrive new file mode 100755 index 0000000..aa241bc --- /dev/null +++ b/home/.local/bin/terminal-testdrive @@ -0,0 +1,66 @@ +#!/usr/bin/env bash + +echo "# 24-bit (true-color)" +# based on: https://gist.github.com/XVilka/8346728 +term_cols="$(tput cols || echo 80)" +cols=$(echo "2^((l($term_cols)/l(2))-1)" | bc -l 2> /dev/null) +rows=$(( cols / 2 )) +awk -v cols="$cols" -v rows="$rows" 'BEGIN{ + s=" "; + m=cols+rows; + for (row = 0; row<rows; row++) { + for (col = 0; col<cols; col++) { + i = row+col; + r = 255-(i*255/m); + g = (i*510/m); + b = (i*255/m); + if (g>255) g = 510-g; + printf "\033[48;2;%d;%d;%dm", r,g,b; + printf "\033[38;2;%d;%d;%dm", 255-r,255-g,255-b; + printf "%s\033[0m", substr(s,(col+row)%2+1,1); + } + printf "\n"; + } + printf "\n\n"; +}' + +echo "# text decorations" +printf '\e[1mbold\e[22m\n' +printf '\e[2mdim\e[22m\n' +printf '\e[3mitalic\e[23m\n' +printf '\e[4munderline\e[24m\n' +printf '\e[4:1mthis is also underline\e[24m\n' +printf '\e[21mdouble underline\e[24m\n' +printf '\e[4:2mthis is also double underline\e[24m\n' +printf '\e[4:3mcurly underline\e[24m\n' +printf '\e[58;5;10;4mcolored underline\e[59;24m\n' +printf '\e[5mblink\e[25m\n' +printf '\e[7mreverse\e[27m\n' +printf '\e[8minvisible\e[28m <- invisible (but copy-pasteable)\n' +printf '\e[9mstrikethrough\e[29m\n' +printf '\e[53moverline\e[55m\n' +echo + +echo "# magic string (see https://en.wikipedia.org/wiki/Unicode#Web)" +echo "รฉ ฮ ะ ืง ู
เน ใ ๅถ ่ ๋ง" +echo + +echo "# emojis" +echo "๐๐ฑ๐ต" +echo + +echo "# right-to-left ('w' symbol should be at right side)" +echo "ืฉืจื" +echo + +echo "# sixel graphics" +printf '\eP0;0;0q"1;1;64;64#0;2;0;0;0#1;2;100;100;100#1~{wo_!11?@FN^!34~^NB +@?_ow{~$#0?BFN^!11~}wo_!34?_o{}~^NFB-#1!5~}{o_!12?BF^!25~^NB@??ow{!6~$#0!5? +@BN^!12~{w_!25?_o{}~~NFB-#1!10~}w_!12?@BN^!15~^NFB@?_w{}!10~$#0!10?@F^!12~} +{o_!15?_ow{}~^FB@-#1!14~}{o_!11?@BF^!7~^FB??_ow}!15~$#0!14?@BN^!11~}{w_!7?_ +w{~~^NF@-#1!18~}{wo!11?_r^FB@??ow}!20~$#0!18?@BFN!11~^K_w{}~~NF@-#1!23~M!4? +_oWMF@!6?BN^!21~$#0!23?p!4~^Nfpw}!6~{o_-#1!18~^NB@?_ow{}~wo!12?@BFN!17~$#0! +18?_o{}~^NFB@?FN!12~}{wo-#1!13~^NB@??_w{}!9~}{w_!12?BFN^!12~$#0!13?_o{}~~^F +B@!9?@BF^!12~{wo_-#1!8~^NFB@?_w{}!19~{wo_!11?@BN^!8~$#0!8?_ow{}~^FB@!19?BFN +^!11~}{o_-#1!4~^NB@?_ow{!28~}{o_!12?BF^!4~$#0!4?_o{}~^NFB!28?@BN^!12~{w_-#1 +NB@???GM!38NMG!13?@BN$#0?KMNNNF@!38?@F!13NMK-\e'\''' diff --git a/home/.local/bin/tokodi b/home/.local/bin/tokodi new file mode 100755 index 0000000..738d77b --- /dev/null +++ b/home/.local/bin/tokodi @@ -0,0 +1,13 @@ +#!/usr/bin/env sh + +if [ -z "$1" ]; then + url=$(xclip -o -selection clipboard) +elif [ "$1" = "-" ]; then + read -r url +else + url="$1" +fi + +payload="$(printf '{"jsonrpc":"2.0", "id": 1, "method":"Player.Open","params": {"item": {"file":"%s"}}}' "$url")" + +curl -u kodi:kodi 'http://xbox.pulpo:8080/jsonrpc' -X POST --data-raw "$payload" -H 'Content-Type: application/json' diff --git a/home/.local/bin/videowrapper b/home/.local/bin/videowrapper new file mode 100755 index 0000000..60dbeb3 --- /dev/null +++ b/home/.local/bin/videowrapper @@ -0,0 +1,7 @@ +#!/usr/bin/env sh +url="$(xclip -o -selection clipboard)" +log="$(mktemp)" +cmd="mpv -quiet $url 2>&1 > $log" + +echo "$cmd" +eval "$cmd" || notify-send "$url" "$(cat "$log")" diff --git a/home/.local/bin/wqr b/home/.local/bin/wqr new file mode 100755 index 0000000..09186ff --- /dev/null +++ b/home/.local/bin/wqr @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +if [ -z "$1" ]; then + text=$(xclip -o -selection clipboard) +elif [ "$1" = "-" ]; then + read -r text +else + text="$1" +fi + +printf '%s' "$text" | qrencode -t SVG -o - | feh - --conversion-timeout 1 diff --git a/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/aim1v1.cfg b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/aim1v1.cfg new file mode 100644 index 0000000..f4a1cdc --- /dev/null +++ b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/aim1v1.cfg @@ -0,0 +1,27 @@ +clear + +exec gamemode_competitive +// Server config +mp_autoteambalance 1 +mp_freezetime 0 // Disables freezetime +sv_alltalk 1 +mp_halftime_duration 0 +mp_weapons_allow_map_placed 1 +mp_roundtime 80250 +mp_maxrounds 30 +mp_join_grace_time 30 +mp_friendlyfire 1 +mp_free_armor 2 +mp_solid_teammates 1 + +bot_kick // Kicks bots +mp_warmup_end // Ends warmup +mp_restartgame 1 // Restarts the game + +echo "" +echo "" +echo "" +echo "1v1 CONFIG LOADED" +echo "" +echo "" +echo "" diff --git a/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/autoexec.cfg b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/autoexec.cfg new file mode 100644 index 0000000..5502774 --- /dev/null +++ b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/autoexec.cfg @@ -0,0 +1,257 @@ +// LAUNCH OPTIONS + +// -novid -nojoy -freq 144 + +echo "" +echo "" +echo "autoexec.cfg starting" +echo "" +echo "" + +//Rates +rate "786432" //Your download rate to the server. Max rate: "786432" +cl_cmdrate "128" //Max number of command packets sent to server per second +cl_updaterate "128" //Number of packets per second you are requesting from the server +cl_interp "0.007813" //Sets the interpolation amount, currently on the lowest value +cl_interp_ratio "1" //Sets the interpolation amount (final amount is cl_interp_ratio / cl_updaterate) +cl_lagcompensation "1" //Lag compensation helps by eliminating combat latency from client side view +cl_predict "1" //Skip waiting for server feedback and simulate client side movement in real-time +cl_predictweapons "1" //Skip waiting for server feedback and perform client side prediction of weapon effects +mm_dedicated_search_maxping "25" + + +//Audio + +voice_scale "0.4" //Turn down volume of other players to 40% (RECOMMENDED) +snd_deathcamera_volume "0" //Volume of the death camera music +snd_dzmusic_volume "0" //Volume of the Danger Zone victory music +snd_mapobjective_volume "0" //Volume of map objective music +snd_menumusic_volume "0.01" //Volume of the main menu music +snd_music_selection "2" //Tracking rotating music for players with no music packs equipped +snd_musicvolume_multiplier_inoverlay "0" //Music volume multiplier when Steam Overlay is active +snd_mute_mvp_music_live_players "0" //MVP music is muted if players from both teams are still alive +snd_mvp_volume "0" //Volume of the MVP music +snd_roundend_volume "0" //Volume of round end music +snd_roundstart_volume "0" //Volume of round start music +snd_tensecondwarning_volume "0.10" //10 Second warning music, enabled on 3% volume to hear if there's time to defuse +snd_mute_losefocus "0" +volume "0.5" +snd_mute_losefocus "1" +snd_pitchquality 1 # Use high quality sounds + + +//Video +muzzleflash_light 0 +mat_monitorgamma "1.6" +mat_monitorgamma_tv_enabled "0" //Turn off TV Mode for less off-set light +mat_queue_mode "-1" +fps_max "300" +fps_max_menu "30" +r_dynamic "0" +r_drawtracers_firstperson "1" +// mat_postprocess_enable 0 +//mat_savechanges //write settings to registry" +r_eyegloss "0" // No Makeup. +r_eyemove "0" // No Eye Movement. +r_eyeshift_x "0" // No Eye Movement X-Angel. +r_eyeshift_y "0" // No Eye Movement Y-Angel. +r_eyeshift_z "0" // No Eye Movement Z-Angel. +r_eyesize "0" // Smaller Eyes. + + +//Mouse +sensitivity "1.0" +zoom_sensitivity_ratio_mouse ".818933" +m_rawinput "1" +m_customaccel "0" +m_mouseaccel1 "0" +m_mouseaccel2 "0" + +unbindall + +//BUY Binds +bind "uparrow" " buy vesthelm;" +bind "downarrow" " buy vest;" +bind "rightarrow" " buy defuser;" +bind "home" "buy ak47; buy m4a1; use weapon_ak47; use weapon_m4a1; drop" +bind "pgup" "buy p250; use weapon_p250; drop" +bind "pgdn" "buy aug; buy sg556; use weapon_aug; use weapon_sg556; drop" +bind "end" "buy awp; use weapon_awp; drop" + +//NADE Binds +bind "4" "buy hegrenade; use weapon_knife; use weapon_hegrenade" +bind "c" "buy smokegrenade; use weapon_knife;use weapon_smokegrenade" +bind "f" "buy flashbang; use weapon_knife; use weapon_flashbang" +bind "v" "buy incgrenade; buy molotov; use weapon_knife;use weapon_molotov; use weapon_incgrenade" +bind "l" "use weapon_decoy" + +//Other Binds +bind mwheelup +jump +bind mwheeldown +jump +bind q "invnextnongrenade" +bind z "+lookatweapon" +bind "t" "use weapon_taser; slot13" +bind "h" "+spray_menu" +bind "mouse5" +voicerecord +bind "f1" "toggleconsole" +bind "f2" "buy smokegrenade; buy incgrenade; buy molotov; buy flashbang; buy flashbang" +bind "f3" "buy smokegrenade; buy incgrenade; buy molotov; buy flashbang; buy hegrenade" +bind "f4" "buy smokegrenade; buy flashbang; buy flashbang; buy hegrenade" +bind 3 "slot3; use weapon_knife" +bind "p" "holdpos;roger" + +//Default Binds +bind "SPACE" "+jump" +bind g drop +bind "1" "slot1" +bind "2" "slot2" +bind "5" "slot5" +bind "6" "slot6" +bind "7" "slot7" +bind "8" "slot8" +bind "9" "slot9" +bind "0" "slot10" +bind ctrl "+duck" +bind b "buymenu" +bind "mouse1" "+attack" +bind "mouse2" "+attack2" +bind a +moveleft +bind d +moveright +bind w +forward +bind s +back +bind "SHIFT" +speed +bind y "messagemode" +bind u messagemode2 +bind r "+reload;r_cleardecals" +bind "TAB" +showscores +bind m teammenu +bind k callvote +bind e +use + +//Misc +developer "0" +con_enable "1" +con_filter_enable "2" +con_filter_text "Damage" +con_filter_text_out "Player:" +ui_steam_overlay_notification_position "bottomleft" +player_nevershow_communityservermessage "1" +gameinstructor_enable "0" +option_duck_method "0" +option_speed_method "0" +cl_downloadfilter "nosounds" +cl_disablehtmlmotd "1" +cl_autowepswitch "0" +cl_buywheel_nomousecentering 1 +cl_buywheel_nonumberpurchasing 0 +closeonbuy "0" +hud_takesshots "0" +cl_join_advertise "2" +func_break_max_pieces "0" //Less clutter from breaking vents (especially on Mirage) +cl_use_opens_buy_menu "0" //Disable button E from opening buy-menu (Useful when picking up weapons in spawn) +spec_replay_autostart "0" //Disable "Auto-start Killer Replay" when available +adsp_debug "0" +cl_clearhinthistory "1" +cl_debugrumble "0" +cl_detail_avoid_force "0" +cl_detail_avoid_radius "0" +cl_detail_avoid_recover_speed "0" +cl_detail_max_sway "0" +cl_rumblescale "0" +cl_threaded_bone_setup "0" +mat_hdr_enabled "0" + + +//HUD +hud_scaling "0.95" //Scales hud elements to maximum value +hud_showtargetid "1" //Enables display of target names, important +cl_disablefreezecam "1" //Disables freezecam +cl_hud_bomb_under_radar "1" //Draws bomb under radar, convenient +cl_hud_color "8" //Makes the hud color green (THIS CHANGES THE HUD COLOR) +cl_hud_playercount_showcount "1" //Shows player avatars instead of numbers left +cl_hud_playercount_pos "0" //Puts player information in the bottom instead of top +cl_hud_healthammo_style "0" //Reverted hud style due to hidden burst mode +cl_hud_background_alpha "0.6" //Hidden but still visible black bars, easy on the eyes +cl_showloadout "1" //So it doesnt fade out the weapon slots, very annoying otherwise +cl_show_clan_in_death_notice "0" //Tagname will not show in death notices +cl_teamid_overhead_mode "2" //Always show team behind walls with equipment +cl_showhelp "0" //Removes on-screen help +cl_autohelp "0" //Removes automatic help +gameinstructor_enable "0" //Removes in-game instructions +safezonex "0.8" //Screen width percentage for the hud +safezoney "1" //Screen height percentage for the hud + +//Scoreboard and netgraph combined +net_graph "0" +net_graphheight 0 +net_graphproportionalfont 0.5 +cl_showfps 0 + +//Crosshair +cl_crosshair_drawoutline "1" +cl_crosshair_dynamic_maxdist_splitratio "0.35" +cl_crosshair_dynamic_splitalpha_innermod "1" +cl_crosshair_dynamic_splitalpha_outermod "0.5" +cl_crosshair_dynamic_splitdist "7" +cl_crosshair_friendly_warning "2" +cl_crosshair_outlinethickness "1" +cl_crosshair_sniper_show_normal_inaccuracy "0" +cl_crosshair_sniper_width "1" +cl_crosshair_t "0" +cl_crosshairalpha "255" +cl_crosshaircolor "1" +cl_crosshaircolor_b "50" +cl_crosshaircolor_g "250" +cl_crosshaircolor_r "50" +cl_crosshairdot "0" +cl_crosshairgap "-2.000000" +cl_crosshairgap_useweaponvalue "0" +cl_crosshairsize "1" +cl_crosshairstyle "4" +cl_crosshairthickness "1.000000" +cl_crosshairusealpha "1" +cl_fixedcrosshairgap "3" + +//Viewmodel +viewmodel_offset_x "2" //Changes viewmodel view in X scale +viewmodel_offset_y "2" //Changes viewmodel view in Y scale +viewmodel_offset_z "-2" //Changes viewmodel view in Z scale +viewmodel_fov "68" //Highest viewmodel FOV +viewmodel_recoil "0" //Disable viewmodel reactions to weapon recoil & aimpunch (from Update: 2018-03-01) +cl_bob_lower_amt "5" //How much the viewmodel lowers when running, set to lowest for less distraction +cl_bobamt_lat "0.1" //How much the viewmodel moves side to side when running, set to lowest for less distraction +cl_bobamt_vert "0.1" //How much the viewmodel moves up and down when running, set to lowest for less distraction +cl_bobcycle "0.98" //The frequency at which the viewmodel bobs, set to default +cl_viewmodel_shift_left_amt "0.5" //Lowers the crouching animation of the viewmodel +cl_viewmodel_shift_right_amt "0.25" //Lowers the crouching animation of the viewmodel + +// RADAR +cl_teammate_colors_show "1" //Show teammates as separate colors without letter +cl_hud_radar_scale "1" //Optimized Radar size +cl_radar_scale "0.4" //Radar map scaled down to fit all maps +cl_radar_always_centered "0" //Centers map instead of player +cl_radar_icon_scale_min "1" //Minimum player icon scale + +//Quick-switch +alias "+knife" "use weapon_knife" +alias "-knife" "invnextnongrenade" +bind "mouse4" "+knife" + +// Jump Throw +alias "+jumpthrow" "+jump;-attack" +alias "-jumpthrow" "-jump" +bind "j" "+jumpthrow" +bind "capslock" "+jumpthrow" + +// Useful shortcuts for popular commands in console +alias "d" "disconnect" +alias "q" "quit;exit" +alias "r" "retry" +alias "rs" "mp_restartgame 1" + +host_writeconfig +echo "" +echo "" +echo "autoexec.cfg loaded, GLHF" +echo "" +echo "" diff --git a/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/practice.cfg b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/practice.cfg new file mode 100644 index 0000000..8139e6c --- /dev/null +++ b/home/.local/share/Steam/steamapps/common/Counter-Strike Global Offensive/csgo/cfg/practice.cfg @@ -0,0 +1,63 @@ +clear + +// Server config +sv_cheats 1 // Enables cheat commands +mp_limitteams 0 // No player limit in teams +mp_autoteambalance 0 // No player balancing +mp_timelimit 999999 +mp_roundtime 60 // 60 minute round-timer +mp_roundtime_defuse 60 // 60 minute round-timer for de_ maps +mp_roundtime_hostage 60 +mp_maxmoney 60000 // Money, max allowed +mp_startmoney 60000 // Money, starting amount +mp_freezetime 0 // Disables freezetime +mp_buytime 9999 // Buy anytime +mp_buy_anywhere 1 // Buy anywhere +sv_infinite_ammo 1 // Ammo: infinite +ammo_grenade_limit_total 5 // Ammo: Allows you to hold all types of grenades +sv_grenade_trajectory 1 // Grenade trajectory visible +sv_grenade_trajectory_time 10 // Grenade trajectory time visible +sv_showimpacts 1 // Bullet impacts visible +sv_showimpacts_time 10 // Bullet impacts time visible +sv_alltalk 1 +cl_grenadepreview 1 +// Gives CT all grenades +mp_ct_default_grenades "weapon_flashbang weapon_hegrenade weapon_smokegrenade weapon_incgrenade weapon_decoy" +// Gives T all grenades +mp_t_default_grenades "weapon_flashbang weapon_hegrenade weapon_smokegrenade weapon_molotov weapon_decoy" +mp_halftime_duration 0 +mp_join_grace_time 30 +mp_respawnwavetime_ct 1 +mp_respawnwavetime_t 1 +mp_friendlyfire 0 +mp_free_armor 2 +mp_respawn_on_death_ct 1 // Respawn CT after death immediately +mp_respawn_on_death_t 1 // Respawn T after death immediately +mp_death_drop_gun 1 // Allow to pick up wepon after somebody's death +mp_death_drop_c4 1 // Allow to pick up C4 after planter's death +mp_death_drop_defuser 1 // Allow to pick up defuse kit after somebody's death +mp_death_drop_grenade 5 // How many grenades will drop after somebody's death +mp_solid_teammates 1 +mp_c4timer 9999 +mp_ignore_round_win_conditions 1 + +bind mouse3 noclip +bind i sv_rethrow_last_grenade +bind leftarrow "cl_sim_grenade_trajectory 10" +bind rightarrow cast_ray +bind uparrow bot_place +alias nades "give weapon_hegrenade;give weapon_flashbang;give weapon_smokegrenade;give weapon_incgrenade;give weapon_molotov;give weapon_decoy" +bot_knives_only +bot_stop 1 +bot_kick // Kicks bots +mp_warmup_end // Ends warmup +mp_restartgame 1 // Restarts the game +bot_add + +echo "" +echo "" +echo "" +echo "PRACTICE CONFIG LOADED" +echo "" +echo "" +echo "" diff --git a/home/.local/share/Steam/steamapps/common/Left 4 Dead 2/left4dead2/cfg/autoexec.cfg b/home/.local/share/Steam/steamapps/common/Left 4 Dead 2/left4dead2/cfg/autoexec.cfg new file mode 100755 index 0000000..d5e408d --- /dev/null +++ b/home/.local/share/Steam/steamapps/common/Left 4 Dead 2/left4dead2/cfg/autoexec.cfg @@ -0,0 +1,121 @@ +// LAUNCH OPTIONS + +// -novid -nojoy -freq 144 + +echo "" +echo "" +echo "autoexec.cfg starting" +echo "" +echo "" + +//Rates +rate 786432 +cl_cmdrate "128" +cl_updaterate "128" +cl_interp "0" +cl_interp_ratio "1" +cl_lagcompensation "1" +cl_predictweapons "1" //Skip waiting for server feedback and perform client side prediction of weapon effects + +//Audio +snd_mixahead "0.05" +volume "0.4" +voice_scale "1" +dsp_enhance_stereo 0 # Disable DSP sound effects. You may want to leave this on, if you find it does not interfere with your perception of the sound effects. +snd_pitchquality 1 # Use high quality sounds + + +//Video +muzzleflash_light 0 +mat_monitorgamma "2.6" +mat_monitorgamma_tv_enabled "0" //Turn off TV Mode for less off-set light +mat_queue_mode "-1" +r_dynamic "0" +r_eyemove "0" // No Eye Movement. +r_eyeshift_x "0" // No Eye Movement X-Angel. +r_eyeshift_y "0" // No Eye Movement Y-Angel. +r_eyeshift_z "0" // No Eye Movement Z-Angel. +r_eyesize "0" // Smaller Eyes. + + +//Mouse +sensitivity "1.0" +m_rawinput "1" +m_customaccel "0" +m_mouseaccel1 "0" +m_mouseaccel2 "0" + + +//Other Binds +bind mwheelup +jump +bind mwheeldown +jump +bind "mouse5" +voicerecord +bind "f1" "toggleconsole" + +//Default Binds +bind "SPACE" "+jump" +//Quick Switch +bind q qs1 +alias qs1 "slot2; slot1; bind q qs2" +alias qs2 "slot1; slot2; bind q qs1" +bind 1 "slot1; bind q qs2" +bind 2 "slot2; bind q qs1" +bind 3 "slot3; bind q qs1" +bind 4 "slot4; bind q qs1" +bind 5 "slot5; bind q qs1" +bind "6" "slot6" +bind "7" "slot7" +bind "8" "slot8" +bind "9" "slot9" +bind "0" "slot10" +bind ctrl "+duck" +bind "mouse1" "+attack" +bind "mouse2" "+attack2" +bind "mouse3" "+zoom" +bind a +moveleft +bind d +moveright +bind w +forward +bind s +back +bind "SHIFT" +speed +bind y "messagemode" +bind u messagemode2 +bind r +reload +bind "TAB" +showscores +bind m teammenu +bind k callvote +bind e +use + +//Misc +con_enable "1" +cl_forcepreload "1" +cl_downloadfilter "nosounds" +cl_autohelp "0" +cl_showhelp "0" +hud_takesshots "0" + +adsp_debug "0" +cl_clearhinthistory "1" +cl_detail_avoid_force "0" +cl_detail_avoid_radius "0" +cl_detail_avoid_recover_speed "0" +cl_detail_max_sway "0" +func_break_max_pieces "0" +mat_hdr_enabled "0" + +//Scoreboard and netgraph combined +net_graph "1" +net_graphheight 0 +net_graphproportionalfont .5 +cl_showfps 0 + +//Quick-switch +alias "+knife" "slot2" +alias "-knife" "slot1" +bind "mouse4" "+knife" + +host_writeconfig +echo "" +echo "" +echo "autoexec.cfg loaded, GLHF" +echo "" +echo "" diff --git a/home/.local/share/applications/mail.desktop b/home/.local/share/applications/mail.desktop new file mode 100644 index 0000000..d8d5e84 --- /dev/null +++ b/home/.local/share/applications/mail.desktop @@ -0,0 +1,19 @@ +[Desktop Entry] +Version=1.0 +Name=aerc + +GenericName=Mail Client +Comment=Launches the aerc email client +Keywords=Email,Mail,IMAP,SMTP +Categories=Office;Network;Email;ConsoleOnly + +Type=Application +Icon=utilities-terminal +Terminal=true +Exec=aerc + +[Desktop Action compose] +# enable as default mailto: handler using +# xdg-mime default aerc.desktop x-scheme-handler/mailto +Exec=aerc %u +MimeType=x-scheme-handler/mailto; diff --git a/home/.local/share/applications/mimeapps.list b/home/.local/share/applications/mimeapps.list new file mode 120000 index 0000000..26be7e8 --- /dev/null +++ b/home/.local/share/applications/mimeapps.list @@ -0,0 +1 @@ +../../../.config/mimeapps.list
\ No newline at end of file diff --git a/home/.local/share/gnupg/gpg-agent.conf b/home/.local/share/gnupg/gpg-agent.conf new file mode 100644 index 0000000..0826efe --- /dev/null +++ b/home/.local/share/gnupg/gpg-agent.conf @@ -0,0 +1,8 @@ +max-cache-ttl 60480000 +default-cache-ttl 60480000 +allow-preset-passphrase +enable-ssh-support +default-cache-ttl-ssh 60480000 +max-cache-ttl-ssh 60480000 +pinentry-program /usr/bin/pinentry-curses +allow-loopback-pinentry diff --git a/home/.local/share/gnupg/gpg.conf b/home/.local/share/gnupg/gpg.conf new file mode 100644 index 0000000..915882c --- /dev/null +++ b/home/.local/share/gnupg/gpg.conf @@ -0,0 +1,9 @@ +personal-digest-preferences SHA512 +cert-digest-algo SHA512 +default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES CAST5 ZLIB BZIP2 ZIP Uncompressed +personal-cipher-preferences TWOFISH CAMELLIA256 AES 3DES + +keyserver-options auto-key-retrieve + +keyid-format 0xlong +with-fingerprint diff --git a/home/.local/share/gnupg/sshcontrol b/home/.local/share/gnupg/sshcontrol new file mode 100644 index 0000000..f298fde --- /dev/null +++ b/home/.local/share/gnupg/sshcontrol @@ -0,0 +1,15 @@ +# List of allowed ssh keys. Only keys present in this file are used +# in the SSH protocol. The ssh-add tool may add new entries to this +# file to enable them; you may also add them manually. Comment +# lines, like this one, as well as empty lines are ignored. Lines do +# have a certain length limit but this is not serious limitation as +# the format of the entries is fixed and checked by gpg-agent. A +# non-comment line starts with optional white spaces, followed by the +# keygrip of the key given as 40 hex digits, optionally followed by a +# caching TTL in seconds, and another optional field for arbitrary +# flags. Prepend the keygrip with an '!' mark to disable it. + +91191A4A6E86279A901A7D38A7512EC126518FA5 +22747ABA1B4502F186654CD84DC353B0C3BD353F +9F3FCCA0F99AE1C5D05B834F0E89C79970A7B74A +5E9259E1EFFFB85520F62A5C31C97033C1DEDBD8 |