fish: acmus, dwarfmount aliases; nvim: fix tex

This commit is contained in:
Phantop 2022-01-25 11:01:04 -05:00
parent f6aa7a0e98
commit 7b8de75017
8 changed files with 17 additions and 31 deletions

View File

@ -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

View File

@ -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'

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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"

View File

@ -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

View File

@ -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