more merges
This commit is contained in:
randomuser 2022-07-15 15:51:59 -05:00
commit 3a66b42d9f
5 changed files with 70 additions and 10 deletions

View File

@ -11,6 +11,7 @@ man:
sh: sh:
mkdir -p $(DESTDIR)$(PREFIX)/bin mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f sh/paste $(DESTDIR)$(PREFIX)/bin cp -f sh/paste $(DESTDIR)$(PREFIX)/bin
cp -f sh/trss $(DESTDIR)$(PREFIX)/bin
cp -f sh/disp $(DESTDIR)$(PREFIX)/bin cp -f sh/disp $(DESTDIR)$(PREFIX)/bin
cp -f sh/wallpaper $(DESTDIR)$(PREFIX)/bin cp -f sh/wallpaper $(DESTDIR)$(PREFIX)/bin
cp -f sh/yt $(DESTDIR)$(PREFIX)/bin cp -f sh/yt $(DESTDIR)$(PREFIX)/bin
@ -21,7 +22,6 @@ sh:
cp -f sh/pco $(DESTDIR)$(PREFIX)/bin cp -f sh/pco $(DESTDIR)$(PREFIX)/bin
cp -f sh/git-survey $(DESTDIR)$(PREFIX)/bin cp -f sh/git-survey $(DESTDIR)$(PREFIX)/bin
cp -f sh/vim-swap-handler $(DESTDIR)$(PREFIX)/bin cp -f sh/vim-swap-handler $(DESTDIR)$(PREFIX)/bin
cp -f sh/snownews-url-handler $(DESTDIR)$(PREFIX)/bin
cp -f sh/status $(DESTDIR)$(PREFIX)/bin cp -f sh/status $(DESTDIR)$(PREFIX)/bin
cp -f sh/statusbar $(DESTDIR)$(PREFIX)/bin cp -f sh/statusbar $(DESTDIR)$(PREFIX)/bin
cp -f sh/cfg $(DESTDIR)$(PREFIX)/bin cp -f sh/cfg $(DESTDIR)$(PREFIX)/bin
@ -36,6 +36,9 @@ sh:
cp -f sh/bspwm-toggle-gaps $(DESTDIR)$(PREFIX)/bin cp -f sh/bspwm-toggle-gaps $(DESTDIR)$(PREFIX)/bin
cp -f sh/machine $(DESTDIR)$(PREFIX)/bin cp -f sh/machine $(DESTDIR)$(PREFIX)/bin
check:
shellcheck sh/*
mkc: c/scream c/timer c/boid c/anaconda c/colors mkc: c/scream c/timer c/boid c/anaconda c/colors
c/boid: c/boid:

26
etc/southwest_tracker.py Normal file
View File

@ -0,0 +1,26 @@
import httplib2
import json
import math
import time
# fun fact: i got bored so made this on a southwest flight
while True:
request = httplib2.Http()
# you have to look in the network tab in 'inspect element', and find the '_' parameter, and paste that in
# of course, you have to be connected to southwest's onboard wifi
_param = "fill this in"
data = request.request("https://getconnected.southwestwifi.com/fp3d_fcgi-php/portal/public/index.php?_url=/index/getFile&path=last&_=" + _param)
data = json.loads(data[1])
print("-- Update --")
print("Nautical Miles: " + str(data["distanceToDestinationNauticalMiles"]))
print("Phase: " + data["presentPhase"])
print("Speed: " + str(data["groundSpeedKnots"]) + "kts")
seconds = data['timeToDestination']
minutes = math.floor(seconds / 60)
seconds = seconds % 60
print("Minutes: " + str(minutes) + " Seconds: " + str(seconds))
print("Flight Number: " + data["flightNumber"] + " Registration: " + data["tailNumber"])
time.sleep(3)
print('\033[H\033[2J')

View File

@ -1,5 +1,4 @@
#!/bin/sh #!/bin/sh
set -x
[ "$1" = "" ] && exit 1 [ "$1" = "" ] && exit 1
[ -f "$1" ] && curl -F"file=@${1}" https://ttm.sh && exit 0 [ -f "$1" ] && curl -F"file=@${1}" https://0x0.st && exit 0

View File

@ -1,7 +0,0 @@
#!/bin/sh
# tube="$(printf "%s\n" "$1" | grep "watch?v=" | wc -l)"
# [ "$tube" -eq 1 ] && mpv -v --video-sync=display-resample "$1" && exit
firefox $1
killall -10 simplestatus

39
sh/trss Executable file
View File

@ -0,0 +1,39 @@
#!/bin/sh
# get configuration & data directories
DATA="$HOME/.cache/trss"
CONFIG="$HOME/.config/trss"
# make sure these directories are in place
mkdir -p "$DATA"
mkdir -p "$CONFIG"
import_information () {
FEEDS=""
for i in "$CONFIG"/*; do
. "$i"
[ -z "$FEEDS" ] && FEEDS="$NAME" || FEEDS="$FEEDS $NAME"
done
}
synchronize () {
for i in $FEEDS; do
url="$(get_feed_attr "$i" feed)"
printf "> synchronizing feed %s via url %s\n" "$i" "$url"
curl "$url" -so "$DATA/${i}.xml"
# generate sfeed formatted file
printf "> creating sfeed compound feed file for feed %s\n" "$i"
cat "$DATA/${i}.xml" | sfeed | cat - "$DATA/${i}.sfeed" | uniq >> "$DATA/${i}.tmp.sfeed"
mv "$DATA/${i}.tmp.sfeed" "${DATA}/${i}.sfeed"
done
}
get_feed_attr () {
eval "printf '%s' \${$1_$2}"
}
import_information
synchronize
printf "%s\n" "$FEEDS"
get_feed_attr seirdy humanname