My personal dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

autohide 463B

12345678910111213141516171819
  1. #!/bin/bash
  2. # Check if xdo is installed
  3. xdo_path=$(which xdo)
  4. if [ $? -ne 0 ]; then
  5. echo "Cannot find \`xdo\` command." 1>&2
  6. exit 1
  7. fi
  8. xinput test AT\ Translated\ Set\ 2\ keyboard | while read -r in ; do
  9. if [[ "$in" = "key press 133" ]]; then
  10. xdo show -N "Polybar"
  11. xdo show -a "Polybar tray window"
  12. elif [[ "$in" = "key release 133" ]]; then
  13. xdo hide -N "Polybar"
  14. xdo hide -a "Polybar tray window"
  15. fi
  16. done