diff --git a/.gitmodules b/.gitmodules index c8b2d75..8217f97 100644 --- a/.gitmodules +++ b/.gitmodules @@ -117,3 +117,15 @@ [submodule ".config/eww"] path = .config/eww url = ssh://gitea@gitea.sravanbalaji.com:2222/sravan/eww.git +[submodule ".tmux/plugins/tpm"] + path = .tmux/plugins/tpm + url = git@github.com:tmux-plugins/tpm.git + branch = master +[submodule ".tmux/plugins/tmux-sensible"] + path = .tmux/plugins/tpm-sensible + url = git@github.com:tmux-plugins/tpm-sensible.git + branch = master +[submodule ".tmux/plugins/tmux"] + path = .tmux/plugins/tmux + url = git@github.com:dracula/tmux.git + branch = master diff --git a/.tmux.conf b/.tmux.conf new file mode 100644 index 0000000..7b67702 --- /dev/null +++ b/.tmux.conf @@ -0,0 +1,44 @@ +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix + +bind | split-window -h +bind - split-window -v +unbind '"' +unbind % + +bind r source-file ~/.tmux.conf + +bind -n M-Left select-pane -L +bind -n M-h select-pane -L + +bind -n M-Right select-pane -R +bind -n M-l select-pane -R + +bind -n M-Up select-pane -U +bind -n M-k select-pane -U + +bind -n M-Down select-pane -D +bind -n M-j select-pane -D + +set -g mouse on + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'dracula/tmux' + +set -g @plugin 'dracula/tmux' + +set -g @dracula-plugins "git cpu-usage ram-usage battery time" + +set -g @dracula-show-powerline true + +set -g @dracula-show-flags true + +set -g @dracula-refresh-rate 5 + +set -g @dracula-show-left-icon session + +set -g @dracula-show-empty-plugins false + +run -b '~/.tmux/plugins/tpm/tpm' diff --git a/.tmux/plugins/tmux b/.tmux/plugins/tmux new file mode 160000 index 0000000..c2b1d67 --- /dev/null +++ b/.tmux/plugins/tmux @@ -0,0 +1 @@ +Subproject commit c2b1d67cbda5c44ea8ee25d2ab307063e6959d0f diff --git a/.tmux/plugins/tmux-sensible b/.tmux/plugins/tmux-sensible new file mode 160000 index 0000000..25cb91f --- /dev/null +++ b/.tmux/plugins/tmux-sensible @@ -0,0 +1 @@ +Subproject commit 25cb91f42d020f675bb0a2ce3fbd3a5d96119efa diff --git a/.tmux/plugins/tpm b/.tmux/plugins/tpm new file mode 160000 index 0000000..99469c4 --- /dev/null +++ b/.tmux/plugins/tpm @@ -0,0 +1 @@ +Subproject commit 99469c4a9b1ccf77fade25842dc7bafbc8ce9946 diff --git a/README.org b/README.org index ecca489..46e2760 100644 --- a/README.org +++ b/README.org @@ -43,7 +43,9 @@ - [[#gammastep][Gammastep]] - [[#lock-screen][Lock Screen]] - [[#betterlockscreen][Betterlockscreen]] -- [[#terminal--shell][Terminal & Shell]] +- [[#command-line-interface][Command Line Interface]] + - [[#multiplexer][Multiplexer]] + - [[#tmux][Tmux]] - [[#prompt][Prompt]] - [[#starship][Starship]] - [[#neofetch][Neofetch]] @@ -259,6 +261,18 @@ Use [[https://www.gnu.org/software/stow/][GNU Stow]] to create symlinks. [submodule ".config/eww"] path = .config/eww url = ssh://gitea@gitea.sravanbalaji.com:2222/sravan/eww.git +[submodule ".tmux/plugins/tpm"] + path = .tmux/plugins/tpm + url = git@github.com:tmux-plugins/tpm.git + branch = master +[submodule ".tmux/plugins/tmux-sensible"] + path = .tmux/plugins/tpm-sensible + url = git@github.com:tmux-plugins/tpm-sensible.git + branch = master +[submodule ".tmux/plugins/tmux"] + path = .tmux/plugins/tmux + url = git@github.com:dracula/tmux.git + branch = master #+END_SRC ** Ignoring files and directories @@ -3693,7 +3707,124 @@ postlock() { } #+END_SRC -* Terminal & Shell +* Command Line Interface + +** Multiplexer + +*** Tmux + +**** Prefix Key + +Remap prefix from 'C-b' to 'C-a' + +#+BEGIN_SRC conf :tangle .tmux.conf +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix +#+END_SRC + +**** Split Commands + +Split panes using '|' and '-' + +#+BEGIN_SRC conf :tangle .tmux.conf +bind | split-window -h +bind - split-window -v +unbind '"' +unbind % +#+END_SRC + +**** Configuration Reload + +Reload config file + +#+BEGIN_SRC conf :tangle .tmux.conf +bind r source-file ~/.tmux.conf +#+END_SRC + +**** Pane Switching + +Switch panes using Alt-arrow or Alt-hjkl without prefix + +#+BEGIN_SRC conf :tangle .tmux.conf +bind -n M-Left select-pane -L +bind -n M-h select-pane -L + +bind -n M-Right select-pane -R +bind -n M-l select-pane -R + +bind -n M-Up select-pane -U +bind -n M-k select-pane -U + +bind -n M-Down select-pane -D +bind -n M-j select-pane -D +#+END_SRC + +**** Mouse Mode + +Enable mouse control (clickable windows, panes, resizable panes) + +#+BEGIN_SRC conf :tangle .tmux.conf +set -g mouse on +#+END_SRC + +**** Setup Tmux Plugin Manager + +#+BEGIN_SRC conf :tangle .tmux.conf +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'dracula/tmux' +#+END_SRC + +**** Dracula Theme + +Install theme plugin. See [[https://draculatheme.com/tmux][Dracula Theme - Tmux]] for all options. + +#+BEGIN_SRC conf :tangle .tmux.conf +set -g @plugin 'dracula/tmux' +#+END_SRC + +Configure status bar modules. Available plugins are ~battery~, ~cpu-usage~, ~git~, ~gpu-usage~, ~ram-usage~, ~tmux-ram-usage~, ~network~, ~network-bandwidth~, ~network-ping~, ~ssh-session~, ~attached-clients~, ~network-vpn~, ~weather~, ~time~, ~mpc~, ~spotify-tui~, ~playerctl~, ~kubernetes-context~, ~synchronize-panes~. + +#+BEGIN_SRC conf :tangle .tmux.conf +set -g @dracula-plugins "git cpu-usage ram-usage battery time" +#+END_SRC + +Enable powerline symbols. + +#+BEGIN_SRC conf :tangle .tmux.conf +set -g @dracula-show-powerline true +#+END_SRC + +Enable window flags. + +#+BEGIN_SRC conf :tangle .tmux.conf +set -g @dracula-show-flags true +#+END_SRC + +Adjust the refresh rate of the status bar. + +#+BEGIN_SRC conf :tangle .tmux.conf +set -g @dracula-refresh-rate 5 +#+END_SRC + +Switch the left smiley icon. It can accept ~hostname~ (full hostname), ~session~, ~shortname~, ~smiley~, ~window~, or any character. + +#+BEGIN_SRC conf :tangle .tmux.conf +set -g @dracula-show-left-icon session +#+END_SRC + +Hide empty modules. + +#+BEGIN_SRC conf :tangle .tmux.conf +set -g @dracula-show-empty-plugins false +#+END_SRC + +**** Run Tmux Plugin Manager + +#+BEGIN_SRC conf :tangle .tmux.conf +run -b '~/.tmux/plugins/tpm/tpm' +#+END_SRC ** Prompt