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.nix14
-rw-r--r--programs/init.vim36
-rw-r--r--programs/neovim.nix2
-rw-r--r--programs/readline.nix1
-rw-r--r--programs/rofi.nix19
-rw-r--r--programs/st/config.h4
-rw-r--r--programs/tmux.nix14
13 files changed, 196 insertions, 59 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..d7911cc 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 = true;
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..d4fac67 100644
--- a/programs/git.nix
+++ b/programs/git.nix
@@ -19,7 +19,13 @@ with theme;
19 syntax-theme = "none"; 19 syntax-theme = "none";
20 zero-style = "8"; 20 zero-style = "8";
21 navigate = "true"; 21 navigate = "true";
22 line-numbers = "true";
22 keep-plus-minus-markers = "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}";
23 decorations = { 29 decorations = {
24 file-decoration-style = "none"; 30 file-decoration-style = "none";
25 whitespace-error-style = "22 reverse"; 31 whitespace-error-style = "22 reverse";
@@ -27,7 +33,7 @@ with theme;
27 minus-emph-style = "${base08} bold"; 33 minus-emph-style = "${base08} bold";
28 plus-style = "${base0B}"; 34 plus-style = "${base0B}";
29 plus-emph-style = "${base0B} bold"; 35 plus-emph-style = "${base0B} bold";
30 file-style = "7 italic"; 36 file-style = "7 bold";
31 hunk-header-style = "7"; 37 hunk-header-style = "7";
32 hunk-header-decoration-style = "8 ul"; 38 hunk-header-decoration-style = "8 ul";
33 }; 39 };
@@ -39,11 +45,6 @@ with theme;
39 }; 45 };
40 }; 46 };
41 }; 47 };
42 # difftastic = {
43 # enable = true;
44 # background = "dark";
45 # display = "inline";
46 # };
47 aliases = { 48 aliases = {
48 co = "checkout"; 49 co = "checkout";
49 rb = "rebase"; 50 rb = "rebase";
@@ -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..e7a70c1 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
@@ -97,7 +100,7 @@ let g:netrw_banner=0
97let g:netrw_browsex_viewer="xdg-open" 100let g:netrw_browsex_viewer="xdg-open"
98let g:netrw_winsize=30 101let g:netrw_winsize=30
99 102
100colorscheme plain 103colorscheme agila
101 104
102set shiftwidth=4 " indent = 4 spaces 105set shiftwidth=4 " indent = 4 spaces
103set expandtab 106set expandtab
@@ -129,35 +132,25 @@ cab bfd bufdo
129" man pages 132" man pages
130let g:ft_man_open_mode = 'tab' 133let g:ft_man_open_mode = 'tab'
131 134
132let g:gitgutter_override_sign_column_highlight = 0
133let g:gitgutter_sign_added = '+'
134let g:gitgutter_sign_modified = '~'
135let g:gitgutter_sign_removed = '-'
136let g:gitgutter_sign_removed_first_line = '-'
137let g:gitgutter_sign_modified_removed = '~'
138
139let g:fzf_colors = 135let g:fzf_colors =
140 \ { 'fg': ['fg', 'Noise'], 136 \ { 'fg': ['fg', 'Normal'],
141 \ 'bg': ['bg', 'Noise'], 137 \ 'bg': ['bg', 'Normal'],
142 \ 'hl': ['fg', 'Statement'], 138 \ 'hl': ['fg', 'Normal'],
143 \ 'fg+': ['fg', 'CursorLine', 'CursorColumn', 'Normal'], 139 \ 'fg+': ['fg', 'StatusLine'],
144 \ 'bg+': ['bg', 'CursorLine', 'CursorColumn'], 140 \ 'bg+': ['bg', 'Normal'],
145 \ 'hl+': ['fg', 'Statement'], 141 \ 'hl+': ['fg', 'Normal'],
142 \ 'gutter': ['bg', 'Normal'],
146 \ 'info': ['fg', 'PreProc'], 143 \ 'info': ['fg', 'PreProc'],
147 \ 'border': ['fg', 'Ignore'], 144 \ 'border': ['fg', 'Ignore'],
148 \ 'prompt': ['fg', 'Conditional'], 145 \ 'prompt': ['fg', 'Conditional'],
149 \ 'pointer': ['fg', 'Exception'], 146 \ 'pointer': ['fg', 'Directory'],
150 \ 'marker': ['fg', 'Keyword'], 147 \ 'marker': ['fg', 'Keyword'],
151 \ 'spinner': ['fg', 'Label'], 148 \ 'spinner': ['fg', 'Label'],
152 \ 'header': ['fg', 'Comment'] } 149 \ 'header': ['fg', 'Comment'] }
153let g:fzf_layout = { 'down': '40%' } 150let g:fzf_layout = { 'down': '40%' }
154let g:fzf_preview_window = [] 151let g:fzf_preview_window = []
155 152
156highlight GitGutterAdd ctermfg=8 153let g:rustfmt_autosave = 0
157highlight GitGutterChange ctermfg=8
158highlight GitGutterDelete ctermfg=8
159
160let g:rustfmt_autosave = 1
161 154
162let g:latex_view_general_viewer = "zathura" 155let g:latex_view_general_viewer = "zathura"
163let g:vimtex_view_method = "zathura" 156let g:vimtex_view_method = "zathura"
@@ -177,4 +170,5 @@ require 'lsp'
177require 'treesitter' 170require 'treesitter'
178require 'completions' 171require 'completions'
179require 'leap' 172require 'leap'
173require 'clipboard'
180EOF 174EOF
diff --git a/programs/neovim.nix b/programs/neovim.nix
index 08a1ada..6a09ba4 100644
--- a/programs/neovim.nix
+++ b/programs/neovim.nix
@@ -42,7 +42,9 @@
42 # syntax 42 # syntax
43 rust-vim 43 rust-vim
44 haskell-vim 44 haskell-vim
45 typescript-vim
45 vim-nix 46 vim-nix
47 vim-javascript
46 48
47 # handy 49 # handy
48 tabular 50 tabular
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..d6402f9 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/*
@@ -46,7 +46,7 @@ int allowaltscreen = 1;
46 46
47/* allow certain non-interactive (insecure) window operations such as: 47/* allow certain non-interactive (insecure) window operations such as:
48 setting the clipboard text */ 48 setting the clipboard text */
49int allowwindowops = 0; 49int allowwindowops = 1;
50 50
51/* 51/*
52 * draw latency range in ms - from new content/keypress/etc until drawing. 52 * draw latency range in ms - from new content/keypress/etc until drawing.
diff --git a/programs/tmux.nix b/programs/tmux.nix
index 43778dd..10cbf5f 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,10 @@ 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}"
121 set -s set-clipboard on
118 bind P paste-buffer 122 bind P paste-buffer
119 123
120 set-window-option -g allow-rename off 124 set-window-option -g allow-rename off
@@ -138,7 +142,7 @@ in
138 # status left 142 # status left
139 set -g status-left-length 70 143 set -g status-left-length 70
140 set -g status-left "#[fg=colour7]#(bat -q) " 144 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)" 145 # set -ag status-left "#[fg=colour15]#(${cmus-np}/bin/cmus-np) #[fg=colour8]#(${cmus-status}/bin/cmus-status)"
142 146
143 # include pwd and branch in pane border 147 # include pwd and branch in pane border
144 set -g pane-border-status top 148 set -g pane-border-status top