1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2025-11-26 22:26:52 +00:00

Fish: set up function completion wraps

This commit is contained in:
Phantop 2020-07-21 10:57:35 -04:00
parent 3f2abc1cf8
commit dc3353b717
53 changed files with 42 additions and 68 deletions

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.73stHk/72.fish @ line 1
function 72
xrandr --newmode (cvt 1920 1080 72 | tail -n1 | cut -d' ' -f2- | tr ' ' \n | awk '$1=$1')
xrandr --addmode (xrandr --listactivemonitors | tail -n1 | cut -d' ' -f5- | awk '$1=$1') (cvt 1920 1080 72 | tail -n1 | cut -d' ' -f2)

View file

@ -1,3 +1,3 @@
function D
function D -w cd
cd $D $argv
end

View file

@ -1,5 +1,5 @@
# Defined in /tmp/fish.kGwYO8/addpath.fish @ line 1
function addpath
function addpath -w set
if test $argv
set PATH $argv $PATH
else

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.gMuQkV/ao3dl.fish @ line 2
function ao3dl
set dir (sed (math (grep -n '<title>' $argv | cut -d: -f1) + 1)!d $argv | sed -e 's/^[ \t]*//')
mkdir $dir; cd $dir

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.JkZKD9/awall.fish @ line 2
function awall
if test $argv
rm ~/Videos/.wallp

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.KfrP39/base64d.fish @ line 2
function base64d
echo (echo $argv | base64 -d 2>/dev/null)
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.0UAkY8/build.fish @ line 2
function build
s printf ''
gp

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.cSMIil/caddy.fish @ line 2
function caddy
function caddy -w python3
python3 -m http.server $argv
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.yHuNyE/dirdl.fish @ line 2
function dirdl
function dirdl -w wget
wget -r -k -p --no-parent --no-clobber -e robots=off $argv
end

View file

@ -1,4 +1,4 @@
function dl
function dl -w aria2c
if test $argv
aria2c --file-allocation=none -c -x 16 -s 16 $argv
else

View file

@ -1,3 +1,3 @@
function dot
function dot -w cd
cd ~/.dotfiles $argv
end

View file

@ -1,3 +1,3 @@
function fe
function fe -w funced
funced $argv
end

View file

@ -1,4 +1,4 @@
function ff
function ff -w fd
fd\
-E sys -E caches -E cache -E .cache -E graphicPacks -E proc -E dosdevices -E .git\
-H -d 5 -L -i $argv

View file

@ -1,3 +1,3 @@
function ffd
function ffd -w ff
ff -t d $argv
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.GyKM24/flacc.fish @ line 1
function flacc
function flacc -w flac
flac -f -8 -V $argv
end

View file

@ -1,3 +1,3 @@
function fs
function fs -w funcsave
funcsave $argv
end

View file

@ -1,3 +1,3 @@
function g
function g -w git
git $argv
end

View file

@ -1,4 +1,4 @@
# Defined in /tmp/fish.zBYqg4/giveme.fish @ line 2
function giveme
function giveme -w chown
s chown $USER $argv
end

View file

@ -1,3 +1,3 @@
function hardinfo
function hardinfo -w inxi
inxi -SPARM -GCDN -v1 -xGCRS -Fxz $argv
end

View file

@ -1,3 +1,3 @@
function l
function l -w ls
ls $argv
end

View file

@ -1,3 +1,3 @@
function la
function la -w ls
ls -a $argv
end

View file

@ -1,3 +1,3 @@
function launcher
function launcher -w rofi
rofi -combi-modi "drun,run" -show combi -modi "combi,window" -drun-icon-theme Papirus $argv
end

View file

@ -1,3 +1,3 @@
function less
function less -w eval
eval $PAGER $argv
end

View file

@ -1,4 +1,3 @@
# Defined in /home/glados/.config/fish/functions/minecraft.fish @ line 2
function minecraft
cd $D/Games/Minecraft/Game
rm (ff -e log)

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.pIfWy2/mpva.fish @ line 2
function mpva
function mpva -w mpv
mpv --no-video $argv
end

