Move some more fish to bash and clean up funcs

This commit is contained in:
Phantop 2020-08-22 00:44:47 -04:00
parent 750acb4935
commit ec4baba852
10 changed files with 11 additions and 37 deletions

View File

@ -1,5 +0,0 @@
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)
xrandr --output (xrandr --listactivemonitors | tail -n1 | cut -d' ' -f5- | awk '$1=$1') --mode (cvt 1920 1080 72 | tail -n1 | cut -d' ' -f2)
end

View File

@ -1,8 +0,0 @@
# Defined in /tmp/fish.kGwYO8/addpath.fish @ line 1
function addpath -w set
if test $argv
set PATH $argv $PATH
else
set PATH (pwd) $PATH
end
end

View File

@ -1,9 +1,4 @@
# Defined in /tmp/fish.YTcC09/cpugov.fish @ line 2
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)
sudo cpupower frequency-set -g performance > /dev/null && echo Now in performance mode
end

View File

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

View File

@ -1,7 +0,0 @@
function timer
tmux new -s 0 -d 'while true
countdown 20m
notify-send Time
zenity --info --text=Time & mpv ~/Music/.break
end'
end

View File

@ -1,4 +1,3 @@
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,3 @@
function wallp -w readlink
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://(readlink -f $argv)"
end

4
.local/bin/72 Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
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)
xrandr --output $(xrandr --listactivemonitors | tail -n1 | cut -d' ' -f5- | awk '$1=$1') --mode $(cvt 1920 1080 72 | tail -n1 | cut -d' ' -f2)

2
.local/bin/addpath Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
[[ "$#" -ge 1 ]] && export PATH=$@:$PATH || export PATH=$@:$PWD

2
.local/bin/listen Executable file
View File

@ -0,0 +1,2 @@
#!/bin/bash
pactl list short modules | grep loopback && pactl unload-module module-loopback || pactl load-module module-loopback