{"id":13,"date":"2020-10-12T13:50:48","date_gmt":"2020-10-12T11:50:48","guid":{"rendered":"https:\/\/franz-rustler.com\/?p=13"},"modified":"2020-10-12T13:50:48","modified_gmt":"2020-10-12T11:50:48","slug":"tmux-notes","status":"publish","type":"post","link":"https:\/\/franz-rustler.com\/?p=13","title":{"rendered":"Tmux Notes"},"content":{"rendered":"\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<p>start\/exit tmux<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ tmux # start tmux servers \n$ tmux at # attach tmux sessions \n$ tmux ls # list tmux sessions \n$ exit # close tmux session<\/code><\/pre>\n\n\n\n<p>Session sharing<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ tmux new -s session_name # make new named session\n$ tmux at -t session_name  # attach to exist session (allowing shared sessions)\n$ tmux kill-session -t session_name  # kill named session<\/code><\/pre>\n\n\n\n<p>tmux commands<\/p>\n<\/div><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>NOTE: All commands need to be prefixed with the action key.\n      By default, this is CTRL-b\n\n c  - create new window\nn\/p - move to next\/previous window\n0-9 - move to window number 0-9\n f  - find window by name\n w  - menu with all windows\n &amp;  - kill current window\n ,  - rename window\n\n %  - split window, adding a vertical pane to the right\n \"  - split window, adding an horizontal pane below\n\u2190\/\u2192 - move focus to left\/right pane\n\u2191\/\u2193 - move focus to upper\/lower pane\n\n !  - Break current pane into new window\n x  - Kill the current pane.\n d  - detach the current client\n\n &#91;  - enter copy mode (then use emacs select\/yank keys)\n      * press CTRL-SPACE or CTRL-@ to start selecting text\n      * move cursor to end of desired text\n      * press ALT-w to copy selected text\n\n ]  - paste copied text\n\n ?  - show tmux key bindings<\/code><\/pre>\n\n\n\n<p>Tmux Config<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Shortcut to load configuration:\nbind-key r source-file ~\/.tmux.conf \\; display-message \"tmux.conf reloaded.\"\n\n# Fast open and rename of window:\nbind-key -n S-Down new-window -c \"#{pane_current_path}\"\nbind-key -n S-Up command-prompt -I \"rename-window \"\n\n# faster navigation between windows:\nbind-key -n S-Left previous-window\nbind-key -n S-Right next-window\n\n# set history to 10000 entrys:\nset-option -g history-limit 10000\n\n# start number of windows with 1:\nset-option -g base-index 1\nset-window-option -g pane-base-index 1\n\n# Pfeiltasten sofort nach Fenster-Wechsel freigeben:\nset-option -g repeat-time 0\n\n# make colours available:\nset-option -g default-terminal screen-256color\n\n# change status (check if \/proc\/loadavg  exist):\nset -g status-interval 2\nset-option -g status-justify left\nset-window-option -g window-status-current-format '#I:#W#F'\nset-window-option -g window-status-format '#I:#W#F'\nset -g status-right-length 150\nset -g status-right \"| #(whoami)@#H | #(awk '{print $1,$2,$3}' \/proc\/loadavg) | %Y-%m-%d %H:%M \"\n# Aussehen der Infoleiste \u00e4ndern:\nset-option -g status on\nset-option -g status-bg blue\nset-option -g status-fg white\nset-window-option -g window-status-current-bg magenta\n\n# set promt:\nset -g message-fg white\nset -g message-bg black\nset -g message-attr bright\n\n# define panels of window:\nset -g pane-border-fg green\nset -g pane-border-bg black\nset -g pane-active-border-fg green\nset -g pane-active-border-bg black\n\n# active window will  :\nsetw -g monitor-activity on\nset -g visual-activity on\n\n# automatic number update of windows:\nset -g renumber-windows on\n\n# split panes using | and -\nbind | split-window -h\nbind - split-window -v\nunbind '\"'\nunbind %<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>start\/exit tmux Session sharing tmux commands Tmux Config<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/franz-rustler.com\/index.php?rest_route=\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/franz-rustler.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/franz-rustler.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/franz-rustler.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/franz-rustler.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13"}],"version-history":[{"count":1,"href":"https:\/\/franz-rustler.com\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":14,"href":"https:\/\/franz-rustler.com\/index.php?rest_route=\/wp\/v2\/posts\/13\/revisions\/14"}],"wp:attachment":[{"href":"https:\/\/franz-rustler.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/franz-rustler.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/franz-rustler.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}