mirror of
https://github.com/HerrCraziDev/dotfiles.git
synced 2025-12-16 02:46:17 +01:00
fucking mess
This commit is contained in:
BIN
tmux/.tmux/.subsegment.sh.swp
Normal file
BIN
tmux/.tmux/.subsegment.sh.swp
Normal file
Binary file not shown.
32
tmux/.tmux/.tmux.conf
Normal file
32
tmux/.tmux/.tmux.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
unbind C-b
|
||||
set -g prefix C-a
|
||||
bind C-a send-prefix
|
||||
|
||||
# More friendly split pane
|
||||
bind-key h split-window -h
|
||||
bind-key v split-window -v
|
||||
bind - split-window -h
|
||||
bind _ split-window -v
|
||||
|
||||
bind Enter copy-mode
|
||||
bind Escape copy-mode
|
||||
|
||||
bind r source-file ~/.tmux.conf; display " [tmux] ♦ Configuration reloaded from .tmux.conf"
|
||||
|
||||
#set -g utf8 on
|
||||
#set-option -g status-utf8 on
|
||||
set -g default-terminal "xterm-256color"
|
||||
|
||||
set -g status-bg colour235
|
||||
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-length 80
|
||||
set -g status-right-length 120
|
||||
set -g status-justify centre
|
||||
set -g status-interval 1
|
||||
|
||||
set -g window-status-format '#(~/.tmux/segment.sh start 235 237 round)#I#(~/.tmux/subsegment.sh end 234) #W #(~/.tmux/segment.sh end 237 235 round)'
|
||||
set -g window-status-current-format '#(~/.tmux/segment.sh start 235 71 round)#[fg=colour235]#I#(~/.tmux/subsegment.sh end 234)#[fg=colour235] #W #(~/.tmux/segment.sh end 71 235 round)'
|
||||
|
||||
set -g status-right '#{?#(~/.tmux/mediaplaying.sh test),#(~/.tmux/segment.sh start 235 65)#[fg=colour235] ♫ #(~/.tmux/mediaplaying.sh) #(~/.tmux/segment.sh start 65 71),#(~/.tmux/segment.sh start 235 71)}#[fg=colour235] %H:%M:%S #(~/.tmux/subsegment.sh start) %d %b '
|
||||
set -g pane-active-border-style fg=colour76
|
||||
23
tmux/.tmux/health-indicator.sh
Executable file
23
tmux/.tmux/health-indicator.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
cnormal1='colour31'
|
||||
cnormal2='white'
|
||||
cprefix='colour238'
|
||||
|
||||
bnormal='colour31'
|
||||
bprefix='colour208'
|
||||
normal='●'
|
||||
prefix='▲'
|
||||
|
||||
if [ $1 -eq 1 ]; then
|
||||
printf "#[fg=$cprefix,bg=$bprefix] $prefix "
|
||||
else
|
||||
if [ $(($(date +%s) % 2)) -eq 0 ]; then
|
||||
printf "#[fg=$cnormal1,bg=$bnormal] $normal "
|
||||
else
|
||||
printf "#[fg=$cnormal2,bg=$bnormal] $normal "
|
||||
fi
|
||||
fi
|
||||
|
||||
#printf "#[fg=white,bg=red] $(date +%N) $@"
|
||||
printf "#[fg=white]"
|
||||
10
tmux/.tmux/mediaplaying.sh
Executable file
10
tmux/.tmux/mediaplaying.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
playing=$(playerctl -a metadata --format='{{status}}:{{artist}} - {{title}}' | grep 'Playing' | sed -e "s/^Playing://")
|
||||
|
||||
if [ -n "$playing" ]; then
|
||||
echo $playing | sed -E 's/(.{30})(.{1,})$/\1.../'
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
26
tmux/.tmux/segment.sh
Executable file
26
tmux/.tmux/segment.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
case $4 in
|
||||
round)
|
||||
separator="\ue0b6";;
|
||||
|
||||
sharp | *)
|
||||
separator="\ue0b2";;
|
||||
esac
|
||||
echo -e "#[fg=colour$3,bg=colour$2]$separator#[fg=white,bg=colour$3]";;
|
||||
|
||||
end)
|
||||
case $4 in
|
||||
round)
|
||||
separator="\ue0b4";;
|
||||
|
||||
sharp | *)
|
||||
separator="\ue0b0";;
|
||||
esac
|
||||
echo -e "#[fg=colour$2,bg=colour$3]$separator#[fg=white]";;
|
||||
esac
|
||||
|
||||
|
||||
26
tmux/.tmux/subsegment.sh
Executable file
26
tmux/.tmux/subsegment.sh
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
case $3 in
|
||||
round)
|
||||
separator="\ue0b7";;
|
||||
|
||||
sharp | *)
|
||||
separator="\ue0b3";;
|
||||
esac;;
|
||||
|
||||
end)
|
||||
case $3 in
|
||||
round)
|
||||
separator="\ue0b5";;
|
||||
|
||||
sharp | *)
|
||||
separator="\ue0b1";;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if [ ! -z $2 ]; then echo -ne "#[fg=colour$2]"; fi
|
||||
echo -ne "$separator"
|
||||
if [ ! -z $2 ]; then echo -ne "#[fg=white]"; fi
|
||||
Reference in New Issue
Block a user