Small changes, tmux shortcuts

This commit is contained in:
2021-12-19 03:55:15 +01:00
parent 932cf6ac6b
commit 3464039d98
3 changed files with 8 additions and 2 deletions

View File

@@ -6,3 +6,6 @@ source "$HOME/.aliases"
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0
echo -e '\e[34m [termrc] Config reloaded\e[0m' echo -e '\e[34m [termrc] Config reloaded\e[0m'
# Add Rust crates to path
export PATH=$PATH:$HOME/.cargo/bin

View File

@@ -21,6 +21,8 @@ bind Tab last-window
bind Enter copy-mode bind Enter copy-mode
bind Escape copy-mode bind Escape copy-mode
# Window actions
bind , rename-window
bind r source-file ~/.tmux.conf; display " [tmux] ♦ Configuration reloaded from .tmux.conf" bind r source-file ~/.tmux.conf; display " [tmux] ♦ Configuration reloaded from .tmux.conf"
# Colors # Colors
@@ -34,7 +36,7 @@ set -g default-terminal "xterm-256color"
set -g status-bg colour235 set -g status-bg colour235
set -g status-fg white set -g status-fg white
set -g status-left '#(sh ~/.tmux/health-indicator.sh #{client_prefix})#S #(~/.tmux/segment.sh end 31 29) ▣ #{session_windows} #{?session_many_attached,#(~/.tmux/subsegment.sh end) 🖥 #{session-attached},}#(~/.tmux/segment.sh end 29 65) #H #(~/.tmux/segment.sh end 65 71) #[fg=colour235]#(whoami) #(~/.tmux/segment.sh end 71 235)' set -g status-left '#(sh ~/.tmux/health-indicator.sh #{client_prefix})#S #(~/.tmux/segment.sh end 31 29) ▣ #{session_windows} #{?session_many_attached,#(~/.tmux/subsegment.sh end) 🖥 #{session-attached},}#(~/.tmux/segment.sh end 29 71) #[fg=colour235]#H #(~/.tmux/segment.sh end 71 65) #[fg=colour235]#(whoami) #(~/.tmux/segment.sh end 65 235)'
set -g status-left-length 80 set -g status-left-length 80
set -g status-right-length 120 set -g status-right-length 120
set -g status-justify centre set -g status-justify centre

View File

@@ -1,10 +1,11 @@
#!/bin/sh #!/bin/sh
if ! command -v playerctl; then if ! hash playerctl 2>/dev/null; then
return 1 return 1
fi fi
playing=$(playerctl -a metadata --format='{{status}}:{{artist}} - {{title}}' | grep 'Playing' | sed -e "s/^Playing://") playing=$(playerctl -a metadata --format='{{status}}:{{artist}} - {{title}}' | grep 'Playing' | sed -e "s/^Playing://")
#echo $playing
if [ -n "$playing" ]; then if [ -n "$playing" ]; then
echo $playing | sed -E 's/(.{30})(.{1,})$/\1.../' echo $playing | sed -E 's/(.{30})(.{1,})$/\1.../'