1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2025-01-23 21:16:45 +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
cd $D $argv;
cd $D $argv
end

View file

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

View file

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

View file

@ -1,16 +1,16 @@
function clean
s printf \
fc-cache -f -v
se clean -y
se dc -y
se rmo -y
se rdb -y
s journalctl --vacuum-size=1K
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 ~/.nv/*
rm -r ~/.local/share/nvim/swap/
rm -r $D/Games/Emulators/*/canary
rm -r $D/Games/Emulators/*/*og*
s printf \
fc-cache -f -v
se clean -y
se dc -y
se rmo -y
se rdb -y
s journalctl --vacuum-size=1K
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 ~/.nv/*
rm -r ~/.local/share/nvim/swap/
rm -r $D/Games/Emulators/*/canary
rm -r $D/Games/Emulators/*/*og*
end

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,9 +1,9 @@
function fruitdl
cd $D/Games/Emulators/$argv[2]
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
dl http://github.com/$file
set file (basename $file)
7z x $file
rm $file
cd $D/Games/Emulators/$argv[2]
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
dl http://github.com/$file
set file (basename $file)
7z x $file
rm $file
end

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
function mcs
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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
function wallp
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