Skip to content

Instantly share code, notes, and snippets.

View mendess's full-sized avatar
🦀
Learning Rust

Mendes mendess

🦀
Learning Rust
  • Cloudflare
  • Portugal
View GitHub Profile
@viking
viking / i3-shell.sh
Last active March 25, 2024 16:25
Bash script for i3 to run a terminal in the same working directory as the current focused application
#!/bin/bash
# i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152
CMD=xterm
CWD=''
# Get window ID
ID=$(xdpyinfo | grep focus | cut -f4 -d " ")
# Get PID of process whose window this is