For example, to change between panes, you can use Ctrl + b, arrow-key. In the future I’d like to look at styling TMUX, there are some awesome examples on /r/unixporn. As for navigation, the default for Tmux is to use Ctrl + b, then the action button. Hopefully the comments should be self explanatory, there are a lot more things I could do here but starting off simple is the way to go for me. # reload config file (change file location to your the nf you want to use) # switch panes using Alt-arrow without prefix Set-window-option -g monitor-activity off Here are some of my specific configuration in ~/.nf # Use mouse like a peasant I’m not really going to go into the depths of using of using TMUX - this post by Hermann Vocke does a much better job than I can explaining the cool things you can do. The config uses YAML which is nice and human readable and you can add your config files to a gist or dotfile repo if you want. The reason I use Tmuxinator is it’s a great way to set environment setups that persist through reboot. Installation - TMUX # sudo apt upgradeĭone Installation - Tmuxinator # gem install tmuxinator It’s not until the past few weeks where I’ve spent most of my time in the terminal for various projects that I’ve really felt the need to dig in and learn the basics. I never got into Alfred, but there clearly is fancy stuff you can do with it.I’ve known about TMUX for a few years now but never got around to checking it out. The other popular answer I got for Mac folks is that they have Alfred do the work. It’s also funny I can’t like compile it into a little mini app or something. It felt weird to have to use keystrokes to have to do it, so I figured if I was going to dig in, I’d figure out if their newer Python stuff supports it more directly or what. I left the comments in there because I’d like to figure out how to get it to do split screen the way I like, rather than tabs, but I got this working and then got lazy again. I just open that script, hit run, and it does the job. # tell application "System Events" to keystroke "]" using command down # tell application "System Events" to keystroke "d" using # tell application "System Events" to keystroke "d" using command down Write text "cd '/Users/chriscoyier/GitHub/CPOR'" In lieu of a built-in iTerm solution, I did learn it was “scriptable.” Apparently, they are sunsetting AppleScript support in favor of Python but, hey, for now it seems to work fine. Maybe you can make npm scripts for those other commands? But even then, I don’t think you’d see the output in different panels, so it’s probably best for scripts that are run-and-done instead of run-forever.īeing a Mac guy, I was most interested in solutions that would work with iTerm since I’ve used that anyway.
0 Comments
Leave a Reply. |