tmux, some refactoring
This commit is contained in:
parent
d994ac0650
commit
ba0a7c40fa
9 changed files with 90 additions and 8 deletions
|
|
@ -47,6 +47,7 @@
|
||||||
./desktop
|
./desktop
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
./foot.nix
|
./foot.nix
|
||||||
|
./tmux
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nix-index = {
|
programs.nix-index = {
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,7 @@
|
||||||
nodejs
|
nodejs
|
||||||
android-studio
|
android-studio
|
||||||
netlify-cli
|
netlify-cli
|
||||||
|
appimage-run
|
||||||
|
|
||||||
# secrets
|
# secrets
|
||||||
libsecret
|
libsecret
|
||||||
|
|
@ -118,17 +119,18 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./desktop
|
|
||||||
./alias.nix
|
./alias.nix
|
||||||
./nvim
|
|
||||||
./foot.nix
|
|
||||||
./fish.nix
|
|
||||||
./firefox.nix
|
|
||||||
./calendars.nix
|
./calendars.nix
|
||||||
|
./desktop
|
||||||
|
./firefox.nix
|
||||||
|
./fish.nix
|
||||||
|
./foot.nix
|
||||||
./mail
|
./mail
|
||||||
./tex.nix
|
./nvim
|
||||||
./openconnect.nix
|
./openconnect.nix
|
||||||
./R.nix
|
./r.nix
|
||||||
|
./tex.nix
|
||||||
|
./tmux
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nix-index = {
|
programs.nix-index = {
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
main = {
|
main = {
|
||||||
shell = "${pkgs.fish}/bin/fish -c 'tmux attach || tmux'";
|
shell = "${pkgs.fish}/bin/fish -c 'tmux attach'";
|
||||||
pad = "22x22";
|
pad = "22x22";
|
||||||
font = "JetBrains Mono:size=14";
|
font = "JetBrains Mono:size=14";
|
||||||
initial-window-mode = "maximized";
|
initial-window-mode = "maximized";
|
||||||
|
|
|
||||||
55
home/tmux/default.nix
Normal file
55
home/tmux/default.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
escapeTime = 0;
|
||||||
|
mouse = true;
|
||||||
|
newSession = true;
|
||||||
|
shell = "${pkgs.fish}/bin/fish";
|
||||||
|
extraConfig = ''
|
||||||
|
# Key bindings
|
||||||
|
bind C-l next-window
|
||||||
|
bind C-h previous-window
|
||||||
|
bind C-b last-window
|
||||||
|
bind n new-window
|
||||||
|
bind C-n new-window -c '#{pane_current_path}'
|
||||||
|
bind v split-window -h
|
||||||
|
bind C-v split-window -hc '#{pane_current_path}'
|
||||||
|
bind s split-window -v
|
||||||
|
bind C-s split-window -vc '#{pane_current_path}'
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
bind c command-prompt -I "#{b:pane_current_path}" "rename-window '%%'"
|
||||||
|
bind C-c command-prompt -I "#{b:pane_current_path}" "rename-window '%%'"
|
||||||
|
|
||||||
|
# Layouts
|
||||||
|
bind f source-file ~/.config/tmux/nnn.conf
|
||||||
|
bind R source-file ~/.config/tmux/rloft.conf
|
||||||
|
bind J source-file ~/.config/tmux/jekyll.conf
|
||||||
|
|
||||||
|
# Unbind
|
||||||
|
unbind p
|
||||||
|
unbind '"'
|
||||||
|
unbind %
|
||||||
|
|
||||||
|
# Eye candy
|
||||||
|
# set-option -g status-position top
|
||||||
|
set-option -g status-right ""
|
||||||
|
set-option -g status-left ""
|
||||||
|
set-option -g status-justify "centre"
|
||||||
|
set-option -g status-style fg=brightmagenta
|
||||||
|
set-option -g pane-border-style fg=brightwhite
|
||||||
|
set-option -g pane-active-border-style fg=magenta
|
||||||
|
set-option -g window-status-current-style fg=magenta
|
||||||
|
|
||||||
|
# Some more specifics
|
||||||
|
set-option -g focus-events on
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
xdg.configFile."tmux/nnn.conf".source = ./nnn.conf;
|
||||||
|
xdg.configFile."tmux/rloft.conf".source = ./rloft.conf;
|
||||||
|
xdg.configFile."tmux/jekyll.conf".source = ./jekyll.conf;
|
||||||
|
}
|
||||||
6
home/tmux/jekyll.conf
Normal file
6
home/tmux/jekyll.conf
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
split-window -c '#{pane_current_path}' -h nix-shell
|
||||||
|
send-keys "jekyll serve" Enter
|
||||||
|
resize-pane -x 40%
|
||||||
|
split-pane -c '#{pane_current_path}' "git status; fish"
|
||||||
|
select-pane -L
|
||||||
|
rename-window "jekyll"
|
||||||
2
home/tmux/nnn.conf
Normal file
2
home/tmux/nnn.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
new-window -c '#{pane_current_path}' nnn
|
||||||
|
rename-window 'nnn'
|
||||||
2
home/tmux/rloft.conf
Normal file
2
home/tmux/rloft.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
split-window -c '#{pane_current_path}' -h R -q --no-save --no-restore
|
||||||
|
select-pane -l
|
||||||
14
system/ishi.nix
Normal file
14
system/ishi.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
users.users.ishi = {
|
||||||
|
isNormalUser = true;
|
||||||
|
uid = 969;
|
||||||
|
group = "users";
|
||||||
|
description = "Ishi";
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
];
|
||||||
|
shell = pkgs.fish;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue