Machine: HP Pavilion dm1 (64bit) RAM 4GB Display 1366x768 pixels
Distro: DPup(32bit)-7.5 Stretch
How do I position a startup app on the desktop in the position I choose?
Do I change the code in the app (in this case OSMO)?
Is this the correct code to change?
Or is there an easier way?
Location of app placed in startup: /user/bin/osmo
Code: Select all
#!/bin/bash
killall osmo 2>/dev/null
SCRNXY=$(xwininfo -root | grep -o '\-geometry .*' | tr -s ' ' | cut -f 2 -d ' ' | cut -f 1 -d '+')
SCRN_X=$(echo -n "$SCRNXY" | cut -f 1 -d 'x')
SCRN_Y=$(echo -n "$SCRNXY" | cut -f 2 -d 'x')
GUI_X=$(expr $SCRN_X - 540)
GUI_Y=$(expr $SCRN_Y - 600)
sed -i "s/^.*window_x.*$/ <window_x>$GUI_X<\/window_x>/" $HOME/.osmo/config.xml
sed -i "s/^.*window_y.*$/ <window_y>$GUI_Y<\/window_y>/" $HOME/.osmo/config.xml
osmo