1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-12-23 05:37:29 +00:00

kitty: update theme; bin: conform to POSIX

This commit is contained in:
Phantop 2022-04-13 17:24:16 -04:00
parent 6af590898a
commit 6c3c937185
10 changed files with 49 additions and 79 deletions

View file

@ -1,11 +1,11 @@
#!/bin/bash
if [[ "$#" -ge 1 ]]; then
#!/bin/sh
if [ "$#" -ge 1 ]; then
rm ~/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
if [[ "$#" -ge 1 ]]; then
nohup xwinwrap -ni -fdt -fs -- mpv -wid WID "$(cat ~/Pictures/.wallp)" --profile=wallpaper >/dev/null 2>&1 &
if [ "$#" -ge 1 ]; then
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"/Pictures/Awall/wall.png

View file

@ -13,5 +13,5 @@ sudo solbuild delete-cache
sudo rm -rf /var/lib/solbuild
sudo solbuild init -p unstable-x86_64
sudo journalctl --vacuum-size=1K
bleachbit -c `bleachbit -l|rg -v 'system.free_disk_space|transmission|system.memory|cookies'`
sudo bleachbit -c `bleachbit -l|rg -v 'system.free_disk_space|system.memory'`
bleachbit -c $(bleachbit -l|rg -v 'system.free_disk_space|transmission|system.memory|cookies')
sudo bleachbit -c $(bleachbit -l|rg -v 'system.free_disk_space|system.memory')

View file

@ -1,5 +1,5 @@
#!/bin/bash
#!/bin/sh
cook=$(mktemp)
link="https://docs.google.com/uc?export=download&id=$(cut -d/ -f6 <<< "$1")"
link="https://docs.google.com/uc?export=download&id=$(echo "$1"| cut -d/ -f6)"
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,24 +1,24 @@
#!/usr/bin/fish
set HIFI ~/Music/HiFi
set LOFI /tmp/foo
#!/bin/sh
HIFI=~/Music/HiFi
LOFI=/tmp/foo
test -f /usr/share/man/man3/Parallel::ForkManager.3 || sudo eopkg it perl-parallel-forkmanager
if test $argv
set LOFI $argv
if test $# -eq 0; then
mkdir "$LOFI"
fusermount -u "$LOFI"
ifuse --documents com.foobar2000.mobile "$LOFI"
else
mkdir $LOFI
fusermount -u $LOFI
ifuse --documents com.foobar2000.mobile $LOFI
end
LOFI=$1
fi
if not test -d $LOFI
cd $HIFI
fd -t d -x mkdir -p $LOFI/{}
fd -e flac -x opusenc --bitrate 256 {} $LOFI/{.}.opus
end
if ! test -d "$LOFI"; then
cd "$HIFI" || exit 1
fd -t d -x mkdir -p "$LOFI"/{}
fd -e flac -x opusenc --bitrate 256 {} "$LOFI"/'{.}'.opus
fi
set args -s $HIFI -d $LOFI -o opus -q 256 --clean sync -F 16 -c mp3,m4a,opus
acxi $args || wget https://github.com/smxi/acxi/raw/stable/acxi -O- -o/dev/null | perl -- - $args
# https://github.com/smxi/acxi/raw/stable/acxi
acxi -s "$HIFI" -d "$LOFI" -o opus -q 256 --clean sync -F 16 -c mp3,m4a,opus
fusermount -u $LOFI
rmdir $LOFI
fusermount -u "$LOFI"
rmdir "$LOFI"

16
bin/nse
View file

@ -1,13 +1,13 @@
#!/bin/sh
d=$(mktemp -d)
bsdtar xf "$@" -C$d
t=$(fd -e ncx . $d)
xml_grep content $t | uniq | grep content | cut -d\" -f2 |\
bsdtar xf "$@" -C"$d"
t=$(fd -e ncx . "$d")
xml_grep content "$t" | uniq | grep content | cut -d\" -f2 |\
sed -e 's#.*#<a href="&">&</a><br />#' -e 's#">[^/<]*/#">#'\
-e 's/\.xhtml/\.html/g' > $(dirname $t)/index.html
fd -e xhtml . $d -x mv {} {.}.html
if test -z $BROWSER; then
-e 's/\.xhtml/\.html/g' > "$(dirname "$t")"/index.html
fd -e xhtml . "$d" -x mv {} '{.}'.html
if test -z "$BROWSER"; then
BROWSER=netsurf
fi
eval $BROWSER $(dirname $t)/index.html
rm -rf $d
eval $BROWSER "$(dirname "$t")"/index.html
rm -rf "$d"

View file

@ -1,13 +1,13 @@
#!/bin/bash
#!/bin/sh
fd -e pdf -x cpdfsqueeze {} {}
fd -e pdf -x qpdf --stream-data=compress --replace-input --compress-streams=y --recompress-flate --compression-level=9 --optimize-images {}
fd -e png -x oxipng
fd -ejp{e,}g -x jpegoptim
fd -e png -ejp{e,}g -X pingo -s9
fd -e jpg -e jpeg -x jpegoptim
fd -e png -e jpg -e jpeg g -X pingo -s9
fd -e webp -x cwebp -z 9 -mt {} -o {}
fd -e{epub,zip,cbz,jar,docx,odt,apk} -x advzip -z2
fd -e epub -e zip -e cbz -e jar -e docx -e odt -e apk -x advzip -z2
fd -t f -x advdef -z2
fd -e mp3 -x mp3packer

View file

@ -1,7 +1,8 @@
#!/bin/bash
#!/bin/sh
# shellcheck disable=SC2086
alias s=sudo se="s eopkg -y" g=git
gnome="$(echo eog gnome-{photos,mpv,terminal} nautilus rhythmbox)"
gnome="eog gnome-photos gnome-mpv gnome-terminal nautilus rhythmbox"
se rm $gnome firefox hexchat libreoffice-common onboard thunderbird
dev="arcanist ccache git-extras llvm-clang neovim parallel qt-creator solbuild"
@ -18,6 +19,7 @@ mkdir -p ~/.parallel/will-cite
echo source ~/.config/bashrc > ~/.bashrc
ln -s ~/.config/gtk-3.0/gtkrc ~/.gtkrc-2.0
wget https://github.com/dracula/kitty/raw/master/dracula.conf -P ~/.config/kitty
un(){ F=$(mktemp); mkdir -p "$2"; curl https://api.github.com/repos/"$1"/releases |\
grep -om1 http.\*zip | wget -i- -O"$F"; unzip "$F" -d "$2";}
un bloc97/Anime4k ~/.config/mpv/shaders
@ -27,7 +29,7 @@ pip3 install adblock pipx-in-pipx readability-lxml
chsh -s "$(which fish)"
fish -c "aliases;clean"
s usermod -aG docker "$USER"
s systemctl mask tracker-{store,miner-{fs,rss,apps},extra,writeback}
s systemctl mask tracker-store tracker-miner-fs tracker-miner-rss tracker-miner-apps tracker-extra tracker-writeback
s systemctl enable --now privoxy
g g p:appdwarf ~/.appdwarf

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
fd -e pdf -x qpdf --stream-data=uncompress --replace-input --compress-streams=n --recompress-flate --compression-level=0 --optimize-images {}
fd -e \~qpdf-orig -x rm
fd -t f -x advzip -z0

View file

@ -1,6 +1,6 @@
#!/bin/bash
#!/bin/sh
data=$(curl -l "$1" | grep /d/)
base=$(cut -d/ -f1-5 <<< "${1/v/d}")
num=$(awk -F'[()]' '{print $4}' <<< "$data" | bc)
name=$(cut -d/ -f5 <<< "$data")
base=$(echo "$1" | sed s/v/d/ | cut -d/ -f1-5)
num=$(echo "$data" | awk -F'[()]' '{print $4}'| bc)
name=$(echo "$data" | cut -d/ -f5)
aria2c "$base/$num/$name"

View file

@ -1,40 +1,8 @@
font_family Ubuntu Mono
font_size 11.75
foreground #f8f8f2
include dracula.conf
background #141127
color0 #282a36
color8 #4d4d4d
color1 #ff5555
color9 #ff6e67
color2 #50fa7b
color10 #5af78e
color3 #f1fa8c
color11 #f4f99d
color4 #3c82e8
color12 #3c82e8
color5 #bd93f9
color13 #caa9fa
color6 #8be9fd
color14 #9aedfe
color7 #bfbfbf
color15 #e6e6e6
color16 #b45bcf
color17 #00f769
color18 #3a3c4e
color19 #4d4f68
color20 #62d6e8
color21 #f1f2f8
background_image ~/.config/kitty/wall.png
remember_window_size no