Skip to content

Instantly share code, notes, and snippets.

@m-bartlett
Created May 17, 2022 19:56
Show Gist options
  • Save m-bartlett/a59baa84034425d4207c11c1eeaa311c to your computer and use it in GitHub Desktop.
Save m-bartlett/a59baa84034425d4207c11c1eeaa311c to your computer and use it in GitHub Desktop.
A script to automatically click the nm-applet tray icon so activating the menu can be bound to a keyboard shortcut (requires xdotool)
#!/usr/bin/env bash
declare $(xdotool getmouselocation --shell)
declare _X=$X _Y=$Y
declare $(xdotool getwindowgeometry --shell $(xdotool search --class nm-applet | tail -1))
xdotool \
mousemove $X $Y \
mousemove_relative 7 7 \
click 1 \
mousemove $_X $_Y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment