diff --git a/.config/i3/config b/.config/i3/config index 7baca51..b5b0325 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -375,7 +375,7 @@ exec pulseaudio --start exec /usr/bin/pasystray # BROWSERS!!!11!elf! -exec firefox +exec MOZ_X11_EGL=1;firefox #exec chromium #exec google-chrome-stable diff --git a/tmux.conf b/tmux.conf new file mode 100644 index 0000000..c1a8fbe --- /dev/null +++ b/tmux.conf @@ -0,0 +1,171 @@ +# ################# +# screen-like setup +# ################# + +# COLOR +# oobah +#set -g status-bg green +# zircon +#set -g status-bg black +#set -g status-fg white +# pi +#set -g status-bg yellow +# bio6 +#set -g status-bg red +#set -g status-fg white +#set -g status-bg blue + +# C-a is escape sequence +unbind C-b +set -g prefix ^O +bind a send-prefix + +# vim ftw +# unnecessary because $EDITOR=vim +# setw -g mode-keys vi + +# copy pasta # +unbind [ +# C to enter copy mode +bind C copy-mode +# v or space to select +bind-key -T copy-mode-vi 'v' send -X begin-selection +# y to yank, and it goes in primary and clipboard buffers +bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel +# P to paste, or shift-inser as it's in bothe buffers +unbind P +bind P paste-buffer + +# switch panes with Tab +unbind Tab +bind Tab select-pane -t :.+ + +#open man page with / +bind / command-prompt "split-window -h 'exec man %%'" + +# resize pane with arrow keys +# -r: can be repeated without pressing prefix +# again (500ms after last '-r' action or prefix) +unbind Left +unbind Right +unbind Down +unbind Up +bind -r Left resize-pane -L 2 +bind -r Right resize-pane -R 2 +bind -r Down resize-pane -D 2 +bind -r Up resize-pane -U 2 + +# new window ^C c +unbind ^C +bind ^C new-window +bind c new-window + +# reload config without killing server +bind R source-file ~/tmux.conf \; display-message " Config reloaded..." + +# detach ^D d +unbind ^D +bind ^D detach + +# displays * +unbind * +bind * list-clients + +# lockscreen ^X x +unbind ^X +bind ^X lock-server +unbind x +bind x lock-server + +# prev ^H ^P p ^? +unbind ^H +bind ^H previous-window +unbind ^P +bind ^P previous-window +unbind p +bind p previous-window +unbind BSpace +bind BSpace previous-window + +# next ^@ ^N space n +unbind ^@ +bind ^@ next-window +unbind ^N +bind ^N next-window +unbind " " +bind " " next-window +unbind n +bind n next-window + +# title A +unbind A +bind A command-prompt "rename-window %%" + +# ^A to get to last window +unbind ^O +bind ^O last-window + +# windows ^W w +unbind ^W +bind ^W list-windows +unbind w +bind w list-windows + +# " windowlist -b +unbind '"' +bind '"' choose-window + +# quit \ +#unbind \ +#bind \ confirm-before "kill-server" + +# kill K k +unbind K +bind K confirm-before "kill-window" +unbind k +bind k confirm-before "kill-window" + +# redisplay ^L l +unbind ^L +bind ^L refresh-client +unbind l +bind l refresh-client + +# split -v | +unbind | +bind | split-window +unbind S +bind S split-window -v + + +#CPU MEM +#https://github.com/thewtex/tmux-mem-cpu-load +#set -g status-interval 2 +#set -g status-right "#(tmux-mem-cpu-load 2) #H" +run-shell "powerline-daemon -q" +source '/usr/lib/python3.9/site-packages/powerline/bindings/tmux/powerline.conf' + +# disable mouse control by default - change 'off' to 'on' to enable by default. +setw -g mouse off +# toggle mouse mode to allow mouse copy/paste +# set mouse on with prefix m +bind m \ + set -g mouse on \;\ + display 'Mouse: ON' +# set mouse off with prefix M +bind M \ + set -g mouse off \;\ + display 'Mouse: OFF' +# zoom this pane to full screen +bind + \ + new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \;\ + swap-pane -s tmux-zoom.0 \;\ + select-window -t tmux-zoom +# restore this pane +bind - \ + last-window \;\ + swap-pane -s tmux-zoom.0 \;\ + kill-window -t tmux-zoom + + # make tmux display things in 256 colors + set -g default-terminal "screen-256color" diff --git a/tmux.sh b/tmux.sh new file mode 100755 index 0000000..b905a13 --- /dev/null +++ b/tmux.sh @@ -0,0 +1,22 @@ +#!/bin/bash +SESSION=main +tmux="tmux -2 -u -f $HOME/tmux.conf" + +# if the session is already running, just attach to it. +$tmux has-session -t $SESSION +if [ $? -eq 0 ]; then + echo "Session $SESSION already exists. Attaching." + sleep 1 + $tmux -u attach -t $SESSION + exit 0; +fi + +# create a new session, named $SESSION, and detach from it +$tmux new-session -d -s $SESSION +$tmux new-window -t $SESSION:1 +$tmux split-window -h -t $SESSION:1 'sudo bpytop' +$tmux split-window -v -t $SESSION:1 'sudo journalctl -f' +$tmux new-window -t $SESSION:2 +$tmux new-window -t $SESSION:3 +$tmux select-window -t $SESSION:1 +$tmux attach -t $SESSION