aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <codyfh@gmail.com>2019-05-03 09:49:40 -0600
committerCody Hiar <codyfh@gmail.com>2019-05-03 09:49:40 -0600
commitaf7e1e0fea820d34c1809f3ac1f6e0cfa04bf858 (patch)
tree8d32810bddf85eab25e74016ad37bb045cce1b3e
parente5e02738066d2976d86cb26ccd30f693abf0d6fe (diff)
Clean up styles from 2.9 update and unused files
-rw-r--r--README.md14
-rwxr-xr-xscripts/check_os.sh27
-rwxr-xr-xscripts/color_palette.sh14
-rwxr-xr-xscripts/path_search.sh3
-rwxr-xr-xscripts/powerline.sh21
-rwxr-xr-xscripts/rolodex.sh24
-rwxr-xr-xscripts/url_search.sh3
-rwxr-xr-xscripts/window_renum.sh8
-rw-r--r--stow/tmux/.tmux.conf17
-rw-r--r--tmux-darwin.config4
-rw-r--r--tmux-linux.config3
11 files changed, 44 insertions, 94 deletions
diff --git a/README.md b/README.md
index d630d4b..6e2d4d6 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,5 @@
-# Setup
-These are the settings that I use for tmux. I used the code from the now
-deprecated tmux-powerline to get some cool functionality out of the status line.
+# TMUX Config
-```
-brew install reattach-to-user-namespace
-git clone https://github.com/thornycrackers/.tmux.git
-make install
-```
-The makefile will create the symlink of .tmux.conf. To install the
-tmux-sessionist plugins type `<prefix>+I` inside of tmux
+I manage dotfiles with stow, to install locally clone this repo, cd into the
+`stow` dir and run the `./install.sh` script. The templates are loaded using
+`tmuxp`
diff --git a/scripts/check_os.sh b/scripts/check_os.sh
deleted file mode 100755
index 6b654af..0000000
--- a/scripts/check_os.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/usr/bin/env bash
-# vim: set filetype=sh :
-#
-# Author: Cody Hiar
-# Date: 2017-06-09
-#
-# Description:: Check the operatig system of the host and load the os specific
-# options
-#
-# Set options:
-# e: Stop script if command fails
-# u: Stop script if unset variable is referenced
-# x: Debug, print commands as they are executed
-# o pipeline: If any command in a pipeline fails it all fails
-#
-set -euo pipefail
-
-# Main loop of program
-main() {
- if [ "$(uname)" == "Darwin" ]; then
- tmux source-file "$HOME/.tmux/tmux-darwin.config"
- elif [ "$(uname)" == "Linux" ]; then
- tmux source-file "$HOME/.tmux/tmux-linux.config"
- fi
-}
-main
-
diff --git a/scripts/color_palette.sh b/scripts/color_palette.sh
deleted file mode 100755
index 3762fae..0000000
--- a/scripts/color_palette.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-# Print tmux color palette.
-# Idea from http://superuser.com/questions/285381/how-does-the-tmux-color-palette-work
-
-for i in $(seq 0 4 255); do
- for j in $(seq $i $(expr $i + 3)); do
- for k in $(seq 1 $(expr 3 - ${#j})); do
- printf " "
- done
- printf "\x1b[38;5;${j}mcolour${j}"
- [[ $(expr $j % 4) != 3 ]] && printf " "
- done
- printf "\n"
-done
diff --git a/scripts/path_search.sh b/scripts/path_search.sh
index c6ee062..d473607 100755
--- a/scripts/path_search.sh
+++ b/scripts/path_search.sh
@@ -4,7 +4,8 @@
# Author: Cody Hiar
# Date: 2019-04-26
#
-# Description: Search buffer for unix filepaths
+# Description: Search buffer for unix paths in current tmux pane and send
+# results to fzf to copy to clipboard
URL=$(tmux capture-pane -pS -30000 | perl -wnl -e '/\S*(html|py|md|txt|pdf|js|ini|json)$/ and print $&' | awk '!x[$0]++' | fzf-tmux)
if [[ -n "$URL" ]]; then
diff --git a/scripts/powerline.sh b/scripts/powerline.sh
deleted file mode 100755
index cf1fb5b..0000000
--- a/scripts/powerline.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-RS='\ue0b4'
-LS='\ue0b4'
-WAN_SYMBOL='\uf0ee'
-LAN_SYMBOL='\uf0ed'
-
-if [[ "$1" == "left" ]]; then
- echo "$(tmux display-message -p '#S') [$(hostname)]"
- # echo -ne "#[fg=colour235, bg=colour66] $(tmux display-message -p '#S') #[fg=colour66, bg=colour241]$LS#[default]"
- # echo -ne "#[fg=colour223, bg=colour241] $(hostname) #[fg=colour241, bg=default]$LS#[default]"
-fi
-
-# Disable right prompt for now, i3 bar has all this info
-# if [[ "$1" == "right" ]]; then
-# IP_ADDRESS=$(ip addr show | grep "inet[^6]" | grep -v "\(127.0.0.1\|docker\)" | tr -s ' ' | cut -d ' ' -f3 | cut -d '/' -f1)
-# echo -ne "#[fg=colour235, bg=colour241]$RS#[fg=colour223, bg=colour241] $LAN_SYMBOL $IP_ADDRESS"
-# WAN_IP=$(curl --max-time 2 -s http://whatismyip.akamai.com/)
-# echo -ne " $WAN_SYMBOL $WAN_IP #[default]"
-# DATE=$(date +"%b %d, %H:%M")
-# echo -ne "#[fg=colour241, bg=colour142]$RS#[fg=colour235] $DATE #[default]"
-# fi
diff --git a/scripts/rolodex.sh b/scripts/rolodex.sh
index ddc6ba0..00cc1ce 100755
--- a/scripts/rolodex.sh
+++ b/scripts/rolodex.sh
@@ -4,7 +4,29 @@
# Author: Cody Hiar
# Date: 2019-01-11
#
-# Description: Rolodex script
+# Description: Rolodex script. Consider the following setup
+#
+# +------------------------------+-----------------------------+
+# | | |
+# | | Pane 3 |
+# | | |
+# | Pane 1 +-----------------------------+
+# | | |
+# | | Pane 4 |
+# +------------------------------+ |
+# | | |
+# | +-----------------------------+
+# | Pane 2 | |
+# | | |
+# | | Pane 5 |
+# | | |
+# +------------------------------+-----------------------------+
+# Window 1 Window 2
+#
+# This is my standard setup. Pane 1 is vim, pane 2-5 are just used for docker
+# or w/e else. I almost always want to stick on Window 1 but I want to cycle
+# between pane 2-5. This script will simply rotate them in either direction so
+# I can stay in window 1 but have a sort of "tabbed" bottom window
#
# Set options:
# e: Stop script if command fails
diff --git a/scripts/url_search.sh b/scripts/url_search.sh
index 497b09c..4320a83 100755
--- a/scripts/url_search.sh
+++ b/scripts/url_search.sh
@@ -4,7 +4,8 @@
# Author: Cody Hiar
# Date: 2019-04-25
#
-# Description: Search buffer for url results
+# Description: Search tmux pane for urls then pass to fzf
+# for copying to clipboard
PANE_HISTORY="$(tmux capture-pane -J -p)"
URL=$(echo "$PANE_HISTORY" | perl -wnl -e '/https?\:\/\/[^\s]+[\/\w]/ and print $&' | fzf-tmux)
diff --git a/scripts/window_renum.sh b/scripts/window_renum.sh
index 19e5825..ef0a87f 100755
--- a/scripts/window_renum.sh
+++ b/scripts/window_renum.sh
@@ -1,3 +1,11 @@
+#!/usr/bin/env bash
+# vim: set filetype=sh
+#
+# Author: Unknown
+# Date: 2016-11-09
+#
+# Description: Renumber tmux windows (1, 3, 4, 6) -> (1, 2, 3, 4)
+
for session in $(tmux ls | awk -F: '{print $1}') ; do
active_window=$(tmux lsw -t ${session} | awk -F: '/\(active\)$/ {print $1}')
inum=1
diff --git a/stow/tmux/.tmux.conf b/stow/tmux/.tmux.conf
index fd613a2..d41265c 100644
--- a/stow/tmux/.tmux.conf
+++ b/stow/tmux/.tmux.conf
@@ -68,22 +68,15 @@ set -g history-limit 50000
# Colors
#####################################
-# default statusbar colors
-set-option -g status-bg default #base02
-set-option -g status-fg colour223 #yellow
-# pane border
-set-option -g pane-border-fg colour236 #base02
-set-option -g pane-active-border-fg colour239 #base01
-# message text
-set-option -g message-bg default #base02
-set-option -g message-fg colour196 #orange
+set-option -g status-style "fg=colour223"
+set-option -g pane-border-style "fg=colour236"
+set-option -g pane-active-border-style "fg=colour239"
+set-option -g message-style "fg=colour196"
set-option -g status on
set-option -g status-interval 2
set-option -g status-justify "centre"
set-option -g status-left-length 110
-set-option -g status-right-length 80
-set-option -g status-left "#(~/.tmux/scripts/powerline.sh left)"
-set-option -g status-right "#(~/.tmux/scripts/powerline.sh right)"
+set-option -g status-left "#S [#H]"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
diff --git a/tmux-darwin.config b/tmux-darwin.config
deleted file mode 100644
index 5d38bd8..0000000
--- a/tmux-darwin.config
+++ /dev/null
@@ -1,4 +0,0 @@
-bind -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
-unbind -T copy-mode-vi Enter
-bind-key -T copy-mode-vi Enter copy-pipe "reattach-to-user-namespace pbcopy"
-set-option -g default-command "reattach-to-user-namespace -l zsh"
diff --git a/tmux-linux.config b/tmux-linux.config
deleted file mode 100644
index 9697a05..0000000
--- a/tmux-linux.config
+++ /dev/null
@@ -1,3 +0,0 @@
-bind -Tcopy-mode-vi y send -X copy-pipe-and-cancel "tmux save-buffer - | xp"
-unbind -T copy-mode-vi Enter
-bind -Tcopy-mode-vi Enter send -X copy-pipe "tmux save-buffer - | xp"