Skip to content

Instantly share code, notes, and snippets.

@Aaron-Macneill
Created March 5, 2018 20:35
Show Gist options
  • Save Aaron-Macneill/53350c42e56a75468c501c691f153eb7 to your computer and use it in GitHub Desktop.
Save Aaron-Macneill/53350c42e56a75468c501c691f153eb7 to your computer and use it in GitHub Desktop.
A script to autohide polybar using xdo and xwininfo
#!/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