Skip to content

Instantly share code, notes, and snippets.

@johackim
Created June 2, 2022 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johackim/8fb83f7a1244d67cab09ce1b54571c09 to your computer and use it in GitHub Desktop.
Save johackim/8fb83f7a1244d67cab09ce1b54571c09 to your computer and use it in GitHub Desktop.
#!/bin/bash
export DISPLAY=:0
export XAUTHORITY=/home/johackim/.Xauthority
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
export APPNAME=obsidian
export WIDTH=$(xdpyinfo | grep dimensions: | awk '{print $2}' | cut -d 'x' -f1)
export HEIGHT=$(xdpyinfo | grep dimensions: | awk '{print $2}' | cut -d 'x' -f2)
for ID in $(xdotool search --name $APPNAME); do
xdotool windowsize $ID $WIDTH $HEIGHT
xdotool windowmove $ID 0 0
done;
# wmctrl -r $APPNAME -b toggle,fullscreen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment