2016-03-14 18:21:48 +01:00
|
|
|
---
|
|
|
|
layout: post
|
|
|
|
comments: true
|
|
|
|
title: "Autostarting tmux + WeeChat"
|
|
|
|
category: [english]
|
|
|
|
tags: [english, irc, tmux, cron, weechat]
|
2018-11-25 23:51:24 +01:00
|
|
|
redirect_from: /english/2016/03/14/autostart-tmux-weechat.html
|
2016-03-14 18:21:48 +01:00
|
|
|
---
|
|
|
|
|
2023-02-22 19:28:38 +01:00
|
|
|
_This is another note-to-self post, but I think other people might also
|
|
|
|
be wondering this._
|
2016-03-14 18:21:48 +01:00
|
|
|
|
2023-02-22 19:28:38 +01:00
|
|
|
**THIS IS ENTIRELY UNTESTED UNTIL THE SHELL WHERE I AM USING THIS REBOOTS
|
|
|
|
THE NEXT TIME!**
|
2016-03-14 18:21:48 +01:00
|
|
|
|
|
|
|
```cron
|
|
|
|
## Environment
|
|
|
|
# To avoid having to type absolute paths, append output of `printf "$PATH"`
|
|
|
|
PATH=
|
|
|
|
# Locale you wish to use
|
|
|
|
LANG=fi_FI.UTF-8
|
|
|
|
# Timezone
|
|
|
|
TZ=Europe/Helsinki
|
|
|
|
|
|
|
|
# The actual autostart magic
|
|
|
|
@reboot sleep 500 && tmux -2u new-session -s auto -d && tmux send -t auto weechat ENTER
|
|
|
|
```
|
|
|
|
|
2023-02-22 19:28:38 +01:00
|
|
|
- `@reboot` = tell cron to do this on reboot
|
|
|
|
- `sleep 500` = the shell where I intent to use this primarily is using NFS
|
2016-03-14 18:21:48 +01:00
|
|
|
and I think it's reasonable to expect everything to be mounted in five
|
|
|
|
minutes.
|
2023-02-22 19:28:38 +01:00
|
|
|
- `tmux -2u" = force enable 256 colors & UTF-8
|
|
|
|
- `new-session -s auto -d` = start a new session with name `auto` (as in
|
2016-03-14 18:21:48 +01:00
|
|
|
automatically started) and detach it
|
2023-02-22 19:28:38 +01:00
|
|
|
- `tmux send -t auto weechat ENTER` type `weechat` to tmux session named
|
2016-03-14 18:21:48 +01:00
|
|
|
auto and press ENTER to execute it.
|