[tmux] feat: introducing tmux

add keybindings for mail and irc
David JULIEN 11 months ago
parent 8b1944ecdd
commit 2cee2b21fc
  1. 7
  2. 81
  3. 9

@ -60,10 +60,13 @@ super + shift + {h,j,k,l}
player {prev,stop,toggle,next}
super + shift + m
$TERMINAL -g 128x32 -c "floating" -e $MUSIC_PLAYER
$TERMINAL -g 128x32 -c "floating" -e $MUSIC_CLIENT
super + shift + n
$TERMINAL -g 128x32 -c "floating" -e neomutt
$TERMINAL -g 128x32 -c "floating" -e tsession "mail" "$MAIL_CLIENT"
super + shift + i
$TERMINAL -g 128x32 -c "floating" -e tsession "mail" "$IRC_CLIENT"
super + shift + t
$TERMINAL -g 128x32 -c "floating" -e tremc

@ -0,0 +1,81 @@
# Adapated from the work of Nicholas Marriott. Public domain.
# Some tweaks to the status line
# set -g status-right "$SHELL"
# set -g window-status-current-style "underscore"
set-option -g status-style bg=color0 # bg=bg1, fg=fg1
set-option -g status-left "\
#[fg=color8, bg=color7]#{?client_prefix,#[bg=color9],} ❐ #S "
set-option -g status-right "\
#[fg=color7, bg=color8] %b. %d \
#[fg=color10] ( %I:%M%p )"
set-window-option -g window-status-current-format "\
#[fg=color7, bg=color8] #I* \
#[fg=color7, bg=color0, bold] #W "
set-window-option -g window-status-format "\
#[fg=color7, bg=color8] #I \
#[fg=color7, bg=color0, bold] #W "
# Set the history limit so we get lots of scrollback.
setw -g history-limit 50000000
# If running inside tmux ($TMUX is set), then change the status line to red
%if #{TMUX}
set -g status-bg red
# Enable RGB colour if running in xterm(1)
set-option -sa terminal-overrides ",xterm*:Tc"
# Change the default $TERM to tmux-256color
set -g default-terminal "tmux-256color"
# No bells at all
set -g bell-action none
# Keep windows around after they exit
# set -g remain-on-exit on
# Change the prefix key to C-a
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Turn the mouse on, but without copy mode dragging
# set -g mouse on
# unbind -n MouseDrag1Pane
# unbind -Tcopy-mode MouseDrag1Pane
# Some extra key bindings to select higher numbered windows
bind F1 selectw -t:10
bind F2 selectw -t:11
bind F3 selectw -t:12
bind F4 selectw -t:13
bind F5 selectw -t:14
bind F6 selectw -t:15
bind F7 selectw -t:16
bind F8 selectw -t:17
bind F9 selectw -t:18
bind F10 selectw -t:19
bind F11 selectw -t:20
bind F12 selectw -t:21
# A key to toggle between smallest and largest sizes if a window is visible in
# multiple places
bind F set -w window-size
# Keys to toggle monitoring activity in a window and the synchronize-panes option
bind m set monitor-activity
bind y set synchronize-panes\; display 'synchronize-panes #{?synchronize-panes,on,off}'
# Session loading
bind i source-file $XDG_CONFIG_HOME/tmux/irssi.session
bind l source-file $XDG_CONFIG_HOME/tmux/latex.session

@ -0,0 +1,9 @@
#! /usr/bin/env sh
tmux new -s $session -d
tmux send-keys -t $session "exec $cmd" C-m
tmux attach -t $session