Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ion-plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
redox-os
ion-plugins
Commits
9c8aa52b
Commit
9c8aa52b
authored
Aug 10, 2019
by
AdminXVII
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix TMUX
parent
a186147d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
+19
-18
tools/tmux.ion
tools/tmux.ion
+19
-18
No files found.
tools/tmux.ion
View file @
9c8aa52b
...
...
@@ -34,26 +34,26 @@ alias tkss = 'tmux kill-session -t'
# CONFIGURATION VARIABLES
# Automatically start tmux
le
t TMUX_AUTOSTART ?= 0
expor
t TMUX_AUTOSTART ?= 0
# Only autostart once. If set to false, tmux will attempt to
# autostart every time your zsh configs are reloaded.
le
t TMUX_AUTOSTART_ONCE ?= 1
expor
t TMUX_AUTOSTART_ONCE ?= 1
# Automatically connect to a previous session if it exists
le
t TMUX_AUTOCONNECT ?= 1
expor
t TMUX_AUTOCONNECT ?= 1
# Automatically close the terminal when tmux exits
le
t TMUX_AUTOQUIT ?= $TMUX_AUTOSTART
expor
t TMUX_AUTOQUIT ?= $TMUX_AUTOSTART
# Set term to screen or screen-256color based on current terminal support
le
t TMUX_FIXTERM ?= 1
expor
t TMUX_FIXTERM ?= 1
# Set '-CC' option for iTerm2 tmux integration
le
t TMUX_ITERM2 ?= 0
expor
t TMUX_ITERM2 ?= 0
# The TERM to use for non-256 color terminals.
# Tmux states this should be screen, but you may need to change it on
# systems without the proper terminfo
le
t TMUX_FIXTERM_WITHOUT_256COLOR ?= screen
expor
t TMUX_FIXTERM_WITHOUT_256COLOR ?= screen
# The TERM to use for 256 color terminals.
# Tmux states this should be screen-256color, but you may need to change it on
# systems without the proper terminfo
le
t TMUX_FIXTERM_WITH_256COLOR ?= screen-256color
expor
t TMUX_FIXTERM_WITH_256COLOR ?= screen-256color
# Determine if the terminal supports 256 colors
# Currently not supported with Ion
...
...
@@ -65,14 +65,14 @@ let TMUX_FIXTERM_WITH_256COLOR ?= screen-256color
# Set the correct local config file to use.
if not bool $TMUX_ITERM2 && test -e "$HOME/.tmux.conf"
export
_TMUX_FIXED_CONFIG = "$(dirname $(readlink -f @args[0]))
/tmux/extra.conf"
export
ION_PLUGINS_TMUX_FIXED_CONFIG = "~/.config/ion/plugins/tools
/tmux/extra.conf"
else
export
_TMUX_FIXED_CONFIG = "$(dirname $(readlink -f @args[0]))/tmux/only
.conf"
export
ION_PLUGINS_TMUX_FIXED_CONFIG = "~/.config/ion/plugins/tools/tmux/tmux
.conf"
end
# Wrapper function for tmux.
fn _tmux_plugin_run args:[str]
let tmux = $(which tmux)
let tmux = $(
/usr/bin/env
which tmux)
if not eq $len(@args) 0
$tmux @args
return $?
...
...
@@ -85,15 +85,16 @@ fn _tmux_plugin_run args:[str]
# Try to connect to an existing session.
if bool $TMUX_AUTOCONNECT
$
tmux_cmd attach
@
tmux_cmd attach
end
# If failed, just run tmux, fixing the TERM variable if requested.
if not eq $?
-ne
0
if not eq $? 0
if bool $TMUX_FIXTERM
let tmux_cmd
::= [ -f $
_TMUX_FIXED_CONFIG ]
let tmux_cmd
++= [ -f $ION_PLUGINS
_TMUX_FIXED_CONFIG ]
end
$tmux_cmd new-session
echo @tmux_cmd
@tmux_cmd new-session
end
if bool $TMUX_AUTOQUIT
...
...
@@ -105,10 +106,10 @@ end
alias tmux = '_tmux_plugin_run'
# Autostart if not already in tmux and enabled.
if not
test -z ${env::TMUX} && bool $TMUX_AUTOSTART && test -z ${env::INSIDE_EMACS} && test -z ${env::EMACS} && test -z ${env::VIM}
if not
exists -s env::TMUX && bool $TMUX_AUTOSTART && not exists -s env::INSIDE_EMACS && not exists -s env::EMACS && not exists -s env::VIM
# Actually don't autostart if we already did and multiple autostarts are disabled.
if not bool $TMUX_AUTOSTART_ONCE || not
bool $
TMUX_AUTOSTARTED
if not bool $TMUX_AUTOSTART_ONCE || not
exists -s env::
TMUX_AUTOSTARTED
export TMUX_AUTOSTARTED = 1
_tmux_plugin_run
_tmux_plugin_run
[]
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment