Skip to content

Commit

Permalink
Added tmux support including asciinema video
Browse files Browse the repository at this point in the history
  • Loading branch information
Kumar Gopal committed Dec 2, 2024
1 parent 7364360 commit 565092a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ when using terminal only window.

[![asciicast](https://asciinema.org/a/OYazu5MjPy0aW6n1ezEvBmvLw.svg)](https://asciinema.org/a/OYazu5MjPy0aW6n1ezEvBmvLw)


### Install and Configure Tmux

1. Install Tmux:
Expand All @@ -146,7 +145,7 @@ when using terminal only window.
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
```

3. Update your `.tmux.conf` file:
3. Update your [.tmux.conf](./scripts/.tmux.conf) file:

```bash
nano ~/.tmux.conf
Expand Down Expand Up @@ -178,7 +177,7 @@ when using terminal only window.

### Automate Tmux with Systemd

1. Create the Systemd service:
1. Create the Systemd service [tmux.service](./systemd/tmux.service):

```bash
sudo nano /etc/systemd/system/tmux.service
Expand Down
12 changes: 12 additions & 0 deletions scripts/.tmux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# List of plugins
set -g @plugin 'tmux-plugins/tpm'

# Add other plugins here
set -g @plugin 'tmux-plugins/tmux-resurrect'

set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @continuum-restore 'on'


# Initialize TPM (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
14 changes: 14 additions & 0 deletions systemd/tmux.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=Tmux session manager
After=multi-user.target

[Service]
Type=forking
User=<your-username>
WorkingDirectory=/home/<your-username>
ExecStart=/usr/bin/tmux new-session -d -s default
ExecStop=/usr/bin/tmux kill-session -t default
Restart=always

[Install]
WantedBy=multi-user.target

0 comments on commit 565092a

Please sign in to comment.