View file

@ -1,3 +1,3 @@
function murder
function murder -w killall
killall $argv -s SIGKILL
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.Qwgrvr/off.fish @ line 2
function off
function off -w shutdown
sync; shutdown $argv; exit
end

View file

@ -1,3 +1,3 @@
function offh
function offh -w math
off (math "60*"$argv)
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.QZ1PN5/pagedl.fish @ line 2
function pagedl
function pagedl -w wget
wget -H -k -p --no-clobber -e robots=off $argv
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.Og3Yo4/podsync.fish @ line 2
function podsync
cd $D/Videos/YouTube/
./clean

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.aALkPB/qb.fish @ line 2
function qb
function qb -w qutebrowser
qutebrowser $argv --target auto & disown
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.QXVsWf/re.fish @ line 2
function re
sync; systemctl reboot -i
end

View file

@ -1,3 +1,3 @@
function s
function s -w sudo
sudo $argv
end

View file

@ -1,3 +1,3 @@
function se
function se -w eopkg
s eopkg $argv
end

View file

@ -1,3 +1,3 @@
function seh
function seh -w eopkg
s eopkg history $argv
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.ozWZUL/squash.fish @ line 2
function squash
mksquashfs . ../(basename (pwd))Squash -comp zstd -b 1M -Xcompression-level 22
function squash -w mksquashfs
mksquashfs . ../(basename (pwd))Squash -comp zstd -b 1M -Xcompression-level 22 $argv
end

View file

@ -1,3 +1,3 @@
function sumurder
function sumurder -w killall
s killall $argv -s SIGKILL
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.7kzeFd/supath.fish @ line 1
function supath
function supath -w env
sudo env "PATH=$PATH" $argv
end

View file

@ -1,3 +1,3 @@
function ta
function ta -w math
tmux attach -t (math 0 + "0$argv")
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.E3u1iE/timer.fish @ line 2
function timer
tmux new -s 0 -d 'while true
countdown 20m

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.xDL739/up.fish @ line 2
function up
se up --y
end

View file

@ -1,3 +1,3 @@
function v
function v -w nvim
nvim $argv
end

View file

@ -1,3 +1,3 @@
function vi
function vi -w nvim
nvim $argv
end

View file

@ -1,3 +1,3 @@
function wallb
function wallb -w wallo
wallo $argv -blur 0x8
end

View file

@ -1,4 +1,4 @@
function wallo
function wallo -w convert
rm ~/.config/wall0
convert $argv -resize (xrandr | grep '*'| grep -o [0-9]\*x[0-9]\*) ~/.config/wall0
end

View file

@ -1,4 +1,4 @@
function wallp
function wallp -w readlink
set -l i (readlink -f $argv)
gsettings set org.gnome.desktop.background picture-uri "file://$i"
end

View file

@ -1,3 +0,0 @@
function wiimote
sudo modprobe -r hid-wiimote
end

View file

@ -1,3 +1,3 @@
function wm
function wm -w startx
startx (which $argv[1]) $argv[2..-1]
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.83qvw2/xcompress.fish @ line 2
function xcompress
if test -d $argv
tar -cf $argv.tar $argv

View file

@ -1,3 +1,3 @@
function xsquash
mksquashfs . ../(basename (pwd))Squash -comp xz -b 1M -Xdict-size 1M
function xsquash -w mksquashfs
mksquashfs . ../(basename (pwd))Squash -comp xz -b 1M -Xdict-size 1M $argv
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.Cfc1Xs/ydl.fish @ line 2
function ydl
function ydl -w youtube-dl
youtube-dl --continue --ignore-errors --no-overwrites --write-sub --embed-subs -o '%(title)s.%(ext)s' $argv
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.nB8upe/ydl4.fish @ line 2
function ydl4 --description 'alias ydl4 ydl --format mp4'
function ydl4 -w ydl
ydl --format mp4 $argv;
end

View file

@ -1,4 +1,3 @@
# Defined in /tmp/fish.PGT46K/zcompress.fish @ line 2
function zcompress
if test -d $argv
tar -cf $argv.tar $argv