Move gpg, git, tmux/screen to separate file
This commit is contained in:
parent
124df42fd8
commit
881b22c9b2
9 changed files with 155 additions and 137 deletions
34
hm/tmux/default.nix
Normal file
34
hm/tmux/default.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
themepack = pkgs.tmuxPlugins.mkTmuxPlugin
|
||||
rec {
|
||||
pluginName = "tmux-themepack";
|
||||
version = "1.1.0";
|
||||
rtpFilePath = "themepack.tmux";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jimeh";
|
||||
repo = "tmux-themepack";
|
||||
rev = "${version}";
|
||||
sha256 = "f6y92kYsKDFanNx5ATx4BkaB/E7UrmyIHU/5Z01otQE=";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.programs.tmux.enable {
|
||||
home = {
|
||||
packages = [ pkgs.screen ];
|
||||
sessionVariables.SCREENRC = "${config.xdg.configHome}/screenrc";
|
||||
};
|
||||
programs.tmux = {
|
||||
mouse = false;
|
||||
clock24 = true;
|
||||
# TODO Vim mode?
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
sensible
|
||||
];
|
||||
extraConfig = builtins.readFile ./tmux.conf + "source-file ${themepack}/share/tmux-plugins/tmux-themepack/powerline/default/green.tmuxtheme\n";
|
||||
};
|
||||
stylix.targets.tmux.enable = false;
|
||||
xdg.configFile.screenrc.text = (builtins.readFile ./screenrc);
|
||||
};
|
||||
}
|
9
hm/tmux/screenrc
Normal file
9
hm/tmux/screenrc
Normal file
|
@ -0,0 +1,9 @@
|
|||
term xterm-256color
|
||||
hardstatus off
|
||||
hardstatus alwayslastline
|
||||
hardstatus alwayslastline '%{= G}[ %{G}%H %{g}][%= %{= w}%?%-Lw%?%{= R}%n*%f %t%?%{= R}(%u)%?%{= w}%+Lw%?%= %{= g}][ %{y}Load: %l %{g}][%{B}%Y-%m-%d %{W}%c:%s %{g}]'
|
||||
startup_message off
|
||||
termcapinfo xterm* ti@:te@
|
||||
vbell off
|
||||
altscreen on
|
||||
windowlist string "%4n %h%=%f"
|
17
hm/tmux/tmux.conf
Normal file
17
hm/tmux/tmux.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
# switch windows alt+number
|
||||
bind-key -n M-1 select-window -t 1
|
||||
bind-key -n M-2 select-window -t 2
|
||||
bind-key -n M-3 select-window -t 3
|
||||
bind-key -n M-4 select-window -t 4
|
||||
bind-key -n M-5 select-window -t 5
|
||||
bind-key -n M-6 select-window -t 6
|
||||
bind-key -n M-7 select-window -t 7
|
||||
bind-key -n M-8 select-window -t 8
|
||||
bind-key -n M-9 select-window -t 9
|
||||
|
||||
# https://superuser.com/a/1007721
|
||||
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e; send-keys -M'"
|
||||
|
||||
# Inform tmux that alacritty supports RGB
|
||||
# (because for some reason terminfo doesn't?)
|
||||
set -ga terminal-overrides ',alacritty*:RGB'
|
Loading…
Add table
Add a link
Reference in a new issue