config: basic tmux for nixos 🎨 💩
This commit is contained in:
parent
c36ba522a7
commit
2bc9af274e
2 changed files with 85 additions and 13 deletions
|
|
@ -8,6 +8,7 @@
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
./tmux.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
|
|
@ -99,26 +100,35 @@
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
# $ nix search wget
|
# $ nix search wget
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git # version control
|
pkgs.git # version control
|
||||||
|
|
||||||
tmux # terminal multiplexer
|
pkgs.tmux # terminal multiplexer
|
||||||
fzf # fuzzy matcher
|
pkgs.fzf # fuzzy matcher
|
||||||
|
|
||||||
vim # text editor: choose this
|
pkgs.vim # text editor: choose this
|
||||||
neovim # or this
|
pkgs.neovim # or this
|
||||||
|
|
||||||
neofetch # system profile: choose this
|
pkgs.neofetch # system profile: choose this
|
||||||
fastfetch # or this
|
pkgs.fastfetch # or this
|
||||||
|
|
||||||
thunderbird # email / calendar
|
pkgs.tldr # community driven manpage alternative
|
||||||
telegram-desktop # instant messager
|
|
||||||
|
|
||||||
gimp # image editor
|
pkgs.thunderbird # email / calendar
|
||||||
libsForQt5.kdenlive # video editor
|
pkgs.telegram-desktop # instant messager
|
||||||
|
|
||||||
|
pkgs.gimp # image editor
|
||||||
|
pkgs.libsForQt5.kdenlive # video editor
|
||||||
|
|
||||||
|
|
||||||
pyenv # python environment manager
|
pkgs.pyenv # python environment manager
|
||||||
poetry # python package manager
|
pkgs.poetry # python package manager
|
||||||
|
pkgs.python3 # trusty old python
|
||||||
|
|
||||||
|
gcc # gnu compiler collection (necessary for python)
|
||||||
|
pkg-config # allows packages to find information about other packages (necessary for python)
|
||||||
|
gnumake # python
|
||||||
|
zlib # python
|
||||||
|
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
cowsay
|
cowsay
|
||||||
|
|
@ -126,6 +136,11 @@
|
||||||
wget
|
wget
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# firefox smooth scrolling
|
||||||
|
environment.sessionVariables = {
|
||||||
|
MOZ_USE_XINPUT2 = "1";
|
||||||
|
};
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
# programs.mtr.enable = true;
|
# programs.mtr.enable = true;
|
||||||
|
|
|
||||||
57
nixos/tmux.nix
Normal file
57
nixos/tmux.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
clock24 = true;
|
||||||
|
extraConfig = ''
|
||||||
|
# remap prefix from ^+A to ^+B (for nested tmux sessions)
|
||||||
|
unbind C-b
|
||||||
|
set -g prefix M-f
|
||||||
|
bind M-f send-prefix
|
||||||
|
|
||||||
|
# nvim 'checkhealth' advice
|
||||||
|
set-option -g focus-events on
|
||||||
|
set-option -g default-terminal "screen-256color"
|
||||||
|
set-option -sa terminal-overrides ',xterm-256color:RGB'
|
||||||
|
|
||||||
|
# enable mouse support for switching panes/windows
|
||||||
|
# set -g mouse on
|
||||||
|
|
||||||
|
# extend history
|
||||||
|
set -g history-limit 100000
|
||||||
|
|
||||||
|
# set vi keybindings
|
||||||
|
setw -g mode-keys vi
|
||||||
|
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xsel -i --clipboard"
|
||||||
|
|
||||||
|
# reduce escape time
|
||||||
|
set-option -sg escape-time 20
|
||||||
|
|
||||||
|
# pane movement shortcuts
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
|
||||||
|
# window selection
|
||||||
|
bind -r C-h select-window -t :-
|
||||||
|
bind -r C-l select-window -t :+
|
||||||
|
|
||||||
|
# Resize pane shortcuts
|
||||||
|
bind -r H resize-pane -L 10
|
||||||
|
bind -r J resize-pane -D 10
|
||||||
|
bind -r K resize-pane -U 10
|
||||||
|
bind -r L resize-pane -R 10
|
||||||
|
|
||||||
|
# split with dash and vbar
|
||||||
|
bind | split-window -h -c "#{pane_current_path}"
|
||||||
|
bind - split-window -v -c "#{pane_current_path}"
|
||||||
|
|
||||||
|
# server-tmux only:
|
||||||
|
# fix ssh agent when tmux is detached
|
||||||
|
# setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue