diff --git a/.config/git/.gitconfig b/.config/git/.gitconfig index 0c186d8..50b50fa 100644 --- a/.config/git/.gitconfig +++ b/.config/git/.gitconfig @@ -1,5 +1,5 @@ # $XDG_CONFIG_HOME/git/config -# ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/.config +# ln -sf $DOTFILES/.config/git/.gitconfig $XDG_CONFIG_HOME/git/config # New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\git\config" -Target "$DOTFILES\.config\git\.gitconfig" [user] name = js0ny diff --git a/.config/lesskey b/.config/lesskey new file mode 100644 index 0000000..150eebe --- /dev/null +++ b/.config/lesskey @@ -0,0 +1,13 @@ +# $XDG_CONFIG_HOME/lesskey -- less options +# ln -sf $DOTFILES/.config/lesskey $XDG_CONFIG_HOME/lesskey +# Ne + +# Format: key action + +# Arrow Remap (hnei -> hjkl) +n forw-line +e back-line + +# search with k : ne[k]st +k repeat-search +K reverse-search diff --git a/.npmrc b/.config/npm/.npmrc similarity index 100% rename from .npmrc rename to .config/npm/.npmrc diff --git a/.config/npm/npmrc b/.config/npm/npmrc new file mode 100644 index 0000000..042f19c --- /dev/null +++ b/.config/npm/npmrc @@ -0,0 +1,4 @@ +# export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc +# $XDG_CONFIG_HOME/npm/npmrc +# ln -s $DOTFILES/.config/npm/npmrc $NPM_CONFIG_USERCONFIG +# registry=https://registry.npmmirror.com diff --git a/.config/starship/starship.toml b/.config/starship/starship.toml index d0c4e98..3a7e341 100644 --- a/.config/starship/starship.toml +++ b/.config/starship/starship.toml @@ -1,7 +1,6 @@ # starship.toml # ~/.config/starship.toml format = '''$os$time $username @ $hostname $directory $all$character''' -continuation_prompt = "[$ ](bold cyan) " add_newline = true @@ -18,11 +17,6 @@ show_always = true ssh_only = false ssh_symbol = '󰞉 ' -[character] -success_symbol = "[$ ](bold green)" -error_symbol = "[$ ](bold red)" -vimcmd_symbol = "[: ](bold green)" - [directory] truncation_length = 2 truncate_to_repo = true diff --git a/.tmux.conf b/.config/tmux/tmux.conf similarity index 100% rename from .tmux.conf rename to .config/tmux/tmux.conf diff --git a/.config/vim/vimrc b/.config/vim/vimrc new file mode 100644 index 0000000..f0c8c7e --- /dev/null +++ b/.config/vim/vimrc @@ -0,0 +1,52 @@ +" $XDG_CONFIG_HOME/vim/vimrc +" This is a minimal setup of vimrc +" ln -sf $DOTFILES/.config/vim/vimrc $XDG_CONFIG_HOME/vim/vimrc + +" Colemak Keys + +" Arrow remap +noremap n j +noremap e k +noremap i l + +" Similar position to i +noremap l i +noremap L I +" ne[k]st +noremap k n +noremap K N +" [j]ump +noremap j e +noremap J E + +" Normal minimal setup + +noremap Y y$ +set expandtab +set tabstop=4 +set shiftwidth=4 +set autoindent +set smartindent +set wrap +set scrolloff=3 +set hlsearch +set incsearch +est ignorecase +set smartcase + +" XDG Directory Specifications +" Reference to https://jorenar.com/blog/vim-xdg + +if empty($XDG_CACHE_HOME) | let $XDG_CACHE_HOME = $HOME."/.cache" | endif +if empty($XDG_CONFIG_HOME) | let $XDG_CONFIG_HOME = $HOME."/.config" | endif +if empty($XDG_DATA_HOME) | let $XDG_DATA_HOME = $HOME."/.local/share" | endif +if empty($XDG_STATE_HOME) | let $XDG_STATE_HOME = $HOME."/.local/state" | endif + +set viminfo+=n$XDG_STATE_HOME/vim/viminfo +set packpath^=$XDG_DATA_HOME/vim +set packpath+=$XDG_DATA_HOME/vim/after +set backupdir=$XDG_STATE_HOME/vim/backup +set directory=$XDG_STATE_HOME/vim/swap +set undodir=$XDG_STATE_HOME/vim/undo +set viewdir=$XDG_STATE_HOME/vim/view +set shada+=n$XDG_STATE_HOME/vim/shada diff --git a/.gitignore b/.gitignore index c989508..7aadea2 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ test.* *.zip *.tgz # WindowsTerminal.json -PowerToys/ \ No newline at end of file +PowerToys/ +xdg-ninja/ \ No newline at end of file diff --git a/.haskline b/.haskeline similarity index 100% rename from .haskline rename to .haskeline diff --git a/surfingkeys.js b/browser/surfingkeys.js similarity index 99% rename from surfingkeys.js rename to browser/surfingkeys.js index b18c72e..012882e 100644 --- a/surfingkeys.js +++ b/browser/surfingkeys.js @@ -1,6 +1,6 @@ // Paste this into surfingkeys advanced settings // or use: -// Load settings from: https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/surfingkeys.js +// Load settings from: https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/browser/surfingkeys.js /** Examples diff --git a/zsh/.zshenv b/zsh/.zshenv index c196353..031bca6 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -4,4 +4,12 @@ # Use XDG Base Directory Specification export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -export ZDOTDIR="${XDG_CONFIG_HOME}/zsh" +export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" +export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" +export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" +export XDG_RUNTIME_DIR="/run/user/$(id -u)" + +# Zsh +export ZDOTDIR="${XDG_CONFIG_HOME}/zsh" + +# Also put in /etc/zsh/zshenv diff --git a/zsh/config.zsh b/zsh/config.zsh index d841ef7..d240881 100644 --- a/zsh/config.zsh +++ b/zsh/config.zsh @@ -21,4 +21,30 @@ source $ZSH/oh-my-zsh.sh source .private.env.sh # export MANPATH="/usr/local/man:$MANPATH" -# export LANG= "en_US.UTF-8" \ No newline at end of file +# export LANG= "en_US.UTF-8" + +# Use XDG Base Directory Specification + +# ~/.dotnet -> $XDG_DATA_HOME/dotnet +export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet +# ~/.gnupg -> $XDG_CONFIG_HOME/gnupg +export GNUPGHOME="$XDG_DATA_HOME"/gnupg +# ~/go -> $XDG_DATA_HOME/go +export GOPATH="$XDG_DATA_HOME"/go +# ~/.npmrc -> $XDG_CONFIG_HOME/npm/npmrc +export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc +# ~/.python_history -> $XDG_DATA_HOME/python/history +# Works only with Python 3.13.0a3 and later +export PYTHON_HISTORY="$XDG_DATA_HOME"/python/history +# ~/.w3m -> $XDG_DATA_HOME/w3m +export W3M_DIR="$XDG_DATA_HOME"/w3m +# ~/.wakatime.cfg -> $XDG_CONFIG_HOME/wakatime.cfg +export WAKATIME_HOME="$XDG_CONFIG_HOME/wakatime" +# ~/.wget-hsts -> $XDG_DATA_HOME/wget-hsts +alias wget='wget --hsts-file="$XDG_DATA_HOME/wget-hsts"' +# ~/.z -> $XDG_DATA_HOME/z +export _Z_DATA="$XDG_DATA_HOME/z" +# ~/.zcompdump* -> $XDG_CACHE_HOME/zsh/zcompdump* +compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-"$ZSH_VERSION" +# ~/.zsh_history -> $XDG_STATE_HOME/zsh/history +export HISTFILE="$XDG_STATE_HOME"/zsh/history \ No newline at end of file