Added new fr24feed-dump1090 function
This commit is contained in:
@@ -414,7 +414,31 @@ echo "Unleaded - $costco_unleaded p"
|
||||
|
||||
## Curl Dump1090 data from scanner
|
||||
alias fr24feed="curl --http0.9 192.168.10.21:30003 --output -"
|
||||
alias fr24feed-dump1090="sh -c 'dump1090-mutability --net --net-only --net-bi-port 30004 --interactive & nc 192.168.10.21 30005 | nc 127.0.0.1 30004'
|
||||
fr24feed-dump1090() {
|
||||
# Start dump1090-mutability in the background
|
||||
dump1090-mutability --net --net-only --net-bi-port 30004 --interactive &
|
||||
DUMP1090_PID=$!
|
||||
|
||||
# Start the nc pipe in the background
|
||||
nc 192.168.10.21 30005 | nc 127.0.0.1 30004 &
|
||||
NC_PID=$!
|
||||
|
||||
# Define a cleanup function
|
||||
cleanup() {
|
||||
echo "Stopping processes..."
|
||||
kill $DUMP1090_PID $NC_PID 2>/dev/null
|
||||
wait $DUMP1090_PID $NC_PID 2>/dev/null
|
||||
echo "Exited."
|
||||
}
|
||||
|
||||
# Trap Ctrl+C (SIGINT) and call cleanup
|
||||
trap cleanup SIGINT
|
||||
|
||||
# Wait for both background processes
|
||||
wait $DUMP1090_PID
|
||||
wait $NC_PID
|
||||
}
|
||||
|
||||
"
|
||||
|
||||
## Subnet Table
|
||||
@@ -485,6 +509,17 @@ alias iplookup='iplookup-get(){ curl "ip.nclte.ch/json?ip=$1"; unset -f iplookup
|
||||
## Make random dir
|
||||
alias mkdir-random='mkdir $(cat /dev/urandom | tr -dc "a-zA-Z0-9" | fold -w 50 | head -n 1) && echo "Directory created: $(cat /dev/urandom | tr -dc "a-zA-Z0-9" | fold -w 50 | head -n 1)"'
|
||||
|
||||
function rofi-file-browser(){
|
||||
rofi -dmenu -p "Select File Manager" -i -no-fixed-num-lines <<< "File Browser"
|
||||
if [ $? -eq 0 ]; then
|
||||
mate-terminal ranger
|
||||
fi
|
||||
}
|
||||
|
||||
## Display all commands in this Alias file
|
||||
alias my-alias="cat ~/.aliases | grep -oP 'alias\s\K[^=]+' | sort -n"
|
||||
|
||||
name = "File Browser"
|
||||
command = "/path/to/rofi-file-browser.sh"
|
||||
combi-modes = ["run", "window", "file-browser"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user