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 537B

123456789101112131415161718192021
  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 raise -N "Polybar"
  11. xdo raise -a "Polybar tray window"
  12. xdo show -N "Polybar"
  13. xdo show -a "Polybar tray window"
  14. elif [[ "$in" = "key release 133" ]]; then
  15. xdo hide -N "Polybar"
  16. xdo hide -a "Polybar tray window"
  17. fi
  18. done