summaryrefslogtreecommitdiffstats
path: root/.config
diff options
context:
space:
mode:
authorLuke <luke@lukesmith.xyz>2018-02-06 18:42:51 -0700
committerLuke <luke@lukesmith.xyz>2018-02-06 18:42:51 -0700
commit19c9c05bceac003a72477f293f3bdb751d150280 (patch)
treeff2fafd0ecabd2bdb633263cb6436a85c5e75c03 /.config
parent03b06725a117b22f08083ca717040284960aa6bd (diff)
downloadeibhear-19c9c05bceac003a72477f293f3bdb751d150280.tar.gz
eibhear-19c9c05bceac003a72477f293f3bdb751d150280.tar.zst
eibhear-19c9c05bceac003a72477f293f3bdb751d150280.zip
tmux now doesn't spawn mult. sessions on restart
Diffstat (limited to '.config')
-rwxr-xr-x.config/Scripts/tmuxinit4
-rw-r--r--.config/i3/config4
2 files changed, 7 insertions, 1 deletions
diff --git a/.config/Scripts/tmuxinit b/.config/Scripts/tmuxinit
new file mode 100755
index 0000000..68a4b86
--- /dev/null
+++ b/.config/Scripts/tmuxinit
@@ -0,0 +1,4 @@
+#!/bin/bash
+# This is the script that i3 runs to either start tmux in
+# the dropdown terminal or log into a previous session.
+tmux a || tmux
diff --git a/.config/i3/config b/.config/i3/config
index 0141fdb..bd8bf05 100644
--- a/.config/i3/config
+++ b/.config/i3/config
@@ -393,7 +393,9 @@ for_window [instance="dropdown"] floating enable
for_window [instance="dropdown"] resize set 625 400
for_window [instance="dropdown"] move scratchpad
for_window [instance="dropdown"] border pixel 5
-exec --no-startup-id $term -n dropdown -e tmux
+# Runs the tmuxinit script, which searches for an earlier tmux instance,
+# otherwise starts a new one (to prevent multiple dropdown sessions).
+exec --no-startup-id $term -n dropdown -e tmuxinit
# Then I have a window running R I use for basic arithmetic
# I'll later bind this to mod+a.