Skip to content

Instantly share code, notes, and snippets.

@Enzime
Created September 11, 2015 00:21
Show Gist options
  • Save Enzime/101a5841302c88b41874 to your computer and use it in GitHub Desktop.
Save Enzime/101a5841302c88b41874 to your computer and use it in GitHub Desktop.
osu launcher (fixes weird i3 bug with the WINE decorations not being properly removed such that they are rendered with black edges in the decorations place)
#!/bin/bash
cd /data/Games/osu\!
wine osu\!
while [ "$win" = "" ]; do
echo 'waiting for osu window'
sleep 0.05
win=$(xwininfo -children -root -all | grep osu\!cuttingedge | sed -e "s/^.*\(0x[0-9a-f]\+\).*$/\1/")
done
while [ "$relx" != "0" ]; do
echo 'waiting for correct size osu window p1'
sleep 0.05
relx=$(xwininfo -id $win | grep -A0 "Relative upper-left X:" | sed -e 's/^ *Relative upper-left X:\s\+//')
done
absx=$(xwininfo -id $win | grep -A0 "Absolute upper-left X:" | sed -e 's/^ *Absolute upper-left X:\s\+//')
echo $absx
while [ "$absx" = "0" ]; do
echo 'waiting for correct size osu window p2'
sleep 0.05
absx=$(xwininfo -id $win | grep -A0 "Absolute upper-left X:" | sed -e 's/^ *Absolute upper-left X:\s\+//')
done
# wait for osu!cuttingedge to launch then run this command!
xdotool windowsize $win 1366 768
xdotool windowmove $win 277 165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment