├── LICENSE
├── README.md
├── scripts
└── basic-cpu-and-memory.tmux
├── themes
├── .gitignore
├── lateo
└── wemux
├── tmux.conf
└── tmuxified-image.png
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Zaiste! λ
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | tmux'ed
7 |
8 |
9 | A simple configuration for tmux.
10 |
11 |
12 |
13 |
14 |
15 | ## Installation
16 |
17 | ```bash
18 | cd
19 | git clone https://github.com/zaiste/tmuxed.git .tmux
20 |
21 | # link tmux.conf
22 | ln -sfn ~/.tmux/tmux.conf ~/.tmux.conf
23 | ```
24 |
25 |
--------------------------------------------------------------------------------
/scripts/basic-cpu-and-memory.tmux:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python
2 |
3 | """
4 | Basic CPU & Memory Usage for Tmux
5 |
6 | Author: Zaiste!
7 |
8 | Dash-meter inspired by tmux-mem-cpu
9 | and code from psutil top.py.
10 | """
11 |
12 | import os
13 | import sys
14 | if os.name != 'posix':
15 | sys.exit('platform not supported')
16 | import psutil
17 |
18 |
19 | def get_dashes(perc):
20 | dashes = "|" * int((float(perc) / 10))
21 | empty_dashes = " " * (10 - len(dashes))
22 | return dashes, empty_dashes
23 |
24 |
25 | def info():
26 | mem = psutil.virtual_memory()
27 | memused = mem.used - mem.cached
28 |
29 | cpu_dashes, cpu_empty_dashes = get_dashes(psutil.cpu_percent(interval=0.1))
30 | line = "%s/%sMB [%s%s] %s%%" % (
31 | str(int(memused / 1024 / 1024)),
32 | str(int(mem.total / 1024 / 1024)),
33 | cpu_dashes, cpu_empty_dashes,
34 | psutil.cpu_percent(interval=0.1),
35 | )
36 |
37 | return line
38 |
39 |
40 | def main():
41 | try:
42 | print info()
43 | except (KeyboardInterrupt, SystemExit):
44 | pass
45 |
46 | if __name__ == '__main__':
47 | main()
48 |
--------------------------------------------------------------------------------
/themes/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaiste/tmuxed/5ecefac6659799cd902ea6c9ef6d460f9f27af33/themes/.gitignore
--------------------------------------------------------------------------------
/themes/lateo:
--------------------------------------------------------------------------------
1 | set -g status-right '#[fg=green] #(basic-cpu-and-memory.tmux)'
2 | set -g status-left '#[fg=blue]#h'
3 | set-window-option -g window-status-current-bg black
4 | set-window-option -g window-status-current-format '#[fg=yellow][#I]#[fg=red] #W'
5 | set-window-option -g window-status-format '#[fg=yellow][#I]#[fg=white] #W'
6 |
--------------------------------------------------------------------------------
/themes/wemux:
--------------------------------------------------------------------------------
1 | # Stolen from https://gist.github.com/2305333
2 |
3 | set -g status-left-length 32
4 | set -g status-right-length 150
5 |
6 | set -g status-fg white
7 | set -g status-bg colour234
8 | set -g window-status-activity-attr bold
9 | set -g pane-border-fg colour245
10 | set -g pane-active-border-fg colour39
11 | set -g message-fg colour16
12 | set -g message-bg colour221
13 | set -g message-attr bold
14 |
15 | set -g status-left '#[fg=colour235,bg=colour252,bold] ❐ #S #[fg=colour252,bg=colour238,nobold]⮀#[fg=colour245,bg=colour238,bold] #(whoami) #[fg=colour238,bg=colour234,nobold]⮀'
16 | set -g window-status-format "#[fg=white,bg=colour234] #I #W "
17 | set -g window-status-current-format "#[fg=colour234,bg=colour39]⮀#[fg=colour25,bg=colour39,noreverse,bold] #I ⮁ #W #[fg=colour39,bg=colour234,nobold]⮀"
18 | set -g status-right '#[fg=color39] #(basic-cpu-and-memory.tmux)'
19 |
--------------------------------------------------------------------------------
/tmux.conf:
--------------------------------------------------------------------------------
1 | # vim: fdm=marker
2 |
3 | # I N T R O
4 | #
5 | # - set is the alias of set-option
6 | # - setw is the alias of set-window-option
7 | #
8 |
9 | setw -g mode-keys vi
10 |
11 | # Setup {{{
12 |
13 | unbind C-b
14 | set -g prefix C-a
15 |
16 | # }}}
17 |
18 | bind r source-file ~/.tmux.conf \; display '~/.tmux.conf reloaded'
19 |
20 | # General {{{
21 |
22 | set -g default-terminal "screen-256color"
23 | set -s escape-time 10
24 | set -g set-titles on
25 |
26 | # }}}
27 |
28 |
29 | # Windows & Panes {{{
30 |
31 | # windows numbers start at 1
32 | set -g base-index 1
33 |
34 | set -g renumber-windows on
35 | setw -g automatic-rename on
36 | set -g allow-rename off
37 |
38 | bind -r h select-pane -L
39 | bind -r j select-pane -D
40 | bind -r k select-pane -U
41 | bind -r l select-pane -R
42 |
43 | # split panes, vertically using | and horizontally useing -
44 | bind | split-window -h
45 | bind - split-window -v
46 | unbind '"'
47 | unbind %
48 |
49 | bind Tab last-window
50 |
51 | # }}}
52 |
53 |
54 | bind-key -r C-h select-window -t :-
55 | bind-key -r C-l select-window -t :+
56 |
57 | bind-key a send-prefix
58 |
59 | set -g bell-action none
60 |
61 | setw -g clock-mode-colour colour135
62 |
63 | set -g message-command-style fg=blue,bg=black
64 | set -g message-style fg=colour232,bg=colour4
65 |
66 | setw -g mode-style bg=colour195,fg=black
67 | setw -g monitor-activity on
68 |
69 | set -g set-titles-string '#(whoami) :: #h :: #(curl ipecho.net/plain;echo)'
70 |
71 | set -g status-justify left
72 | set -g status-interval 2
73 | set -g status-position bottom
74 | set -g status-style bg=black
75 | set -g status-left ""
76 | set -g status-left-length 40
77 | set -g status-right '#[fg=colour67]1.1.1.1 #[fg=white,bg=colour241] %d/%m #[fg=colour233,bold,bg=colour245] %H:%M:%S '
78 | #set -g status-right '#[fg=colour67]#(curl ipecho.net/plain;echo) #[fg=white,bg=colour241] %d/%m #[fg=colour233,bold,bg=colour245] %H:%M:%S '
79 | set -g status-right-length 50
80 |
81 | setw -g window-status-format ' #W:#I '
82 | setw -g window-status-current-format ' #W:#I '
83 | setw -g window-status-current-style fg=white,bold,bg=colour63
84 | setw -g window-status-style fg=colour63,bg=black,bold
85 | setw -g window-status-bell-style bold,fg=colour255,bg=colour1
86 |
87 | set -g visual-activity on
88 | set -g visual-bell off
89 | set -g visual-silence off
90 |
91 | set -g pane-border-style fg=black,bg=colour235
92 | set -g pane-active-border-style bg=colour236,fg=colour51
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/tmuxified-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/zaiste/tmuxed/5ecefac6659799cd902ea6c9ef6d460f9f27af33/tmuxified-image.png
--------------------------------------------------------------------------------