1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2025-11-28 07:06:37 +00:00

Fish: More function cleanup

This commit is contained in:
Phantop 2019-04-07 23:03:58 -04:00
parent 0cd388fe68
commit 6460d33152
39 changed files with 89 additions and 84 deletions

View file

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

View file

@ -1,12 +1,12 @@
function build function build
s printf \ s printf \
gp gp
./autogen.sh ./autogen.sh
./configure --prefix=/usr ./configure --prefix=/usr
cmake -DCMAKE_INSTALL_PREFIX=/usr . cmake -DCMAKE_INSTALL_PREFIX=/usr .
make make
s make install s make install
meson --prefix=/usr build meson --prefix=/usr build
ninja -C build ninja -C build
sudo ninja -C build install sudo ninja -C build install
end end

View file

@ -1,3 +1,4 @@
# Defined in /tmp/fish.pCCKfo/cd.fish @ line 2
function cd function cd
builtin cd (realpath $argv) builtin cd (realpath $argv 2> /dev/null)
end end

View file

@ -1,16 +1,16 @@
function clean function clean
s printf \ s printf \
fc-cache -f -v fc-cache -f -v
se clean -y se clean -y
se dc -y se dc -y
se rmo -y se rmo -y
se rdb -y se rdb -y
s journalctl --vacuum-size=1K s journalctl --vacuum-size=1K
bleachbit -c (bleachbit -l|grep -Ev 'system.free_disk_space|transmission|system.memory') bleachbit -c (bleachbit -l|grep -Ev 'system.free_disk_space|transmission|system.memory')
s bleachbit -c (bleachbit -l|grep -Ev 'system.free_disk_space|transmission|system.memory') s bleachbit -c (bleachbit -l|grep -Ev 'system.free_disk_space|transmission|system.memory')
rm -r ~/.cache/* rm -r ~/.cache/*
rm -r ~/.nv/* rm -r ~/.nv/*
rm -r ~/.local/share/nvim/swap/ rm -r ~/.local/share/nvim/swap/
rm -r $D/Games/Emulators/*/canary rm -r $D/Games/Emulators/*/canary
rm -r $D/Games/Emulators/*/*og* rm -r $D/Games/Emulators/*/*og*
end end

View file

@ -1,9 +1,9 @@
function cpugov function cpugov
echo -e "The current state is "(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) echo -e "The current state is "(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
if [ (cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) != "performance" ] if [ (cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) != "performance" ]
s -i cpupower frequency-set -g performance >/dev/null s -i cpupower frequency-set -g performance >/dev/null
else else
s cpupower frequency-set -g powersave >/dev/null s cpupower frequency-set -g powersave >/dev/null
end end
echo -e "The current state is "(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) echo -e "The current state is "(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
end end

View file

@ -1,7 +1,7 @@
function dl function dl
if test $argv if test $argv
aria2c --file-allocation=none -c -x 16 -s 16 $argv aria2c --file-allocation=none -c -x 16 -s 16 $argv
else else
cd ~/Downloads/ cd ~/Downloads/
end end
end end

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
function fish_user_key_bindings function fish_user_key_bindings
bind \co 'fff' bind \co 'fff'
bind \eo 'cd (ffd | fzf)' bind \eo 'cd (ffd | fzf)'
bind \ed 'ncdu' bind \ed 'ncdu'
bind \eg 'git log; git status' bind \eg 'git log; git status'
end end

View file

@ -1,9 +1,9 @@
function fruitdl function fruitdl
cd $D/Games/Emulators/$argv[2] cd $D/Games/Emulators/$argv[2]
rm -r $argv[1] rm -r $argv[1]
set file (curl -sL github.com/$argv[2]-emu/$argv[2]-$argv[1]/releases/latest| grep -om1 $argv[2]-emu/$argv[2]-$argv[1]/releases/download/$argv[1]-[0-9]\*/$argv[2]-linux-[0-9]\*-[0-9a-f]\*).7z set file (curl -sL github.com/$argv[2]-emu/$argv[2]-$argv[1]/releases/latest| grep -om1 $argv[2]-emu/$argv[2]-$argv[1]/releases/download/$argv[1]-[0-9]\*/$argv[2]-linux-[0-9]\*-[0-9a-f]\*).7z
dl http://github.com/$file dl http://github.com/$file
set file (basename $file) set file (basename $file)
7z x $file 7z x $file
rm $file rm $file
end end

View file

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

View file

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

View file

@ -1,3 +1,3 @@
function ga function ga
git commit -a $argv; git commit -a $argv
end end

View file

@ -1,3 +1,3 @@
function gad function gad
git add $argv; git add $argv
end end

View file

@ -1,3 +1,3 @@
function gb function gb
git branch $argv; git branch $argv
end end

View file

@ -1,3 +1,3 @@
function gc function gc
git commit $argv; git commit $argv
end end

View file

@ -1,3 +1,3 @@
function gca function gca
git commit --amend $argv; git commit --amend $argv
end end

View file

@ -1,3 +1,3 @@
function gch function gch
git checkout $argv; git checkout $argv
end end

View file

@ -1,3 +1,3 @@
function gg function gg
git clone $argv; git clone $argv
end end

View file

@ -1,5 +1,5 @@
function giveme function giveme
for i in (ff) for i in (ff)
s chown $USER $i s chown $USER $i
end end
end end

View file

@ -1,3 +1,3 @@
function gl function gl
git log $argv; git log $argv
end end

View file

@ -1,3 +1,3 @@
function gp function gp
git pull $argv; git pull $argv
end end

View file

@ -1,3 +1,3 @@
function gpu function gpu
git push $argv; git push $argv
end end

View file

@ -1,3 +1,3 @@
function gpuf function gpuf
git push -f $argv; git push -f $argv
end end

View file

@ -1,3 +1,3 @@
function gs function gs
git status $argv; git status $argv
end end

View file

@ -1,4 +1,4 @@
function gsu function gsu
git submodule update --init --recursive git submodule update --init --recursive
git submodule foreach git pull origin master git submodule foreach git pull origin master
end end

View file

@ -1,7 +1,7 @@
function gupall function gupall
for i in * for i in *
cd $i cd $i
git pull git pull
cd .. cd ..
end end
end end

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
function listen function listen
if pactl list short modules | grep loopback if pactl list short modules | grep loopback
pactl unload-module module-loopback pactl unload-module module-loopback
else else
pactl load-module module-loopback pactl load-module module-loopback
end end
end end

View file

@ -1,4 +1,4 @@
function mcs function mcs
cd $D/Games/Minecraft/Server cd $D/Games/Minecraft/Server
java -Xmx8G -Xms1G -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:ParallelGCThreads=4 -jar server.jar nogui java -Xmx8G -Xms1G -XX:+UseG1GC -XX:MaxGCPauseMillis=50 -XX:ParallelGCThreads=4 -jar server.jar nogui
end end

View file

@ -1,7 +1,7 @@
function motherfuckgit function motherfuckgit
git clean -xfd git clean -xfd
git submodule foreach --recursive git clean -xfd git submodule foreach --recursive git clean -xfd
git reset --hard git reset --hard
git submodule foreach --recursive git reset --hard git submodule foreach --recursive git reset --hard
git submodule update --init --recursive git submodule update --init --recursive
end end

View file

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

View file

@ -1,3 +1,3 @@
function sou function sou
cd $D/Source $argv; cd $D/Source $argv
end end

View file

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

View file

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

View file

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