tmuxp
tmuxp copied to clipboard
`run_before_script`: Allow daemonized functions to run
pipx install --suffix=@run_before_script 'tmuxp @ git+https://github.com/tmux-python/tmuxp.git@tn-run-before-script-daemonized'
re: #692
Codecov Report
Merging #743 (9ebd7d6) into master (51f673a) will not change coverage. The diff coverage is
n/a.
@@ Coverage Diff @@
## master #743 +/- ##
=======================================
Coverage 75.96% 75.96%
=======================================
Files 7 7
Lines 1190 1190
Branches 311 311
=======================================
Hits 904 904
Misses 199 199
Partials 87 87
| Impacted Files | Coverage Δ | |
|---|---|---|
| tmuxp/util.py | 84.41% <ø> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 51f673a...9ebd7d6. Read the comment docs.
this functionality may turn out may be better to put before running tmuxp load <session>, e.g.
kak -d -s sessionname && tmuxp load yoursession`
I thought of the fabled @bitprophet when I think of a way to launch a process to the background like a daemon into the background, "spawn it and forget about it". The examples on github search brought up fabric and invoke. In hindsight I realize the times I started mysql or postgres it was using those
@ttttcrngyblflpp @Segaja #692 is turning out to be harder than it looks when it comes to commands like that. Would running the script before tmuxp in shell do for the ones that happen in the background?
At least for me it would be possible to execute the VPN connection before i call tmuxp, yeah. But maybe then it should be mentioned in the documentation that the before_script has problems with processes which try to fork into the background?
@aschleifer Closed for now, per conversation here, and if you want to revisit this let me know :)