Commit 29bfea1e authored by Mohcine Chraibi's avatar Mohcine Chraibi

first commit

parents
set-option -g default-shell /usr/local/bin/zsh
#set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l /usr/local/bin/zsh"
#set -g default-command "reattach-to-user-namespace -l /usr/local/bin/zsh"
#set-option -g default-command "which reattach-to-user-namespace > /dev/null && reattach-to-user-namespace -l $SHELL"
# setting default termtype to screen 256
set -g default-terminal "screen-256color"
# Change prefix key to Ctrl+a
unbind C-b
set -g prefix C-a
# reload ~/.tmux.conf using PREFIX r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind-key c new-window -c "#{pane_current_path}"
# utf-8 settings
set -g status-utf8 on
setw -g utf8 on
# Make mouse useful in copy mode
setw -g mode-mouse on
# key bindings for splitting
unbind %
#bind | split-window -h
# Horizontal
bind v split-window -h -c "#{pane_current_path}"
unbind '"'
#bind - split-window -v
# Vertical
bind h split-window -v -c "#{pane_current_path}"
bind-key -n C-S-Left swap-window -t -1
bind-key -n C-S-Right swap-window -t +1
# key binding for nested tmux
#unbind q
bind a send-prefix
# History
set -g history-limit 100000
# Terminal emulator window title
set -g set-titles on
set -g set-titles-string '#S:#I.#P #W'
####################### zenburn
setw -g clock-mode-colour colour117
setw -g mode-attr bold
setw -g mode-fg colour117
setw -g mode-bg colour238
set -g status-bg colour235
set -g status-fg colour248
set -g status-attr dim
# set -g status-right '#[fg=colour174]#(mpc) #[fg=colour187,bold]%H:%M:%S'
# set -g status-right-length 80
setw -g window-status-current-fg colour223
setw -g window-status-current-bg colour237
setw -g window-status-current-attr bold
set -g message-attr bold
set -g message-fg colour117
set -g message-bg colour235
################################
#set -g status-right '#[fg=colour174,bold]⚡#(/usr/local/bin/battery -a) #[fg=colour187,bold] ⌛ %m/%d/%Y|%H:%M #[default]'
# set -g status-right '#(/usr/local/bin/battery -t)'
# set -g status-left '📅 #(gcalcli --nostarted --calendar "" agenda --nocolor | cut -d " " -f 4- | head -2 | tail -1 | sed "s/^ *//g" | sed "s/ / /g" | cut -c1-19)'
# set -g status-left '📅 #[fg=color187,bright]#(gcalcli --nostarted --calendar "" agenda --nocolor | cut -d " " -f 4- | head -2 | tail -1 | sed "s/^ *//g" | sed "s/ / /g" | cut -c1-50)'
set -g status-left '#(/usr/local/bin/battery -t -p) #(whoami)@#H #[fg=colour187,bold] %d/%m/%Y %H:%M'
# set -g status-right '#[fg=blue,bold]#H#[default] #[fg=blue,bold][CPU=#(getCpuUsage.sh) MEM=#(getMemUsage.sh)]#[default]'
# #[fg=colour187,bold]%d/%m/%Y
# set -g status-right '#[fg=colour187,bold] %d/%m/%Y | %H:%M #(rainbarf --remaining --rgb)'
set -g status-right "#[fg=colour190] #(~/.tmuxDir/getProc.sh)"
##(~/.tmuxDir/getCPU.sh)
# #(tmux-mem-cpu-load --interval 2 --colors)#[default]
# ⌛ #[fg=colour190,bold]%H:%M #[fg=colour187,bold] #(/usr/local/bin/battery -t)
#------------------------------
set-option -g status-position top
set-option -g status on
set-option -g status-interval 5
setw -g c0-change-trigger 10
setw -g c0-change-interval 100
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 90
set-option -g status-right-length 350
#------------------------------
# Notifying if other windows has activities
set -g visual-activity on
setw -g monitor-activity on
setw -g window-status-activity-attr bold,blink,underscore
# window options
set -g mouse-select-pane on
setw -g automatic-rename
# Don't actually ring the bell (but still set the window attributes in
# the status bar so we know that a bell rang)
set -g bell-action none
# Easier pane resize keybindings.
bind-key -n C-M-u resize-pane -U 1
bind-key -n C-M-d resize-pane -D 1
bind-key -n C-M-l resize-pane -L 1
bind-key -n C-M-r resize-pane -R 1
# bind-key -n M-right select-pane -t:.+
# bind-key -n M-left select-pane -t:.-
# bind-key -n M-down select-pane -t:.+
# bind-key -n M-up select-pane -t:.-
#bind-key -n M-space resize-pane -Z
# To copy:
# bind-key -n -t emacs-copy M-w copy-pipe "xclip -i -sel p -f | xclip -i -sel c "
bind-key -t emacs-copy y copy-pipe "reattach-to-user-namespace pbcopy"
unbind -t emacs-copy Enter
bind-key -t emacs-copy Enter copy-pipe "reattach-to-user-namespace pbcopy"
# # To paste:
# bind-key -n C-y run "xclip -o | tmux load-buffer - ; tmux paste-buffer"
# bind-key y new-window -n "emacs" "emacsclient -nw"
# bind-key C-y split-window "emacsclient -nw"
# ------------------------------------------------------------ #
# Key Bindings / Copy Mode
# ------------------------------------------------------------ #
# bind-key -t emacs-copy C-d page-down
# bind-key -t emacs-copy C-u page-up
# bind-key -t emacs-copy C-h cursor-left
# bind-key -t emacs-copy Enter copy-selection
# bind-key -t emacs-copy C-y scroll-up
# # bind-key -t emacs-copy $ end-of-line
# # bind-key -t emacs-copy C run-shell
# bind-key -t emacs-copy / search-forward
# bind-key -t emacs-copy B previous-space
# bind-key -t emacs-copy D copy-end-of-line
# bind-key -t emacs-copy E next-space-end
# bind-key -t emacs-copy F jump-backward
# bind-key -t emacs-copy G history-bottom
# bind-key -t emacs-copy H top-line
# bind-key -t emacs-copy J scroll-down
# bind-key -t emacs-copy K scroll-up
# bind-key -t emacs-copy L bottom-line
# bind-key -t emacs-copy M middle-line
# bind-key -t emacs-copy N search-reverse
# bind-key -t emacs-copy T jump-to-backward
# bind-key -t emacs-copy W next-space
# # bind-key -t emacs-copy ^ back-to-indentation
# bind-key -t emacs-copy b previous-word
# bind-key -t emacs-copy e next-word-end
# bind-key -t emacs-copy f jump-forward
# bind-key -t emacs-copy g history-top
# bind-key -t emacs-copy h cursor-left
# bind-key -t emacs-copy j cursor-down
# bind-key -t emacs-copy k cursor-up
# bind-key -t emacs-copy l cursor-right
# bind-key -t emacs-copy n search-again
# bind-key -t emacs-copy q cancel
# # bind-key -t emacs-copy t jump-to-forward
# bind-key -t emacs-copy v rectangle-toggle
# bind-key -t emacs-copy w next-word
# bind-key -t emacs-copy BSpace cursor-left
# bind-key -t emacs-copy NPage page-down
# bind-key -t emacs-copy PPage page-up
# bind-key -t emacs-copy Up cursor-up
# bind-key -t emacs-copy Down cursor-down
# bind-key -t emacs-copy Left cursor-left
# bind-key -t emacs-copy Right cursor-right
# bind-key -t emacs-copy C-Up scroll-up
# bind-key -t emacs-copy C-Down scroll-down
set -g default-command "reattach-to-user-namespace -l /usr/local/bin/zsh"
set -g window-status-format '#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F'
set -g window-status-current-format '#I:#(pwd="#{pane_current_path}"; echo ${pwd####*/})#F'
set-option -g status-interval 1
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment