mirror of
https://github.com/Phantop/dotfiles
synced 2024-11-21 22:32:46 +00:00
fish: wallcat, dicts
This commit is contained in:
parent
71b031d30e
commit
fe56cdafa8
|
@ -32,7 +32,7 @@ set -U fish_color_valid_path --underline
|
|||
set -U fish_pager_color_prefix 'white' '--bold' '--underline'
|
||||
|
||||
curl -sL https://git.io/fisher | source
|
||||
fisher install {jorgebucaran/replay,PatrickF1/fzf}.fish
|
||||
fisher install {jorgebucaran/replay,PatrickF1/fzf,mattmc3/dict}.fish
|
||||
|
||||
ln -s /usr/share/autojump/autojump.fish ~/.config/fish/conf.d
|
||||
ln -s /opt/homebrew/share/autojump/autojump.fish ~/.config/fish/conf.d/autojump.mac.fish
|
||||
|
@ -101,6 +101,7 @@ a vwhich 'v (which $argv);:'
|
|||
a wallp 'gsettings set org.gnome.desktop.background picture-uri file://(realpath $argv);:'
|
||||
a ya 'yay -a'
|
||||
a ydl 'yt-dlp'
|
||||
a ydlh 'ydl -S height:$argv[1] $argv[2..-1];:'
|
||||
|
||||
a 7zstd '7z a -m0=zstd -mx22 -mmt=8 -mfb=273 -md=1536m -ms=on (realpath $argv[1]).7z'
|
||||
a compress '7z a -m0=flzma2 -mx9 -mmt=8 -mfb=273 -md=1536m -ms=on (realpath $argv[1]).7z'
|
||||
|
|
27
bin/wallcat
Executable file
27
bin/wallcat
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/fish
|
||||
set offset 0
|
||||
set 1 $argv[1]
|
||||
set 2 $argv[2]
|
||||
if test $argv[3]
|
||||
set offset $argv[3]
|
||||
end
|
||||
|
||||
set h1 (identify -format %h "$1")
|
||||
set h2 (identify -format %h "$2")
|
||||
|
||||
if test $h1 -ne $h2
|
||||
exit
|
||||
end
|
||||
|
||||
|
||||
set w1 (identify -format %w "$1")
|
||||
set w2 (identify -format %w "$2")
|
||||
set drop (math $w1+$offset)
|
||||
set width (math $drop+$w2)
|
||||
|
||||
set out "$(dirname "$1")/tran_$(basename "$1")"
|
||||
set work (mktemp)
|
||||
|
||||
jpegtran -outfile $work -crop $width $1
|
||||
jpegtran -outfile $out -drop +$drop $2 $work
|
||||
rm $work
|
|
@ -1,5 +1,5 @@
|
|||
function ytfluxfix
|
||||
set instances (curl https://api.invidious.io/instances.json | jq -r '.[] | select(.[1].type == "https" and .[1].monitor.uptime == 100) [0]')
|
||||
set instances (curl https://api.invidious.io/instances.json | jq -r '.[] | select(.[1].type == "https" and .[1].monitor.uptime > 99) [0]')
|
||||
for i in (eval curl (cat ~/.config/miniflux)/categories/3/feeds | jq -rc '.[] | select(.parsing_error_count!=0)' | head -n15)
|
||||
set url (trurl -s host=(random choice $instances) (echo $i | jq -r .feed_url))
|
||||
set id (echo $i | jq -r .id)
|
||||
|
|
Loading…
Reference in a new issue