Created
June 2, 2022 12:18
-
-
Save johackim/8fb83f7a1244d67cab09ce1b54571c09 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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