Skip to content

Instantly share code, notes, and snippets.

@tyjak
Last active March 28, 2020 22:12
Show Gist options
  • Save tyjak/08bc835c2b5b6b99eea0730bcc0dfcc6 to your computer and use it in GitHub Desktop.
Save tyjak/08bc835c2b5b6b99eea0730bcc0dfcc6 to your computer and use it in GitHub Desktop.
i3wm move terminal to a workspace based on current path
#!/bin/sh
# command to move terminal in a workspace
# useful in conjonction with direnv
# when you change to directory that have a .envrc with the workspace command, the
# terminal automove to the predifined workspace specified in the .envrc
# how to use: simply put `workspace {name of the workspace}"` in the .envrc file !!!
i3-msg "move --no-auto-back-and-forth container to workspace $1; workspace --no-auto-back-and-forth $1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment