Squash for a new start

main v1.0.0
Efertone 1 year ago
commit f2f4fe791c
Signed by: efertone
GPG Key ID: 07AB750DDFD9EE50
  1. 1
      .gitignore
  2. 3
      .gitmodules
  3. 18
      _tmuxp/content.yaml
  4. 6
      _tmuxp/email.yaml
  5. 32
      _tmuxp/pet.yaml
  6. 12
      _tmuxp/random.yaml
  7. 25
      _tmuxp/weaveworks.yaml
  8. 18
      get-path
  9. 15
      left
  10. 1
      plugins/tpm
  11. 11
      right
  12. 70
      status-first
  13. 37
      status-second
  14. 104
      tmux.conf

1
.gitignore vendored

@ -0,0 +1 @@
plugins/*

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "plugins/tpm"]
path = plugins/tpm
url = https://github.com/tmux-plugins/tpm

@ -0,0 +1,18 @@
session_name: Content
windows:
- window_name: efertone.me
start_directory: ~/Development/gitea.code-infection.com/efertone/efertone-me/
automatic-rename: 'off'
layout: even-horizontal
focus: true
panes:
- focus: true
- blank
- window_name: code-infection.com
start_directory: ~/Development/gitea.code-infection.com/efertone/blog-code-infection-com/
automatic-rename: 'off'
layout: even-horizontal
panes:
- focus: true
- blank

@ -0,0 +1,6 @@
start_directory: "${HOME}"
session_name: Email
windows:
- window_name: Weaveworks
panes:
- mutt-weaveworks

@ -0,0 +1,32 @@
session_name: Pet Projects
windows:
- window_name: totp-cli
start_directory: ~/Development/github.com/yitsushi/totp-cli/
automatic-rename: 'off'
panes:
- focus: true
- window_name: go-misskey
start_directory: ~/Development/github.com/yitsushi/go-misskey/
automatic-rename: 'off'
focus: true
panes:
- focus: true
- window_name: eferland
start_directory: ~/Development/gitea.code-infection.com/efertone/eferland/
automatic-rename: 'off'
panes:
- focus: true
- window_name: Charts
start_directory: ~/Development/gitea.code-infection.com/efertone/charts/
automatic-rename: 'off'
panes:
- focus: true
- window_name: Experimens
start_directory: ~/Development/gitea.code-infection.com/efertone/experiments/
automatic-rename: 'off'
panes:
- focus: true

@ -0,0 +1,12 @@
start_directory: "${HOME}"
session_name: Random
windows:
- window_name: RandomSell
start_directory: "${HOME}/tmp"
layout: main-horizontal
options:
main-pane-height: 40
panes:
- focus: true
- null
- null

@ -0,0 +1,25 @@
start_directory: "~/Development/github.com/weaveworks/"
session_name: Weaveworks
windows:
- window_name: reignite
start_directory: ~/Development/github.com/weaveworks/reignite/
automatic-rename: 'off'
layout: main-vertical
options:
main-pane-width: 120
focus: true
panes:
- focus: true
- blank
- blank
- window_name: firecracker
start_directory: ~/Development/github.com/firecracker-microvm/firecracker
layout: main-vertical
options:
main-pane-width: 120
automatic-rename: 'off'
panes:
- focus: true
- blank
- blank

@ -0,0 +1,18 @@
#!/bin/bash
p=${1:-$(pwd)}
cd $p
g=$(git rev-parse --show-toplevel 2> /dev/null)
if [ $g != "" ]; then
basename $g
else
if [[ $p = $HOME ]]; then
echo "~$(whoami)"
else
echo ${p/${HOME}\//}
fi
fi

15
left

@ -0,0 +1,15 @@
#!/bin/bash
line=''
line=$line'#[fg=colour232,bg=colour227,bold]'
line=$line' #S ' \
line=$line'#[fg=colour227,bg=colour240,nobold]'
line=$line'#[fg=colour233,bg=colour240]'
line=$line' #(whoami) '
line=$line'#[fg=colour240,bg=colour235]'
line=$line'#[fg=colour240,bg=colour235]'
line=$line' #I:#P '
line=$line'#[fg=colour235,bg=default,nobold]'
echo $line

@ -0,0 +1 @@
Subproject commit 693e5a2a0f6acfd2666882655d5dfd32e8c6c50b

11
right

@ -0,0 +1,11 @@
#!/bin/bash
line=''
line=$line'#(date +"%I:%M %p") '
line=$line'#[fg=colour238,nobold]'
line=$line'#[fg=colour254, bg=colour238]'
line=$line' #(date +"%D %a") '
line=$line'#(rainbarf --width 10 --battery --remaining --tmux --rgb)'
echo "${line}"

@ -0,0 +1,70 @@
#!/bin/bash
# set status-format[0]
# "#[align=left range=left #{status-left-style}]#[push-default]#{T;=/#{status-left-length}:status-left}#[pop-default]
# #[norange default]#[list=on align=#{status-justify}]#[list=left-marker]<#[list=right-marker]>#[list=on]
# #{W:#[range=window|#{window_index} #{window-status-style}#{?#{&&:#{window_last_flag},#{!=:#{window-status-last-style},default}}, #{window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{window-status-bell-style},default}}, #{window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{window-status-activity-style},default}}, #{window-status-activity-style},}}]#[push-default]#{T:window-status-format}#[pop-default]#[norange default]#{?window_end_flag,,#{window-status-separator}},#[range=window|#{window_index} list=focus #{?#{!=:#{window-status-current-style},default},#{window-status-current-style},#{window-status-style}}#{?#{&&:#{window_last_flag},#{!=:#{window-status-last-style},default}}, #{window-status-last-style},}#{?#{&&:#{window_bell_flag},#{!=:#{window-status-bell-style},default}}, #{window-status-bell-style},#{?#{&&:#{||:#{window_activity_flag},#{window_silence_flag}},#{!=:#{window-status-activity-style},default}}, #{window-status-activity-style},}}]#[push-default]#{T:window-status-current-format}#[pop-default]#[norange list=on default]#{?window_end_flag,,#{window-status-separator}}}
# #[nolist align=right range=right #{status-right-style}]#[push-default]#{T;=/#{status-right-length}:status-right}#[pop-default]#[norange default]#[align=centre]"
function left() {
line='#[align=left range=left #{status-left-style}]'
#line=$line'#[fg=colour234,bg=colour133,bold]'
#line=$line' #S ' \
#line=$line'#[fg=colour133,bg=colour235,nobold]'
#line=$line'#[fg=colour240,bg=colour235]'
#line=$line' #(whoami) '
#line=$line'#[fg=colour235,bg=default,nobold]'
line=$line'#[fg=colour133,bg=colour235,bold]'
line=$line' #S ' \
line=$line'#[fg=colour133]❯'
line=$line'#[fg=colour240]'
line=$line' #(whoami) '
line=$line'#[fg=colour235,bg=default,nobold]'
echo $line
}
function center() {
# Alignment
line='#[norange default]#[list=on align=#{status-justify}]'
# Markers
line=$line'#[list=left-marker]<#[list=right-marker]>#[list=on]'
# Start of list
line=$line'#{W:'
# Window list
line=$line'#[push-default]#{T:window-status-format}#[pop-default]'
# Window separator
line=$line'#[norange default]#{?window_end_flag,,#{window-status-separator}},'
# Current format
line=$line'#[push-default]#{T:window-status-current-format}#[pop-default]'
line=$line'#[norange list=on default]'
line=$line'#{?window_end_flag,,#{window-status-separator}}'
# End of list
line=$line'}'
echo $line
}
function right() {
line='#[nolist align=right range=right #{status-right-style}]'
line=$line'#(date +"%I:%M %p") '
line=$line'#[fg=colour238,nobold]'
line=$line'#[fg=colour254, bg=colour238]'
line=$line' #(date +"%D %a") '
line=$line'#(rainbarf --width 10 --battery --remaining --tmux --rgb)'
echo "${line}"
}
echo "$(left)$(center)$(right)"

@ -0,0 +1,37 @@
#!/bin/bash
function left() {
line=''
line=$line'#[fg=colour149,bg=colour235]'
line=$line' #(~/.tmux/get-path #{pane_current_path})'
line=$line' #(gitmux "#{pane_current_path}") '
line=$line'#[fg=colour235,bg=default,nobold]'
echo $line
}
function right() {
line='#[nolist align=right range=right #{status-right-style}]'
spotyTextColor=colour219
spotyBarColor=colour219
spotyBackground=default
#spotyBackground=colour133
#spotyStyle="#[fg=${spotyBackground}]#[fg=${spotyTextColor}, bg=${spotyBackground}, nobold]"
spotyStyle="#[fg=${spotyTextColor}, bg=${spotyBackground}, nobold]"
spotyFlags="--tmux-color-bar-fg=${spotyBarColor}"
spotyFlags="${spotyFlags} --tmux-color-text-fg=${spotyTextColor}"
spotyFlags="${spotyFlags} --first-artist --max-length-total=80"
if ps aux | grep -i '[z]oom' 2>&1 > /dev/null; then
line=$line' #[fg=colour124]#[fg=colour15, bg=colour124, nobold] Zoom is running '
else
line=$line' '$spotyStyle' #(eferland spoty show --tmux '$spotyFlags') '
fi
echo "${line}"
}
echo "$(left)$(right)"

@ -0,0 +1,104 @@
unbind C-b
set -g prefix C-a
bind r source-file ~/.tmux.conf \; display-message "Config reloaded."
#set -g default-terminal tmux-256color
#set -g default-terminal screen-256color
set -g default-terminal xterm-256color
set -g base-index 1
set -g default-command "${SHELL}"
# Mouse
set -g mouse on
set -ag terminal-overrides ",st-*:Tc"
set -g history-limit 30000
# Scrolling in copy-mode
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
# Fast scroll with Ctrl
bind-key -T root C-WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
# Toggle mouse on/off
bind-key m set-option -g mouse on \; display 'Mouse: ON'
bind-key M set-option -g mouse off \; display 'Mouse: OFF'
# Display
set -g display-time 5000
set -g monitor-activity on
set -g visual-activity on
set -g status-style fg=white,bg=default,default
set -g pane-border-style fg=default,bg=default
set -g message-style fg=yellow,bg=default
set -g set-titles on
set -g status on
set -g status-interval 3
set -g status-justify centre
set -g automatic-rename on
set -g status-position top
set -g pane-border-status top
set -g pane-border-format " ###{pane_index} (#{pane_id}) " # #{pane_title}"
#source-file "${HOME}/.tmux-themepack/powerline/block/magenta.tmuxtheme"
# --------
setw -g mode-keys vi
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-battery'
#set -g @plugin 'jimeh/tmux-themepack'
#set -g @themepack 'powerline/block/blue'
run -b '~/.tmux/plugins/tpm/tpm'
# Extra style
#set -g window-status-style fg=colour38,bg=default,dim
set -g pane-active-border-style fg=colour219,bg=default
#set -g window-status-current-style fg=colour38,bg=default
set -g status 2
set -g status-format[0] "#(~/.tmux/status-first)"
set -g status-format[1] "#(~/.tmux/status-second)"
# Status length
#set -g status-left-length 50
#set -g status-right-length 80
# Left side
#set -g status-left "#(~/.tmux/left)"
# Right side
#set -g status-right '#(~/.tmux/right)'
# Tabs
set -g window-status-current-format "#[fg=yellow, bg=default] #[fg=black]#[bg=yellow] #I #[fg=colour254, bg=colour237] #W #[fg=brightblack]#F "
set -g window-status-format "#[fg=colour39, bg=default, nodim] #[fg=colour16, bg=colour39] #I #[fg=colour247, bg=colour237] #W #[fg=brightblack]#F "
set -g window-status-bell-style fg=colour39,bg=black
set -g window-status-activity-style fg=colour39,bg=black
set -g monitor-activity off
set-option -g default-shell "${SHELL}"
bind-key § set-option status
bind-key '#' set-window-option synchronize-panes\; display-message "synchronize-panes is now #{?pane_synchronized,on,off}"
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe "pbcopy"
bind-key j select-pane -D
bind-key k select-pane -U
bind-key h select-pane -L
bind-key l select-pane -R
bind-key Enter split-window -h
bind-key BSpace split-window -v
bind-key C-d split-window -h "pmenu"
Loading…
Cancel
Save