My dotfiles. Period.

123456789101112
  1. #!/bin/bash
  2. lswindows() {
  3. echo -ne "i3-ipc\x0\x0\x0\x0\x4\x0\x0\x0" \
  4. | socat STDIO "UNIX-CLIENT:$(i3 --get-socketpath)" \
  5. | tail -c +15 \
  6. | sed -e 's/"id":/\n"id":/g' \
  7. | sed -ne 's/.*"name":"\([^"]\+\)".*"window":\([0-9]\+\).*/\1 \2/p' \
  8. | grep .
  9. }
  10. lswindows