aboutsummaryrefslogtreecommitdiff
path: root/programs
diff options
context:
space:
mode:
Diffstat (limited to 'programs')
-rw-r--r--programs/alacritty.nix63
-rw-r--r--programs/atuin.nix20
-rw-r--r--programs/bash.nix16
-rw-r--r--programs/default.nix22
-rw-r--r--programs/fuzzel.nix42
-rw-r--r--programs/fzf.nix2
-rw-r--r--programs/git.nix62
-rw-r--r--programs/init.vim7
-rw-r--r--programs/readline.nix1
-rw-r--r--programs/rofi.nix19
-rw-r--r--programs/st/config.h2
-rw-r--r--programs/tmux.nix13
12 files changed, 206 insertions, 63 deletions
diff --git a/programs/alacritty.nix b/programs/alacritty.nix
new file mode 100644
index 0000000..280c667
--- /dev/null
+++ b/programs/alacritty.nix
@@ -0,0 +1,63 @@
1{ config
2, pkgs
3, lib
4, theme
5, font
6, ...
7}:
8let
9
10 fontConfig = {
11 normal = { family = "${font.name}"; style = "Regular"; };
12 bold = { family = "${font.name}"; style = "Bold"; };
13 italic = { family = "${font.name}"; style = "Italic"; };
14 size = 10.0;
15 };
16in
17{
18 programs.alacritty = {
19 enable = true;
20 settings = {
21 env = {
22 TERM = "xterm-256color";
23 };
24 window = {
25 padding.x = 20;
26 padding.y = 20;
27 dynamic_padding = true;
28 decorations = "None";
29 };
30
31 font = fontConfig;
32
33 colors = {
34 primary = {
35 background = "${theme.base00}";
36 foreground = "${theme.base05}";
37 };
38 normal = {
39 black = "${theme.base00}";
40 red = "${theme.base08}";
41 green = "${theme.base0B}";
42 yellow = "${theme.base0A}";
43 blue = "${theme.base0D}";
44 magenta = "${theme.base0E}";
45 cyan = "${theme.base0C}";
46 white = "${theme.base05}";
47 };
48 bright = {
49 black = "${theme.base03}";
50 red = "${theme.base09}";
51 green = "${theme.base01}";
52 yellow = "${theme.base02}";
53 blue = "${theme.base04}";
54 magenta = "${theme.base06}";
55 cyan = "${theme.base0F}";
56 white = "${theme.base07}";
57 };
58 };
59
60 };
61 };
62}
63
diff --git a/programs/atuin.nix b/programs/atuin.nix
new file mode 100644
index 0000000..39e5d89
--- /dev/null
+++ b/programs/atuin.nix
@@ -0,0 +1,20 @@
1{
2 programs.atuin = {
3 enable = true;
4 enableBashIntegration = true;
5 flags = [
6 "--disable-up-arrow"
7 ];
8 settings = {
9 invert = true;
10 history_format = "{command}";
11 theme.name = "minimal";
12 style = "compact";
13 inline_height = 15;
14 prefers_reduced_motion = true;
15 show_help = false;
16 show_tabs = false;
17 enter_accept = true;
18 };
19 };
20}
diff --git a/programs/bash.nix b/programs/bash.nix
index 7d3c25e..d4a52f2 100644
--- a/programs/bash.nix
+++ b/programs/bash.nix
@@ -53,27 +53,15 @@
53 ]; 53 ];
54 54
55 sessionVariables = { 55 sessionVariables = {
56 56 TERM = "alacritty";
57 PF_INFO = "ascii title os kernel uptime pkgs shell";
58 PF_SEP = " ";
59 PF_COL1 = 7;
60 PF_COL2 = 7;
61 PF_COL3 = 6;
62 PF_ALIGN = "9";
63 PF_ASCII = "nixos";
64
65 _JAVA_AWT_WM_NONREPARENTING = 1;
66
67 TERM = "xterm-256color-italic";
68 EDITOR = "nvim"; 57 EDITOR = "nvim";
69 MANPAGER = "nvim +Man!"; 58 MANPAGER = "nvim +Man!";
70 GPG_TTY = "\$(tty)"; 59 GPG_TTY = "\$(tty)";
71
72 }; 60 };
73 61
74 initExtra = '' 62 initExtra = ''
75 export PATH=$PATH:"$HOME/scripts" 63 export PATH=$PATH:"$HOME/scripts"
76 export PROMPT_COMMAND="tmux refresh-client -S > /dev/null"; 64 export PROMPT_COMMAND="tmux refresh-client -S &> /dev/null";
77 export PS1="\n\001\e[0;36m\002λ\001\e[0m\002 "; 65 export PS1="\n\001\e[0;36m\002λ\001\e[0m\002 ";
78 export PS2="> "; 66 export PS2="> ";
79 67
diff --git a/programs/default.nix b/programs/default.nix
index 70ded22..b45f476 100644
--- a/programs/default.nix
+++ b/programs/default.nix
@@ -8,6 +8,7 @@
8{ 8{
9 9
10 imports = [ 10 imports = [
11 ./atuin.nix
11 ./bash.nix 12 ./bash.nix
12 ./chromium.nix 13 ./chromium.nix
13 ./feh.nix 14 ./feh.nix
@@ -16,9 +17,11 @@
16 ./htop.nix 17 ./htop.nix
17 ./neovim.nix 18 ./neovim.nix
18 ./readline.nix 19 ./readline.nix
20 ./rofi.nix
21 ./alacritty.nix
19 ./tmux.nix 22 ./tmux.nix
20 ./zathura.nix 23 ./zathura.nix
21 ./rofi.nix 24 ./fuzzel.nix
22 ]; 25 ];
23 26
24 programs = { 27 programs = {
@@ -48,5 +51,22 @@
48 }; 51 };
49 gpg.enable = true; 52 gpg.enable = true;
50 info.enable = true; 53 info.enable = true;
54 broot = {
55 enable = true;
56 enableBashIntegration = true;
57 settings = {
58 imports = [
59 "native-16.hjson"
60 ];
61 verbs = [
62 {
63 key = "enter";
64 working_dir = "{root}";
65 execution = ''$EDITOR +{line} {file}'';
66 leave_broot = false;
67 }
68 ];
69 };
70 };
51 }; 71 };
52} 72}
diff --git a/programs/fuzzel.nix b/programs/fuzzel.nix
new file mode 100644
index 0000000..8a87911
--- /dev/null
+++ b/programs/fuzzel.nix
@@ -0,0 +1,42 @@
1{ config
2, pkgs
3, theme
4, font
5, ...
6}:
7
8with theme;
9let
10 fuzzelColor = themeColor: (builtins.replaceStrings [ "#" ] [ "" ] themeColor) + "ff";
11in
12{
13 programs.fuzzel = {
14 enable = true;
15 settings = {
16 main = {
17 font = "${font.name}:size=12";
18 prompt = "";
19 anchor = "top-left";
20 icons-enabled = "no";
21 fields = "filename,exec,name,generic";
22 horizontal-pad = 12;
23 vertical-pad = 12;
24 };
25 colors = {
26 background = "${fuzzelColor theme.base00}";
27 text = "${fuzzelColor theme.base02}";
28 match = "${fuzzelColor theme.base0C}";
29 selection = "${fuzzelColor theme.base00}";
30 selection-text = "${fuzzelColor theme.base05}";
31 selection-match = "${fuzzelColor theme.base0C}";
32 border = "${fuzzelColor theme.base02}";
33 };
34 border = {
35 width = 2;
36 radius = 0;
37 };
38 };
39 };
40}
41
42
diff --git a/programs/fzf.nix b/programs/fzf.nix
index 92ee4d0..c1e6bdb 100644
--- a/programs/fzf.nix
+++ b/programs/fzf.nix
@@ -8,6 +8,8 @@
8 "--color bw" 8 "--color bw"
9 "--no-scrollbar" 9 "--no-scrollbar"
10 "--no-separator" 10 "--no-separator"
11 "--no-unicode"
12 "--pointer '>'"
11 ]; 13 ];
12 defaultCommand = "rg -L --files"; 14 defaultCommand = "rg -L --files";
13 changeDirWidgetCommand = "fd --type d"; 15 changeDirWidgetCommand = "fd --type d";
diff --git a/programs/git.nix b/programs/git.nix
index e4b5e0f..9901d2d 100644
--- a/programs/git.nix
+++ b/programs/git.nix
@@ -12,37 +12,38 @@ with theme;
12 userEmail = "[email protected]"; 12 userEmail = "[email protected]";
13 userName = "Akshay"; 13 userName = "Akshay";
14 lfs.enable = true; 14 lfs.enable = true;
15 delta = { 15 # delta = {
16 enable = true;
17 options = {
18 features = "decorations labels";
19 syntax-theme = "none";
20 zero-style = "8";
21 navigate = "true";
22 keep-plus-minus-markers = "true";
23 decorations = {
24 file-decoration-style = "none";
25 whitespace-error-style = "22 reverse";
26 minus-style = "${base08}";
27 minus-emph-style = "${base08} bold";
28 plus-style = "${base0B}";
29 plus-emph-style = "${base0B} bold";
30 file-style = "7 italic";
31 hunk-header-style = "7";
32 hunk-header-decoration-style = "8 ul";
33 };
34 labels = {
35 file-modified-label = " MODIFIED ";
36 file-removed-label = " REMOVED ";
37 file-added-label = " ADDED ";
38 file-renamed-label = " RENAMED ";
39 };
40 };
41 };
42 # difftastic = {
43 # enable = true; 16 # enable = true;
44 # background = "dark"; 17 # options = {
45 # display = "inline"; 18 # features = "decorations labels";
19 # syntax-theme = "none";
20 # zero-style = "8";
21 # navigate = "true";
22 # line-numbers = "true";
23 # keep-plus-minus-markers = "true";
24 # line-numbers-zero-style = "8";
25 # line-numbers-left-style = "8";
26 # line-numbers-right-style = "8";
27 # line-numbers-minus-style = "${base08}";
28 # line-numbers-plus-style = "${base0B}";
29 # # decorations = {
30 # # file-decoration-style = "none";
31 # # whitespace-error-style = "22 reverse";
32 # # minus-style = "${base08}";
33 # # minus-emph-style = "${base08} bold";
34 # # plus-style = "${base0B}";
35 # # plus-emph-style = "${base0B} bold";
36 # # file-style = "7 bold";
37 # # hunk-header-style = "7";
38 # # hunk-header-decoration-style = "8 ul";
39 # # };
40 # labels = {
41 # file-modified-label = " MODIFIED ";
42 # file-removed-label = " REMOVED ";
43 # file-added-label = " ADDED ";
44 # file-renamed-label = " RENAMED ";
45 # };
46 # };
46 # }; 47 # };
47 aliases = { 48 aliases = {
48 co = "checkout"; 49 co = "checkout";
@@ -67,6 +68,7 @@ with theme;
67 enabled = true; 68 enabled = true;
68 autoUpdate = true; 69 autoUpdate = true;
69 }; 70 };
71 merge.conflictstyle = "diff3";
70 }; 72 };
71 }; 73 };
72} 74}
diff --git a/programs/init.vim b/programs/init.vim
index c62f419..3dbd4b5 100644
--- a/programs/init.vim
+++ b/programs/init.vim
@@ -55,6 +55,8 @@ set dir=/tmp
55 55
56syntax on 56syntax on
57 57
58set nocursorline
59set notermguicolors
58set omnifunc=syntaxcomplete#Complete 60set omnifunc=syntaxcomplete#Complete
59set completefunc=LanguageClient#complete 61set completefunc=LanguageClient#complete
60set list 62set list
@@ -76,6 +78,7 @@ set path+=**
76set backspace=indent,eol,start 78set backspace=indent,eol,start
77set hidden 79set hidden
78set wildmenu 80set wildmenu
81set pumheight=8
79set complete=.,w,b,i,u,t, 82set complete=.,w,b,i,u,t,
80set background=dark 83set background=dark
81set mouse=a 84set mouse=a
@@ -83,7 +86,7 @@ set conceallevel=0
83set nonumber 86set nonumber
84set grepprg=rg\ --vimgrep\ --no-heading 87set grepprg=rg\ --vimgrep\ --no-heading
85set grepformat=%f:%l:%c:%m,%f:%l:%m 88set grepformat=%f:%l:%c:%m,%f:%l:%m
86set cmdheight=2 89set cmdheight=1
87set shortmess+=c 90set shortmess+=c
88set updatetime=300 91set updatetime=300
89set signcolumn=yes 92set signcolumn=yes
@@ -157,7 +160,7 @@ highlight GitGutterAdd ctermfg=8
157highlight GitGutterChange ctermfg=8 160highlight GitGutterChange ctermfg=8
158highlight GitGutterDelete ctermfg=8 161highlight GitGutterDelete ctermfg=8
159 162
160let g:rustfmt_autosave = 1 163let g:rustfmt_autosave = 0
161 164
162let g:latex_view_general_viewer = "zathura" 165let g:latex_view_general_viewer = "zathura"
163let g:vimtex_view_method = "zathura" 166let g:vimtex_view_method = "zathura"
diff --git a/programs/readline.nix b/programs/readline.nix
index 8afdd82..c4d5046 100644
--- a/programs/readline.nix
+++ b/programs/readline.nix
@@ -8,6 +8,7 @@
8 enable = true; 8 enable = true;
9 bindings = { 9 bindings = {
10 "\\C-o" = ''"tmux-fzf\n"''; 10 "\\C-o" = ''"tmux-fzf\n"'';
11 "\\C-b" = ''"br\n"'';
11 "\\t" = "menu-complete"; 12 "\\t" = "menu-complete";
12 "\\e[Z" = "menu-complete-backward"; 13 "\\e[Z" = "menu-complete-backward";
13 }; 14 };
diff --git a/programs/rofi.nix b/programs/rofi.nix
index 8ce77bf..b6105fc 100644
--- a/programs/rofi.nix
+++ b/programs/rofi.nix
@@ -35,17 +35,15 @@ let
35 35
36 inputbar.children = [ "entry" ]; 36 inputbar.children = [ "entry" ];
37 37
38 element.padding = 10;
39 entry = { 38 entry = {
40 padding = 10;
41 placeholder = "type to filter"; 39 placeholder = "type to filter";
42 }; 40 };
43 listview.border = 0; 41 listview.border = 0;
44 scrollbar.handle-width = 0; 42 scrollbar.handle-width = 0;
45 window = { 43 window = {
46 padding = 40; 44 padding = 40;
47 width = 800; 45 width = 600;
48 height = 600; 46 height = 400;
49 border = mkLiteral "3px solid"; 47 border = mkLiteral "3px solid";
50 border-color = mkLiteral theme.base01; 48 border-color = mkLiteral theme.base01;
51 }; 49 };
@@ -53,11 +51,12 @@ let
53in 51in
54{ 52{
55 programs.rofi = { 53 programs.rofi = {
54 package = pkgs.rofi-wayland;
56 enable = true; 55 enable = true;
57 font = "${font.name} 21"; 56 font = "${font.name} 12";
58 location = "top-left"; 57 location = "center";
59 xoffset = 20; 58 # xoffset = 40;
60 yoffset = 20; 59 # yoffset = 40;
61 cycle = true; 60 cycle = true;
62 theme = rofi-theme; 61 theme = rofi-theme;
63 extraConfig = { 62 extraConfig = {
@@ -65,8 +64,8 @@ in
65 combi-modes = mkLiteral "[ window, run ]"; 64 combi-modes = mkLiteral "[ window, run ]";
66 # window = mkLiteral ''{ display-name: "[w]"; }''; 65 # window = mkLiteral ''{ display-name: "[w]"; }'';
67 # run = mkLiteral ''{ display-name: "[r]"; }''; 66 # run = mkLiteral ''{ display-name: "[r]"; }'';
68 kb-clear-line = "Control+c"; 67 # kb-clear-line = "Control+u";
69 kb-remove-word-back = "Control+w"; 68 # kb-remove-word-back = "Control+w";
70 }; 69 };
71 }; 70 };
72} 71}
diff --git a/programs/st/config.h b/programs/st/config.h
index c9fca58..e7f79e3 100644
--- a/programs/st/config.h
+++ b/programs/st/config.h
@@ -27,7 +27,7 @@ char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
27char *vtiden = "\033[?6c"; 27char *vtiden = "\033[?6c";
28 28
29/* Kerning / character bounding-box multipliers */ 29/* Kerning / character bounding-box multipliers */
30static float cwscale = 0.9; 30static float cwscale = 1.0;
31static float chscale = 1.0; 31static float chscale = 1.0;
32 32
33/* 33/*
diff --git a/programs/tmux.nix b/programs/tmux.nix
index 43778dd..bfda915 100644
--- a/programs/tmux.nix
+++ b/programs/tmux.nix
@@ -28,12 +28,15 @@ let
28 date-bst = date-tz "Europe/London"; 28 date-bst = date-tz "Europe/London";
29 date-hel = date-tz "Europe/Helsinki"; 29 date-hel = date-tz "Europe/Helsinki";
30 30
31 copy = "${pkgs.wl-clipboard-rs}/bin/wl-copy";
32 paste = "${pkgs.wl-clipboard-rs}/bin/wl-paste";
33
31 # plugins 34 # plugins
32 thumbs = { 35 thumbs = {
33 plugin = pkgs.tmuxPlugins.tmux-thumbs; 36 plugin = pkgs.tmuxPlugins.tmux-thumbs;
34 extraConfig = '' 37 extraConfig = ''
35 set -g @thumbs-key F 38 set -g @thumbs-key F
36 set -g @thumbs-command 'echo -n {} | xclip -i -sel p -f | xclip -i -sel c' 39 set -g @thumbs-command 'echo -n {} | ${copy}'
37 set -g @thumbs-fg-color white 40 set -g @thumbs-fg-color white
38 set -g @thumbs-hint-bg-color yellow 41 set -g @thumbs-hint-bg-color yellow
39 set -g @thumbs-hint-fg-color black 42 set -g @thumbs-hint-fg-color black
@@ -65,7 +68,7 @@ in
65 plugins = [ thumbs ]; 68 plugins = [ thumbs ];
66 prefix = "C-t"; 69 prefix = "C-t";
67 keyMode = "vi"; 70 keyMode = "vi";
68 terminal = "xterm-256color-italic"; 71 terminal = "alacritty";
69 extraConfig = '' 72 extraConfig = ''
70 bind r source-file ~/.config/tmux/tmux.conf 73 bind r source-file ~/.config/tmux/tmux.conf
71 74
@@ -112,9 +115,9 @@ in
112 bind-key -r ">" swap-window -d -t +1 115 bind-key -r ">" swap-window -d -t +1
113 116
114 bind-key -T copy-mode-vi v send-keys -X begin-selection 117 bind-key -T copy-mode-vi v send-keys -X begin-selection
115 bind-key -T copy-mode-vi y send-keys -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c " 118 bind-key -T copy-mode-vi y send-keys -X copy-pipe "${copy}"
116 bind-key -T copy-mode-vi r send-keys -X rectangle-toggle 119 bind-key -T copy-mode-vi r send-keys -X rectangle-toggle
117 bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "xclip -i -sel p -f | xclip -i -sel c " 120 bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear "${copy}"
118 bind P paste-buffer 121 bind P paste-buffer
119 122
120 set-window-option -g allow-rename off 123 set-window-option -g allow-rename off
@@ -138,7 +141,7 @@ in
138 # status left 141 # status left
139 set -g status-left-length 70 142 set -g status-left-length 70
140 set -g status-left "#[fg=colour7]#(bat -q) " 143 set -g status-left "#[fg=colour7]#(bat -q) "
141 set -ag status-left "#[fg=colour15]#(${cmus-np}/bin/cmus-np) #[fg=colour8]#(${cmus-status}/bin/cmus-status)" 144 # set -ag status-left "#[fg=colour15]#(${cmus-np}/bin/cmus-np) #[fg=colour8]#(${cmus-status}/bin/cmus-status)"
142 145
143 # include pwd and branch in pane border 146 # include pwd and branch in pane border
144 set -g pane-border-status top 147 set -g pane-border-status top