commit afe1ba1e205e306569d916d0fe81f43cf0f34db2
parent 1be405d2a46d8269e34fb462b3d260920497cbca
Author: pyratebeard <root@pyratebeard.net>
Date: Thu, 2 Jan 2020 12:34:10 +0000
tmux plugins
add tpm and install online_status plugin. set hook to rename window on creation. start tmux with window name '~'. remove tmuxinator command as no longer used
Diffstat:
3 files changed, 17 insertions(+), 25 deletions(-)
diff --git a/bin/bin/tmuxinator b/bin/bin/tmuxinator
@@ -1,23 +0,0 @@
-#!/usr/bin/ruby
-#
-# This file was generated by RubyGems.
-#
-# The application 'tmuxinator' is installed as part of a gem, and
-# this file is here to facilitate running it.
-#
-
-require 'rubygems'
-
-version = ">= 0"
-
-if ARGV.first
- str = ARGV.first
- str = str.dup.force_encoding("BINARY") if str.respond_to? :force_encoding
- if str =~ /\A_(.*)_\z/ and Gem::Version.correct?($1) then
- version = $1
- ARGV.shift
- end
-end
-
-gem 'tmuxinator', version
-load Gem.bin_path('tmuxinator', 'tmuxinator', version)
diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf
@@ -20,6 +20,9 @@ set -g pane-base-index 1
# keep window names fixed
set-option -g allow-rename off
+# rename window on creation
+set-hook -g after-new-window 'command-prompt -I "#{window_name}" "rename-window '%%'"'
+
# screen mode
set -g default-terminal "screen-256color"
@@ -93,9 +96,13 @@ set -g status-interval 5
setw -g window-status-format "#[bg=black,fg=magenta] #I #[bg=black,fg=magenta] #W "
setw -g window-status-current-format "#[bg=yellow,fg=black] #I #[bg=black,fg=yellow] #W "
set -g status-justify left
-set-option -g status-right '#[bg=black,fg=blue] #H #[default] #[bg=black,fg=cyan] %Y-%m-%d %H:%M #[default]'
+set-option -g status-right '#[bg=black,fg=blue] #H #[default] #{online_status} #[bg=black,fg=cyan] %Y-%m-%d %H:%M #[default]'
set-option -g status-left ''
+# online and offline icon for tmux-online-status
+set -g @online_icon "#[fg=green]online#[default]"
+set -g @offline_icon "#[fg=red]offline#[default]"
+
# loud or quiet?
set-option -g visual-activity on
set-option -g visual-bell off
@@ -116,3 +123,11 @@ bind Z previous-layout
# toggle status bar visibility
bind t set status
+
+# plugins
+# `mkdir -p ~/.tmux/plugins/ ; git clone 'https://github.com/tmux-plugins/tpm' ~/.tmux/plugins/tpm`
+set -g @plugin 'tmux-plugins/tpm'
+set -g @plugin 'tmux-plugins/tmux-online-status'
+
+# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
+run -b '~/.tmux/plugins/tpm/tpm'
diff --git a/zsh/.zsh/welcome.zsh b/zsh/.zsh/welcome.zsh
@@ -16,7 +16,7 @@ audio_vol() {
# script run on first terminal
script() {
audio_vol
- tmux new -s main
+ tmux new -s main -n '~'
}
set -o vi