Skip to content

Neko-nos/configs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neko-nos's dotfiles & configs

These are my settings for a keyboard and fonts in Windows and tools used in programming (VSCode, Git, etc.) across two operating systems: Mac, and Ubuntu (WSL).

Contents

Windows

Key Configuration

Note

My configuration is only for JIS layout, a keyboard layout for Japanese. Other layouts are not tested.

There are differences in a key configuration between Mac and Windows, which may confuse you if you use both of them with a default key configuration.
By using my configuration, you can reproduce the Mac key configuration on a Windows computer.

Fonts

The default fonts of Windows are, in my humble opinion, not as good as those of Mac, especially for Japanese.
I personally prefer Moralerspace, so I use it in Windows.

Mac & Ubuntu

zsh

  1. zplug
    zplug allows you to install useful plugins for zsh.As coded in .zshrc, I used plugins for completion, syntax checking, and prompt customization.
    (You can see my prompt in the above image.)

  2. peco
    There are two functions: peco-select-history and peco-cdr.
    (The original code is here: https://qiita.com/reireias/items/fd96d67ccf1fdffb24ed)
    As you can see the images in the linked article,

    • peco-select-history allows you to view multiple histories and select whay you want.
    • peco-cdr allows you to select the directory that you want to move into by using a relative-path, instead of an absolute-path like peco-select-history.
  3. Useful aliases
    You can see what they do in the .zshrc file.

For more details, please refer to the .zshrc file.

Git

  1. Useful settings in .gitconfig.
    You can see what they do in the .gitconfig file.

  2. A template for .gitignore (for Python users)
    It includes directories and files such as .venv and __pycache__.

Python

I use pyenv + Poetry.

VScode

  1. linebreak.py
    If you set the value of markdown.preview.break to true in settings.json, your preview will correcly display line breaks. However, other environments (GitHub, etc) do not automatically generate line breaks.
    It takes time and effort to manually insert line break tags (i.e., <br>, two whitespaces and an extra \n) every time you write Markdown, especially in Japanese.
    Therefore, I combine Run on save with linebreak.py, that automatically inserts line break tags into your Markdown file.

  2. Useful settings for settings.json
    It includes not only the settings for VSCode and Python. In settings_mac.json, there are also the settings for Markdown and LaTeX.

Installation

Important

If you want to use these dotfiles, review and customize the code. Do not blindly use my settings unless you understand what they do.
In fact, some settings are OS-level (e.g., key configurations).

First, clone this repository from GitHub:

git clone https://github.com/zplug/zplug.git $PATH_TO_CONFIGS

Windows

Most of the settings have to be configured via GUI, so there are no install scripts.
Please refer to the README.md file in the Windows directory for the installation instruction.
(Since my configuration is for JIS layout (a keyboard layout for Japanese), the README.md file is written in Japanese).

WSL

WSL/install/install.sh runs all the install scripts in the install directory.

cd $PATH_TO_CONFIGS
cd WSL/install
source install.sh

If you want to run a particular script, instead of sourcing install.sh, simply execute the desired script.

  1. apt.sh
    Update apt and the packages specified in apt_packages.txt.

    chmod +x apt.sh
    ./apt.sh .
  2. zsh.sh
    Insall peco, zplug and set up .zshrc.

    chmod +x zsh.sh
    ./zsh.sh .
  3. git.sh
    Set up .gitconfig.

    chmod +x git.sh
    ./git.sh .
  4. python.sh
    Install and set up pyenv & Poetry

    source python.sh

Mac

CUI settings

Mac/install/install.sh runs all the install scripts in the install direcory.

cd $PATH_TO_CONFIGS
cd Mac/install
source install.sh

If you want to run a particular script, instead of sourcing install.sh, simply execute the desired script.

  1. brew.sh
    Install or Update Homebrew and the formulae specified in brew_formulae.txt

    source brew.sh
  2. zsh.sh
    Install zplug and set up .zshrc

    chmod +x zsh.sh
    ./zsh.sh
  3. python.sh
    Install and set up pyenv & Poetry

    source python.sh

Git configuration files are also provided (they are located in the WSL directory).

GUI settings

Since .zshrc doesn't support command key configuration, I use Karabina-elements, an OS-level key configuration tool.
After installing it, open its settings and add the two JSON files (rule1.json & rule2.json).

Zsh prompt

Prompt with Icons

  1. Font Settings
    To display icons using Powerlevel10k, download the MesloLGS NF font files from here.
    After downloading, set the font in both your terminal and IDE.

  2. Configure Powerlevel10k
    Once the font is set, run p10k configure to generate a new configuration file.

Instant Prompt

Powerlevel10k offers an instant prompt, allowing you to type commands while plugins are still loading.
The instructions in p10k configure recommend setting POWERLEVEL9K_INSTANT_PROMPT to verbose, but if you encounter warnings about the instant prompt, set it to quiet.

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published