Тёмный

Smart tmux sessions with zoxide and fzf 

Josh Medeski
Подписаться 4,9 тыс.
Просмотров 50 тыс.
50% 1

All the notes for this video can be found here:
www.joshmedeski.com/posts/sma...

Наука

Опубликовано:

 

11 авг 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 123   
@jamesmillsnicholas7813
@jamesmillsnicholas7813 Год назад
Great stuff! I had watched it before and it served as valuable inspiration to implement my own system. I watched it again and it inspired me again to simplify and streamline things. Thanks Josh!
@cris7ea
@cris7ea Год назад
I watched this video many time and still haven't implemented everything just yet (but working on it). Its so good!!!! ... All your videos are packed of good info. Keep up the awesome amazing 'jaw dropping' 😁work!
@raj.svc.google911
@raj.svc.google911 Год назад
You could use `tmux new -As mysession` to either attach or create the session.
@JoshMedeski
@JoshMedeski Год назад
Good to know, I might use that
@Milky____
@Milky____ Год назад
Guys like you is why I read comments, Thank you!
@ahmedash95
@ahmedash95 18 дней назад
Didn't know about zoxide before. such a good tool to use. Thanks!
@logannday
@logannday 10 месяцев назад
Just got this up and running..... life changing dude you're best
@user-id1ho2pk8p
@user-id1ho2pk8p Год назад
very good and useful video, thank you
@Amiron97
@Amiron97 Год назад
Love your t-smart-tmux-session-manager plugin. Good stuff!!!
@rokometek7394
@rokometek7394 Год назад
Thank you for this amazing workflow. I will definitely try this on my workflow.
@JoshMedeski
@JoshMedeski Год назад
You’re welcome! It makes me so productive in the terminal.
@Chalisque
@Chalisque 8 месяцев назад
I have a simple pair of scripts, tm and tmx, for creating and reattaching (tmx is separate so I can have command completion via querying tmux list-sessions). By doing this I can add various shorthands as I desire them.
@vjuwyy5922
@vjuwyy5922 Год назад
Great video, this is something I've been fighting with for so long! I ended up creating a custom Raycast extensions with the same functionality of the popup window since I didn't know the tmux pop-up fzf existed. This is going to be so much better. Thank you
@JoshMedeski
@JoshMedeski Год назад
I made it into a tmux plugin to make it even easier to use, check out the blog post in the description!
@vjuwyy5922
@vjuwyy5922 Год назад
This is awesome, thank you so much
@travispandos7179
@travispandos7179 Год назад
Always bringing us such amazing content! Thank you! Looking forward to more of your videos on Vim!
@ericraio7145
@ericraio7145 8 месяцев назад
If you don't want to use zoxide, you can set the CDPATH variable, it's like PATH but the cd command looks at the CDPATH list to determine what to CD into and the default is your current directory. available on POSIX computers
@JoshMedeski
@JoshMedeski 8 месяцев назад
Thanks for the tip. I really like zoxide’s algorithm for detecting directories based on frequency and recency, that’s why I use it
@stephenkbolton
@stephenkbolton Год назад
You can simplify that sed command with using the basename command
@JoshMedeski
@JoshMedeski Год назад
Thanks for the tip!
@Subbeh2
@Subbeh2 Год назад
Or even ${PWD##*/}
@heinrichskies
@heinrichskies 9 месяцев назад
​@@JoshMedeskiand you can avoid issuing a command by using (basename $PWD)
@abdoulayebalde2139
@abdoulayebalde2139 Год назад
Thanks for this amazing video. which theme of fish are you using?
@svyatogor
@svyatogor Год назад
I really like the format of the video and the way you present things. Would love to see deep dive into you neovim setup! As for the tmux I didn't quite get why would you want to have new tmux sessions created for every folder you jump in? p.s. lazygit is really cool, thanks for the tip!
@JoshMedeski
@JoshMedeski Год назад
My keyboard shortcuts, scripts, and some other tools typically expect the session root to be a git repository. So it allows me to be focused on a single project at a time. I can share more in a future video!
@phaberest_
@phaberest_ Год назад
This is definitely magnificent, well done mate!
@zestynotions
@zestynotions Год назад
always great stuff Josh, cheers. I likely wont need that level of session management in tmux for what I do, but the idea of combining fzf with the results list from zoxide is great and gives me some ideas.
@JoshMedeski
@JoshMedeski Год назад
Sweet, please share your ideas! Fzf and zoxide are both great tools on their own.
@zestynotions
@zestynotions Год назад
@@JoshMedeski My problem is sometimes remembering the foldername in which case zoxide cant really help me (although to be fair zoxide can also tab completed suggestions) with a fzf or broot over folder structures I atleast get a view of names to remind me. but on mac I find that because there are SO many system directories fzf can be slow as it struggles with all those. Whats great about this idea for me is to have a fzf over an already curated list of folder names that zoxide knows I use and so it can be super fast :) I used to alias broot and zoxide to start in a specific folder to help it not having to index the entire tree each time, but this way I wont have to ;)
@zestynotions
@zestynotions Год назад
haha now I just need to figure out how to make fzf always use the zoxide results list. haha
@JoshMedeski
@JoshMedeski Год назад
@@zestynotions Feel free to use my t script as inspiration.
@zestynotions
@zestynotions Год назад
@@JoshMedeski Yes was definitely gonna have a look there first. Thanks for sharing.
@MichaelButlerC
@MichaelButlerC 8 месяцев назад
This seems pretty damn cool! I just started using tmux recently and I keep using the tab left and right techniques which seem very inefficient (I'm too used to web browsers). But creating a session per project sounds a lot better and faster
@JoshMedeski
@JoshMedeski 8 месяцев назад
Thanks, check out the plugin. It's got lots of cool new features since this video came out: github.com/joshmedeski/t-smart-tmux-session-manager
@toolbelt
@toolbelt 2 месяца назад
Brilliant!
@the.real.ipatch
@the.real.ipatch Год назад
well done due. 👍 have you dabbled into nested tmux sessions at all?
@bombrman1994
@bombrman1994 2 месяца назад
This is amazing
@Dmitri_Ivanovich
@Dmitri_Ivanovich 6 месяцев назад
I found your tmux plugin (in a video from another user) - it works great! You should probably mention it in this video somehow, either in the description or pinned comment. I know it's the first link in your notes document, but still. Thanks for make a great tool.
@JoshMedeski
@JoshMedeski 6 месяцев назад
Good idea! I mention it on the blog post but it would be good to mention it here too 🙂
@eduardoaranda4379
@eduardoaranda4379 Год назад
It’s amazing how I made the same solutions as you but using a script called “Z jump around”
@JoshMedeski
@JoshMedeski Год назад
Cool, there are lots of smart directory jumping CLIs out there!
@pascalporedda958
@pascalporedda958 Год назад
Really nice video. I like the concept, been using the "tmux sessionizr" ThePrimeagen built sometime ago, which works kinda the same. Haven't heard of Zoxide yet. Just installed it and will give it a go today.
@MyBlancpain
@MyBlancpain Год назад
Loving the content, have implemented a bunch of your ideas into my workflow. Can I ask how you set up gitmux with tmux to show git info in the status bar? I am also using fish & alacritty.
@JoshMedeski
@JoshMedeski Год назад
Thanks, here is the repo with instructions github.com/arl/gitmux
@iduran
@iduran Год назад
Really nice workflow. Will implement something similar. Perhaps instead of named sessions will use named windows. Thanks for this!
@JoshMedeski
@JoshMedeski Год назад
I’ve thought about applying some of the same principles to window names, maybe I’ll share some of what I’ve been doing in an upcoming video!
@iduran
@iduran Год назад
@@JoshMedeski That would be great!
@ElderESG
@ElderESG Год назад
Amazing config ❤
@joselima7655
@joselima7655 Год назад
Nice!!! Love it. What colorscheme is that?
@JoshMedeski
@JoshMedeski Год назад
Thank, here is what I use github.com/catppuccin/catppuccin
@seaphd
@seaphd Год назад
Interesting setup. Alot to chew on. random question : is this your normal typeface or something you use specifically for presentations? Very readable.
@JoshMedeski
@JoshMedeski Год назад
It’s Apple’s SF font patched with Nerd icons github.com/epk/SF-Mono-Nerd-Font
@GonzaloStoll
@GonzaloStoll 5 месяцев назад
Absolutely amazing and helpful video. Would like to know how to get t into PATH tho 😬 What font were you using in this video by the way? It's not JetBrainsMono right?
@JoshMedeski
@JoshMedeski 5 месяцев назад
Thanks! Check out the official tmux plugin for more features and how to set it up github.com/joshmedeski/t-smart-tmux-session-manager
@m_pac4221
@m_pac4221 8 месяцев назад
great content! how does zoxide work with repeating directory structures when directory names occur multiple times?
@JoshMedeski
@JoshMedeski 8 месяцев назад
Thanks! Zoxide ranks directories based off recent usage and how much a directory is used. You’ll get used to the ranking system after using it for awhile
@m_pac4221
@m_pac4221 8 месяцев назад
@@JoshMedeski ok, if you use a directory name multiple times z changes to that with the most search requests. in this case you only can z to a unique upper level directory.
@IainSimmons
@IainSimmons Год назад
I know I'm a bit late to the party, but I tend to just use multiple windows on the same tmux session (appearing as tabs, and then each with multiple panes as needed). Do you think it would be difficult to modify your plugin to suit that need?
@JoshMedeski
@JoshMedeski Год назад
So my script is specifically for session management. Feel free to borrow my ideas for creating a window or pane manager if you think it’s a good idea for your workflow!
@PhiHDN
@PhiHDN Год назад
hi, thank you for the great plugin and great tutor. I would like fix the theme issue at 10:54 in fzf popup. Could you guide me how to fix that?
@JoshMedeski
@JoshMedeski Год назад
It will be an upcoming blog post and video, stay tuned in! I recommend reading the fzf documentation in the meantime.
@PhiHDN
@PhiHDN Год назад
@@JoshMedeski Looks like I fixed it by adding `set -Ux FZF_DEFAULT_OPTS "--color=..."`. Anyway, I am still looking forward to see your videos, love them. Thanks
@mbrochh82
@mbrochh82 Год назад
you have several paths that end with lazygit. what happens if you select one and then another, would you now have two tmux sessions with the same name (if that is even possible)?
@JoshMedeski
@JoshMedeski Год назад
As of right now it would switch back to the existing one.
@JoshMedeski
@JoshMedeski Год назад
You could rename the session manually if you ever needed to open similarly named folders at the same time. But it doesn’t happen to me.
@sebastianmangelsen8056
@sebastianmangelsen8056 Год назад
How did you manage to get rid of your window frame in MacOs?
@JoshMedeski
@JoshMedeski Год назад
It’s a terminal emulator called Alacritty, I’ve got a video how to set it up! ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Mu4frtvHPOY.html
@xueweihuang2508
@xueweihuang2508 Год назад
Thank you!!! 6:07 How did you do that?
@JoshMedeski
@JoshMedeski Год назад
I have my file manager bound to a keyboard shortcut, see ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BLp61-Lq0kQ.html
@JoshMedeski
@JoshMedeski Год назад
I’ll be making a video on my file manager soon!
@mbrochh82
@mbrochh82 Год назад
what is that popup that thows up at 11:00 -- seems to be some fuzzy file finder to open files in vim?
@JoshMedeski
@JoshMedeski Год назад
It’s called Telescope it’s a Neovim plugin
@BohdanMakohin
@BohdanMakohin Год назад
@@JoshMedeski and you have shell alias to open it like “nvim +GitFiles”?
@Danielo515
@Danielo515 Год назад
That chair looks nice. Do you recommend it?
@JoshMedeski
@JoshMedeski Год назад
Yeah. It’s a gamer chair from IKEA. It inexpensive and gets the job done.
@Danielo515
@Danielo515 Год назад
@@JoshMedeski looked a lot like one of those ergonomic office chairs
@vikingthedude
@vikingthedude 5 месяцев назад
What file explorer is this at 6:07? I think i should start using one
@JoshMedeski
@JoshMedeski 5 месяцев назад
It's call "lf", check it out github.com/gokcehan/lf
@rmrvubl8648
@rmrvubl8648 Год назад
How did you make fzf popup like that on 13:01?
@JoshMedeski
@JoshMedeski Год назад
It's built into the `tt` script github.com/joshmedeski/dotfiles/blob/main/mackup/.config/bin/tt and I have it commented to a macOS keyboard shortcut (cmd+j) using Alacritty (see ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-BLp61-Lq0kQ.html). Hope that helps.
@bhaveshverma8629
@bhaveshverma8629 Год назад
Which snippet expansion do you use?
@JoshMedeski
@JoshMedeski Год назад
What you’re seeing in this video is the fish shell’s built in abbreviation feature
@bhaveshverma8629
@bhaveshverma8629 Год назад
@@JoshMedeski oh ok thanks for clarifying. I thought of some kind of snippet plugin you use.
@bhaveshverma8629
@bhaveshverma8629 Год назад
By the way the video is very good. I forgot to appreciate.
@jordanbarlow3788
@jordanbarlow3788 Год назад
I notice this doesn't work for paths stored in the zoxide database that include a space. Example: PATH = "~/Documents/Cool Stuff/project" Will create a tmux session named "Cool" and won't zoxide to the folder "project". This is probably trivial enough to fix for someone who writes shell scripts on the regular, but that ain't me at the moment haha. Anyone got ideas?
@JoshMedeski
@JoshMedeski Год назад
I can make a fix. I don’t ever use spaces in my folder names but I realize some people do.
@jordanbarlow3788
@jordanbarlow3788 Год назад
@@JoshMedeski That would be great, thanks! I don't really use spaces either, only realised once I was in some iCloud folder that had "Mobile Documents" as part of the path.
@rexroof
@rexroof 4 месяца назад
tmux new-session -A -t name will automatically create the session it doesn't exist or it will attach to it.
@JoshMedeski
@JoshMedeski 4 месяца назад
Yes! Lots of others have shared that tip with me since making this video, thanks :)
@aziz0x00
@aziz0x00 10 месяцев назад
fish shell
@yvng4697
@yvng4697 8 месяцев назад
How did u made your terminal like that?
@JoshMedeski
@JoshMedeski 8 месяцев назад
I've got a free online guide for how to set up the terminal like mine, check it out! www.joshmedeski.com/guides/dev-workflow-intro
@yvng4697
@yvng4697 8 месяцев назад
I will check it out, thank u so much!!@@JoshMedeski
@alexandredecobert8819
@alexandredecobert8819 Год назад
Why your window look like that ?
@JoshMedeski
@JoshMedeski Год назад
I’m using Alacritty with the borderless configuration
@Yu-qv3qc
@Yu-qv3qc Год назад
What is this file manager at 6:06?
@JoshMedeski
@JoshMedeski Год назад
It's called LF github.com/gokcehan/lf
@Yu-qv3qc
@Yu-qv3qc Год назад
@@JoshMedeski thanks a lot
@howqso2885
@howqso2885 Год назад
Great stuff, but I see you are using fish. It's really a small detail, but is there any reason you didn't choose to make a function for t instead of a script ?
@JoshMedeski
@JoshMedeski Год назад
A bash script is easily transferable to other shell environments, I’ve already had some good contributions thanks to the format and people using zsh use the script as well.
@augustepugnet5407
@augustepugnet5407 9 месяцев назад
Do you have the source code ?
@JoshMedeski
@JoshMedeski 9 месяцев назад
Yes, check the video description. It’s since been turned into an official tmux plugin with more features!
@nils.8335
@nils.8335 Год назад
imma need that wallpaper
@JoshMedeski
@JoshMedeski Год назад
It’s a built-in macOS wallpaper!
@makkusu3866
@makkusu3866 Год назад
Can't make it work on ubuntu
@JoshMedeski
@JoshMedeski Год назад
Bummer, can you be more specific? Is it my custom script? I'm happy to take a look at it.
@makkusu3866
@makkusu3866 Год назад
@@JoshMedeski I'm sorry, seems that it started working after reloading my machine 😅 great stuff btw
@awesomesauce1157
@awesomesauce1157 7 месяцев назад
linux users try getting audio right: impossible difficulty
@eyal670
@eyal670 Год назад
nice scripts, the scripts are no longer avaliable in your dotfiles repo, can you please share the new location in the video description?
@JoshMedeski
@JoshMedeski Год назад
I’ve turned it into an official tmux plugin! github.com/joshmedeski/t-smart-tmux-session-manager
@megasuperlexa2
@megasuperlexa2 Год назад
alacrity? but it cant ssh
@JoshMedeski
@JoshMedeski Год назад
What do you mean? This workflow isn’t related to ssh but the ssh command works fine in Alacritty when I need it
@TravisBHartwell
@TravisBHartwell Год назад
Instead of using sed to get the name of the current directory, you can just use the basename command. For example (in Bash, but it is not a bash-builtin), if I'm in my home directory: > basename $PWD travisbhartwell
@TravisBHartwell
@TravisBHartwell Год назад
I see that in your tt script you share later in the video you do use basename, so ignore me. :)
@JoshMedeski
@JoshMedeski Год назад
Thanks for the tip. I learned about basename after publishing the video 😄
@TravisBHartwell
@TravisBHartwell Год назад
@@JoshMedeski No problem! I actually have a similar set up that I use that includes integration with Alfred, iTerm integration, and opening my session picker whenever a new terminal is opened that isn't already part of a session. I think I'll try to get my stuff cleaned up and at least blog about it.
@JoshMedeski
@JoshMedeski Год назад
@@TravisBHartwell awesome, feel free to share it!
@stefandriesner5026
@stefandriesner5026 8 месяцев назад
Alternative alias for new session: tn='tmux new -s ${PWD##*/}'
@abdoulayebalde2139
@abdoulayebalde2139 Год назад
Thanks for this amazing video. which theme of fish are you using?
Далее
Smart tmux sessions with sesh
9:27
Просмотров 3,9 тыс.
НАТО против России?  @posle_zavtra
30:01
How do THESE guys use Linux? - Linux for Newbs EP 0
10:06
7 Essential Command Line Tools (2022)
9:12
Просмотров 188 тыс.
FZF Will CHANGE How You Work
9:30
Просмотров 31 тыс.
Vim Tips I Wish I Knew Earlier
23:00
Просмотров 35 тыс.
Blazing Fast Window Management on macOS
19:06
Просмотров 67 тыс.
Dotfiles! Here's how I organize them.
9:37
Просмотров 36 тыс.
My Forever Dev Workflow
16:02
Просмотров 60 тыс.
What the hell is Zellij?
8:00
Просмотров 53 тыс.
Карточка Зарядка 📱 ( @ArshSoni )
0:23
3D printed Nintendo Switch Game Carousel
0:14
Просмотров 4,6 млн
wyłącznik
0:50
Просмотров 21 млн