diff --git a/bin/.bin/rofi-print b/bin/.bin/dmenu/rofi-print similarity index 100% rename from bin/.bin/rofi-print rename to bin/.bin/dmenu/rofi-print diff --git a/bin/.bin/nmap/open-ports b/bin/.bin/nmap/open-ports new file mode 100755 index 00000000..f876ac36 --- /dev/null +++ b/bin/.bin/nmap/open-ports @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +IP="$1" + +if [ -n "$IP" ]; then + nmap $IP -p0- | # Get the nmap output + cut -d '/' -f1 | # + sed -n '/^[0-9]/p' +else + echo "Print an ip address" +fi diff --git a/bin/.bin/showI3Help_ b/bin/.bin/showI3Help_ deleted file mode 100755 index 332d114a..00000000 --- a/bin/.bin/showI3Help_ +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env sh - -function format0to9 { - cat - | - sed -E '/\$mod(\+Shift)?\+[1-9]/d' |\ - #sed -nE '/\$mod(\+Shift)?\+0/p' |\ - sed -E '/\$mod(\+Shift)?\+0/ { s/0/[1-9,0]/; s/10/[1-10]/g}' -} - -function formatLine { - while read line; do - if echo "$line" | grep -q "exec"; then - echo "$line" |\ - awk '{print "# "$1 "\n"; $1=$2=""; print " Runs the shell command: \n\n```bash\n" $0 "\n```\n" }' - else - echo "$line" | awk '{print "# "$1 "\n"; $1=""; print $0 "\n" }' - fi - done; -} - -cat $HOME/.dotfiles/i3/configWork |\ - #Gets lines that start with bindsym - sed -e "/^#/d" -ne "/^bindsym/p" | \ - #Remove things we dont want to show - sed 's/\(bindsym \|--whole-window \|--no-startup-id \|--release \)//g' | \ - #Hopefully self explanitory - sort |\ - #Makes Formats [0-9] - format0to9 |\ - #Goes through each line and turns it into simple markdown - formatLine |\ - #Converts markdown to groff ms - #pandoc -f markdown -t ms |\ - pandoc -f markdown -t latex -o ~/test.pdf - #Converts groff to pdf - #groff -ms - -T pdf > ~/test.pdf - #groff -ms - -T pdf |\ - #Opens PDF - #zathura - - diff --git a/bin/.bin/weather b/bin/.bin/weather index 5f99fbc0..2ed211a6 100755 --- a/bin/.bin/weather +++ b/bin/.bin/weather @@ -2,6 +2,6 @@ initial=$@ place=${initial// /+} if [[ "$place" == "" ]]; then - place="Bury+St+Edmunds" + place="Cheltenham" fi curl "wttr.in/$place" 2> /dev/null | head -n -2 diff --git a/bin/.bin/xkcd b/bin/.bin/xkcd index fd663042..4844f48e 100755 --- a/bin/.bin/xkcd +++ b/bin/.bin/xkcd @@ -10,4 +10,4 @@ else json=$(curl https://xkcd.com/$comic/info.0.json 2> /dev/null) fi echo $json | /usr/bin/jq -C -echo $json | /usr/bin/jq ".img" | xargs feh +echo $json | /usr/bin/jq ".img" | xargs sxiv