Created
March 5, 2018 20:35
-
-
Save Aaron-Macneill/53350c42e56a75468c501c691f153eb7 to your computer and use it in GitHub Desktop.
A script to autohide polybar using xdo and xwininfo
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/sh | |
# Get Polybar ID | |
id=$(xdo id -N "Polybar") | |
# If Polybar is viewable hide it. Otherwise, show it. | |
if xwininfo -id $id | grep -q "IsViewable"; then | |
xdo hide -N "Polybar" | |
else | |
xdo show -N "Polybar" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment