Misc

UNIX

All of the mentioned packages can be downloaded using sudo apt-get install PACKAGE.

Music in terminal

Using mpv and youtube-dl we can stream a single song using

mpv https://youtu.be/JUpidCc7wwY --no-video

or shuffle a whole playlist

mpv PLAYLIST_LINK --shuffle --no-video

We can create a audio visual using vis in another terminal Visual example

Random wallpaper from folder

feh --randomize --bg-fill ~/Pictures/Wallpapers/*

Multiscreen Streaming

Automatically switch OBS streaming scene to desktop with current mouse location:

#!/bin/bash
# Whenever out mouse is past XSPLIT in the X-direction,
# A hotkey is sent to OBS to change scenes
XSPLIT=1920

# Hotkeys
LEFT='F7'
RIGHT='F8'

PAST=$RIGHT

obs | while :
do
	XCOORD=$(xdotool getmouselocation | cut -d : -f 2 | cut -d ' ' -f 1)

	if [ "$XCOORD" -lt "$XSPLIT" ] && [ "$PAST" == "$RIGHT" ]; then
		WINDOWID=$(xdotool search --name OBS | tail -1)
		xdotool key --window $WINDOWID $LEFT
		PAST=$LEFT
		echo "CHANGE LEFT"

	elif [ "$XCOORD" -gt "$XSPLIT" ] && [ "$PAST" == "$LEFT" ]
	then
		WINDOWID=$(xdotool search --name OBS | tail -1)
		xdotool key --window $WINDOWID $RIGHT
		PAST=$RIGHT
		echo "CHANGE RIGHT"
	fi
done

2020

The Origin of GW190425

11 minute read

GW190425 is the second detection of gravitational waves originating from a double neutron star inspiral, and was the topic of my honours thesis and paper.

Back to top ↑

2019

Back to top ↑