From 9caf88f11dfde151c9ec22291ea6878ac18eef15 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 23 Apr 2017 06:47:00 -0500 Subject: [PATCH] Work on tmux stuff --- .gitignore | 1 + readme.md | 2 ++ .../arch-linux/provisioning/2-essentials.bash | 5 +-- scripts/arch-linux/provisioning/3-extras.bash | 1 + scripts/bin/tmux-session-list | 26 ++++++++++++++ shell/tmux.conf | 36 ++++++++++++++++--- 6 files changed, 64 insertions(+), 7 deletions(-) create mode 100755 scripts/bin/tmux-session-list diff --git a/.gitignore b/.gitignore index 9a4e25a..e32d9bb 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ colors/gen/tmp *.pid *.tmp *.secret +/.repositories diff --git a/readme.md b/readme.md index f0f2c6c..701f478 100644 --- a/readme.md +++ b/readme.md @@ -79,3 +79,5 @@ Here are some bullet points on my workflow as a Web Developer: * Unify all the common variables... somehow? * Dunst and notifications * Vimux +* urxvt reizing +* urxvt fontawesome diff --git a/scripts/arch-linux/provisioning/2-essentials.bash b/scripts/arch-linux/provisioning/2-essentials.bash index 6d297d3..c417af3 100755 --- a/scripts/arch-linux/provisioning/2-essentials.bash +++ b/scripts/arch-linux/provisioning/2-essentials.bash @@ -42,5 +42,6 @@ sudo pip2 install neovim sudo ln -s /usr/bin/google-chrome-unstable /usr/bin/chrome -mkdir -p "$HOME/.fonts" -curl -o "$HOME/.fonts/monaco_powerline_nerd_font.otf" https://github.com/taohex/font/raw/master/Monaco%20for%20Powerline%20Nerd%20Font%20Complete.otf +mkdir -p "$HOME/.fonts/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 diff --git a/scripts/arch-linux/provisioning/3-extras.bash b/scripts/arch-linux/provisioning/3-extras.bash index a60d26b..0a54934 100755 --- a/scripts/arch-linux/provisioning/3-extras.bash +++ b/scripts/arch-linux/provisioning/3-extras.bash @@ -23,6 +23,7 @@ pacaur -S \ nginx \ urxvt-perls-git urxvt-resize-font-git \ samba \ + wine-staging lib32-libpulse \ ttf-noto-fonts-simple ttf-noto-fonts-ib ttf-noto-fonts-emoji-ib \ siji-git gohufont artwiz-fonts phallus-fonts-git \ --noconfirm --noedit diff --git a/scripts/bin/tmux-session-list b/scripts/bin/tmux-session-list new file mode 100755 index 0000000..60f356f --- /dev/null +++ b/scripts/bin/tmux-session-list @@ -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" diff --git a/shell/tmux.conf b/shell/tmux.conf index 3e08920..6907a74 100644 --- a/shell/tmux.conf +++ b/shell/tmux.conf @@ -11,9 +11,6 @@ set-option -g mouse on set -g escape-time 10 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 # splitting @@ -24,13 +21,42 @@ bind-key b split-window set -g default-terminal "xterm" # iterating +unbind r 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 +# 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 -setw -g mode-keys vi +setw -g mode-keys v bind-key -t vi-copy 'v' begin-selection bind-key -t vi-copy 'y' copy-selection