diff options
author | Adam T. Carpenter <atc@sparrowhawk.53hor.net> | 2020-05-13 17:54:18 -0400 |
---|---|---|
committer | Adam T. Carpenter <atc@sparrowhawk.53hor.net> | 2020-05-13 17:54:18 -0400 |
commit | 31d0c02b0c7644d524f6f7a48af3dd1a65abaa2c (patch) | |
tree | efe83835c5372978d2bb735f7a1c766881f9aeb7 | |
parent | 212b87cd003505f0414b8c3cc538c715f8c33df6 (diff) | |
download | scripts-31d0c02b0c7644d524f6f7a48af3dd1a65abaa2c.tar.xz scripts-31d0c02b0c7644d524f6f7a48af3dd1a65abaa2c.zip |
renamed and deleted old scripts
-rwxr-xr-x | compiz-install.sh | 8 | ||||
-rwxr-xr-x | dmenu-ssid.sh | 12 | ||||
-rwxr-xr-x | do_gen_gif | 21 | ||||
-rwxr-xr-x | docked.sh | 1 | ||||
-rwxr-xr-x | dwm-fkeys.sh | 18 | ||||
-rwxr-xr-x | dwm-launch.sh | 19 | ||||
-rwxr-xr-x | dwm-status.sh | 12 | ||||
-rwxr-xr-x | findport.sh | 4 | ||||
-rwxr-xr-x | gen_base64key.sh (renamed from do_gen_base64key) | 0 | ||||
-rwxr-xr-x | gen_favicon | 2 | ||||
-rwxr-xr-x | gen_favicon.sh (renamed from do_gen_favicon) | 0 | ||||
-rwxr-xr-x | gen_meme.sh (renamed from do_gen_meme) | 0 | ||||
-rwxr-xr-x | giffeinate.sh (renamed from giffeinate) | 0 | ||||
-rwxr-xr-x | i3blocks-cpuload.sh | 8 | ||||
-rwxr-xr-x | i3blocks-memory.sh | 2 | ||||
-rwxr-xr-x | mounter.sh (renamed from mounter) | 0 | ||||
-rwxr-xr-x | mutt-open.sh (renamed from open-with-mutt) | 0 | ||||
-rwxr-xr-x | ripper.sh (renamed from ripper) | 0 | ||||
-rwxr-xr-x | split_cert.sh (renamed from do_split_cert) | 0 | ||||
-rwxr-xr-x | status.sh | 8 | ||||
-rwxr-xr-x | undocked.sh | 1 | ||||
-rwxr-xr-x | unmounter.sh (renamed from umounter) | 0 | ||||
-rwxr-xr-x | yt-player.sh (renamed from yt) | 0 |
23 files changed, 12 insertions, 104 deletions
diff --git a/compiz-install.sh b/compiz-install.sh deleted file mode 100755 index 6625de6..0000000 --- a/compiz-install.sh +++ /dev/null @@ -1,8 +0,0 @@ -cd /tmp -mkdir aur -cd aur -wget https://aur.archlinux.org/cgit/aur.git/snapshot/compiz-core.tar.gz -tar xzvf compiz-core.tar.gz -cd compiz-core -makepkg -rs -sudo pacman -U compiz*.xz diff --git a/dmenu-ssid.sh b/dmenu-ssid.sh deleted file mode 100755 index fdffc02..0000000 --- a/dmenu-ssid.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -prompt=$(ifconfig | egrep -o '"(.*)"') -ssids=$(ifconfig wlan0 scan | cut -c 1-32 | awk 'NF' ) - - - -ssid=$( -dmenu -c -l 10 -p "$prompt" << EOF -$ssids -EOF -) diff --git a/do_gen_gif b/do_gen_gif deleted file mode 100755 index bcd3b0c..0000000 --- a/do_gen_gif +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# Turn video files on STDIN into GIFs. - -FPS=${FPS:-10} -SCALE=${SCALE:-480} - -while [ $1 ] -do - BASENAME=$(echo $1 | cut -d'.' -f1) - FRAMEDIR=/tmp/$BASENAME-frames-$(date +%s) - - mkdir -p $FRAMEDIR - echo Writing frames... - ffmpeg -loglevel quiet -i $1 -vf scale=-1:$SCALE,fps=$FPS $FRAMEDIR/%05d.png - echo Creating GIF... - convert -loop 0 $FRAMEDIR/*.png $BASENAME.gif - rm -r $FRAMEDIR - echo Done. - shift -done @@ -1,2 +1,3 @@ #!/bin/sh +xrandr xrandr --output VGA-0 --mode 1024x768 --pos 1920x312 --rotate normal --dpi 82 --output DP-0 --off --output DP-1 --off --output DP-2 --off --output DP-3 --primary --mode 1920x1080 --pos 0x0 --rotate normal --dpi 96 --output DP-4 --off diff --git a/dwm-fkeys.sh b/dwm-fkeys.sh deleted file mode 100755 index c656161..0000000 --- a/dwm-fkeys.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -choice=$( -dmenu -l 12 -i -b -p [Fn]: << EOF -F1: File Manager [Sleep] -F2: Wifi Scanner -F3: Browser -F4: Email -F5: Brightness Down -F6: Brightness Up -F7: Unused [Blank Screen] -F8: Mounter [Unmounter] -F9: Unused -F10: Unused [Vol Mute] -F11: Unused [Vol Down] -F12: Unused [Vol Up] -EOF -) diff --git a/dwm-launch.sh b/dwm-launch.sh deleted file mode 100755 index 62e4eba..0000000 --- a/dwm-launch.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -compton -cCGb -feh --bg-fill /var/wallpaper -xrdb ~/.Xresources -xautolock -locker ~/source/scripts/slock-fortune.sh & -~/source/scripts/dwm-status.sh & - -logfile="/var/log/dwm.log" - -while true; do - - if [ -O $logfile ]; then - dwm 2> $logfile - else - dwm 2>&1 > /dev/null - fi - -done diff --git a/dwm-status.sh b/dwm-status.sh deleted file mode 100755 index 52ad773..0000000 --- a/dwm-status.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -while true -do - date=$(date "+%a %b %d %I:%M %p") - batt=$(acpiconf -i 0 | egrep -o "([0-9]+%)") - disk=$(df -H | awk '{ if ($6 == "/") print $4 }') - #ssid=$(ifconfig | egrep -o '*ssid (.*) ') - idle=$(top -n | egrep -o '[0-9]+\.[0-9]% idle') - xsetroot -name "$ssid $idle $disk free $batt charged $date" - sleep 5 -done diff --git a/findport.sh b/findport.sh new file mode 100755 index 0000000..9aa11d9 --- /dev/null +++ b/findport.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +find /usr/local/poudriere/ports/default -type d -name "*$1*" + diff --git a/do_gen_base64key b/gen_base64key.sh index fd4eab5..fd4eab5 100755 --- a/do_gen_base64key +++ b/gen_base64key.sh diff --git a/gen_favicon b/gen_favicon deleted file mode 100755 index b65950a..0000000 --- a/gen_favicon +++ /dev/null @@ -1,2 +0,0 @@ -convert -define icon:auto-resize=72,64,48,32,16 logo.png -thumbnail "72x72>" \ - -background transparent -gravity center -extent 64x64 favicon.ico diff --git a/do_gen_favicon b/gen_favicon.sh index a7bbc66..a7bbc66 100755 --- a/do_gen_favicon +++ b/gen_favicon.sh diff --git a/do_gen_meme b/gen_meme.sh index 258dba8..258dba8 100755 --- a/do_gen_meme +++ b/gen_meme.sh diff --git a/giffeinate b/giffeinate.sh index 8e59600..8e59600 100755 --- a/giffeinate +++ b/giffeinate.sh diff --git a/i3blocks-cpuload.sh b/i3blocks-cpuload.sh index 8d61815..dd30311 100755 --- a/i3blocks-cpuload.sh +++ b/i3blocks-cpuload.sh @@ -1,16 +1,18 @@ #!/bin/sh -cpu_count=4 low=25 high=75 icon_low= icon_mid= icon_high= -#min_avg_usage=$(vmstat | tail -1 | cut -w -f17) +cpu_count=$(sysctl -n hw.ncpu) avg_load=$(sysctl vm.loadavg | cut -w -f3) percent=$(echo "result = $avg_load / $cpu_count * 100; scale=0; result / 1" | bc -l) +mhz=$(sysctl -n dev.cpu.0.freq) +ghz=$(echo "result = $mhz / 1000; scale=1; result / 1" | bc -l) + [ $percent -lt $low ] && printf $icon_low [ $percent -ge $low ] && [ $percent -lt $high ] && printf $icon_mid [ $percent -ge $high ] && printf $icon_high -printf " %s%%\n" $percent +printf " %s%% %s GHz\n" $percent $ghz diff --git a/i3blocks-memory.sh b/i3blocks-memory.sh index e40c2df..308b2b1 100755 --- a/i3blocks-memory.sh +++ b/i3blocks-memory.sh @@ -1,4 +1,4 @@ #!/bin/sh icon= -printf "$icon %s\n" $(vmstat -h | tail -1 | cut -w -f5) +printf "$icon %s\n" $(top -d 1 | grep Mem | cut -w -f2) diff --git a/open-with-mutt b/mutt-open.sh index 162c4cf..162c4cf 100755 --- a/open-with-mutt +++ b/mutt-open.sh diff --git a/do_split_cert b/split_cert.sh index 0c58142..0c58142 100755 --- a/do_split_cert +++ b/split_cert.sh diff --git a/status.sh b/status.sh deleted file mode 100755 index aa23534..0000000 --- a/status.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -date=$(date "+%a %b %d %I:%M %p") -batt=$(acpi -b | awk -F ', ' '{ print $2 }') -disk=$(df -H | awk '{ if ($6 == "/") print $4 }') -#ssid=$(ifconfig | egrep -o '*ssid (.*) ') -#idle=$(top -n | egrep -o '[0-9]+\.[0-9]% idle') -echo "$ssid $idle $disk free | $batt charged | $date" diff --git a/undocked.sh b/undocked.sh index ec2c9f3..b0f24c9 100755 --- a/undocked.sh +++ b/undocked.sh @@ -1,2 +1,3 @@ #!/bin/sh +xrandr xrandr --output VGA-0 --off --output DP-0 --off --output DP-1 --off --output DP-2 --off --output DP-3 --primary --mode 1920x1080 --pos 0x0 --rotate normal --dpi 96 --output DP-4 --off |