Skip to content

nxtkofi/LightningNvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

133 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note

Most of people and most of stars are coming from those looking to get that juicy header image generation on their own. I myself have lost motivation (and interest) towards maintaining this repository as a Neovim repository, which it used to be. I have personally switched to LazyVim and I maintain my own set of plugins there. Having the ability to simply download an Extra for a certain language (C#/Java/Go / whatever) is a bliss and I refuse to compete with that. I am leaving this readme purely as a tutorial on how to set up those alpha-nvim images. Alpha-nvim config should still be reliable to use from this config (as well as generated images and commands in obsidian plugin).

Preview

arcane_ekko image preview Arcane_ekko.jpg image preview

Arcane wild rune image You can change images while at dashboard with w key

Manage tasks <C-t> Let's You manage Your daily tasks from Your Zettelkasten!

Updated task And You can see them update in real-time!

Running typr from dashboard Running Typr plugin directly from dashboard

Quick markdown look Quick markdown look

Dashboard images

How do I set my own dashboard images? Very easy! We're going to use Asthestarsfalll's img2art github repository but with a quick style fix from me, that's going to speed up the process by 90%.

Important

For more details or custom output options visit Asthestarsfalll's img2art github repository
Without him none of this would be possible!

img2art Installation

Prerequisites

Due to the fix that we had to apply make sure that You have python's poetry installed on your system.

  1. Clone my fork of ASthestarsfalll's repository. git clone https://github.com/nxtkofi/img2art
  2. Install requirements inside the project root
cd img2art
python -m venv ./venv
source venv/bin/activate 
pip install typer opencv-python numpy
  1. We're now ready to go! Run: poetry run python -m img2art.cli ~/path/to/picture.jpg --scale 0.3 --threshold 20 --save-raw ./test.lua --alpha

What does it do:

  • --scale 0.3 This is scaling for our image. Pick a value so it fits into Your dashboard
  • --threshold 20 This is black-white threshold point. I suggest You play around it for a bit to see what's the best outcome for Your picture. Usually it's something between 20-150
  • ./test.lua This is where our output file will go and what name will it receive. Leave .lua extension. You may change the name.
  • --alpha This makes sure that we get our picture in desired output style (ready to paste into alpha's dashboard!).

You should have Your output file now! Move it into header_img folder. Now to set a header image go ahead and check out my ./lua/custom/plugins/alpha.lua file.
Function load_random_header() loads random header image from header_img folder on nvim startup.

Important

Make sure you add local header = load_random_header() - otherwise Your image will not get initialized.

Tip

I also wrote a function change_header() which let's you change header when you press w in dashboard.

Keymaps

All keymaps are defined in /lua/keymaps.lua (except for those that were defined in plugin files - those are listed at the end of keymaps.lua so You can easily find them!)

About

Productivity-oriented Neovim configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages