TIL: Clean Up Tmux Service When Removed by Home Manager
Recently I stopped using tmux to try zellij, however I noticed when I removed tmux from my nix config. I was getting the following error, when rebuilding my home-manager config:
The user systemd session is degraded: UNIT LOAD ACTIVE SUB DESCRIPTION ● tmux.service loaded failed failed tmux default session (detached) Legend: LOAD → Reflects whether the unit definition was properly loaded.
...
For once, I am actually doing a year in review, to go over some of the things I’ve learnt over the last year. Part of the reason is this has been probably my most transformative year since I have been a software engineer. I have become far more terminal development driven, if that is a phrase one can use. What I mean is I changed my development workflow to leverage being in the terminal more.
...
TIL: How to Title Your Terminals When Running Tmux
I have been tmux with the foot terminal and when trying to share my screen I couldn’t work out which terminal to share based on the name. Since they are running tmux, all the terminals were titled terminal - t.
To fix this and name it after what is running (and where) in tmux, i.e. foot blog/nvim. We can do this by adding the following to our tmux config:
...
TIL: How to Fix tmux-resurrect on NixOS
When I moved to NixOS I noticed that tmux-resurrect stop restoring some applications such as man and nvim. Like it used to on my Arch machine. I recently found a solution to my problem (thanks to a lovely chap on the nixos discourse).
By adding the following lines to our tmux config:
resurrect_dir="$HOME/.tmux/resurrect" set -g @resurrect-dir $resurrect_dir set -g @resurrect-hook-post-save-all 'target=$(readlink -f $resurrect_dir/last); sed "s| --cmd .
...
Introduction In this post I will show you how you can setup tmux (plugins) using the nix package manager, specifically using home-manager. I will also show you how you can avoid an issue I encountered where tmux resurrect wasn’t working properly due to plugin ordering.
Typically we use the tmux plugin manager to manage our tmux plugins. However, when I moved to NixOS, I wanted to move away from having lots of different ways of managing what is on my system.
...
Workflows Change This post is accurate as of date of publish. But likely will go stale, if I update my workflows I will likely publish another post. In this blog post, I will go over my current development workflow using the above tools namely, fish shell tmux and neovim. I’ll be using the dotfiles found here.
I aim to move away from using my mouse as much as possible as it just slows me down when my hands are away from my keyboard.
...