Work on tmux stuff
This commit is contained in:
parent
cddee8ecb0
commit
9caf88f11d
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,3 +5,4 @@ colors/gen/tmp
|
||||||
*.pid
|
*.pid
|
||||||
*.tmp
|
*.tmp
|
||||||
*.secret
|
*.secret
|
||||||
|
/.repositories
|
||||||
|
|
|
@ -79,3 +79,5 @@ Here are some bullet points on my workflow as a Web Developer:
|
||||||
* Unify all the common variables... somehow?
|
* Unify all the common variables... somehow?
|
||||||
* Dunst and notifications
|
* Dunst and notifications
|
||||||
* Vimux
|
* Vimux
|
||||||
|
* urxvt reizing
|
||||||
|
* urxvt fontawesome
|
||||||
|
|
|
@ -42,5 +42,6 @@ sudo pip2 install neovim
|
||||||
|
|
||||||
sudo ln -s /usr/bin/google-chrome-unstable /usr/bin/chrome
|
sudo ln -s /usr/bin/google-chrome-unstable /usr/bin/chrome
|
||||||
|
|
||||||
mkdir -p "$HOME/.fonts"
|
mkdir -p "$HOME/.fonts/OTF"
|
||||||
curl -o "$HOME/.fonts/monaco_powerline_nerd_font.otf" https://github.com/taohex/font/raw/master/Monaco%20for%20Powerline%20Nerd%20Font%20Complete.otf
|
curl -L -o "$HOME/.fonts/OTF/monaco_powerline_nerd_font.otf" https://github.com/taohex/font/raw/master/Monaco%20for%20Powerline%20Nerd%20Font%20Complete.otf
|
||||||
|
fc-cache -vf
|
||||||
|
|
|
@ -23,6 +23,7 @@ pacaur -S \
|
||||||
nginx \
|
nginx \
|
||||||
urxvt-perls-git urxvt-resize-font-git \
|
urxvt-perls-git urxvt-resize-font-git \
|
||||||
samba \
|
samba \
|
||||||
|
wine-staging lib32-libpulse \
|
||||||
ttf-noto-fonts-simple ttf-noto-fonts-ib ttf-noto-fonts-emoji-ib \
|
ttf-noto-fonts-simple ttf-noto-fonts-ib ttf-noto-fonts-emoji-ib \
|
||||||
siji-git gohufont artwiz-fonts phallus-fonts-git \
|
siji-git gohufont artwiz-fonts phallus-fonts-git \
|
||||||
--noconfirm --noedit
|
--noconfirm --noedit
|
||||||
|
|
26
scripts/bin/tmux-session-list
Executable file
26
scripts/bin/tmux-session-list
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
function debug_msg {
|
||||||
|
(>&2 echo "DEBUG: $1")
|
||||||
|
}
|
||||||
|
|
||||||
|
export CUR_SESSION_PREFIX="#[bg=colour1] "
|
||||||
|
export CUR_SESSION_SUFFIX=" #[bg=default]"
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
# debug_msg 'No current session passed'
|
||||||
|
export CUR_TMUX_SESSION="$(tmux display-message -p '#S')"
|
||||||
|
else
|
||||||
|
export CUR_TMUX_SESSION="$1"
|
||||||
|
fi
|
||||||
|
# debug_msg "Current tmux session name: $CUR_TMUX_SESSION"
|
||||||
|
|
||||||
|
export TMUX_SESSION_LIST="$(tmux list-sessions | sed -ne 's/^\([^:]*\).*$/ \1 /p' | tr '\n' ' ' | xargs)"
|
||||||
|
# debug_msg "Running tmux sessions: $TMUX_SESSION_LIST"
|
||||||
|
|
||||||
|
HIGHLIGHT_CUR_SESSION="${TMUX_SESSION_LIST/$CUR_TMUX_SESSION/${CUR_SESSION_PREFIX}${CUR_TMUX_SESSION}${CUR_SESSION_SUFFIX}}"
|
||||||
|
|
||||||
|
ADD_END_SPACE_IF_NECESSARY=$(echo "$HIGHLIGHT_CUR_SESSION" | sed -e 's/\([^]]\)$/\ /p')
|
||||||
|
# debug_msg "Transformed tmux session list: -$ADD_END_SPACE_IF_NECESSARY-"
|
||||||
|
|
||||||
|
echo "$ADD_END_SPACE_IF_NECESSARY"
|
|
@ -11,9 +11,6 @@ set-option -g mouse on
|
||||||
set -g escape-time 10
|
set -g escape-time 10
|
||||||
setw -g monitor-activity on
|
setw -g monitor-activity on
|
||||||
|
|
||||||
# hide tmux status bar by default (prefix H toggles)
|
|
||||||
set -g status off
|
|
||||||
|
|
||||||
bind-key W resize-pane -x 100
|
bind-key W resize-pane -x 100
|
||||||
|
|
||||||
# splitting
|
# splitting
|
||||||
|
@ -24,13 +21,42 @@ bind-key b split-window
|
||||||
set -g default-terminal "xterm"
|
set -g default-terminal "xterm"
|
||||||
|
|
||||||
# iterating
|
# iterating
|
||||||
|
unbind r
|
||||||
bind r source-file ~/.tmux.conf
|
bind r source-file ~/.tmux.conf
|
||||||
|
|
||||||
# toggle status bar
|
# hide tmux status bar by default (prefix H toggles)
|
||||||
|
set -g status off
|
||||||
|
|
||||||
|
# toggle status bar hotkey
|
||||||
bind-key H set status
|
bind-key H set status
|
||||||
|
|
||||||
|
# message colors
|
||||||
|
set -g message-bg colour18
|
||||||
|
set -g message-fg colour7
|
||||||
|
|
||||||
|
# status bar configuration
|
||||||
|
# set -g status-utf8 on
|
||||||
|
set -g status-justify left
|
||||||
|
|
||||||
|
# status bar colors
|
||||||
|
set -g status-bg colour18
|
||||||
|
set -g status-fg colour7
|
||||||
|
|
||||||
|
# don't show time or date or anything - we have a bar for that
|
||||||
|
set -g status-left ''
|
||||||
|
set -g status-right ''
|
||||||
|
set -g status-right-length 20
|
||||||
|
|
||||||
|
set -g status-left ' #(#{DOTFILES_PATH}/scripts/bin/tmux-session-list #S)'
|
||||||
|
set -g status-left-length 80
|
||||||
|
|
||||||
|
setw -g window-status-current-fg colour7
|
||||||
|
setw -g window-status-current-bg colour1
|
||||||
|
# setw -g window-status-current-attr bold
|
||||||
|
setw -g window-status-current-format ''
|
||||||
|
|
||||||
# vim copying
|
# vim copying
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys v
|
||||||
bind-key -t vi-copy 'v' begin-selection
|
bind-key -t vi-copy 'v' begin-selection
|
||||||
bind-key -t vi-copy 'y' copy-selection
|
bind-key -t vi-copy 'y' copy-selection
|
||||||
|
|
||||||
|
|
Reference in a new issue