From 7b8de75017d009cd050f5ea5840791d60a2e01ec Mon Sep 17 00:00:00 2001 From: Phantop Date: Tue, 25 Jan 2022 11:01:04 -0500 Subject: [PATCH] fish: acmus, dwarfmount aliases; nvim: fix tex --- bin/acmus | 7 ------- bin/aliases | 4 ++-- bin/awall | 11 +++++------ bin/drivedl | 8 ++++---- bin/dwarfmount | 6 ------ bin/zippy | 6 +++--- fish/config.fish | 1 - nvim/init.vim | 5 +++-- 8 files changed, 17 insertions(+), 31 deletions(-) delete mode 100755 bin/acmus delete mode 100755 bin/dwarfmount diff --git a/bin/acmus b/bin/acmus deleted file mode 100755 index b61fc6a..0000000 --- a/bin/acmus +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -source=https://d17orwheorv96d.cloudfront.net -hour=$(date +%-I%p|tr APM apm) -curl $source/$1/$hour.ogg -so/tmp/ac - -loops=$(bc <<< "(3600 - $(date +%s) % 3600)/$(soxi -D /tmp/ac)") -mpv --vid=no --no-resume-playback --loop=$loops /tmp/ac diff --git a/bin/aliases b/bin/aliases index dac2576..ba97398 100755 --- a/bin/aliases +++ b/bin/aliases @@ -1,6 +1,7 @@ #!/usr/bin/fish alias a 'alias -s' +a acmus 'timeout --foreground (math 3600 - (date +%s) % 3600) mpv --loop https://acmusicext.com/static/$argv/sunny/(date +%-I%p|tr APM apm).ogg' a aliases 'v (env which aliases); command aliases' a all2jxl 'fd -e{png,jpg} -x cjxl -e 8 -d 0 {} {.}.jxl && fd -e{png,jpg} -x rm' a ao3 'grep epub $argv | cut -d\" -f4 | parallel aria2c "https://ao3.org{}" -dao3;rm' @@ -17,7 +18,6 @@ a g git a giveme 's chown $USER' a hardinfo 'inxi -SPARM -GCDN -v1 -xGCRS -Fxz' a imgsum 'printf "$argv: " && identify -format "%#\n"' -a invid 'tmux new -s 0 -d "docker-compose -f ~/.config/invid.yml up --build"' a l ls a la 'l -A' a launcher 'rofi -combi-modi "drun,run" -show combi -modi "combi,window"' @@ -38,7 +38,6 @@ a re 'systemctl reboot -i' a s 'sudo env "PATH=$PATH"' a se 's eopkg' a spleet 'spleeter separate -o . -c flac' -a ta 'tmux a -t (math 0 + "0$argv");:' a tar bsdtar a tcsv 'curl -sL http://torrents-csv.ml/service/search?q="$argv"|jq ".[]|.name,.infohash,.seeders";:' a temp 'curl temp.sh -T' @@ -54,6 +53,7 @@ a ydl 'while not yt-dlp $argv; end;:' a 7zstd '7z a -m0=zstd -mx22 -mmt=8 -mfb=273 -md=256m -ms=on (realpath $argv[1]).7z' a compress '7z a -m0=flzma2 -mx9 -mmt=8 -mfb=273 -md=256m -ms=on (realpath $argv[1]).7z' a dwarf 'mkdwarfs -i . -o $PWD.dwarfs' +a dwarfmount 'dwarfs -f $argv (mktemp -d | tee /dev/tty);:' a dwarfs 'dwarfs -o offset=auto -o tidy_strategy=swap' a foldwarf 'appdwarf -f $argv .;:' a redwarf 'mkdwarfs -o redwarf.dwarfs --recompress -i' diff --git a/bin/awall b/bin/awall index 720db69..93ef7ce 100755 --- a/bin/awall +++ b/bin/awall @@ -1,13 +1,12 @@ -#!/bin/sh +#!/bin/bash if [[ "$#" -ge 1 ]]; then rm ~/Pictures/.wallp - echo ~/Pictures/Awall/$@* > ~/Pictures/.wallp + echo ~/Pictures/Awall/"$1"* > ~/Pictures/.wallp fi pkill -f "mpv.*wallpaper" -xwinwrap -ni -fdt -fs -- mpv -wid WID $(cat ~/Pictures/.wallp) --profile=wallpaper & disown +xwinwrap -ni -fdt -fs -- mpv -wid WID "$(cat ~/Pictures/.wallp)" --profile=wallpaper & disown if [[ "$#" -ge 1 ]]; then - ffmpeg -i $(cat ~/Pictures/.wallp) -vframes 1 -y ~/Pictures/Awall/wall.png + ffmpeg -i "$(cat ~/Pictures/.wallp)" -vframes 1 -y ~/Pictures/Awall/wall.png convert ~/Pictures/Awall/wall.png -interpolate Integer -filter point -resize 1920x1080 -gravity center -background black -extent 1920x1080 ~/Pictures/Awall/wall.png - gsettings set org.gnome.desktop.background picture-uri file://$HOME/.config/kitty/wall.png - gsettings set org.gnome.desktop.background picture-uri file://$HOME/Pictures/Awall/wall.png + gsettings set org.gnome.desktop.background picture-uri file://"$HOME"/Pictures/Awall/wall.png fi diff --git a/bin/drivedl b/bin/drivedl index 5444c9e..0c1d3ba 100755 --- a/bin/drivedl +++ b/bin/drivedl @@ -1,5 +1,5 @@ #!/bin/bash -cook=/tmp/cookies -link="https://docs.google.com/uc?export=download&id=$(echo $1 | cut -d/ -f6)" -code=$(wget --save-cookies $cook "$link" -O- | egrep -o confirm=[0-9A-Za-z_]+) -aria2c --load-cookies $cook "$link&$code" -c -x16 -s 16 +cook=$(mktemp) +link="https://docs.google.com/uc?export=download&id=$(cut -d/ -f6 <<< "$1")" +code=$(wget --save-cookies "$cook" "$link" -O- | grep -Eo "confirm=[0-9A-Za-z_]+") +aria2c --load-cookies "$cook" "$link&$code" -c -x16 -s16 diff --git a/bin/dwarfmount b/bin/dwarfmount deleted file mode 100755 index 57a3686..0000000 --- a/bin/dwarfmount +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -DIR=~/dwarf/$(basename "$@" .dwarfs)$RANDOM -mkdir -p "$DIR" -echo "$DIR" -dwarfs -o offset=auto -o tidy_strategy=swap -f "$@" "$DIR" 2> /dev/null -rmdir -p "$DIR" 2> /dev/null diff --git a/bin/zippy b/bin/zippy index 3ed464a..258b09c 100755 --- a/bin/zippy +++ b/bin/zippy @@ -1,6 +1,6 @@ #!/bin/bash data=$(curl -l "$1" | grep /d/) -base=$(echo "$1" | sed s/v/d/ | cut -d/ -f1-5) -num=$(echo "$data" | cut -d\( -f3 | cut -d\) -f1 | bc) -name=$(echo "$data" | cut -d/ -f5) +base=$(cut -d/ -f1-5 <<< "${1/v/d}") +num=$(awk -F'[()]' '{print $4}' <<< "$data" | bc) +name=$(cut -d/ -f5 <<< "$data") aria2c "$base/$num/$name" diff --git a/fish/config.fish b/fish/config.fish index 504173c..02e8b1e 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -26,7 +26,6 @@ if tty -s bind \eo 'nnn' bind \ed 'ncdu' - bind \et 'tmux' bind \ef 'fzf | xclip -selection clipboard' starship init fish --print-full-init | source diff --git a/nvim/init.vim b/nvim/init.vim index 235926f..213ab90 100755 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -1,17 +1,18 @@ call plug#begin('~/.local/share/nvim/plugged') +Plug 'ackyshake/vimcompletesme' Plug 'airblade/vim-gitgutter' -Plug 'ajh17/vimcompletesme' Plug 'ctrlpvim/ctrlp.vim' Plug 'dense-analysis/ale' Plug 'dracula/vim' Plug 'easymotion/vim-easymotion' Plug 'godlygeek/tabular' +Plug 'lervag/vimtex' +Plug 'lukas-reineke/indent-blankline.nvim' Plug 'RobertAudi/fish.vim' Plug 'tpope/vim-commentary' Plug 'tpope/vim-sensible' Plug 'tpope/vim-surround' Plug 'vim-airline/vim-airline' -Plug 'Yggdroot/indentLine' call plug#end() se background=dark