Skip to content

Instantly share code, notes, and snippets.

@trustedtomato
Created December 28, 2019 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trustedtomato/99bac54710310e7637f6068760d14d91 to your computer and use it in GitHub Desktop.
Save trustedtomato/99bac54710310e7637f6068760d14d91 to your computer and use it in GitHub Desktop.
Open alacritty in current directory.
alacritty --working-directory $(DIR=$(xprop -id $(xprop -root '\t$0' _NET_ACTIVE_WINDOW | cut -f 2) 8t '\t$0' _NET_WM_NAME | cut -f 2 | grep -Po '(?<=:).*(?=")' | sed "s|^~|$HOME|"); if [ -d "$DIR" ]; then echo $DIR; else echo $HOME; fi)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment