diff options
Diffstat (limited to '.local')
-rw-r--r-- | .local/share/applications/discord.desktop | 1 | ||||
-rwxr-xr-x | .local/share/bin/ccpreview | 2 | ||||
-rwxr-xr-x | .local/share/bin/mk | 7 | ||||
-rwxr-xr-x | .local/share/bin/nginx-dev | 5 |
4 files changed, 14 insertions, 1 deletions
diff --git a/.local/share/applications/discord.desktop b/.local/share/applications/discord.desktop index 676b330..403a457 100644 --- a/.local/share/applications/discord.desktop +++ b/.local/share/applications/discord.desktop @@ -7,3 +7,4 @@ Exec=discord Icon=discord Type=Application Categories=Network;InstantMessaging; +MimeType=x-scheme-handler/betterdiscord; diff --git a/.local/share/bin/ccpreview b/.local/share/bin/ccpreview index 914a6ad..9f13acc 100755 --- a/.local/share/bin/ccpreview +++ b/.local/share/bin/ccpreview @@ -55,6 +55,7 @@ _mpv \ --interpolation=no \ --stream-buffer-size=4k \ --profile=low-latency \ + --speed=1.001 \ "$AUDIO_URL" # video preview @@ -65,6 +66,7 @@ _mpv \ --demuxer-lavf-o-add=framerate="$FRAMERATE" \ --demuxer-lavf-o-add=resolution="$RESOLUTION" \ --demuxer-lavf-o-add=rw_timeout=30000000 \ + --speed=1.05 \ "$VIDEO_URL" sleep infinity diff --git a/.local/share/bin/mk b/.local/share/bin/mk index ab0f586..b7e2b41 100755 --- a/.local/share/bin/mk +++ b/.local/share/bin/mk @@ -6,6 +6,13 @@ showmode() { printf '\e[1A\e['$col'G\e[1;30m%s\e[0m\n' "$mode" } +mode_west() { + showmode 'west' + [ -z "$*" ] && set -- build + exec west "$@" +} +[ -e "west.yml" ] && mode_west "$@" + mode_cmake() { showmode 'cmake' builddir="build" diff --git a/.local/share/bin/nginx-dev b/.local/share/bin/nginx-dev index 4e9825d..10987fd 100755 --- a/.local/share/bin/nginx-dev +++ b/.local/share/bin/nginx-dev @@ -21,13 +21,14 @@ options: -C enable server cache (disabled by default) -v verbose mode (prints config before starting server) -q quiet mode (disable access_log) + -x automatically open a browser -h show this help EOF exit $1 } ARGC=0 -while getopts hvp:Ct:q OPT; do +while getopts hvp:Ct:qx OPT; do [ $OPTIND -gt $ARGC ] && ARGC=$OPTIND case $OPT in h) usage 0 ;; @@ -36,6 +37,7 @@ while getopts hvp:Ct:q OPT; do v) print_config=1 ;; C) cache_control="" ;; q) access_log="/dev/null" ;; + x) open_browser=1 ;; \?|*) usage 1 ;; esac done @@ -76,6 +78,7 @@ http { } EOF [ $print_config ] && cat "$config" +[ $open_browser ] && (xdg-open "http://localhost:$port" 1> /dev/null 2> /dev/null &) nginx -c "$config" rm -f "$config" "$pidfile" |