Skip to content

Instantly share code, notes, and snippets.

@zm69
Forked from v-yarotsky/.tmux.conf
Last active August 29, 2015 14:15
Show Gist options
  • Save zm69/ff7b0a33359b84eede55 to your computer and use it in GitHub Desktop.
Save zm69/ff7b0a33359b84eede55 to your computer and use it in GitHub Desktop.
tmux config
#
# Oleh's tmux config
#
# INSTALLATION NOTES
# 1. Install Homebrew (https://github.com/mxcl/homebrew)
# 2. brew install zsh
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh)
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace
# 5. Install iTerm2
# 6. In iTerm2 preferences for your profile set:
# Character Encoding: Unicode (UTF-8)
# Report Terminal Type: xterm-256color
# 7. Put itunesartist and itunestrack into PATH
#
#
# USAGE:
# - Prefix is set to Ctrl-s (make sure you remapped Caps Lock to Ctrl)
# - All prefixed with Ctrl-s
# - Vertical split: \
# - Horizontal split: -
unbind C-b
set -g prefix C-s
bind-key -r C-s send-prefix
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded"
bind-key -n C-h select-pane -L
bind-key -n C-j select-pane -D
bind-key -n C-k select-pane -U
bind-key -n C-l select-pane -R
set-option -g default-command "reattach-to-user-namespace -l zsh"
### LOOK & FEEL ###
set -g default-terminal "xterm-256color"
# default statusbar colors
set-option -g status-bg colour235
set-option -g status-fg colour179
set-option -g status-attr default
# default window title colors
set-window-option -g window-status-fg colour244
set-window-option -g window-status-bg default
# active window title colors
set-window-option -g window-status-current-fg colour166
set-window-option -g window-status-current-bg default
set-window-option -g window-status-current-attr bright
# pane border
set-option -g pane-border-fg colour235
set-option -g pane-active-border-fg colour240
# pane number display
set-option -g display-panes-active-colour colour33
set-option -g display-panes-colour colour166
# clock
set-window-option -g clock-mode-colour colour64
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
set-option -g mode-mouse on
set-window-option -g utf8 on
set-option -g status-keys vi
set-option -g mode-keys vi
#no command delay
set -sg escape-time 0
#count windows and panes from 1
set -g base-index 1
setw -g pane-base-index 1
set-option -g status-right "#(battery -t) #(date '+%a, %b %d - %I:%M') "
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection
bind-key - split-window -v -c '#{pane_current_path}'
bind-key \ split-window -h -c '#{pane_current_path}'
# Adjustment (1 or 2 cursor cells per bump)
bind -n S-Left resize-pane -L 2
bind -n S-Right resize-pane -R 2
bind -n S-Down resize-pane -D 1
bind -n S-Up resize-pane -U 1
# Coarse adjustment (5 or 10 cursor cells per bump)
bind -n C-Left resize-pane -L 10
bind -n C-Right resize-pane -R 10
bind -n C-Down resize-pane -D 5
bind -n C-Up resize-pane -U 5
bind C-c run "tmux save-buffer - | pbcopy"
bind C-v run "tmux set-buffer \"$(pbpaste)\"; tmux paste-buffer"
bind C-s choose-session
#!/usr/bin/osascript
on run
set info to ""
tell application "System Events"
set num to count (every process whose name is "iTunes")
end tell
if num > 0 then
tell application "iTunes"
if player state is playing then
set info to artist of current track
end if
end tell
end if
return info
end run
#!/usr/bin/osascript
on run
set info to ""
tell application "System Events"
set num to count (every process whose name is "iTunes")
end tell
if num > 0 then
tell application "iTunes"
if player state is playing then
set info to name of current track
else
set info to "Not Playing."
end if
end tell
end if
return info
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment