From 9e3bbebc6eb7c40145a2fe0dc92b517ab6065dee Mon Sep 17 00:00:00 2001 From: DariusIII Date: Wed, 5 Sep 2018 15:23:15 +0200 Subject: [PATCH] Add powerline directly from ubuntu repo and use it in tmux --- Changelog | 1 + install_tmux.sh | 1 + misc/update/tmux/tmux.conf | 21 ++++++--------------- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/Changelog b/Changelog index 49e58688cb..8545858dc2 100755 --- a/Changelog +++ b/Changelog @@ -1,4 +1,5 @@ 2018-09-05 DariusIII + * Chg: Add powerline directly from ubuntu repo and use it in tmux * Chg: Update tmux.conf, add credit where credit is due * Chg: Update tmux theme and remove powerline support * Chg: Remove now unused packages folder diff --git a/install_tmux.sh b/install_tmux.sh index 19504b7345..6f2fc49981 100755 --- a/install_tmux.sh +++ b/install_tmux.sh @@ -13,6 +13,7 @@ sudo apt install -y pkg-config sudo apt install -y libevent-dev sudo apt install -y libncurses5-dev sudo apt install -y fonts-powerline +sudo apt install -y powerline rm -fr /tmp/tmux diff --git a/misc/update/tmux/tmux.conf b/misc/update/tmux/tmux.conf index 76b91bd76f..dbf0eff46c 100644 --- a/misc/update/tmux/tmux.conf +++ b/misc/update/tmux/tmux.conf @@ -25,10 +25,6 @@ set -g status-left "" # client connected to *that window*. Much more reasonable. setw -g aggressive-resize on -## Allows us to use C-a a to send commands to a TMUX session inside -## another TMUX session -# bind-key a send-prefix # <<<<===DELETE? - # Activity monitoring setw -g monitor-activity on #set -g visual-activity on @@ -36,17 +32,9 @@ setw -g monitor-activity on # # Refresh the status bar every 5 seconds. set -g status-interval 5 # default = 15 seconds -# Several examples of using a shell command in the status line <<<=== DELETE??? -#set -g status-right "#[fg=yellow]#(uptime | cut -d ',' -f 2-)" -#set -g status-right "#[fg=yellow]#(free -m | grep 'Mem' | awk '{ print \"Ram Used: \"$3\" MB\";}') #[fg=yellow]#(free -m | grep 'Mem' | awk '{ print \"Ram Free: \"$4\" MB\";}') \ -#[fg=yellow]#(free -m | grep 'Swap' | awk '{ print \"Swap Used: \"$3\" MB\";}') #[fg=yellow]#(uptime | cut -d ',' -f 2-)" -#set -g status-right "#[fg=yellow]#(free -m | grep '+' | awk '{ print \"Ram Used: \"$3\" MB, Ram Free: \"$4\" MB\";}')#(free -m | grep 'Swap' | awk '{ print \",Swap Used: \"$3\" MB\";}') #[fg=cyan,bold]%Y-%m-%d #(uptime)" -# Compact status line for free version 3.3.10 +# Right status bar set -g status-right "#[fg=yellow]#(free -h | grep 'Mem' | awk '{ print \"RAM Used: \"$3\", Cached: \"$6\", \";}')#(free -m | grep 'Swap' | awk '{ print \"Swapped: \"$3;}')M #[fg=cyan,bold] #(uptime | cut -d ',' -f 4-)" -#set-option -g status-right-length 200 -#set -g status-right '#[fg=green][#[fg=blue]%Y-%m-%d #[fg=white]%H:%M#[default] #($HOME/bin/battery)#[fg=green]]' - # Highlight active window set-window-option -g window-status-current-bg red @@ -93,8 +81,8 @@ set -g status-fg colour137 set -g status-attr dim set -g status-left '' set -g status-right "#[fg=yellow]#(free -h | grep 'Mem' | awk '{ print \"RAM Used: \"$3\", Cached: \"$6\", \";}')#(free -m | grep 'Swap' | awk '{ print \"Swapped: \"$3;}')M #[fg=cyan,bold] #(uptime | cut -d ',' -f 4-)" -set -g status-right-length 250 -set -g status-left-length 20 +set -g status-right-length 200 +set -g status-left-length 10 setw -g window-status-current-fg colour1 setw -g window-status-current-bg colour19 @@ -114,3 +102,6 @@ setw -g window-status-bell-bg colour1 set -g message-attr bold set -g message-fg colour232 set -g message-bg colour16 + +# Add powerline to tmux +source '/usr/share/powerline/bindings/tmux/powerline.conf'