Skip to content

Commit

Permalink
add image.nvim and update terminal configs
Browse files Browse the repository at this point in the history
  • Loading branch information
ALescoulie committed Aug 15, 2024
1 parent 7388894 commit 98dd143
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 1,084 deletions.
6 changes: 6 additions & 0 deletions hm/hm_modules/kitty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
{
programs.kitty = {
enable = true;
theme = "Adwaita dark";
extraConfig = ''
font_size 10
background_opacity 0.5
'';
};
}

36 changes: 36 additions & 0 deletions hm/hm_modules/nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
-- default config
require("image").setup({
backend = "kitty",
integrations = {
markdown = {
enabled = true,
clear_in_insert_mode = false,
download_remote_images = true,
only_render_image_at_cursor = false,
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
},
neorg = {
enabled = true,
clear_in_insert_mode = false,
download_remote_images = true,
only_render_image_at_cursor = false,
filetypes = { "norg" },
},
html = {
enabled = false,
},
css = {
enabled = false,
},
},
max_width = nil,
max_height = nil,
max_width_window_percentage = nil,
max_height_window_percentage = 50,
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened
})

38 changes: 38 additions & 0 deletions hm/hm_modules/nvim/init.nvim
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,41 @@ func! MakeSplitTerm()
:normal G
endfunc
noremap <leader>rr :call MakeSplitTerm()<CR>

lua << EOF
-- default config
require("image").setup({
backend = "kitty",
integrations = {
markdown = {
enabled = true,
clear_in_insert_mode = false,
download_remote_images = true,
only_render_image_at_cursor = false,
filetypes = { "markdown", "vimwiki" }, -- markdown extensions (ie. quarto) can go here
},
neorg = {
enabled = true,
clear_in_insert_mode = false,
download_remote_images = true,
only_render_image_at_cursor = false,
filetypes = { "norg" },
},
html = {
enabled = false,
},
css = {
enabled = false,
},
},
max_width = 100,
max_height = 12,
max_width_window_percentage = math.huge,
max_height_window_percentage = math.huge,
window_overlap_clear_enabled = false, -- toggles images when windows are overlapped
window_overlap_clear_ft_ignore = { "cmp_menu", "cmp_docs", "" },
editor_only_render_when_focused = false, -- auto show/hide images when the editor gains/looses focus
tmux_show_only_in_active_window = false, -- auto show/hide images in the correct Tmux window (needs visual-activity off)
hijack_file_patterns = { "*.png", "*.jpg", "*.jpeg", "*.gif", "*.webp", "*.avif" }, -- render image files as images when opened
})
EOF
8 changes: 6 additions & 2 deletions hm/hm_modules/nvim/nvim.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
vimtex
awesome-vim-colorschemes
telescope-nvim
nvim-dap
nvim-dap-ui
image-nvim
molten-nvim
];

coc = {
Expand All @@ -49,6 +49,10 @@
${builtins.readFile ./init.nvim}
${builtins.readFile ./ide.nvim}
'';

extraLuaPackages = [ pkgs.luajitPackages.magick ];
extraPackages = [ pkgs.imagemagick ];

};

home.packages = with pkgs; [
Expand Down
1 change: 1 addition & 0 deletions hm/hm_modules/tmux.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
set -g status-bg color141
set -g status-fg white
set -gq allow-passthrough on
'';
};
}
Expand Down
1,113 changes: 32 additions & 1,081 deletions hm/hm_modules/zsh/p10k-config/p10k.zsh

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions hm/stargazer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@
./hm_modules/tmux.nix
./hm_modules/hypr.nix
./hm_modules/waybar/waybar.nix
./hm_modules/kitty.nix
];

home.packages = with pkgs; [
arandr
anki
arduino
calibre
discord
polybar
Expand All @@ -33,6 +35,7 @@
strawberry
zathura
praat
zotero
];


Expand Down
2 changes: 1 addition & 1 deletion systems/stargazer.nix
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
users.users.alia = {
isNormalUser = true;
description = "Alia Lescoulie";
extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
extraGroups = [ "networkmanager" "wheel" "libvirtd" "dialout" ];
packages = with pkgs; [
firefox
qmk
Expand Down

0 comments on commit 98dd143

Please sign in to comment.