aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2022-01-29 16:47:02 +0000
committerAkshay <[email protected]>2022-01-29 16:47:02 +0000
commit0bd9e1a8066706ebf806dbfdd55752bc3cb0a7ae (patch)
tree299765399e716d739960bb2c19e3c03f258b857c
parentf0256aadc01907d8a03fcdd0f35ca3dc6261704d (diff)
update prompt to show up in tmux
-rw-r--r--hosts/olive/configuration.nix2
-rw-r--r--programs/bash.nix30
-rw-r--r--programs/tmux.nix20
3 files changed, 26 insertions, 26 deletions
diff --git a/hosts/olive/configuration.nix b/hosts/olive/configuration.nix
index 91d7b1c..02bf4a5 100644
--- a/hosts/olive/configuration.nix
+++ b/hosts/olive/configuration.nix
@@ -128,7 +128,7 @@
128 extraOptions = '' 128 extraOptions = ''
129 experimental-features = nix-command flakes ca-derivations 129 experimental-features = nix-command flakes ca-derivations
130 warn-dirty = false 130 warn-dirty = false
131 keep-outputs = true 131 keep-outputs = false
132 keep-derivations = true 132 keep-derivations = true
133 ''; 133 '';
134 }; 134 };
diff --git a/programs/bash.nix b/programs/bash.nix
index 82e5c67..66546c2 100644
--- a/programs/bash.nix
+++ b/programs/bash.nix
@@ -11,6 +11,7 @@
11 historyFileSize = 2000; 11 historyFileSize = 2000;
12 historyIgnore = [ "ls" "exit" "kill" ]; 12 historyIgnore = [ "ls" "exit" "kill" ];
13 historySize = 1000; 13 historySize = 1000;
14
14 shellAliases = { 15 shellAliases = {
15 "..." = "cd -- ../.."; 16 "..." = "cd -- ../..";
16 grep = "grep --color=auto"; 17 grep = "grep --color=auto";
@@ -34,6 +35,7 @@
34 glo = "git log --pretty=oneline --abbrev-commit"; 35 glo = "git log --pretty=oneline --abbrev-commit";
35 gst = "git status --short"; 36 gst = "git status --short";
36 }; 37 };
38
37 shellOptions = [ 39 shellOptions = [
38 "histappend" 40 "histappend"
39 "autocd" 41 "autocd"
@@ -47,22 +49,9 @@
47 "histreedit" 49 "histreedit"
48 "nocasematch" 50 "nocasematch"
49 ]; 51 ];
52
50 sessionVariables = { 53 sessionVariables = {
51 PROMPT_CHAR = "λ"; 54
52 PROMPT_CHAR_COLOR = "cyan";
53 PROMPT_CHAR_ROOT = "#";
54 PROMPT_CHAR_ROOT_COLOR = "magenta";
55 SHORTEN_CWD = 1;
56 CWD_COLOR = "white";
57 EXPAND_TILDE = 0;
58 GIT_CLEAN = "·";
59 GIT_CLEAN_COLOR = "green";
60 GIT_WT_MODIFIED = "×";
61 GIT_WT_MODIFIED_COLOR = "red";
62 GIT_INDEX_MODIFIED = "±";
63 GIT_INDEX_MODIFIED_COLOR = "yellow";
64 BRANCH_COLOR = "bright black";
65 COMMIT_COLOR = "green";
66 PF_INFO = "ascii title os kernel uptime pkgs shell"; 55 PF_INFO = "ascii title os kernel uptime pkgs shell";
67 PF_SEP = " "; 56 PF_SEP = " ";
68 PF_COL1 = 7; 57 PF_COL1 = 7;
@@ -70,18 +59,25 @@
70 PF_COL3 = 6; 59 PF_COL3 = 6;
71 PF_ALIGN = "9"; 60 PF_ALIGN = "9";
72 PF_ASCII = "nixos"; 61 PF_ASCII = "nixos";
62
73 _JAVA_AWT_WM_NONREPARENTING = 1; 63 _JAVA_AWT_WM_NONREPARENTING = 1;
64
74 TERM = "xterm-256color-italic"; 65 TERM = "xterm-256color-italic";
75 EDITOR = "nvim"; 66 EDITOR = "nvim";
76 MANPAGER = "nvim +Man!"; 67 MANPAGER = "nvim +Man!";
77 GPG_TTY = "\$(tty)"; 68 GPG_TTY = "\$(tty)";
69
78 }; 70 };
71
79 initExtra = '' 72 initExtra = ''
80 [ -f $HOME/.github ] && . $HOME/.github 73 [ -f $HOME/.github ] && . $HOME/.github
81 [ -f ~/.bash_aliases ] && . ~/.bash_aliases
82 eval "$(direnv hook bash)" 74 eval "$(direnv hook bash)"
83 export PS1='\n$(pista)'
84 export PATH=$PATH:"$HOME/scripts" 75 export PATH=$PATH:"$HOME/scripts"
76 export PROMPT_COMMAND="tmux refresh-client -S";
77 export PS1="\n\001\e[0;36m\002λ\001\e[0m\002 ";
78 export PS2="> ";
79
85 ''; 80 '';
81
86 }; 82 };
87} 83}
diff --git a/programs/tmux.nix b/programs/tmux.nix
index 30483aa..8975f44 100644
--- a/programs/tmux.nix
+++ b/programs/tmux.nix
@@ -67,19 +67,23 @@
67 set -g pane-border-style fg=colour11 67 set -g pane-border-style fg=colour11
68 set -g pane-active-border-style fg=colour8 68 set -g pane-active-border-style fg=colour8
69 69
70 set -g status-justify right 70 set-option -g status-justify absolute-centre
71 set -g status-right "" 71 set-option -g status-position bottom
72 set -g status-style "bg=colour0"
73 set -ag status-style "fg=colour7"
74 72
75 set -g window-status-current-format " #[fg=colour15]#W#{?window_zoomed_flag, #[fg=colour2]+,}#{?window_activity_flag, #[fg=colour3]!,}" 73 set -g window-status-current-format " #[fg=colour15]#W#{?window_zoomed_flag, #[fg=colour2]+,}#{?window_activity_flag, #[fg=colour3]!,}"
76 set -g window-status-format " #[fg=colour8]#W#{?window_zoomed_flag, #[fg=colour2]+,}" 74 set -g window-status-format " #[fg=colour8]#W#{?window_zoomed_flag, #[fg=colour2]+,}"
77 75
76 # status right
77 set -g status-style "bg=colour0"
78 set -ag status-style "fg=colour7"
79
80 set -g status-right "#[fg=colour15]#(date +"%H%M") #[fg=colour8]hrs "
81 set -ag status-right "#[fg=colour15]#(date +"%d/%m")#[fg=colour8] #(date +"%Y") "
82 set -ag status-right "#[fg=colour7]#(bat -q)#[fg=colour12]"
78 83
79 set -g status-left-length 100 84 # status left
80 set -g status-left "#[fg=colour15]#(date +"%H%M") #[fg=colour8]hrs " 85 set -g status-left "#[fg=colour7]#(/home/np/code/rust/prompt/target/debug/prompt cwd #{pane_current_path}) "
81 set -ag status-left "#[fg=colour15]#(date +"%d/%m")#[fg=colour8] #(date +"%Y") " 86 set -ag status-left "#[fg=colour7]#(/home/np/code/rust/prompt/target/debug/prompt vcs #{pane_current_path})"
82 set -ag status-left "#[fg=colour7]#(bat -q)#[fg=colour12]"
83 ''; 87 '';
84 }; 88 };
85} 89}