diff options
author | InigoGutierrez <inigogf.95@gmail.com> | 2019-03-12 20:29:37 +0100 |
---|---|---|
committer | InigoGutierrez <inigogf.95@gmail.com> | 2019-03-12 20:29:37 +0100 |
commit | 02308076e833029cb84467e1773aacbac8ae1f0a (patch) | |
tree | 33135f924a98b14e4e328b08a4d2a07dd96b4ffc | |
parent | 7271354955d686d5ea7e698542f7afb4864746ee (diff) | |
download | scripts-02308076e833029cb84467e1773aacbac8ae1f0a.tar.gz scripts-02308076e833029cb84467e1773aacbac8ae1f0a.zip |
Simple changes to some scripts.
-rwxr-xr-x | i3blocks/i3internet.sh | 13 | ||||
-rwxr-xr-x | i3lock.sh | 4 | ||||
-rwxr-xr-x | screenshot.sh | 3 | ||||
-rwxr-xr-x | selectPath.sh | 7 |
4 files changed, 19 insertions, 8 deletions
diff --git a/i3blocks/i3internet.sh b/i3blocks/i3internet.sh index ab26611..1523c9b 100755 --- a/i3blocks/i3internet.sh +++ b/i3blocks/i3internet.sh @@ -11,14 +11,17 @@ if [ $wstatus = "down" ]; then wifi="❌" else # with IP - wifi="$(nmcli | grep "wlp2s0: conectado to " | cut -d' ' -f4-) ($(ip addr show wlp2s0 | grep "inet " | cut -d' ' -f6)) ($(grep "^\s*w" /proc/net/wireless | awk '{print int($3 * 100 / 70)"%"}'))" - # no IP - #wifi="$(nmcli | grep "wlp2s0: conectado to " | cut -d' ' -f4-) ($(grep "^\s*w" /proc/net/wireless | awk '{print int($3 * 100 / 70)"%"}'))" + #wifi="✔️$(nmcli | grep "wlp2s0: connected to " | cut -d' ' -f4-) ($(ip addr show wlp2s0 | grep "inet " | cut -d' ' -f6)) ($(grep "^\s*w" /proc/net/wireless | awk '{print int($3 * 100 / 70)"%"}'))" + # with name + wifi="✔️ $(nmcli | grep "wlp2s0: connected to " | cut -d' ' -f4-) ($(grep "^\s*w" /proc/net/wireless | awk '{print int($3 * 100 / 70)"%"}'))" fi if [ $estatus = "down" ]; then en="❌" else - en=$(ip addr show enp3s0 | grep "inet " | cut -d' ' -f6) + # with IP + #en=$(ip addr show enp3s0 | grep "inet " | cut -d' ' -f6) + # no IP + en=✔️ fi -echo "📶$wifi 🌐$en" +echo "📶$wifi 🌐$en" @@ -2,8 +2,8 @@ # Generates an i3lock bg based on a screenshot. -imgLock="$HOME/images/padlock.png" +imgLock="$HOME/images/padlocks.png" imgFinal="/tmp/lockFinal$(date +"%H%M%S").png" maim /tmp/i3lockss.png -convert /tmp/i3lockss.png -paint 1 -swirl -20 "$imgLock" -gravity center -composite "$imgFinal" +convert /tmp/i3lockss.png -paint 1 -swirl -120 "$imgLock" -gravity center -composite "$imgFinal" i3lock -i "$imgFinal" -f diff --git a/screenshot.sh b/screenshot.sh index 21f490a..cb911c4 100755 --- a/screenshot.sh +++ b/screenshot.sh @@ -4,4 +4,5 @@ name="$(date +"%y%m%d_%H%M%S")".png file="$HOME/images/screenshots/""$name" -maim -m 8 $file && notify-send -t 800 "Screenshot $name taken." +[ "$1" = "" ] && maim -m 8 $file && notify-send -t 800 "Screenshot $name taken." +[ "$1" = "-a" ] && maim -s -b 2 -c 0.412,0.431,1 -m 8 $file && notify-send -t 800 "Screenshot $name taken." diff --git a/selectPath.sh b/selectPath.sh new file mode 100755 index 0000000..5de2af8 --- /dev/null +++ b/selectPath.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +# Reads ~/.paths and uses dmenu to echo a path. + +[ -z "$1" ] && prompt="Choose a path:" || prompt="$1" +echo "$(cat $HOME/.paths | dmenu -l $(cat $HOME/.paths | wc -l) -p "$prompt" | awk '{print $3}')" + |