diff --git a/.chezmoiroot b/.chezmoiroot new file mode 100644 index 0000000..5e72f75 --- /dev/null +++ b/.chezmoiroot @@ -0,0 +1 @@ +home diff --git a/.gitignore b/.gitignore index f0d1635..8f2990d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,12 @@ # Log *.log -# Private Files -*private* -.private.env.* +# fish +dot_config/fish/fish_variables +dot_config/fish/completions +dot_config/fish/functions/br.fish +dot_config/fish/functions/dotenv.fish + # Test files test/ @@ -29,8 +32,6 @@ tools/nushell/ .venv/ -gitconfig - # Lock files lazy-lock.json @@ -38,10 +39,11 @@ lazy-lock.json # Emacs *.elc -common/**/*current* - -**/current.* default.target.wants nvim-healthcheck.txt + +private_pid +private_security +private_fish_variables diff --git a/.just.d/check.just b/.just.d/check.just deleted file mode 100644 index b06d518..0000000 --- a/.just.d/check.just +++ /dev/null @@ -1,45 +0,0 @@ - -test: - echo "DOTFILES={{DOTFILES}}" - echo "XDG_CONFIG_HOME={{XDG_CONFIG_HOME}}" - echo "XDG_DATA_HOME={{XDG_DATA_HOME}}" - - -check: - @just check_shell -format: - @just format_shell - - -[private] -[unix] -check_shell: - shellcheck -x -s sh --severity=error **/*.sh platforms/mac/yabairc - shellcheck -x -s bash --severity=error **/*.bash tools/bash/* **/*.bashrc - -[private] -[unix] -format_shell: - shfmt -w -i 2 -ci -bn -p **/*.sh - shfmt -w -i 2 -ci -bn -ln bash **/*.bash platforms/mac/sketchybar/sketchybarrc - # Ignore syntax errors in zsh files - shfmt -w -i 2 -ci -bn -ln bash **/*.zsh tools/zsh/**/* **/zshrc || true - -[private] -check_info: - shellcheck -x -s sh **/*.sh platforms/mac/yabairc - shellcheck -x -s bash **/*.bash tools/bash/* scripts/*.{sh,zsh,bash} **/*.bashrc - -[private] -init: - git remote add github git@github.com:js0ny/dotfiles.git - git remote add codeberg git@codeberg.org:js0ny/dotfiles.git - -[private] -push: - git push github master - git push codeberg master - -[private] -pull: - git pull github master diff --git a/.just.d/cmds.just b/.just.d/cmds.just deleted file mode 100644 index eb93a58..0000000 --- a/.just.d/cmds.just +++ /dev/null @@ -1,26 +0,0 @@ - -# Sudo and coreutils are required -LN := \ - if os_family() == "windows" { - "sudo ln -sf" - } else { - "ln -sf" - } -CLIP := \ - if os() == "windows" { "clip.exe" } \ - else if os() == "linux" { "wl-copy" } \ - else if os() == "macos" { "pbcopy" } \ - else { "" } - - -CURL := \ - if os() == "windows" { "Invoke-WebRequest" } \ - else if os() == "linux" { "curl -L" } \ - else if os() == "macos" { "curl -L" } \ - else { "" } - -CURL_OUT := \ - if os() == "windows" { "-OutFile" } \ - else if os() == "linux" { "-o" } \ - else if os() == "macos" { "-o" } \ - else { "" } diff --git a/.just.d/common.just b/.just.d/common.just deleted file mode 100644 index 1530a10..0000000 --- a/.just.d/common.just +++ /dev/null @@ -1,52 +0,0 @@ -ideavim: - {{LN}} {{DOTFILES}}/common/ideavimrc {{XDG_CONFIG_HOME}}/ideavim/ideavimrc - git clone https://github.com/MarcoIeni/intellimacs {{join(home_directory(), ".local/share/intellimacs")}} --depth 1 - -lsd: - -mkdir {{XDG_CONFIG_HOME}}/lsd - {{LN}} {{DOTFILES}}/common/lsd.yaml {{XDG_CONFIG_HOME}}/lsd/config.yaml - -bat: - mkdir -p "$(bat --config-dir)/themes" - wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Latte.tmTheme - wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Frappe.tmTheme - wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmTheme - wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme - {{LN}} {{DOTFILES}}/common/bat.config.dark {{DOTFILES}}/common/bat.config - {{LN}} {{DOTFILES}}/common/bat.config {{XDG_CONFIG_HOME}}/bat/config - -[unix] -neovide: - which neovide - -mkdir -p {{XDG_CONFIG_HOME}}/neovide - {{LN}} {{DOTFILES}}/platforms/{{OS}}/neovide.toml {{XDG_CONFIG_HOME}}/neovide/config.toml - - -[linux] -readline: - mkdir -p {{XDG_CONFIG_HOME}}/readline - {{LN}} {{DOTFILES}}/common/inputrc {{XDG_CONFIG_HOME}}/readline/inputrc - -[unix] -rtorrent: - mkdir -p {{XDG_CONFIG_HOME}}/rtorrent - {{LN}} {{DOTFILES}}/common/rtorrent.rc {{XDG_CONFIG_HOME}}/rtorrent/rtorrent.rc - mkdir -p {{XDG_DATA_HOME}}/rtorrent/session - mkdir -p {{XDG_DATA_HOME}}/rtorrent/watch - -starship: - {{LN}} {{DOTFILES}}/common/starship.toml {{XDG_CONFIG_HOME}}/starship.toml - - -[unix] -vim: - mkdir -p {{XDG_DATA_HOME}}/vim/after - mkdir -p {{XDG_STATE_HOME}}/vim/{backup,swap,undo,view} - mkdir -p {{XDG_CONFIG_HOME}}/vim/ - ln -sf {{DOTFILES}}/common/vimrc {{XDG_CONFIG_HOME}}/vim/vimrc - - -[windows] -vim: - New-Item -ItemType SymbolicLink -Path $HOME/_vimrc -Value {{DOTFILES}}/common/vim.noxdg.vimrc - diff --git a/.just.d/linux.just b/.just.d/linux.just deleted file mode 100644 index f5ac99d..0000000 --- a/.just.d/linux.just +++ /dev/null @@ -1,61 +0,0 @@ - -[linux] -systemd: - {{LN}} {{DOTFILES}}/platforms/{{OS}}/systemd {{XDG_CONFIG_HOME}}/systemd - -[linux] -keyd: - -which keyd || sudo pacman -S keyd --noconfirm || sudo apt install keyd --yes || @just build_keyd - sudo mkdir /etc/keyd/ - sudo cp {{DOTFILES}}/platforms/linux/keyd/default.conf /etc/keyd/default.conf - mkdir -p {{XDG_CONFIG_HOME}}/keyd - {{LN}} {{DOTFILES}}/platforms/linux/keyd/app.conf {{XDG_CONFIG_HOME}}/keyd/app.conf - sudo systemctl enable --now keyd.service - -[linux] -[private] -build_keyd: - git clone https://github.com/rvaiya/keyd $HOME/.local/build/keyd - cd $HOME/.local/build/keyd && make && sudo make install - -[linux] -flatpak: - flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo - -[linux] -swaylock: - mkdir -p {{XDG_CONFIG_HOME}}/swaylock - {{LN}} {{DOTFILES}}/platforms/linux/swaylock {{XDG_CONFIG_HOME}}/swaylock/config - -[linux] -dunst: - mkdir -p {{XDG_CONFIG_HOME}}/dunst - {{LN}} {{DOTFILES}}/platforms/linux/dunstrc {{XDG_CONFIG_HOME}}/dunst/dunstrc - -[linux] -hypr: - {{LN}} {{DOTFILES}}/platforms/linux/hypr/hyprland/dark.conf {{DOTFILES}}/platforms/linux/hypr/hyprland/current.conf - {{LN}} {{DOTFILES}}/platforms/linux/hypr {{XDG_CONFIG_HOME}}/hypr - -[linux] -rofi: - {{LN}} {{DOTFILES}}/platforms/linux/rofi/dark.rasi {{DOTFILES}}/platforms/linux/rofi/current.rasi - {{LN}} {{DOTFILES}}/platforms/linux/rofi {{XDG_CONFIG_HOME}}/rofi - -[linux] -waybar: - {{LN}} {{DOTFILES}}/platforms/linux/waybar {{XDG_CONFIG_HOME}}/waybar - {{LN}} {{DOTFILES}}/platforms/linux/waybar/dark.css {{DOTFILES}}/platforms/linux/waybar/current.css - -[linux] -hyprland: - @just hypr - @just dunst - @just swaylock - @just rofi - - -[linux] -fcitx: - [ -d {{XDG_CONFIG_HOME}}/fcitx5 ] && mv {{XDG_CONFIG_HOME}}/fcitx {{XDG_CONFIG_HOME}}/fcitx5.bak - {{LN}} {{DOTFILES}}/platforms/linux/fcitx5 {{XDG_CONFIG_HOME}}/fcitx5 diff --git a/.just.d/misc.just b/.just.d/misc.just deleted file mode 100644 index aef7bc8..0000000 --- a/.just.d/misc.just +++ /dev/null @@ -1,15 +0,0 @@ -uv: - uv init {{XDG_DATA_HOME}}/uvenv - cd {{XDG_DATA_HOME}}/uvenv - uv venv - uv add -r {{DOTFILES}}/bootstrap/components/requirements.txt - -vivaldi: - {{CURL}} https://github.com/catppuccin/vivaldi/releases/download/1.0.0-ctpv2/Catppuccin.Latte.Lavender.zip {{CURL_OUT}} "$HOME/Downloads/vivaldi-light.zip" # Catppuccin Latte Lavender - {{CURL}} https://github.com/catppuccin/vivaldi/releases/download/1.0.0-ctpv2/Catppuccin.Mocha.Lavender.zip {{CURL_OUT}} "$HOME/Downloads/vivaldi-dark.zip" # Catppuccin Mocha Lavender - - -zotero: - {{CURL}} https://github.com/syt2/zotero-addons/releases/download/V1.8.1/zotero-addons.xpi {{CURL_OUT}} "$HOME/Downloads/zotero-addons.xpi" - - diff --git a/.just.d/tools.just b/.just.d/tools.just deleted file mode 100644 index b0a4096..0000000 --- a/.just.d/tools.just +++ /dev/null @@ -1,69 +0,0 @@ -[unix] -kitty: - which kitty - {{LN}} {{DOTFILES}}/tools/kitty {{XDG_CONFIG_HOME}}/kitty - -neovim: - which nvim - {{LN}} {{DOTFILES}}/tools/nvim {{XDG_CONFIG_HOME}}/nvim - nvim --headless +checkhealth +"w nvim-healthcheck.txt" +qall - -nvim: - @just neovim - -[linux] -bash: - {{LN}} {{DOTFILES}}/tools/bash {{XDG_CONFIG_HOME}}/bash - sudo cp {{DOTFILES}}/tools/bash/xdg-compat.sh /etc/profile.d/xdg-compat.sh - -[unix] -fish: - {{LN}} {{DOTFILES}}/tools/fish {{XDG_CONFIG_HOME}}/fish - {{CURL}} https://raw.githubusercontent.com/SpaceAceMonkey/dotenv-for-fish/refs/heads/main/dotenv.fish {{CURL_OUT}} "{{DOTFILES}}/tools/fish/functions/dotenv.fish" - -[unix] -screen: - {{LN}} {{DOTFILES}}/tools/screen {{XDG_CONFIG_HOME}}/screen - -[unix] -tmux: - {{LN}} {{DOTFILES}}/tools/tmux {{XDG_CONFIG_HOME}}/tmux - -thunderbird: - {{CURL}} https://github.com/wshanks/tbkeys/releases/download/v2.4.0/tbkeys.xpi {{CURL_OUT}} "$HOME/Downloads/tbkeys.xpi" - {{CURL}} https://github.com/htyxyt/htyxyt-immersive-translate-Thunderbird/releases/download/thunderbird-v1.14.8/immersive-translate-Thunderbird.v1.14.8.xpi {{CURL_OUT}} "$HOME/Downloads/immersive-translate-Thunderbird.xpi" - {{CURL}} https://raw.githubusercontent.com/catppuccin/thunderbird/refs/heads/main/themes/mocha/mocha-lavender.xpi {{CURL_OUT}} "$HOME/Downloads/thunderbird-dark.xpi" - cat {{DOTFILES}}/tools/thunderbird/tbkeys.json | {{CLIP}} - -wezterm: - which wezterm - {{LN}} {{DOTFILES}}/tools/wezterm {{XDG_CONFIG_HOME}}/wezterm - - -yazi: - which yazi || cargo install --locked yazi-fm yazi-cli - -ya pack -a llanosrocas/yaziline - -ya pack -a yazi-rs/plugins:git - -ya pack -a Rolv-Apneseth/starship - -[unix] -zsh: - -[[ -f /etc/zshenv ]] && sudo cp {{DOTFILES}}/tools/zsh/global.zshenv /etc/zshenv # or /etc/zsh/zshenv - -[[ -f /etc/zsh/zshenv ]] && sudo cp {{DOTFILES}}/tools/zsh/global.zshenv /etc/zsh/zshenv - mkdir -p {{XDG_CONFIG_HOME}}/zsh - {{LN}} {{DOTFILES}}/tools/zsh/zshenv {{XDG_CONFIG_HOME}}/zsh/.zshenv - {{LN}} {{DOTFILES}}/tools/zsh/zshrc {{XDG_CONFIG_HOME}}/zsh/.zshrc - {{LN}} {{DOTFILES}}/tools/zsh/zprofile {{XDG_CONFIG_HOME}}/zsh/.zprofile - test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-autosuggestions || git clone --depth 1 https://github.com/zsh-users/zsh-autosuggestions.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-autosuggestions - test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-syntax-highlighting || git clone --depth 1 https://github.com/zsh-users/zsh-syntax-highlighting.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-syntax-highlighting - test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-history-substring-search || git clone --depth 1 https://github.com/zsh-users/zsh-history-substring-search.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-history-substring-search - test -d {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-completions || git clone --depth 1 https://github.com/zsh-users/zsh-completions.git {{XDG_CONFIG_HOME}}/zsh/plugins/zsh-completions - -[linux] -install_emacs: - git clone --depth 1 https://github.com/emacs-mirror/emacs.git --branch feature/igc $HOME/.local/build/emacs-igc-build - cd $HOME/.local/build/emacs-igc-build - ./autogen.sh - ./configure --with-mailutils --with-native-compilation --with-pgtk --with-tree-sitter --with-imagemagick - make -j$(nproc) - sudo make install diff --git a/.just.d/vars.just b/.just.d/vars.just deleted file mode 100644 index 5fd1146..0000000 --- a/.just.d/vars.just +++ /dev/null @@ -1,42 +0,0 @@ -OS := \ - if os() == "linux" { - if env("WSL_DISTRO_NAME","") != "" { - "wsl" - } else { - "linux" - } - } else if os() == "windows" { - "win" - } else if os() == "macos" { - "mac" - } else { "" } -DOTFILES := join(home_directory(), ".dotfiles") -XDG_CONFIG_HOME := \ - if env("XDG_CONFIG_HOME", "") != "" {env("XDG_CONFIG_HOME", "")} \ - else { - if os_family() == "windows" { - env("APPDATA") - } else { - join(home_directory(), ".config") - } - } - -XDG_DATA_HOME := \ - if env("XDG_DATA_HOME", "") != "" {env("XDG_DATA_HOME", "")} \ - else { - if os_family() == "windows" { - env("LOCALAPPDATA", "") - } else { - join(home_directory(), ".local/share") - } - } - -XDG_STATE_HOME := \ - if env("XDG_STATE_HOME", "") != "" {env("XDG_STATE_HOME", "")} \ - else { - if os_family() == "windows" { - join(env("LOCALAPPDATA", ""), "state") - } else { - join(home_directory(), ".local/state") - } - } diff --git a/Justfile b/Justfile deleted file mode 100644 index e81b300..0000000 --- a/Justfile +++ /dev/null @@ -1,15 +0,0 @@ -# set shell := ["fish", "-c"] -set shell := ["bash", "-c"] -set windows-shell := ["pwsh", "-c"] - -import '.just.d/vars.just' -import '.just.d/cmds.just' -import '.just.d/common.just' -import '.just.d/tools.just' -import '.just.d/misc.just' -import '.just.d/linux.just' -import '.just.d/check.just' - -_default: - @just test - @just --list diff --git a/_assets/windows-1.png b/_assets/windows-1.png deleted file mode 100644 index 313ae1c..0000000 Binary files a/_assets/windows-1.png and /dev/null differ diff --git a/bootstrap/components/emacs.sh b/bootstrap/components/emacs.sh deleted file mode 100644 index 1784a0a..0000000 --- a/bootstrap/components/emacs.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# shellcheck shell=sh -echo "[INFO] Installing DOOM Emacs" -echo "[ACTION] Request Human Takeover" -test -d ~/.config/emacs && mv ~/.config/emacs ~/.config/emacs.bak -git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs -~/.config/emacs/bin/doom install -~/.config/emacs/bin/doom sync - -echo "[INFO] Installing Emacs-Rime" -git clone --depth 1 https://github.com/js0ny/Rime.git ~/.config/emacs/.local/cache/rime diff --git a/bootstrap/components/mocha-port.bash b/bootstrap/components/mocha-port.bash deleted file mode 100644 index ceabe73..0000000 --- a/bootstrap/components/mocha-port.bash +++ /dev/null @@ -1,231 +0,0 @@ -#!/usr/bin/env bash -# Adds better error handling and safety features -# shellcheck disable=SC2016 - -set -e # Exit immediately if a command exits with a non-zero status -set -u # Treat unset variables as an error - -# Create temporary working directory -TEMP_DIR="${HOME}/.tmp/catppuccin-install" -mkdir -p "${TEMP_DIR}" - -# Create config directories -mkdir -p "${HOME}/.config/tmux/plugins" -mkdir -p "${HOME}/.config/yazi" -mkdir -p "${HOME}/.config/btop/themes" -mkdir -p "${HOME}/.config/git" -mkdir -p "${HOME}/.config/lsd" -mkdir -p "${HOME}/.local/share/mc/skins" -mkdir -p "${HOME}/.config/fish/themes" -mkdir -p "${HOME}/.local/share/fcitx5/themes" - -# Function for downloading files -download_file() { - local url="$1" - local output_path="$2" - local output_dir - - # Extract directory from output path - output_dir=$(dirname "$output_path") - - # Create directory if it doesn't exist - if [ ! -d "$output_dir" ]; then - mkdir -p "$output_dir" - fi - - # Print status message - echo "Downloading: $url" - echo " to: $output_path" - - # Download with curl (using -L to follow redirects) - if ! curl -L -s --fail "$url" -o "$output_path"; then - echo "Error: Failed to download $url" >&2 - return 1 - fi - - # Verify file was downloaded - if [ ! -f "$output_path" ]; then - echo "Error: File was not created at $output_path" >&2 - return 1 - fi - - echo "Download successful." - return 0 -} - -# Function to check if command exists -command_exists() { - command -v "$1" >/dev/null 2>&1 -} - -# Install Bat themes -if command_exists bat; then - BAT_CONFIG_DIR=$(bat --config-dir 2>/dev/null || echo "${HOME}/.config/bat") - mkdir -p "${BAT_CONFIG_DIR}/themes" - - echo "Installing Bat themes..." - THEMES=("Latte" "Frappe" "Macchiato" "Mocha") - - for theme in "${THEMES[@]}"; do - download_file "https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20${theme}.tmTheme" \ - "${BAT_CONFIG_DIR}/themes/Catppuccin ${theme}.tmTheme" - done - - echo "Rebuilding Bat cache..." - bat cache --build || echo "WARNING: Failed to rebuild Bat cache" >&2 -else - echo "Bat not found, skipping Bat themes installation" >&2 -fi - -# Install Tmux plugin -if command_exists tmux; then - echo "Installing Tmux plugin..." - - TMUX_PLUGIN_DIR="${HOME}/.config/tmux/plugins/catppuccin" - rm -rf "${TMUX_PLUGIN_DIR}" - mkdir -p "${TMUX_PLUGIN_DIR}" - - if command_exists git; then - if ! git clone -b v2.1.2 --depth=1 https://github.com/catppuccin/tmux.git "${TMUX_PLUGIN_DIR}/tmux" 2>/dev/null; then - echo "WARNING: Failed to clone Tmux plugin repository" >&2 - fi - else - echo "Git not found, skipping Tmux plugin installation" >&2 - fi -else - echo "Tmux not found, skipping Tmux plugin installation" >&2 -fi - -# Install Yazi theme -if command_exists yazi; then - echo "Installing Yazi theme..." - download_file "https://raw.githubusercontent.com/catppuccin/yazi/main/themes/mocha/catppuccin-mocha-lavender.toml" \ - "${HOME}/.config/yazi/theme.toml" -else - echo "Yazi not found, skipping Yazi theme installation" >&2 -fi - -# Install BTopa themes -if command_exists btop; then - echo "Installing BTopa themes..." - download_file "https://raw.githubusercontent.com/catppuccin/btop/main/themes/catppuccin_mocha.theme" \ - "${HOME}/.config/btop/themes/catppuccin_mocha.theme" - download_file "https://raw.githubusercontent.com/catppuccin/btop/main/themes/catppuccin_latte.theme" \ - "${HOME}/.config/btop/themes/catppuccin_latte.theme" -else - echo "BTopa not found, skipping BTopa themes installation" >&2 -fi - -# Install Delta config -echo "Installing Delta config..." -download_file "https://raw.githubusercontent.com/catppuccin/delta/main/catppuccin.gitconfig" \ - "${HOME}/.config/git/catppuccin-delta.gitconfig" - -# Configure FZF -if command_exists fzf; then - echo "Configuring FZF..." - - # Check shell type to determine how to set environment variables - if [ -n "${FISH_VERSION:-}" ] || command_exists fish; then - # For Fish shell - fish -c 'set -U FZF_DEFAULT_OPTS "--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc --color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 --color=selected-bg:#45475a --multi"' \ - || echo "WARNING: Failed to set FZF options for Fish shell" >&2 - else - # For Bash/Zsh - add to both .bashrc and .zshrc if they exist - FZF_CONFIG="export FZF_DEFAULT_OPTS=\"--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 --color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc --color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 --color=selected-bg:#45475a --multi\"" - - # Add to .bashrc if it exists - if [ -f "${HOME}/.bashrc" ]; then - if ! grep -q "FZF_DEFAULT_OPTS.*catppuccin" "${HOME}/.bashrc"; then - echo "${FZF_CONFIG}" >>"${HOME}/.bashrc" - echo "Added FZF configuration to .bashrc" - fi - fi - - # Add to .zshrc if it exists - if [ -f "${HOME}/.zshrc" ]; then - if ! grep -q "FZF_DEFAULT_OPTS.*catppuccin" "${HOME}/.zshrc"; then - echo "${FZF_CONFIG}" >>"${HOME}/.zshrc" - echo "Added FZF configuration to .zshrc" - fi - fi - fi -else - echo "FZF not found, skipping FZF configuration" >&2 -fi - -# Install LSD themes -if command_exists lsd; then - echo "Installing LSD themes..." - download_file "https://raw.githubusercontent.com/catppuccin/lsd/main/themes/catppuccin-mocha/colors.yaml" \ - "${HOME}/.config/lsd/colors.yaml" - download_file "https://raw.githubusercontent.com/catppuccin/lsd/main/themes/catppuccin-latte/colors.yaml" \ - "${HOME}/.config/lsd/colors-light.yaml" -else - echo "LSD not found, skipping LSD themes installation" >&2 -fi - -# Install Midnight Commander skin -echo "Installing Midnight Commander skin..." -download_file "https://raw.githubusercontent.com/catppuccin/mc/main/catppuccin.ini" \ - "${HOME}/.local/share/mc/skins/catppuccin.ini" - -# Print MC configuration hint -echo "Note: To use the Midnight Commander theme:" -echo " - Change or add skin=catppuccin in the [Midnight-Commander] section inside ~/.config/mc/ini" -echo " - OR choose the skin inside Midnight Commander through F9 > Options > Appearance" -echo " - Save setup through F9 > Options > Save setup" - -# Install PowerShell module -if command_exists pwsh; then - echo "Installing PowerShell module..." - PS_MODULE_PATH=$(pwsh -C 'Write-Output $Env:PSModulePath.split(":")[0]' 2>/dev/null) - - if [ -n "${PS_MODULE_PATH}" ]; then - if command_exists git; then - if ! git clone --depth=1 https://github.com/catppuccin/powershell.git "${PS_MODULE_PATH}/Catppuccin" 2>/dev/null; then - echo "WARNING: Failed to clone PowerShell module repository" >&2 - fi - else - echo "Git not found, skipping PowerShell module installation" >&2 - fi - else - echo "PowerShell module path not found, skipping PowerShell module installation" >&2 - fi -else - echo "PowerShell not found, skipping PowerShell module installation" >&2 -fi - -# Install Fish themes -if command_exists fish; then - echo "Installing Fish themes..." - download_file "https://raw.githubusercontent.com/catppuccin/fish/main/themes/Catppuccin%20Mocha.theme" \ - "${HOME}/.config/fish/themes/Catppuccin Mocha.theme" - download_file "https://raw.githubusercontent.com/catppuccin/fish/main/themes/Catppuccin%20Latte.theme" \ - "${HOME}/.config/fish/themes/Catppuccin Latte.theme" -else - echo "Fish not found, skipping Fish themes installation" >&2 -fi - -# Install Fcitx5 themes -if command_exists fcitx5; then - echo "Installing Fcitx5 themes..." - - rm -rf "${TEMP_DIR}/fcitx5" - if command_exists git; then - if git clone --depth=1 https://github.com/catppuccin/fcitx5.git "${TEMP_DIR}/fcitx5" 2>/dev/null; then - cp -r "${TEMP_DIR}/fcitx5/src/"* "${HOME}/.local/share/fcitx5/themes/" - else - echo "WARNING: Failed to clone Fcitx5 repository" >&2 - fi - else - echo "Git not found, skipping Fcitx5 themes installation" >&2 - fi -else - echo "Fcitx5 not found, skipping Fcitx5 themes installation" >&2 -fi - -# Clean up temporary directory -rm -rf "${TEMP_DIR}" - -echo "Catppuccin themes installation completed!" diff --git a/bootstrap/components/mocha_port.fish b/bootstrap/components/mocha_port.fish deleted file mode 100644 index 804cf22..0000000 --- a/bootstrap/components/mocha_port.fish +++ /dev/null @@ -1,43 +0,0 @@ -mkdir -p ~/.tmp -# Bat -mkdir -p "$(bat --config-dir)/themes" -wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Latte.tmTheme -wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Frappe.tmTheme -wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmTheme -wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme -bat cache --build -# Tmux -mkdir -p ~/.config/tmux/plugins/catppuccin:w -git clone -b v2.1.2 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux -# Yazi -curl https://raw.githubusercontent.com/catppuccin/yazi/refs/heads/main/themes/mocha/catppuccin-mocha-lavender.toml -o ~/.config/yazi/theme.toml -# BTop -curl https://raw.githubusercontent.com/catppuccin/btop/refs/heads/main/themes/catppuccin_mocha.theme -o ~/.config/btop/themes/catppuccin_mocha.theme -curl https://raw.githubusercontent.com/catppuccin/btop/refs/heads/main/themes/catppuccin_latte.theme -o ~/.config/btop/themes/catppuccin_latte.theme -# Delta -curl https://raw.githubusercontent.com/catppuccin/delta/refs/heads/main/catppuccin.gitconfig -o ~/.config/git/catppuccin-delta.gitconfig -# Fzf -set -Ux FZF_DEFAULT_OPTS "\ ---color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \ ---color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \ ---color=marker:#b4befe,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8 \ ---color=selected-bg:#45475a \ ---multi" -# LsD -curl https://raw.githubusercontent.com/catppuccin/lsd/refs/heads/main/themes/catppuccin-mocha/colors.yaml -o ~/.config/lsd/colors.yaml -curl https://raw.githubusercontent.com/catppuccin/lsd/refs/heads/main/themes/catppuccin-latte/colors.yaml -o ~/.config/lsd/colors-light.yaml -# Midnight Commander -# Change or add skin=catppuccin in the [Midnight-Commander] section inside ~/.config/mc/ini OR Choose the skin inside Midnight Commander through F9>Options>Appearance and Save setup through F9>Options/Save setup -mkdir -p $HOME/.local/share/mc/skins -curl https://raw.githubusercontent.com/catppuccin/mc/refs/heads/main/catppuccin.ini -o $HOME/.local/share/mc/skins/catppuccin.ini -# PowerShell -pwsh -C 'git clone https://github.com/catppuccin/powershell.git (Join-Path $Env:PSModulePath.split(":")[0] Catppuccin)' -# Fish -mkdir -p ~/.config/fish/themes -curl https://raw.githubusercontent.com/catppuccin/fish/refs/heads/main/themes/Catppuccin%20Mocha.theme -o ~/.config/fish/themes/Catppuccin\ Mocha.theme -curl https://raw.githubusercontent.com/catppuccin/fish/refs/heads/main/themes/Catppuccin%20Latte.theme -o ~/.config/fish/themes/Catppuccin\ Latte.theme -# fcitx5 -git clone https://github.com/catppuccin/fcitx5.git ~/.tmp/fcitx5 -cd ~/.tmp/fcitx5 -mkdir -p ~/.local/share/fcitx5/themes -cp -r ./src/* ~/.local/share/fcitx5/themes diff --git a/bootstrap/components/pwsh.ps1 b/bootstrap/components/pwsh.ps1 deleted file mode 100644 index 086f340..0000000 --- a/bootstrap/components/pwsh.ps1 +++ /dev/null @@ -1,3 +0,0 @@ -Install-Module CompletionPredictor -Install-Module PSFzf -Install-Module Posh-Git diff --git a/bootstrap/components/requirements.txt b/bootstrap/components/requirements.txt deleted file mode 100644 index fa5157a..0000000 --- a/bootstrap/components/requirements.txt +++ /dev/null @@ -1,112 +0,0 @@ -anyio==4.8.0 -argon2-cffi==23.1.0 -argon2-cffi-bindings==21.2.0 -arrow==1.3.0 -asttokens==3.0.0 -async-lru==2.0.4 -attrs==25.1.0 -babel==2.17.0 -beautifulsoup4==4.13.3 -bleach==6.2.0 -certifi==2025.1.31 -cffi==1.17.1 -charset-normalizer==3.4.1 -comm==0.2.2 -contourpy==1.3.1 -cycler==0.12.1 -debugpy==1.8.13 -decorator==5.2.1 -defusedxml==0.7.1 -executing==2.2.0 -fastjsonschema==2.21.1 -fonttools==4.56.0 -fqdn==1.5.1 -h11==0.14.0 -httpcore==1.0.7 -httpx==0.28.1 -idna==3.10 -ipykernel==6.29.5 -ipython==9.0.2 -ipython-pygments-lexers==1.1.1 -ipywidgets==8.1.5 -isoduration==20.11.0 -jedi==0.19.2 -jinja2==3.1.6 -joblib==1.4.2 -json5==0.10.0 -jsonpointer==3.0.0 -jsonschema==4.23.0 -jsonschema-specifications==2024.10.1 -jupyter==1.1.1 -jupyter-client==8.6.3 -jupyter-console==6.6.3 -jupyter-core==5.7.2 -jupyter-events==0.12.0 -jupyter-lsp==2.2.5 -jupyter-server==2.15.0 -jupyter-server-terminals==0.5.3 -jupyterlab==4.3.5 -jupyterlab-pygments==0.3.0 -jupyterlab-server==2.27.3 -jupyterlab-widgets==3.0.13 -kiwisolver==1.4.8 -markupsafe==3.0.2 -matplotlib==3.10.1 -matplotlib-inline==0.1.7 -mistune==3.1.2 -nbclient==0.10.2 -nbconvert==7.16.6 -nbformat==5.10.4 -nest-asyncio==1.6.0 -notebook==7.3.2 -notebook-shim==0.2.4 -numpy==2.2.3 -overrides==7.7.0 -packaging==24.2 -pandas==2.2.3 -pandocfilters==1.5.1 -parso==0.8.4 -pexpect==4.9.0 -pillow==11.1.0 -platformdirs==4.3.6 -prometheus-client==0.21.1 -prompt-toolkit==3.0.50 -psutil==7.0.0 -ptyprocess==0.7.0 -pure-eval==0.2.3 -pycparser==2.22 -pygments==2.19.1 -pyparsing==3.2.1 -python-dateutil==2.9.0.post0 -python-json-logger==3.3.0 -pytz==2025.1 -pyyaml==6.0.2 -pyzmq==26.2.1 -referencing==0.36.2 -requests==2.32.3 -rfc3339-validator==0.1.4 -rfc3986-validator==0.1.1 -rpds-py==0.23.1 -scikit-learn==1.6.1 -scipy==1.15.2 -send2trash==1.8.3 -setuptools==76.0.0 -six==1.17.0 -sniffio==1.3.1 -soupsieve==2.6 -stack-data==0.6.3 -terminado==0.18.1 -threadpoolctl==3.5.0 -tinycss2==1.4.0 -tornado==6.4.2 -traitlets==5.14.3 -types-python-dateutil==2.9.0.20241206 -typing-extensions==4.12.2 -tzdata==2025.1 -uri-template==1.3.0 -urllib3==2.3.0 -wcwidth==0.2.13 -webcolors==24.11.1 -webencodings==0.5.1 -websocket-client==1.8.0 -widgetsnbextension==4.0.13 diff --git a/bootstrap/components/rime.sh b/bootstrap/components/rime.sh deleted file mode 100644 index 89ea323..0000000 --- a/bootstrap/components/rime.sh +++ /dev/null @@ -1,17 +0,0 @@ -echo "[INFO] Installing Rime" - -case "$(uname)" in - Linux) - RIMEDIR="${RIMEDIR:-$HOME/.local/share/fcitx5/rime}" - ;; - Darwin) - RIMEDIR="${RIMEDIR:-$HOME/Library/Rime}" - ;; -esac - -git clone --depth 1 https://github.com/js0ny/rime_wanxiang_pro.git "$RIMEDIR" -cd "$RIMEDIR" || exit - -just init -# just install_rime -just clone_plum diff --git a/bootstrap/components/symlinks.bash b/bootstrap/components/symlinks.bash deleted file mode 100644 index 2273a84..0000000 --- a/bootstrap/components/symlinks.bash +++ /dev/null @@ -1,110 +0,0 @@ -#!/usr/bin/env bash -# vim:ft=bash -# shellcheck disable=SC1090 shell=bash -# This should be run with bash > 4.0 or zsh -set -e # Exit immediately if a command exits with a non-zero status - -DOTFILES="${DOTFILES:-$HOME/.dotfiles}" -ZDOTDIR="${ZDOTDIR:-$HOME/.config/zsh}" -XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -NPM_CONFIG_USERCONFIG="${NPM_CONFIG_USERCONFIG:-$XDG_CONFIG_HOME/npm/npmrc}" -GUI_SETUP="${GUI_SETUP:-1}" -WHEEL="${WHEEL:-0}" - -XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}" -XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" -XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" - -echo "[INFO] Setting up some local directories" -test -d "$XDG_CACHE_HOME" || mkdir -p "$XDG_CACHE_HOME" -test -d "$XDG_DATA_HOME" || mkdir -p "$XDG_DATA_HOME" -test -d "$XDG_STATE_HOME" || mkdir -p "$XDG_STATE_HOME" -test -d ~/.local/state/zsh || mkdir -p ~/.local/state/zsh - -# echo "[INFO] Setting up system-wide zsh configuration" -# echo "[ACTION] Elevation required!" -# test -f "/etc/zsh/zshenv" && sudo cp "$DOTFILES/tools/zsh/zshenv" "/etc/zsh/zshenv" -# test -f "/etc/zshenv" && sudo cp "$DOTFILES/tools/zsh/zshenv" "/etc/zshenv" - -declare -A linkDots - -linkDots=( - ["$DOTFILES/common/condarc.yaml"]="$XDG_CONFIG_HOME/conda/.condarc" - # ["$DOTFILES/common/gitconfig"]="$XDG_CONFIG_HOME/git/config" - ["$DOTFILES/common/glow.yaml"]="$HOME/.config/glow/config.yml" - ["$DOTFILES/common/haskeline"]="$HOME/.haskeline" - ["$DOTFILES/common/ideavimrc"]="$XDG_CONFIG_HOME/ideavim/ideavimrc" - ["$DOTFILES/common/lazygit.yaml"]="$XDG_CONFIG_HOME/lazygit/config.yml" - ["$DOTFILES/common/lesskey"]="$XDG_CONFIG_HOME/lesskey" - ["$DOTFILES/common/npmrc"]="$NPM_CONFIG_USERCONFIG" - ["$DOTFILES/common/NuGet.Config"]="$XDG_CONFIG_HOME/NuGet/NuGet.Config" - ["$DOTFILES/common/pip.conf"]="$XDG_CONFIG_HOME/pip/pip.conf" - ["$DOTFILES/common/starship.toml"]="$HOME/.config/starship.toml" - ["$DOTFILES/common/tmux.conf"]="$XDG_CONFIG_HOME/tmux/tmux.conf" - ["$DOTFILES/common/vimrc"]="$XDG_CONFIG_HOME/vim/vimrc" - ["$DOTFILES/common/zellij.config.kdl"]="$HOME/.config/zellij/config.kdl" - # ["$DOTFILES/tools/emacs.d"]="$HOME/.emacs.d" - ["$DOTFILES/tools/doom"]="$HOME/.config/doom" - ["$DOTFILES/tools/fish"]="$HOME/.config/fish" - ["$DOTFILES/tools/ipython"]="$XDG_CONFIG_HOME/ipython" - ["$DOTFILES/tools/nvim"]="$XDG_CONFIG_HOME/nvim" - ["$DOTFILES/tools/yazi"]="$HOME/.config/yazi" - ["$DOTFILES/tools/zsh/zshrc"]="$ZDOTDIR/.zshrc" - ["$DOTFILES/tools/zsh/zshenv"]="$ZDOTDIR/.zshenv" - ["$DOTFILES/platforms/mac/pwshProfile.ps1"]="$HOME/.config/powershell/Microsoft.PowerShell_profile.ps1" -) - -if [ $(uname) = "Darwin" ]; then - echo "[INFO] Running on macOS" - linkDots+=( - ["$DOTFILES/platforms/mac/karabiner"]="$HOME/.config/karabiner" - ["$DOTFILES/platforms/mac/skhdrc"]="$XDG_CONFIG_HOME/skhd/skhdrc" - ["$DOTFILES/platforms/mac/sketchybarrc"]="$XDG_CONFIG_HOME/sketchybar/sketchybarrc" - ["$DOTFILES/platforms/mac/yabairc"]="$XDG_CONFIG_HOME/yabai/yabairc" - ["$DOTFILES/tools/wezterm"]="$HOME/.config/wezterm" - ["$DOTFILES/tools/zed"]="$HOME/.config/zed" - ["$DOTFILES/tools/sioyek"]="$HOME/.config/sioyek" - ) -else - echo "[INFO] Running on Linux" - linkDots+=( - ["$DOTFILES/common/inputrc"]="$XDG_CONFIG_HOME/readline/inputrc" - ) - # WSL1 : Microsoft - # WSL2 : microsoft - # if [ "$(uname -r)" = *icrosoft* ]; then - # echo "[INFO] Running on WSL" - # : # NOP - if [ "$GUI_SETUP" -eq 1 ]; then - echo "[INFO] Setting up Linux GUI Applications" - linkDots+=( - ["$DOTFILES/platforms/linux/awesome"]="$HOME/.config/awesome" - ["$DOTFILES/platforms/linux/hypr"]="$HOME/.config/hypr" - ["$DOTFILES/platforms/linux/waybar"]="$HOME/.config/waybar" - ["$DOTFILES/platforms/linux/wlogout"]="$HOME/.config/wlogout" - ["$DOTFILES/platforms/linux/mako-config"]="$HOME/.config/mako/config" - ["$DOTFILES/tools/wezterm"]="$HOME/.config/wezterm" - ["$DOTFILES/tools/zed"]="$HOME/.config/zed" - ["$DOTFILES/tools/sioyek"]="$HOME/.config/sioyek" - ) - for kde in "$DOTFILES/platforms/linux/kde/"*; do - linkDots+=["$kde"]="$HOME/.config/kde/$(basename "$kde")" - # echo "Linking $kde to $HOME/.config/kde/$(basename $kde)" - done - if [ "$WHEEL" -eq 1 ]; then - echo "[INFO] Setting up system environment variables" - echo "[ACTION] Elevation required!" - sudo cp "$DOTFILES/platforms/linux/etc/environment" "/etc/environment" - fi - fi -fi - -echo "[INFO] Copying example files" -test -d $XDG_CONFIG_HOME/git || mkdir -p $XDG_CONFIG_HOME/git -test -f $XDG_CONFIG_HOME/git/config && mv $XDG_CONFIG_HOME/git/config $XDG_CONFIG_HOME/git/config.bak -cp $DOTFILES/common/gitconfig.example $XDG_CONFIG_HOME/git/config -echo "[INFO] Don't forget to update your gitconfig!" - -test -f ~/.wakatime.cfg && mv ~/.wakatime.cfg ~/.wakatime.cfg.bak -cp $DOTFILES/common/wakatime.example.cfg ~/.wakatime.cfg -echo "[INFO] Don't forget to update your wakatime config!" diff --git a/bootstrap/components/zsh.sh b/bootstrap/components/zsh.sh deleted file mode 100644 index 485ac1d..0000000 --- a/bootstrap/components/zsh.sh +++ /dev/null @@ -1,28 +0,0 @@ -WHEEL="${WHEEL:-1}" - -echo "[INFO] ZDOTDIR = $ZDOTDIR" -echo "[INFO] DOTFILES = $DOTFILES" -echo "[INFO] WHEEL = $WHEEL" - -echo "[ACTION] Press any key to proceed" -read -n 1 - -if [ "$WHEEL" -eq 1 ]; then - echo "[INFO] Setting up system-wide zsh configuration" - echo "[ACTION] Elevation required" - test -f "/etc/zsh/zshenv" && sudo cp "$DOTFILES/tools/zsh/global.zshenv" "/etc/zsh/zshenv" - test -f "/etc/zshenv" && sudo cp "$DOTFILES/tools/zsh/global.zshenv" "/etc/zshenv" - if [ "$(uname)" = "Darwin" ]; then - sudo cp "$DOTFILES/tools/zsh/global.zshenv" "/etc/zshenv" - fi -else - echo "[INFO] Setting up user zsh configuration" - # A fallback case to set $ZDOTDIR in ~/.zshenv if the user cannot access global zshenv - ln -sf "$DOTFILES/tools/zsh/zshenv" "$HOME/.zshenv" -fi - -echo "[INFO] Installing zsh plugins" -test -d "$ZDOTDIR"/plugins/zsh-autosuggestions || git clone --depth 1 https://github.com/zsh-users/zsh-autosuggestions.git "$ZDOTDIR"/plugins/zsh-autosuggestions -test -d "$ZDOTDIR"/plugins/zsh-syntax-highlighting || git clone --depth 1 https://github.com/zsh-users/zsh-syntax-highlighting.git "$ZDOTDIR"/plugins/zsh-syntax-highlighting -test -d "$ZDOTDIR"/plugins/zsh-history-substring-search || git clone --depth 1 https://github.com/zsh-users/zsh-history-substring-search.git "$ZDOTDIR"/plugins/zsh-history-substring-search -test -d "$ZDOTDIR"/plugins/zsh-completions || git clone --depth 1 https://github.com/zsh-users/zsh-completions.git "$ZDOTDIR"/plugins/zsh-completions diff --git a/bootstrap/linux/appman.bash b/bootstrap/linux/appman.bash deleted file mode 100644 index dad1f09..0000000 --- a/bootstrap/linux/appman.bash +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash -# vim:ft=bash -echo "[INFO] Installing AppMan" -echo "[ACTION] Type [2] to install AppMan" -wget -q https://raw.githubusercontent.com/ivan-hc/AM/main/AM-INSTALLER && chmod a+x ./AM-INSTALLER && ./AM-INSTALLER - -APPMAN_PATH="$HOME/.local/bin/appman" - -if command -v "$APPMAN_PATH" >/dev/null 2>&1; then - $APPMAN_PATH install wezterm - $APPMAN_PATH install nvim -fi diff --git a/bootstrap/linux/chromium-flags.bash b/bootstrap/linux/chromium-flags.bash deleted file mode 100755 index 2ad6bbd..0000000 --- a/bootstrap/linux/chromium-flags.bash +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash -# vim:ft=bash -# chromium-flags.sh -# Set Chromium & Electron Flags - -echo "[INFO] Set Chromium & Electron Flags" - -DOTFILES="${DOTFILES:-$HOME/.dotfiles}" -XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -BROWSER_FLAG=$DOTFILES/platforms/linux/chromium-flags.conf -ELECTRON_FLAG=$DOTFILES/platforms/linux/electron-flags.conf - - -parse_args() { - while [[ $# -gt 0 ]]; do - case "$1" in - # --debug|-d) - # export LOG_LEVEL="DEBUG" - # log_debug "Debug mode enabled" - # shift - # ;; - --force|-f) - FORCE_FILE="true" - echo "Force update enabled" - shift - ;; - *) - echo "Unknown argument: $1" - echo "Usage: chromium-flags.sh [--debug|-d] [--force|-f]" - exit 1 - ;; - esac - done -} - -parse_args "$@" - -# Browser Flags - -browser_flags_path=( - "$XDG_CONFIG_HOME/chromium-flags.conf" # Chromium - "$XDG_CONFIG_HOME/chrome-flags.conf" # Google Chrome - "$XDG_CONFIG_HOME/thorium-flags.conf" # Thorium - "$XDG_CONFIG_HOME/vivaldi-flags.conf" # Vivaldi - "$XDG_CONFIG_HOME/vivaldi-stable.conf" # Vivaldi - -) - -electron_flags_path=( - "$XDG_CONFIG_HOME/electron-flags.conf" # General - "$XDG_CONFIG_HOME/code-flags.conf" # VSCode - "$XDG_CONFIG_HOME/qq-electron-flags.conf" # QQ -) - -for path in "${browser_flags_path[@]}"; do - if [ -f "$path" ] && [ "$FORCE_FILE" != "true" ]; then - echo "[INFO] Found Browser Flags: $path" - else - echo "[INFO] Creating Browser Flags: $path" - ln -sf "$BROWSER_FLAG" "$path" - fi -done - -for path in "${electron_flags_path[@]}"; do - if [ -f "$path" ] && [ "$FORCE_FILE" != "true" ]; then - echo "[INFO] Found Electron Flags: $path" - else - echo "[INFO] Creating Electron Flags: $path" - ln -sf "$ELECTRON_FLAG" "$path" - fi -done diff --git a/bootstrap/linux/chromium-flags.hypr.bash b/bootstrap/linux/chromium-flags.hypr.bash deleted file mode 100755 index 982fb59..0000000 --- a/bootstrap/linux/chromium-flags.hypr.bash +++ /dev/null @@ -1,71 +0,0 @@ -#!/usr/bin/env bash -# vim:ft=bash -# chromium-flags.sh -# Set Chromium & Electron Flags - -echo "[INFO] Set Chromium & Electron Flags" - -DOTFILES="${DOTFILES:-$HOME/.dotfiles}" -XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" -BROWSER_FLAG=$DOTFILES/platforms/linux/chromium-flags.hypr.conf -ELECTRON_FLAG=$DOTFILES/platforms/linux/electron-flags.hypr.conf - - -parse_args() { - while [[ $# -gt 0 ]]; do - case "$1" in - # --debug|-d) - # export LOG_LEVEL="DEBUG" - # log_debug "Debug mode enabled" - # shift - # ;; - --force|-f) - FORCE_FILE="true" - echo "Force update enabled" - shift - ;; - *) - echo "Unknown argument: $1" - echo "Usage: chromium-flags.sh [--debug|-d] [--force|-f]" - exit 1 - ;; - esac - done -} - -parse_args "$@" - -# Browser Flags - -browser_flags_path=( - "$XDG_CONFIG_HOME/chromium-flags.conf" # Chromium - "$XDG_CONFIG_HOME/chrome-flags.conf" # Google Chrome - "$XDG_CONFIG_HOME/thorium-flags.conf" # Thorium - "$XDG_CONFIG_HOME/vivaldi-flags.conf" # Vivaldi - "$XDG_CONFIG_HOME/vivaldi-stable.conf" # Vivaldi - -) - -electron_flags_path=( - "$XDG_CONFIG_HOME/electron-flags.conf" # General - "$XDG_CONFIG_HOME/code-flags.conf" # VSCode - "$XDG_CONFIG_HOME/qq-electron-flags.conf" # QQ -) - -for path in "${browser_flags_path[@]}"; do - if [ -f "$path" ] && [ "$FORCE_FILE" != "true" ]; then - echo "[INFO] Found Browser Flags: $path" - else - echo "[INFO] Creating Browser Flags: $path" - ln -sf "$BROWSER_FLAG" "$path" - fi -done - -for path in "${electron_flags_path[@]}"; do - if [ -f "$path" ] && [ "$FORCE_FILE" != "true" ]; then - echo "[INFO] Found Electron Flags: $path" - else - echo "[INFO] Creating Electron Flags: $path" - ln -sf "$ELECTRON_FLAG" "$path" - fi -done diff --git a/bootstrap/linux/electron_flag_append.py b/bootstrap/linux/electron_flag_append.py deleted file mode 100644 index 31388bc..0000000 --- a/bootstrap/linux/electron_flag_append.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env false -# TODO: This script is not ready for use yet -# -*- coding: utf-8 -*- -# Append Electron argument (for wayland) to *.desktop files - -import argparse -import configparser -import os - -APPEND_ARG_FILE = "~/.dotfiles/platforms/linux/electron-flags.conf" - - -with open(os.path.expanduser(APPEND_ARG_FILE)) as f: - APPEND_ARGS = list(map(str.strip, f.readlines())) - -# for file in desktop_files: -# config = configparser.ConfigParser() -# config.read(file) - - -def append_arg(file): - config = configparser.ConfigParser() - config.read(file) - try: - exec_line = config["Desktop Entry"].get("Exec") - except KeyError: - print(f"Skipping {file} as it does not have an Exec key") - return - print(f"Appending {APPEND_ARGS} to {exec_line}") - config["Desktop Entry"].update({"Exec": f"{exec_line} {' '.join(APPEND_ARGS)}"}) - with open(file, "w") as f: - config.write(f) - - -def main(): - parser = argparse.ArgumentParser() - parser.add_argument("-f", "--file", help="Desktop file to modify") - args = parser.parse_args() - append_arg(args.file) - pass - - -if __name__ == "__main__": - main() diff --git a/bootstrap/linux/main.bash b/bootstrap/linux/main.bash deleted file mode 100644 index fe6c916..0000000 --- a/bootstrap/linux/main.bash +++ /dev/null @@ -1,193 +0,0 @@ -#!/usr/bin/env bash -# vim:ft=bash - -set -e - -echo "Running the setup script" - -# Variables - -export DOTFILES="${DOTFILES:-$HOME/.dotfiles}" - -# If is in the sudo or wheel group, set the WHEEL variable to 1 -WHEEL=0 -groups "$(whoami)" | grep -E -q '\b(sudo|wheel)\b' && WHEEL=1 - -if [ "$WHEEL" -eq 1 ]; then - echo "[INFO] Running as sudo or wheel group" -else - echo "[INFO] Not running as sudo or wheel group" -fi - -export WHEEL - -GUI_SETUP=0 - -IS_WSL=0 -WINDOWS_USER="" -PACKAGE_MANAGER="" - -# WSL detection -# NOTE: This is NOT a POSIX-compliant way, for POSIX-compliant way, use case/esac -if [[ "$(uname -r)" = *icrosoft* ]]; then - echo "[INFO] Running on WSL" - WINDOWS_USER="$(cmd.exe /c "echo %USERNAME%" | tr -d '\r')" - IS_WSL=1 -fi - -if [ "$IS_WSL" -eq 1 ]; then - if [[ "$(uname -r)" = *Microsoft* ]]; then - IS_WSL=1 - elif [[ "$(uname -r)" = *microsoft* ]]; then - IS_WSL=2 - fi -fi - -if [ "$IS_WSL" -eq 1 ]; then - echo "[INFO] Running on WSL1 Skipping GUI setup" -else - read -p "[ACTION] Do you want to setup Linux GUI? (y/N) " -r choice - case "$choice" in - y | Y) - GUI_SETUP=1 - ;; - *) - echo "[INFO] Skipping GUI setup" - ;; - esac -fi - -export GUI_SETUP - -# base-devel - -if [ "$WHEEL" -eq 1 ]; then - echo "[INFO] Installing basic build tools" - if command -v apt >/dev/null 2>&1; then - sudo apt update - sudo apt install -y build-essential - PACKAGE_MANAGER="apt" - elif command -v pacman >/dev/null 2>&1; then - sudo pacman -Syu --noconfirm - sudo pacman -S --noconfirm base-devel - PACKAGE_MANAGER="pacman" - else - echo "[ERROR] Unsupported package manager" - read -p "[ACTION] Do you still want to continue? (y/N) " -r choice - case "$choice" in - y | Y) - : - ;; - *) - echo "[ERROR] Exiting" - exit 1 - ;; - esac - fi -fi - -echo "[INFO] Cloning Dotfiles" - -if [ -d "$DOTFILES" ]; then - echo "[INFO] Dotfiles already cloned" -elif [ "$IS_WSL" -eq 1 ]; then - ln -sf "/mnt/c/Users/$WINDOWS_USER/.dotfiles" "$DOTFILES" -elif command -v git >/dev/null 2>&1; then - git clone https://github.com/js0ny/dotfiles.git "$DOTFILES" --depth 1 -else - echo "[ERROR] Git is not installed" - exit 1 -fi - -if [ "$WHEEL" -eq 0 ]; then - read -p "[ACTION] Do you want to install some AppImages (by AppMan)? (y/N) " -r choice - case "$choice" in - y | Y) - source "$DOTFILES/bootstrap/linux/appman.bash" - ;; - *) - echo "[INFO] Skipping AppMan installation" - : - ;; - esac -fi - -echo "[INFO] Setting up symbolic links" - -source "$DOTFILES"/bootstrap/linux/symlinks.bash - -set +x - -if [ "$WHEEL" -eq 1 ]; then - source "$DOTFILES"/tools/bash/xdg-compat.sh - source "$DOTFILES"/tools/bash/global.bashrc -fi -source "$DOTFILES"/tools/bash/profile -source "$DOTFILES"/tools/bash/bashrc -source "$DOTFILES"/tools/bash/bash_aliases - -set -x - -if command -v zsh >/dev/null 2>&1; then - - read -p "[ACTION] Do you want to setup zsh? (Y/n) " -r choice - case "$choice" in - n | N) - : - ;; - *) - source "$DOTFILES"/bootstrap/components/zsh.sh - ;; - esac -fi - -if [ "$WHEEL" -eq 0 ]; then - echo "Done!" - exit 0 -fi - -# TODO: Add this part -read -p "[ACTION] Do you want to use other package managers? (y/N) " -r choice -case "$choice" in - y | Y) - : - ;; - *) - : - ;; -esac - -echo "[INFO] Installing Doom Emacs" - -source "$DOTFILES"/bootstrap/components/emacs.sh - -if [ "$IS_WSL" -eq 1 ]; then - ln -sf "/mnt/c/Users/$WINDOWS_USER" "$HOME/winhome" - ln -sf "/mnt/c/Users/$WINDOWS_USER/Downloads" "$HOME/Downloads" - ln -sf "/mnt/c/Users/$WINDOWS_USER/Documents" "$HOME/Documents" - ln -sf "/mnt/c/Users/$WINDOWS_USER/Desktop" "$HOME/Desktop" - ln -sf "/mnt/c/Users/$WINDOWS_USER/Pictures" "$HOME/Pictures" - ln -sf "/mnt/c/Users/$WINDOWS_USER/Music" "$HOME/Music" - ln -sf "/mnt/c/Users/$WINDOWS_USER/Videos" "$HOME/Videos" -fi - -if [ "$GUI_SETUP" -eq 0 ]; then - echo "Done!" - exit 0 -fi - -# Wayland - -source "$DOTFILES"/bootstrap/linux/chromium-flags.bash - -# Rime - -source "$DOTFILES"/bootstrap/components/rime.sh - -echo "[INFO] Installing Color Scheme (Catppuccin Mocha)" - -# fish $DOTFILES/bootstrap/temp/mocha_port.fish - -source "$DOTFILES"/bootstrap/components/mocha-port.bash - -echo "Done!" diff --git a/bootstrap/linux/symlinks.bash b/bootstrap/linux/symlinks.bash deleted file mode 100644 index 6842444..0000000 --- a/bootstrap/linux/symlinks.bash +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash -# vim:ft=bash -set -e # Exit immediately if a command exits with a non-zero status - -declare -A linkDots - -source "$DOTFILES/bootstrap/components/symlinks.bash" - -echo "[INFO] DOTFILES = $DOTFILES" - -echo "[ACTION] Press any key to proceed" -read -r -n1 -s - -echo "[INFO] Setting up symbolic links" - -for src in "${!linkDots[@]}"; do - dest="${linkDots[$src]}" - echo "Linking $src to $dest" - if [ -d "$src" ]; then - test -d "$dest" && mv "$dest" "$dest.bak" - ln -sf "$src" "$dest" - elif [ -f "$src" ]; then - dest_parent=$(dirname "$dest") - test -d "$dest_parent" || mkdir -p "$dest_parent" - ln -sf "$src" "$dest" - else - echo "[ERROR] $src does not exist" - fi -done diff --git a/bootstrap/linux/wsl.bash b/bootstrap/linux/wsl.bash deleted file mode 100644 index 8b13789..0000000 --- a/bootstrap/linux/wsl.bash +++ /dev/null @@ -1 +0,0 @@ - diff --git a/bootstrap/macOS/Brewfile b/bootstrap/macOS/Brewfile deleted file mode 100644 index ab56c89..0000000 --- a/bootstrap/macOS/Brewfile +++ /dev/null @@ -1,150 +0,0 @@ -tap "daipeihust/tap" -tap "felixkratz/formulae" -tap "homebrew/bundle" -tap "homebrew/services" -tap "koekeishiya/formulae" -tap "nikitabobko/tap" -tap "railwaycat/emacsmacport" -brew "age" -brew "aichat" -brew "bat" -brew "bottom" -brew "broot" -brew "btop" -brew "cmake" -brew "composer" -brew "coreutils" -brew "curlie" -brew "dark-mode" -brew "dos2unix" -brew "duf" -brew "dust" -brew "duti" -brew "fastfetch" -brew "fd" -brew "ffmpeg" -brew "fish" -brew "fzf" -brew "gh" -brew "ghcup" -brew "git-delta" -brew "glow" -brew "go" -brew "hugo" -brew "hyperfine" -brew "imagemagick" -brew "ipython" -brew "julia" -brew "just" -brew "lazygit" -brew "less" -brew "pkgconf" -brew "lua" -brew "librime" -brew "lsd" -brew "luajit" -brew "luarocks" -brew "macvim", link: false -brew "node" -brew "markdownlint-cli" -brew "mas" -brew "neovim" -brew "nowplaying-cli" -brew "nushell" -brew "openjdk@21" -brew "pandoc" -brew "pipx" -brew "pnpm" -brew "procs" -brew "ripgrep" -brew "ripgrep-all" -brew "rlwrap" -brew "rust" -brew "rustup" -brew "screenfetch" -brew "sd" -brew "sevenzip" -brew "speedtest-cli" -brew "starship" -brew "switchaudio-osx" -brew "tldr" -brew "tmux" -brew "tree" -brew "uv" -brew "vim" -brew "wget" -brew "wget2" -brew "yarn" -brew "yazi" -brew "zellij" -brew "zoxide" -brew "daipeihust/tap/im-select" -brew "felixkratz/formulae/borders" -brew "felixkratz/formulae/sketchybar" -brew "koekeishiya/formulae/skhd" -brew "koekeishiya/formulae/yabai" -brew "railwaycat/emacsmacport/emacs-mac" -cask "activitywatch" -cask "alacritty" -cask "alex313031-thorium" -cask "alt-tab" -cask "apparency" -cask "appcleaner" -cask "arc" -cask "betterdisplay" -cask "chatgpt" -cask "discord" -cask "dotnet-sdk" -cask "font-caskaydia-cove-nerd-font" -cask "font-iosevka-nerd-font" -cask "font-jetbrains-mono-nerd-font" -cask "font-lxgw-wenkai" -cask "font-sf-mono" -cask "font-sf-pro" -cask "google-drive" -cask "iina" -cask "iterm2" -cask "jordanbaird-ice" -cask "karabiner-elements" -cask "keka" -cask "keyguard" -cask "kitty" -cask "localsend" -cask "ltspice" -cask "macfuse" -cask "neovide" -cask "obsidian" -cask "onedrive" -cask "orbstack" -cask "powershell" -cask "protonvpn" -cask "qlcolorcode" -cask "qlimagesize" -cask "qlmarkdown" -cask "qlstephen" -cask "qlvideo" -cask "qspace-pro" -cask "quicklook-json" -cask "quicklookase" -cask "r" -cask "raycast" -cask "rider" -cask "rstudio" -cask "rustdesk" -cask "scroll-reverser" -cask "sf-symbols" -cask "sioyek" -cask "skim" -cask "squirrel" -cask "steam" -cask "suspicious-package" -cask "telegram-desktop" -cask "typora" -cask "visual-studio-code" -cask "vivaldi" -cask "warp" -cask "wezterm" -cask "zen-browser" -mas "QQ", id: 451108668 -mas "SnippetsLab", id: 1006087419 -mas "微信", id: 836500024 diff --git a/bootstrap/macOS/duti.zsh b/bootstrap/macOS/duti.zsh deleted file mode 100644 index 8f1ccf5..0000000 --- a/bootstrap/macOS/duti.zsh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/zsh -# duti.zsh -# Set default apps (duti) -# The id of the app can be found by running -# `osascript -e 'id of app "AppName"'` -brew install --formula duti -echo "[INFO] Setting Default Apps" - -# Define an associative array with file extensions and corresponding app IDs -typeset -A app_defaults -app_defaults=( - # Markdown -> Typora - .md abnerworks.Typora - .markdown abnerworks.Typora - # PDF -> Sioyek - .pdf info.sioyek.sioyek - # Raw Text -> Neovide - .txt com.neovide.neovide - # Archive -> Keka - .zip com.aone.keka - .rar com.aone.keka - .7z com.aone.keka - .tar com.aone.keka - # Source Code Light -> Neovim - .gitignore com.neovide.neovide - .vimrc com.neovide.neovide - .vim com.neovide.neovide - .lua com.neovide.neovide - .py com.neovide.neovide - .jl com.neovide.neovide - .sh com.neovide.neovide - .c com.neovide.neovide - # Source Code DOTNET -> VSCode - .cs com.microsoft.VSCode - .fs com.microsoft.VSCode - .fsx com.microsoft.VSCode - .csx com.microsoft.VSCode - .ps1 com.microsoft.VSCode - # Source Code Web -> VSCode - .js com.microsoft.VSCode - .ts com.microsoft.VSCode - .jsx com.microsoft.VSCode - .tsx com.microsoft.VSCode - .css com.microsoft.VSCode - .scss com.microsoft.VSCode - .sass com.microsoft.VSCode - .vue com.microsoft.VSCode - # Source Code Config -> Neovim - .json com.neovide.neovide - .yaml com.neovide.neovide - .yml com.neovide.neovide - .toml com.neovide.neovide - .ini com.neovide.neovide - .cfg com.neovide.neovide - .conf com.neovide.neovide - .kdl com.neovide.neovide - .xml com.neovide.neovide - # Source Code Jupyter -> VSCode - .ipynb com.microsoft.VSCode - # Source Code DotNet Project -> Rider - .sln com.jetbrains.rider - .csproj com.jetbrains.rider - .fsproj com.jetbrains.rider - # Video -> IINA - .mp4 com.colliderli.iina - .mkv com.colliderli.iina -) - -# Loop through the array and set the default apps -for ext app_id in ${(kv)app_defaults}; do - duti -s $app_id $ext all -done - -unset app_defaults diff --git a/bootstrap/macOS/main.zsh b/bootstrap/macOS/main.zsh deleted file mode 100644 index 07a3855..0000000 --- a/bootstrap/macOS/main.zsh +++ /dev/null @@ -1,106 +0,0 @@ -#! /bin/zsh - -echo "Running the setup script" -set -e -set -x - -# VARIABLES - -export DOTFILES="${DOTFILES:-$HOME/.dotfiles}" - -# In macOS, consider the user as sudoer by default -export WHEEL=1 -export GUI_SETUP=1 - -# Xcode Command Line Tools -echo "[INFO] Installing Xcode Command Line Tools" -echo "[ACTION] Request Human Takeover" - -xcode-select --install - -# Press any key to continue (if Xcode Command Line Tools are installed) -echo "[ACTION] Press any key to continue when xcode CLI tools are installed" -read -n 1 - -# System Preferences -# Installation Sources -echo "[INFO] Setting Installation Sources" -echo "[ACTION] Request Human Takeover" -echo "In macOS Sequoia, setup manually (System preferences -> Security & Privacy -> General -> Allow apps downloaded from: Anywhere)" -# sudo spctl --master-disable -# In Mac OS Sequoia, the command above is not working -# Should be set up manually (System Preferences -> Security & Privacy -> General -> Allow apps downloaded from: Anywhere) - -echo "[INFO] Installing Homebrew" -echo "[ACTION] Request Human Input" -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - -echo "[ACTION] Press any key to continue when xcode CLI tools are installed" -read -n 1 - -echo "[INFO] Cloning Dotfiles" - -git clone https://github.com/js0ny/dotfiles.git $DOTFILES - -echo "[INFO] Setting up system properties" - -source $DOTFILES/bootstrap/macOS/plist.zsh - -read -p "[ACTION] Do you want to use sudo with touch ID? (Y/n) " -r choice -case "$choice" in - n | N) - : - ;; - *) - # Use `sudo cp` to prevent losing sudo access - sudo cp /etc/pam.d/sudo /etc/pam.d/sudo.bak - sudo cp $DOTFILES/platforms/mac/etc/pam.d/sudo /etc/pam.d/sudo - ;; -esac - -echo "[INFO] Installing Homebrew Packages" - -# Load Brewfile -eval "$(/opt/homebrew/bin/brew shellenv)" -brew bundle --file=$DOTFILES/bootstrap/macOS/Brewfile - -# Setting up emacs -ln -s /usr/local/opt/emacs-mac/Emacs.app /Applications/Emacs.app - -# Setting Default Apps - -source $DOTFILES/bootstrap/macOS/duti.zsh - -# Setting up Dotfiles - -source $DOTFILES/bootstrap/macOS/symlinks.zsh -source $DOTFILES/bootstrap/components/zsh.sh - -source $DOTFILES/tools/zsh/global.zshenv -source $DOTFILES/tools/zsh/zshenv -source $DOTFILES/tools/zsh/zshrc - -# Rime - -source $DOTFILES/bootstrap/components/rime.sh - -echo "[INFO] Installing Doom Emacs" - -source $DOTFILES/bootstrap/components/emacs.sh - - -echo "[INFO] Installing Color Scheme (Catppuccin Mocha)" - -bash $DOTFILES/bootstrap/components/mocha-port.bash - -# Misc - -dotnet tool install --global dotnet-repl - -pnpm install -g typescript -pnpm install -g tsx - -echo "Done! For additional setup, boot to recovery mode and run the following command:" -echo "csrutil enable --without fs --without debug --without nvram" -echo "Then, reboot the system" -echo "Run the post-install script to finish the setup" diff --git a/bootstrap/macOS/plist.zsh b/bootstrap/macOS/plist.zsh deleted file mode 100644 index 9d7982c..0000000 --- a/bootstrap/macOS/plist.zsh +++ /dev/null @@ -1,37 +0,0 @@ -## Finder -echo "[INFO] Setting Finder Preferences" -defaults write com.apple.finder QuitMenuItem -bool true # Quit with CMD+Q -defaults write com.apple.finder ShowPathbar -bool true # Show Path Bar -defaults write com.apple.finder ShowStatusBar -bool true # Show Status Bar -defaults write NSGlobalDomain AppleShowAllExtensions -bool true # Show All File Extensions -defaults write com.apple.finder AppleShowAllFiles -bool true # Show Hidden Files -defaults write com.apple.finder _FXSortFoldersFirst -bool true -defaults write com.apple.finder FinderSpawnTab -bool true -# Don't show External Hard Drives on Desktop -defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false -defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false -defaults write com.apple.finder ShowMountedServersOnDesktop -bool false -defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false -# No DS_Store on Network -defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true -# Keyboard -# Disable Accent Menu -defaults write NSGlobalDomain ApplePressAndHoldEnabled -boolean false -killall Finder -killall Dock -## Dock -echo "[INFO] Setting Dock Preferences" -defaults write com.apple.dock persistent-apps -array -defaults write com.apple.dock persistent-others -array -defaults write com.apple.dock autohide -bool true # Autohide Dock -defaults write com.apple.dock autohide-time-modifier -float 0.5 -defaults write com.apple.dock autohide-delay -float 0 # Immediately Autohide Dock -defaults write com.apple.dock show-recents -bool false # Hide Recent Applications -killall Dock -## Trackpad -echo "[INFO] Setting Trackpad Preferences" -defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerDrag -bool true -defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad TrackpadThreeFingerDrag -bool true -defaults write com.apple.AppleMultitouchTrackpad Clicking -bool true -defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true -defaults write -g NSWindowShouldDragOnGesture -bool true diff --git a/bootstrap/macOS/symlinks.zsh b/bootstrap/macOS/symlinks.zsh deleted file mode 100644 index f9466ca..0000000 --- a/bootstrap/macOS/symlinks.zsh +++ /dev/null @@ -1,29 +0,0 @@ -set -e # Exit immediately if a command exits with a non-zero status - -# 声明为关联数组 -typeset -A linkDots - -# 从通用配置文件加载 -source "$DOTFILES/bootstrap/components/symlinks.bash" - -echo "[INFO] DOTFILES = $DOTFILES" - -echo "[ACTION] Press any key to proceed" -read -r -n1 - -echo "[INFO] Setting up symbolic links" -# 使用 zsh 的关联数组语法 -for src in ${(k)linkDots}; do - dest="${linkDots[$src]}" - echo "Linking $src to $dest" - if [ -d "$src" ]; then - test -d $dest && mv $dest $dest.bak - ln -sf $src $dest - elif [ -f "$src" ]; then - dest_parent=$(dirname $dest) - test -d $dest_parent || mkdir -p $dest_parent - ln -sf $src $dest - else - echo "[ERROR] $src does not exist" - fi -done diff --git a/bootstrap/setup.ps1 b/bootstrap/setup.ps1 deleted file mode 100644 index fbbdd94..0000000 --- a/bootstrap/setup.ps1 +++ /dev/null @@ -1,223 +0,0 @@ -#Requires -RunAsAdministrator -# TODO: This file is under development -exit 1 - -$DOTFILES = if ($Env:DOTFILES) { $Env:DOTFILES } else { Join-Path "$Env:USERPROFILE" "dotfiles" } - - -New-Item -ItemType Directory -Path (Join-Path $Env:UserProfile "Temp") -Force - -winget install -e --id Git.Git - -if (Get-Command git -ErrorAction SilentlyContinue) { - git clone https://github.com/js0ny/dotfiles.git "$DOTFILES" --depth 1 -} -else { - Write-Output "[ERROR] Git is not installed" - exit 1 -} - -# Install scoop -Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression - -# Inline `sudo` -sudo sudo config --enable normal - -$BOOTSTRAP = Join-Path $DOTFILES "bootstrap" "win" - -. (Join-Path $BOOTSTRAP "Environment.ps1") -. (Join-Path $BOOTSTRAP "Registry.ps1") -. (Join-Path $BOOTSTRAP "Symlinks.ps1") - -scoop import (Join-Path $BOOTSTRAP "Scoopfile.json") - -# Rime - -$RIMEDIR = Join-Path $Env:AppData "Rime" -git clone --depth 1 https://github.com/js0ny/rime_wanxiang_pro.git $RIMEDIR - -Set-Location $RIMEDIR -just init -just clone_plum - -# The section below not done yet -exit 1 - -#!C:\Program Files\WindowsApps\Microsoft.PowerShell_7.4.6.0_x64__8wekyb3d8bbwe\pwsh.EXE -# Run with PowerShell 7 -winget install -e --id Git.Git -git clone https://github.com/js0ny/dotfiles.git ~\.dotfiles -Set-Location -Path ~\.dotfiles -Remove-Item -Force $PROFILE -$DOTFILES = "$HOME\.dotfiles" -New-Item -ItemType SymbolicLink -Path $PROFILE -Target "$DOTFILES\win\Microsoft.PowerShell_profile.ps1" -. $PROFILE -# Install Scoop -Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression -# Install Chocolatey -# Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) - -# Set Dotfiles -# $DOTFILES\.config -$folders = @("conda", "git", "ideavim", "ipython", "markdownlint", "npm", "NuGet", "nvim", "pip", "Vim") -foreach ($folder in $folders) { - New-Item -ItemType Directory -Path "$Env:XDG_CONFIG_HOME\$folder" -Force -} -New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\conda\.condarc" -Target "$DOTFILES\.config\conda\condarc.yaml" -Force -New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\git\config" -Target "$DOTFILES\.config\git\.gitconfig" -Force -New-Item -ItemType SymbolicLink -Path "~\.haskeline" -Target "$DOTFILES\.haskeline" -Force -New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\ideavim\.ideavimrc" -Target "$DOTFILES\.config\ideavim\.ideavimrc" -Force -New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\ipython" -Target "$DOTFILES\.config\ipython" -Force -# New-Item -ItemType SymbolicLink -Path "~\.markdownlint.json" -Target "$DOTFILES\.markdownlint.json" -Force -New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\npm\npmrc" -Target "$DOTFILES\.config\npm\npmrc" -Force -New-Item -ItemType SymbolicLink -Path "$Env:AppData\NuGet\NuGet.Config" -Target "$DOTFILES\.config\NuGet\NuGet.Config" -Force -New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\nvim" -Target "$DOTFILES\.config\nvim" -Force -New-Item -ItemType SymbolicLink -Path "$Env:AppData\pip\pip.ini" -Target "$DOTFILES\.config\pip\pip.conf" -Force -New-Item -ItemType SymbolicLink -Path "$Env:XDG_CONFIG_HOME\Vim\_vimrc" -Target "$DOTFILES\.config\vim\vimrc" -Force -New-Item -ItemType SymbolicLink -Path "~\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force -New-Item -ItemType SymbolicLink -Path "$Env:AppData\neovide\config.toml" -Target "$DOTFILES\win\neovide.toml" -Force -# New-Item -ItemType SymbolicLink -Path "~\.vscode.vimrc" -Target "$DOTFILES\vscode\vscode.vimrc" Use Absolute Path -# Hide dotfiles -Get-ChildItem -Force -Filter .* -Path $HOME | ForEach-Object { $_.Attributes += "Hidden" } -@( - Join-Path $HOME '.config' - Join-Path $HOME '.dotfiles' -) | ForEach-Object { - $_.Attributes -band -bnot [System.IO.FileAttributes]::Hidden -} -Set-Location $HOME\Documents -# Match WindowsPowerShell and PowerShell -Get-ChildItem -Force -Filter *owerShell | ForEach-Object { $_.Attributes += "Hidden" } - -# Windows Terminal -if (Get-Command wt -ErrorAction SilentlyContinue) { - Write-Output "Windows Terminal (wt) installed" -} -else { - winget install -e --id Microsoft.WindowsTerminal -} - -# Uninstall Windows Apps -Get-AppxPackage *solit* | Remove-AppxPackage # 纸牌 -Get-AppxPackage *sound* | Remove-AppxPackage # 錄音機 -Get-AppxPackage *camera* | Remove-AppxPackage # 相機 -Get-AppxPackage *weather* | Remove-AppxPackage # 天氣 -Get-AppxPackage *Map* | Remove-AppxPackage # 地圖 -# Get-AppxPackage *clipchamp* | Remove-AppxPackage # 其實這個還行 - -# Added Packages -scoop bucket add main -scoop bucket add nerd-fonts -scoop bucket add extras -scoop bucket add nonportable - -# CLI Tools -# winget install -e --id GnuWin32.Grep # Use Select-String instead -scoop install main/make -# winget install -e --id GnuWin32.Which # Use Get-Command instead -scoop install main/fzf -scoop install main/ripgrep -scoop install main/wget -scoop install main/wget2 -scoop install main/cmake -scoop install main/bat # modern cat -scoop install main/zoxide # Directory Jump -scoop install main/dos2unix # Convert line endings -scoop install main/hyperfine # Benchmark -scoop install main/bottom # System Monitor -scoop install main/delta # diff -scoop install extras/gpg4win - -# File Management -scoop install extras/everything -scoop install main/7zip -scoop install extras/bandizip -scoop install main/pandoc -scoop install extras/sumatrapdf -winget install -e --id Google.GoogleDrive -sudo scoop install nonportable/winbtrfs-np - -# System Enhancements -scoop install extras/fancontrol -scoop install extras/powertoys -scoop install extras/msiafterburner -winget install -e --id Yuanli.uTools -scoop install extras/geekuninstaller -scoop install extras/flow-launcher -# winget install -e --id AutoHotkey.AutoHotkey -scoop install extras/autohotkey -scoop install nonportable/mactype-np -scoop install extras/diskgenius -# winget install -e --id Nilesoft.Shell -# scoop install umi-ocr-paddle - -# Editor -scoop install main/vim -scoop install main/neovim -scoop install extras/vscodium -scoop install extras/vscode -scoop install extras/neovide - - -# Security -scoop bucket add keyguard https://github.com/AChep/keyguard-repo-scoop -scoop install keyguard/keyguard - -# PKM -scoop install extras/obsidian -winget install -e --id 9P7HPMXP73K4 # Siyuan -scoop install extras/typora -scoop install extras/zotero -scoop install extras/anki -# winget install -e --id Notion.Notion - -# Browser -# Use Microsoft Edge directly -# winget install -e --id TheBrowserCompany.Arc -# winget install -e --id Mozilla.Firefox.Nightly # Not working - -# Programming Languages -winget install -e --id Python.Python.3.13 -winget install -e --id Anaconda.Miniconda3 -winget install -e --id OpenJS.NodeJS -winget install -e --id Rustlang.Rustup -winget install -e --id Microsoft.DotNet.SDK.9 - -# Dev -scoop install extras/docker -scoop install extras/lazygit - -# IDE -scoop install extras/rider - -# Gaming -winget install -e --id Valve.Steam - -# IME -winget install -e --id Rime.Weasel # 小狼毫 Rime - -# Misc -winget install -e --id 9N5LW3JBCXKF --source msstore # MSIX Packaging Tool -winget install -e --id 9PKTQ5699M62 --source msstore # iCloud -winget install -e --id RazerInc.RazerInstaller # Razer Synapse - -# Social -winget install -e --id 9N97ZCKPD60Q --source msstore # Unigram (Telegram client) -winget install -e --id Tencent.QQ.NT -winget install -e --id XPFCKBRNFZQ62G --source msstore # WeChat in Windows Store (MSIX) - -# Others -winget install -e --id Appest.TickTick -winget install -e --id 9NBLGGH4Z1SP --source msstore # ShareX (screen capture) - -# Fonts -scoop install FiraCode-NF -scoop install CascadiaCode-NF -scoop install LXGWWenKai # 霞鹜文楷 -scoop install LXGWWenKaiMono # 霞鹜文楷Mono - -# WSL -scoop install archwsl -wsl --set-version Arch 1 diff --git a/bootstrap/setup.sh b/bootstrap/setup.sh deleted file mode 100644 index bd6c661..0000000 --- a/bootstrap/setup.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash -# shellcheck disable=SC1090 shell=sh -# Date: 2025-02-11 -# Author: js0ny -# IMPORTANT: The default `bash` in macOS is outdated, run with zsh or install the latest `bash` via Homebrew -# If you are macOS, run `xcode select --install` first - -set -o errexit -set -o xtrace - -DOTFILES="${DOTFILES:-$HOME/.dotfiles}" - -mkdir -p ~/.local/.tmp - -export DOTFILES - -case "$(uname)" in - Linux) - curl https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/bootstrap/linux/main.bash -o ~/.local/.tmp/main.bash - source ~/.local/.tmp/main.bash - rm -rf ~/.local/.tmp/main.bash - ;; - Darwin) - curl https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/bootstrap/macOS/main.zsh -o ~/.local/.tmp/main.zsh - zsh ~/.local/.tmp/main.zsh - rm -rf ~/.local/.tmp/main.zsh - ;; -esac diff --git a/bootstrap/win/Defender.ps1 b/bootstrap/win/Defender.ps1 deleted file mode 100644 index 06577de..0000000 --- a/bootstrap/win/Defender.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -#Requires -RunAsAdministrator - -Set-MpPreference -EnableControlledFolderAccess 1 - -$protected = (Get-MpPreference).ControlledFolderAccessProtectedFolders -$protected += "$Env:UserProfile\.ssh" -$protected += "$Env:UserProfile\.config" -$protected += "$Env:UserProfile\Vault" -Set-MpPreference -ControlledFolderAccessProtectedFolders $protected - -$apps = (Get-MpPreference).ControlledFolderAccessAllowedApplications -$apps += "$Env:Windir\System32\OpenSSH\ssh.exe" -$apps += "$Env:ProgramFiles\GPSoftware\Directory Opus\DOpus.exe" -$apps += (Get-Command -Name code).Source.Replace("bin\code.cmd", "Code.exe") -$apps += (Get-Command -Name pwsh).Source -$apps += (Get-Command -Name git).Source -Set-MpPreference -ControlledFolderAccessAllowedApplications $apps - -$exclusion = (Get-MpPreference).ExclusionPath -$exclusion += "$env:ProgramFiles\JetBrains" -$exclusion += "$env:LocalAppData\JetBrains" -$exclusion += "D:\Source" -Set-MpPreference -ExclusionPath $exclusion diff --git a/bootstrap/win/Environments.ps1 b/bootstrap/win/Environments.ps1 deleted file mode 100644 index 06feb5f..0000000 --- a/bootstrap/win/Environments.ps1 +++ /dev/null @@ -1,93 +0,0 @@ -# Set Environment Variables -# Use %PATH_EXT% to prevent PATH from being too long -[System.Environment]::SetEnvironmentVariable("Path_EXT_0", "D:\bin", "User") -[System.Environment]::SetEnvironmentVariable("Path_EXT_0", "C:\Users\jsony\AppData\Local\Cargo\bin", "User") -[System.Environment]::SetEnvironmentVariable("Path_EXT_1", "C:\Users\jsony\AppData\Local\Go\bin", "User") -[System.Environment]::SetEnvironmentVariable("Path_EXT_2", "C:\Users\jsony\AppData\Local\Cargo\bin", "User") -$currentPath = [System.Environment]::GetEnvironmentVariable("Path", "User") -if ($currentPath -notlike "*%PATH_EXT%*") { - $currentPath += ";%PATH_EXT_0%;%PATH_EXT_1%;%PATH_EXT_2%" -} -[System.Environment]::SetEnvironmentVariable("Path", $currentPath, "User") -[System.Environment]::SetEnvironmentVariable("PATH_EXT_0", "", [System.EnvironmentVariableTarget]::Machine) -[System.Environment]::SetEnvironmentVariable("PATH_EXT_1", "", [System.EnvironmentVariableTarget]::Machine) -[System.Environment]::SetEnvironmentVariable("PATH_EXT_2", "", [System.EnvironmentVariableTarget]::Machine) -$currentPath = [System.Environment]::GetEnvironmentVariable("Path", [System.EnvironmentVariableTarget]::Machine) -if ($currentPath -notlike "*%PATH_EXT%*") { - $currentPath += ";%PATH_EXT_0%;%PATH_EXT_1%;%PATH_EXT_2%" -} -[System.Environment]::SetEnvironmentVariable("Path", $currentPath, [System.EnvironmentVariableTarget]::Machine) -# Simulate XDG Base Directory Specification -$Env:XDG_CONFIG_HOME = "$Env:AppData" -$Env:XDG_DATA_HOME = "$Env:LocalAppData" -$Env:XDG_CACHE_HOME = "$Env:LocalAppData\Cache" -$Env:XDG_STATE_HOME = "$Env:LocalAppData\State" -[System.Environment]::SetEnvironmentVariable("XDG_CONFIG_HOME", "$Env:XDG_CONFIG_HOME", "User") -[System.Environment]::SetEnvironmentVariable("XDG_DATA_HOME", "$Env:XDG_DATA_HOME", "User") -New-Item -ItemType Directory -Path "$Env:LocalAppData\cache" -Force -[System.Environment]::SetEnvironmentVariable("XDG_CACHE_HOME", "$Env:XDG_CACHE_HOME", "User") -New-Item -ItemType Directory -Path "$Env:LocalAppData\state" -Force -[System.Environment]::SetEnvironmentVariable("XDG_STATE_HOME", "$Env:XDG_STATE_HOME", "User") -# Add environment variables -[System.Environment]::SetEnvironmentVariable("DOTFILES", "$DOTFILES", "User") -# Set potential environment variables to prevent softwares put their configs in the wrong place -# eg. dotfiles in %UserProfile% -# ~\.aws -> %AppData%\aws :: AWS CLI -New-Item -ItemType Directory -Path "$Env:AppData\aws" -Force -[System.Environment]::SetEnvironmentVariable("AWS_CONFIG_FILE", "$Env:AppData\aws\config", "User") -[System.Environment]::SetEnvironmentVariable("AWS_SHARED_CREDENTIALS_FILE", "$Env:AppData\aws\credentials", "User") -# ~\.azure -> %LocalAppData%\Azure :: Azure CLIcargo install --list -[System.Environment]::SetEnvironmentVariable("AZURE_CONFIG_DIR", "$Env:LocalAppData\Azure", "User") -# ~\.cargo -> %LocalAppData%\Cargo :: Rust https://doc.rust-lang.org/cargo/guide/cargo-home.html -[System.Environment]::SetEnvironmentVariable("CARGO_HOME", "$Env:LocalAppData\Cargo", "User") -# ~\.docker -> %AppData%\dotDocker :: Docker (Docker takes %AppData%\Docker, use dotDocker instead) -[System.Environment]::SetEnvironmentVariable("DOCKER_CONFIG", "$Env:AppData\dotDocker", "User") -# ~\.dotnet -> %LocalAppData%\dotNET :: .NET Core -[System.Environment]::SetEnvironmentVariable("DOTNET_CLI_HOME", "$Env:LocalAppData\dotNET", "User") -# ~\.emacs.d -> %AppData%\.emacs.d :: Emacs (This is default) -# [System.Environment]::SetEnvironmentVariable("EMACS_HOME", "$Env:AppData\emacs.d", "User") -# ~\go -> %LocalAppData%\GO :: golang -[System.Environment]::SetEnvironmentVariable("GOPATH", "$Env:LocalAppData\GO", "User") -# ~\.ipython -> %AppData%\ipython :: IPython -# IPython won't check XDG on Windows https://github.com/ipython/ipython/blob/0615526f80691452f2e282c363bce197c0141561/IPython/utils/path.py#L200 -[System.Environment]::SetEnvironmentVariable("IPYTHONDIR", "$Env:AppData\ipython", "User") -# ~\.julia -> %LocalAppData%\julia :: Julia -[System.Environment]::SetEnvironmentVariable("JULIA_DEPOT_PATH", "$Env:LocalAppData\julia", "User") -# ~\_lesshst -> %LocalAppData%\state\lesshst :: less -[System.Environment]::SetEnvironmentVariable("LESSHISTFILE", "$Env:XDG_STATE_HOME\lesshst", "User") -# %AppData%\less\lesskey :: less -New-Item -ItemType Directory -Path "$Env:AppData\less" -Force -[System.Environment]::SetEnvironmentVariable("LESSKEYIN", "$Env:AppData\less\lesskey", "User") -# ~\.matplotlib -> %LocalAppData%\matplotlib :: Matplotlib -[System.Environment]::SetEnvironmentVariable("MPLCONFIGDIR", "$Env:LocalAppData\matplotlib", "User") -# ~\.npmrc -> %AppData%\npm\npmrc :: npm -[System.Environment]::SetEnvironmentVariable("NPM_CONFIG_USERCONFIG", "$Env:AppData\npm\npmrc", "User") -# ~\.node_repl_history -> %LocalAppData%\state\node\repl_history :: Node.js -New-Item -ItemType Directory -Path "$Env:XDG_STATE_HOME\node" -Force -[System.Environment]::SetEnvironmentVariable("NODE_REPL_HISTORY", "$Env:XDG_STATE_HOME\node\repl_history", "User") -# ~\.ts_node_repl_history -> %LocalAppData%\state\node\ts_node_repl_history :: Node.js -# NOTE: ts-node doesn't support this yet -# [System.Environment]::SetEnvironmentVariable("TS_NODE_REPL_HISTORY", "$Env:XDG_STATE_HOME\node\ts_node_repl_history", "User") -# ~\.nuget\packages -> %LocalAppData%\cache\NuGet\packages :: NuGet -[System.Environment]::SetEnvironmentVariable("NUGET_PACKAGES", "$Env:XDG_CACHE_HOME\NuGet\packages", "User") -# ~\.omnisharp -> %AppData%\OmniSharp :: OmniSharp -[System.Environment]::SetEnvironmentVariable("OMNISHARPHOME", "$Env:AppData\OmniSharp", "User") -# ~\.python_history -> %LocalAppData%\state\python\python_history :: Python -# Only works for Python 3.13+ https://docs.python.org/3.13/using/cmdline.html#envvar-PYTHON_HISTORY -New-Item -ItemType Directory -Path "$Env:XDG_STATE_HOME\python" -Force -[System.Environment]::SetEnvironmentVariable("PYTHON_HISTORY", "$Env:XDG_STATE_HOME\python\python_history", "User") -# ~\.rustup -> %LocalAppData%\Rustup :: Rust -[System.Environment]::SetEnvironmentVariable("RUSTUP_HOME", "$Env:LocalAppData\Rustup", "User") -# ~\.vimrc -> %AppData%\Vim\_vimrc :: Vim -New-Item -ItemType Directory -Path "$Env:AppData\Vim" -Force -[System.Environment]::SetEnvironmentVariable("VIM", "$Env:AppData\Vim", "User") -[System.Environment]::SetEnvironmentVariable("KOMOREBI_CONFIG_HOME", "$Env:AppData\komorebi", "User") -# ~\.vuerc -> %AppData%\vue\.vuerc :: Vue CLI -# Currently, Vue CLI doesn't support file path configuration:https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli/lib/confifile -# [System.Environment]::SetEnvironmentVariable("VUE_CLI_CONFIG_PATH", "$Env:AppData\vue\.vuerc", "User") -# ~\.wget-hsts -> %LocalAppData%\cache\wget-hsts :: wget -# Use Alias, wget host file path is not configurable -# ~\.yarnrc -> %AppData%\yarn\config.yaml :: Yarn v1 -# Use Alias, yarnrc path is not configurable - -# Reload required here to make sure the environment variables are set diff --git a/bootstrap/win/Registry.ps1 b/bootstrap/win/Registry.ps1 deleted file mode 100644 index a170680..0000000 --- a/bootstrap/win/Registry.ps1 +++ /dev/null @@ -1,11 +0,0 @@ - -# Disable StickyKeys -REG ADD "HKEY_CURRENT_USER\Control Panel\Accessibility\StickyKeys" /v "Flags" /t REG_SZ /d "506" /f - -# Disable Hyper+Keys to open Office apps -REG ADD HKCU\Software\Classes\ms-officeapp\Shell\Open\Command /t REG_SZ /d rundll32 - -# Disable DOS 8.3 file name creation -sudo fsutil 8dot3name set 1 -# Delete all known DOS 8.3 file name -fsutil 8dot3name strip /s /v C:\ diff --git a/bootstrap/win/Tasks.ps1 b/bootstrap/win/Tasks.ps1 deleted file mode 100644 index d12756f..0000000 --- a/bootstrap/win/Tasks.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -#Requires -RunAsAdministrator - -Write-Output "[INFO] Setting up KMonad Tasks" - -# PowerShell Path, use 7 if available -if (Get-Command "pwsh" -ErrorAction SilentlyContinue) { - $PowerShellPath = (Get-Command "pwsh").Source -} -else { - $PowerShellPath = (Get-Command "powershell").Source -} - -$DotStartUpPath = "$Env:DOTFILES\platforms\win\start" - -$KMonadRunnerPath = Join-Path $DotStartUpPath "KMonad.ps1" -$Action = New-ScheduledTaskAction -Execute $PowerShellPath -Argument "-NoProfile -ExecutionPolicy Bypass -File $KMonadRunnerPath" -$Trigger = New-ScheduledTaskTrigger -AtLogOn -$Principal = New-ScheduledTaskPrincipal -UserId "$env:USERNAME" -LogonType Interactive -RunLevel Highest -$Settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -DontStopOnIdleEnd -Hidden - -Register-ScheduledTask -TaskName "Start Kmonad" -Action $Action -Trigger $Trigger -Principal $Principal -Settings $Settings -TaskPath "\Personal" diff --git a/bootstrap/win/symlinks.ps1 b/bootstrap/win/symlinks.ps1 deleted file mode 100644 index 4b137ad..0000000 --- a/bootstrap/win/symlinks.ps1 +++ /dev/null @@ -1,78 +0,0 @@ -# $DOTFILES\bootstrap\set_symlink_win.ps1 -# Date: 2024-12-01 -# Author: js0ny -# Set symlinks for dotfiles on Windows -# 在 Windows 上设置 配置文件的符号链接 - -# Run this with Administrator privileges - -$DOTFILES = Join-Path $Env:UserProfile ".dotfiles" -$BASE_COMMON = Join-Path $DOTFILES "common" -$BASE_TOOLS = Join-Path $DOTFILES "tools" -$BASE_WIN = Join-Path $DOTFILES "platforms" "win" -$STARTUP = [System.Environment]::GetFolderPath("Startup") - -$BAT_CONF = Join-Path $Env:AppData "bat" "config" -if ((Get-Command bat).Source -ccontains "scoop") { - $BAT_CONF = Join-Path (scoop prefix bat) "config" -} - - -$SIOYEKDIR = scoop prefix sioyek - -$SIOYEKCFG = Get-ChildItem "$BASE_TOOLS\sioyek" -Filter "*.config" - -foreach ($cfg in $SIOYEKCFG) { - $cfgName = $cfg.Name - $cfgPath = Join-Path $SIOYEKDIR $cfgName - New-Item -ItemType SymbolicLink -Target $cfg -Path $cfgPath -Force -} - -$linkDots = @{ - "$BASE_WIN\wslconfig" = "$Env:UserProfile\.wslconfig" - "$BASE_WIN\glzr" = "$Env:UserProfile\.glzr" - "$BASE_WIN\neovide.toml" = "$Env:AppData\neovide\config.toml" - "$BASE_WIN\vsvimrc" = "$Env:UserProfile\.vsvimrc" - "$BASE_COMMON\bat.config" = "$BAT_CONF" - "$BASE_COMMON\condarc.yaml" = "$Env:XDG_CONFIG_HOME\conda\.condarc" - "$BASE_COMMON\glow.yaml" = "$Env:AppData\glow\glow.yml" - "$BASE_COMMON\haskeline" = "$Env:UserProfile\.haskeline" - "$BASE_COMMON\ideavimrc" = "$Env:XDG_CONFIG_HOME\ideavim\ideavimrc" - "$BASE_COMMON\lazygit.yaml" = "$Env:AppData\lazygit\config.yml" - "$BASE_COMMON\lesskey" = "$Env:LessKeyIn" - "$BASE_COMMON\lsd" = "$Env:AppData\lsd\config.yaml" - "$BASE_COMMON\npmrc" = "$Env:NPM_CONFIG_USERCONFIG" - "$BASE_COMMON\NuGet.Config" = "$Env:AppData\NuGet\NuGet.Config" - "$BASE_COMMON\starship.toml" = "$Env:UserProfile\.config\starship.toml" - "$BASE_COMMON\pip.conf" = "$Env:AppData\pip\pip.ini" - "$BASE_COMMON\vimrc.noxdg.vimrc" = "$Env:UserProfile\_vimrc" - "$BASE_COMMON\emacs.d" = "$Env:AppData\.emacs.d" - "$BASE_TOOLS\ipython" = "$Env:IPYTHONDIR" - "$BASE_TOOLS\nvim" = "$Env:XDG_CONFIG_HOME\nvim" - "$BASE_TOOLS\wezterm" = "$Env:XDG_CONFIG_HOME\wezterm" - "$BASE_TOOLS\yazi" = "$Env:AppData\yazi\config" - "$BASE_TOOLS\zed" = "$Env:AppData\Zed" -} - - - -foreach ($src in $linkDots.Keys) { - $dest = $linkDots[$src] - # Auto create directories (Untested) - if (Test-Path -Path $src -PathType Container) { - New-Item -ItemType Directory -Path $dest -Force - } - else { - $Local:destParent = Split-Path -Path $dest -Parent - New-Item -ItemType Directory -Path $destParent -Force - } - if (Test-Path -Path $dest) { - Move-Item $dest "$dest.bak" -Force - } - New-Item -ItemType SymbolicLink -Target $src -Path $dest -Force -} - -New-Item -ItemType SymbolicLink -Target "$BASE_WIN\Microsoft.PowerShell_profile.ps1" -Path "$Env:UserProfile\Documents\PowerShell\Microsoft.PowerShell_profile.ps1" -Force - -Copy-Item (Join-Path $BASE_WIN "ahk" "bin" "Caps.exe") $STARTUP -Copy-Item (Join-Path $BASE_COMMON "gitconfig") $Env:UserProfile diff --git a/common/agenda-view.el b/common/agenda-view.el deleted file mode 100644 index cf8adaa..0000000 --- a/common/agenda-view.el +++ /dev/null @@ -1,3 +0,0 @@ - -(setq org-directory "~/OrgFiles/") -(setq org-agenda-files (list (concat org-directory "tasks/"))) diff --git a/common/bat.config b/common/bat.config deleted file mode 120000 index 2de399f..0000000 --- a/common/bat.config +++ /dev/null @@ -1 +0,0 @@ -/home/js0ny/.dotfiles/common/bat.config.light \ No newline at end of file diff --git a/common/fzfrc b/common/fzfrc deleted file mode 100644 index 4d88a35..0000000 --- a/common/fzfrc +++ /dev/null @@ -1,10 +0,0 @@ -# --preview 'bat --color=always --style=numbers {}' -# --bind alt-n:preview-down,alt-e:preview-up -# --bind ctrl-e:up -# --bind alt-p:toggle-preview -# --color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 -# --color=fg:#cdd6f4,header:#f38ba8,info:#f5c2e7,pointer:#f5e0dc -# --color=marker:#b4befe,fg+:#cdd6f4,prompt:#f5c2e7,hl+:#f38ba8 -# --color=selected-bg:#45475a -# --color=border:#313244,label:#cdd6f4 -# diff --git a/common/haskeline b/common/haskeline deleted file mode 100644 index 8dd3b01..0000000 --- a/common/haskeline +++ /dev/null @@ -1,4 +0,0 @@ -editMode: Vi -bind: n down -bind: e up -bind: l vi-insert diff --git a/common/lazygit.yaml b/common/lazygit.yaml deleted file mode 100644 index 952549b..0000000 --- a/common/lazygit.yaml +++ /dev/null @@ -1,476 +0,0 @@ -yaml-language-server: $schema=https://raw.githubusercontent.com/jesseduffield/lazygit/master/schema/config.json -# Config relating to the Lazygit UI -gui: - # The number of lines you scroll by when scrolling the main window - scrollHeight: 2 - # If true, allow scrolling past the bottom of the content in the main window - scrollPastBottom: true - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#scroll-off-margin - scrollOffMargin: 2 - # One of: 'margin' (default) | 'jump' - scrollOffBehavior: margin - # If true, capture mouse events. - # When mouse events are captured, it's a little harder to select text: e.g. requiring you to hold the option key when on macOS. - mouseEvents: true - # If true, do not show a warning when discarding changes in the staging view. - skipDiscardChangeWarning: false - # If true, do not show warning when applying/popping the stash - skipStashWarning: false - # If true, do not show a warning when attempting to commit without any staged files; instead stage all unstaged files. - skipNoStagedFilesWarning: false - # If true, do not show a warning when rewording a commit via an external editor - skipRewordInEditorWarning: false - # Fraction of the total screen width to use for the left side section. You may want to pick a small number (e.g. 0.2) if you're using a narrow screen, so that you can see more of the main section. - # Number from 0 to 1.0. - sidePanelWidth: 0.3333 - # If true, increase the height of the focused side window; creating an accordion effect. - expandFocusedSidePanel: false - # The weight of the expanded side panel, relative to the other panels. 2 means - # twice as tall as the other panels. Only relevant if `expandFocusedSidePanel` is true. - expandedSidePanelWeight: 2 - # Sometimes the main window is split in two (e.g. when the selected file has both staged and unstaged changes). This setting controls how the two sections are split. - # Options are: - # - 'horizontal': split the window horizontally - # - 'vertical': split the window vertically - # - 'flexible': (default) split the window horizontally if the window is wide enough, otherwise split vertically - mainPanelSplitMode: flexible - # How the window is split when in half screen mode (i.e. after hitting '+' once). - # Possible values: - # - 'left': split the window horizontally (side panel on the left, main view on the right) - # - 'top': split the window vertically (side panel on top, main view below) - enlargedSideViewLocation: left - # One of 'auto' (default) | 'en' | 'zh-CN' | 'zh-TW' | 'pl' | 'nl' | 'ja' | 'ko' | 'ru' - language: auto - # Format used when displaying time e.g. commit time. - # Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format - timeFormat: 02 Jan 06 - # Format used when displaying time if the time is less than 24 hours ago. - # Uses Go's time format syntax: https://pkg.go.dev/time#Time.Format - shortTimeFormat: 3:04PM - # Config relating to colors and styles. - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#color-attributes - theme: - activeBorderColor: - - "#b4befe" - - bold - inactiveBorderColor: - - "#a6adc8" - optionsTextColor: - - "#89b4fa" - selectedLineBgColor: - - "#313244" - cherryPickedCommitBgColor: - - "#45475a" - cherryPickedCommitFgColor: - - "#b4befe" - unstagedChangesColor: - - "#f38ba8" - defaultFgColor: - - "#cdd6f4" - searchingActiveBorderColor: - - "#f9e2af" - authorColors: - "*": "#b4befe" - # Background color of selected line when view doesn't have focus. - inactiveViewSelectedLineBgColor: - - bold - # Foreground color of marked base commit (for rebase) - markedBaseCommitFgColor: - - blue - # Background color of marked base commit (for rebase) - markedBaseCommitBgColor: - - yellow - # Config relating to the commit length indicator - commitLength: - # If true, show an indicator of commit message length - show: true - # If true, show the '5 of 20' footer at the bottom of list views - showListFooter: true - # If true, display the files in the file views as a tree. If false, display the files as a flat list. - # This can be toggled from within Lazygit with the '~' key, but that will not change the default. - showFileTree: true - # If true, show the number of lines changed per file in the Files view - showNumstatInFilesView: false - # If true, show a random tip in the command log when Lazygit starts - showRandomTip: true - # If true, show the command log - showCommandLog: true - # If true, show the bottom line that contains keybinding info and useful buttons. If false, this line will be hidden except to display a loader for an in-progress action. - showBottomLine: true - # If true, show jump-to-window keybindings in window titles. - showPanelJumps: true - # Deprecated: use nerdFontsVersion instead - showIcons: false - # Nerd fonts version to use. - # One of: '2' | '3' | empty string (default) - # If empty, do not show icons. - nerdFontsVersion: "3" - # If true (default), file icons are shown in the file views. Only relevant if NerdFontsVersion is not empty. - showFileIcons: true - # Length of author name in (non-expanded) commits view. 2 means show initials only. - commitAuthorShortLength: 2 - # Length of author name in expanded commits view. 2 means show initials only. - commitAuthorLongLength: 17 - # Length of commit hash in commits view. 0 shows '*' if NF icons aren't on. - commitHashLength: 8 - # If true, show commit hashes alongside branch names in the branches view. - showBranchCommitHash: false - # Whether to show the divergence from the base branch in the branches view. - # One of: 'none' | 'onlyArrow' | 'arrowAndNumber' - showDivergenceFromBaseBranch: none - # Height of the command log view - commandLogSize: 8 - # Whether to split the main window when viewing file changes. - # One of: 'auto' | 'always' - # If 'auto', only split the main window when a file has both staged and unstaged changes - splitDiff: auto - # Default size for focused window. Window size can be changed from within Lazygit with '+' and '_' (but this won't change the default). - # One of: 'normal' (default) | 'half' | 'full' - screenMode: normal - # Window border style. - # One of 'rounded' (default) | 'single' | 'double' | 'hidden' - border: rounded - # If true, show a seriously epic explosion animation when nuking the working tree. - animateExplosion: true - # Whether to stack UI components on top of each other. - # One of 'auto' (default) | 'always' | 'never' - portraitMode: auto - # How things are filtered when typing '/'. - # One of 'substring' (default) | 'fuzzy' - filterMode: substring - # Config relating to the spinner. - spinner: - # The frames of the spinner animation. - frames: - - "|" - - / - - "-" - - \ - # The "speed" of the spinner in milliseconds. - rate: 50 - # Status panel view. - # One of 'dashboard' (default) | 'allBranchesLog' - statusPanelView: dashboard - # If true, jump to the Files panel after popping a stash - switchToFilesAfterStashPop: true - # If true, jump to the Files panel after applying a stash - switchToFilesAfterStashApply: true - # If true, when using the panel jump keys (default 1 through 5) and target panel is already active, go to next tab instead - switchTabsWithPanelJumpKeys: false -# Config relating to git -git: - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Custom_Pagers.md - paging: - # Value of the --color arg in the git diff command. Some pagers want this to be set to 'always' and some want it set to 'never' - colorArg: always - # e.g. - # diff-so-fancy - # delta --dark --paging=never - # ydiff -p cat -s --wrap --width={{columnWidth}} - pager: "delta --dark --paging=never" - # If true, Lazygit will use whatever pager is specified in `$GIT_PAGER`, `$PAGER`, or your *git config*. If the pager ends with something like ` | less` we will strip that part out, because less doesn't play nice with our rendering approach. If the custom pager uses less under the hood, that will also break rendering (hence the `--paging=never` flag for the `delta` pager). - useConfig: false - # e.g. 'difft --color=always' - externalDiffCommand: "" - # Config relating to committing - commit: - # If true, pass '--signoff' flag when committing - signOff: false - # Automatic WYSIWYG wrapping of the commit message as you type - autoWrapCommitMessage: true - # If autoWrapCommitMessage is true, the width to wrap to - autoWrapWidth: 72 - # Config relating to merging - merging: - # If true, run merges in a subprocess so that if a commit message is required, Lazygit will not hang - # Only applicable to unix users. - manualCommit: false - # Extra args passed to `git merge`, e.g. --no-ff - args: "" - # The commit message to use for a squash merge commit. Can contain "{{selectedRef}}" and "{{currentBranch}}" placeholders. - squashMergeMessage: Squash merge {{selectedRef}} into {{currentBranch}} - # list of branches that are considered 'main' branches, used when displaying commits - mainBranches: - - master - - main - # Prefix to use when skipping hooks. E.g. if set to 'WIP', then pre-commit hooks will be skipped when the commit message starts with 'WIP' - skipHookPrefix: WIP - # If true, periodically fetch from remote - autoFetch: true - # If true, periodically refresh files and submodules - autoRefresh: true - # If true, pass the --all arg to git fetch - fetchAll: true - # If true, lazygit will automatically stage files that used to have merge - # conflicts but no longer do; and it will also ask you if you want to - # continue a merge or rebase if you've resolved all conflicts. If false, it - # won't do either of these things. - autoStageResolvedConflicts: true - # Command used when displaying the current branch git log in the main window - branchLogCmd: git log --graph --color=always --abbrev-commit --decorate --date=relative --pretty=medium {{branchName}} -- - # If true, do not spawn a separate process when using GPG - overrideGpg: false - # If true, do not allow force pushes - disableForcePushing: false - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-commit-message-prefix - commitPrefix: - - # pattern to match on. E.g. for 'feature/AB-123' to match on the AB-123 use "^\\w+\\/(\\w+-\\w+).*" - pattern: "" - # Replace directive. E.g. for 'feature/AB-123' to start the commit message with 'AB-123 ' use "[$1] " - replace: "" - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#predefined-branch-name-prefix - branchPrefix: "" - # If true, parse emoji strings in commit messages e.g. render :rocket: as 🚀 - # (This should really be under 'gui', not 'git') - parseEmoji: false - # Config for showing the log in the commits view - log: - # One of: 'date-order' | 'author-date-order' | 'topo-order' | 'default' - # 'topo-order' makes it easier to read the git log graph, but commits may not - # appear chronologically. See https://git-scm.com/docs/ - # - # Deprecated: Configure this with `Log menu -> Commit sort order` ( in the commits window by default). - order: topo-order - # This determines whether the git graph is rendered in the commits panel - # One of 'always' | 'never' | 'when-maximised' - # - # Deprecated: Configure this with `Log menu -> Show git graph` ( in the commits window by default). - showGraph: always - # displays the whole git graph by default in the commits view (equivalent to passing the `--all` argument to `git log`) - showWholeGraph: false - # When copying commit hashes to the clipboard, truncate them to this - # length. Set to 40 to disable truncation. - truncateCopiedCommitHashesTo: 12 - allBranchesLogCmds: - - git log --graph --all --color=always --abbrev-commit --decorate --date=relative --pretty=medium -# Periodic update checks -update: - # One of: 'prompt' (default) | 'background' | 'never' - method: prompt - # Period in days between update checks - days: 14 -# Background refreshes -refresher: - # File/submodule refresh interval in seconds. - # Auto-refresh can be disabled via option 'git.autoRefresh'. - refreshInterval: 10 - # Re-fetch interval in seconds. - # Auto-fetch can be disabled via option 'git.autoFetch'. - fetchInterval: 60 -# If true, show a confirmation popup before quitting Lazygit -confirmOnQuit: false -# If true, exit Lazygit when the user presses escape in a context where there is nothing to cancel/close -quitOnTopLevelReturn: false -# Config relating to things outside of Lazygit like how files are opened, copying to clipboard, etc -os: - # Command for editing a file. Should contain "{{filename}}". - edit: "" - # Command for editing a file at a given line number. Should contain - # "{{filename}}", and may optionally contain "{{line}}". - editAtLine: "" - # Same as EditAtLine, except that the command needs to wait until the - # window is closed. - editAtLineAndWait: "" - # For opening a directory in an editor - openDirInEditor: "" - # A built-in preset that sets all of the above settings. Supported presets - # are defined in the getPreset function in editor_presets.go. - editPreset: "nvim" - # Command for opening a file, as if the file is double-clicked. Should - # contain "{{filename}}", but doesn't support "{{line}}". - open: "" - # Command for opening a link. Should contain "{{link}}". - openLink: "" - # EditCommand is the command for editing a file. - # Deprecated: use Edit instead. Note that semantics are different: - # EditCommand is just the command itself, whereas Edit contains a - # "{{filename}}" variable. - editCommand: "" - # EditCommandTemplate is the command template for editing a file - # Deprecated: use EditAtLine instead. - editCommandTemplate: "" - # OpenCommand is the command for opening a file - # Deprecated: use Open instead. - openCommand: "" - # OpenLinkCommand is the command for opening a link - # Deprecated: use OpenLink instead. - openLinkCommand: "" - # CopyToClipboardCmd is the command for copying to clipboard. - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard - copyToClipboardCmd: "" - # ReadFromClipboardCmd is the command for reading the clipboard. - # See https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-command-for-copying-to-and-pasting-from-clipboard - readFromClipboardCmd: "" -# If true, don't display introductory popups upon opening Lazygit. -disableStartupPopups: false -# What to do when opening Lazygit outside of a git repo. -# - 'prompt': (default) ask whether to initialize a new repo or open in the most recent repo -# - 'create': initialize a new repo -# - 'skip': open most recent repo -# - 'quit': exit Lazygit -notARepository: prompt -# If true, display a confirmation when subprocess terminates. This allows you to view the output of the subprocess before returning to Lazygit. -promptToReturnFromSubprocess: true -# Keybindings -keybinding: - universal: - quit: q - quit-alt1: - return: - quitWithoutChangingDirectory: Q - togglePanel: - prevItem: - nextItem: - prevItem-alt: e - nextItem-alt: "n" - prevPage: "," - nextPage: . - scrollLeft: H - scrollRight: L - gotoTop: < - gotoBottom: ">" - toggleRangeSelect: v - rangeSelectDown: - rangeSelectUp: - prevBlock: - nextBlock: - prevBlock-alt: h - nextBlock-alt: i - nextBlock-alt2: - prevBlock-alt2: - jumpToBlock: - - "1" - - "2" - - "3" - - "4" - - "5" - nextMatch: "k" - prevMatch: "K" - startSearch: / - optionMenu: - optionMenu-alt1: "?" - select: - goInto: - confirm: - confirmInEditor: - remove: d - new: "n" - edit: l - openFile: o - scrollUpMain: - scrollDownMain: - scrollUpMain-alt1: E - scrollDownMain-alt1: "N" - scrollUpMain-alt2: - scrollDownMain-alt2: - executeShellCommand: ":" - createRebaseOptionsMenu: m - # 'Files' appended for legacy reasons - pushFiles: P - # 'Files' appended for legacy reasons - pullFiles: p - refresh: R - createPatchOptionsMenu: - nextTab: "]" - prevTab: "[" - nextScreenMode: + - prevScreenMode: _ - undo: z - redo: - filteringMenu: - diffingMenu: W - diffingMenu-alt: - copyToClipboard: - openRecentRepos: - submitEditorText: - extrasMenu: "@" - toggleWhitespaceInDiffView: - increaseContextInDiffView: "}" - decreaseContextInDiffView: "{" - increaseRenameSimilarityThreshold: ) - decreaseRenameSimilarityThreshold: ( - openDiffTool: - status: - checkForUpdate: u - recentRepos: - allBranchesLogGraph: a - files: - commitChanges: c - commitChangesWithoutHook: w - amendLastCommit: A - commitChangesWithEditor: C - findBaseCommitForFixup: - confirmDiscard: x - ignoreFile: i - refreshFiles: r - stashAllChanges: s - viewStashOptions: S - toggleStagedAll: a - viewResetOptions: D - fetch: f - toggleTreeView: "t" - openMergeTool: M - openStatusFilter: - copyFileInfoToClipboard: "y" - branches: - createPullRequest: o - viewPullRequestOptions: O - copyPullRequestURL: - checkoutBranchByName: c - forceCheckoutBranch: F - rebaseBranch: r - renameBranch: R - mergeIntoCurrentBranch: M - viewGitFlowOptions: l - fastForward: f - createTag: T - pushTag: P - setUpstream: u - fetchRemote: f - sortOrder: s - worktrees: - viewWorktreeOptions: w - commits: - squashDown: s - renameCommit: r - renameCommitWithEditor: R - viewResetOptions: g - markCommitAsFixup: f - createFixupCommit: F - squashAboveCommits: S - moveDownCommit: - moveUpCommit: - amendToCommit: A - resetCommitAuthor: a - pickCommit: p - revertCommit: t - cherryPickCopy: C - pasteCommits: V - markCommitAsBaseForRebase: B - tagCommit: T - checkoutCommit: - resetCherryPick: - copyCommitAttributeToClipboard: "y" - openLogMenu: - openInBrowser: o - viewBisectOptions: b - startInteractiveRebase: I - amendAttribute: - resetAuthor: a - setAuthor: A - addCoAuthor: c - stash: - popStash: g - renameStash: r - commitFiles: - checkoutCommitFile: c - main: - toggleSelectHunk: a - pickBothHunks: b - editSelectHunk: E - submodules: - init: I - update: u - bulkMenu: b - commitMessage: - commitMenu: diff --git a/common/npmrc b/common/npmrc deleted file mode 100644 index a49e127..0000000 --- a/common/npmrc +++ /dev/null @@ -1 +0,0 @@ -strict-ssl=false diff --git a/common/remote.bashrc b/common/remote.bashrc deleted file mode 100644 index 94147d0..0000000 --- a/common/remote.bashrc +++ /dev/null @@ -1,159 +0,0 @@ -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples - -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return;; -esac - -# don't put duplicate lines or lines starting with space in the history. -# See bash(1) for more options -HISTCONTROL=ignoreboth - -# append to the history file, don't overwrite it -shopt -s histappend - -# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) -HISTSIZE=1000 -HISTFILESIZE=2000 - -# check the window size after each command and, if necessary, -# update the values of LINES and COLUMNS. -shopt -s checkwinsize - -# If set, the pattern "**" used in a pathname expansion context will -# match all files and zero or more directories and subdirectories. -#shopt -s globstar - -# make less more friendly for non-text input files, see lesspipe(1) -#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" - -# set variable identifying the chroot you work in (used in the prompt below) -if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then - debian_chroot=$(cat /etc/debian_chroot) -fi - -# set a fancy prompt (non-color, unless we know we "want" color) -case "$TERM" in - xterm-color|*-256color) color_prompt=yes;; -esac - -# uncomment for a colored prompt, if the terminal has the capability; turned -# off by default to not distract the user: the focus in a terminal window -# should be on the output of commands, not on the prompt -#force_color_prompt=yes - -if [ -n "$force_color_prompt" ]; then - if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then - # We have color support; assume it's compliant with Ecma-48 - # (ISO/IEC-6429). (Lack of such support is extremely rare, and such - # a case would tend to support setf rather than setaf.) - color_prompt=yes - else - color_prompt= - fi -fi - -if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' -else - PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' -fi -unset color_prompt force_color_prompt - -# If this is an xterm set the title to user@host:dir -case "$TERM" in -xterm*|rxvt*) - PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" - ;; -*) - ;; -esac - -# enable color support of ls and also add handy aliases -if [ -x /usr/bin/dircolors ]; then - test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" - alias ls='ls --color=auto' - #alias dir='dir --color=auto' - #alias vdir='vdir --color=auto' - - #alias grep='grep --color=auto' - #alias fgrep='fgrep --color=auto' - #alias egrep='egrep --color=auto' -fi - -# colored GCC warnings and errors -#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - -# some more ls aliases -alias ll='ls -l' -alias la='ls -A' -alias l='ls -CF' - -# Alias definitions. -# You may want to put all your additions into a separate file like -# ~/.bash_aliases, instead of adding them here directly. -# See /usr/share/doc/bash-doc/examples in the bash-doc package. - -if [ -f ~/.bash_aliases ]; then - . ~/.bash_aliases -fi - -# enable programmable completion features (you don't need to enable -# this, if it's already enabled in /etc/bash.bashrc and /etc/profile -# sources /etc/bash.bashrc). -if ! shopt -oq posix; then - if [ -f /usr/share/bash-completion/bash_completion ]; then - . /usr/share/bash-completion/bash_completion - elif [ -f /etc/bash_completion ]; then - . /etc/bash_completion - fi -fi - -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion -source ~/.nvm/nvm.sh - - -# Append to original bashrc for minimal setup -# echo $DOTFILES/wsl/.bashrc >> ~/.bashrc -bind 'set show-mode-in-prompt on' -set -o vi - -alias svi="sudo vim" # Prevent conflicts with svelte-cli -alias v="vim" - -alias sdocker="sudo docker" -alias scompose="sudo docker compose up -d" -alias sdockerps="sudo docker ps" -alias netl="netstat -tulnp" - -alias apt="sudo apt" -alias apts="apt search" -alias apti="sudo apt install" -alias aptr="sudo apt remove" -alias aptu="sudo apt upgrade && sudo apt update" - -alias l="ls -lah" -alias ll="ls -l" -alias la="ls -lA" - -bind 'set vi-ins-mode-string "sh"' -bind 'set vi-cmd-mode-string "vi"' - - - -PS2=" > " -update_ps1() { - local last_status=$? - if [[ $last_status -eq 0 ]]; then - PS1="\[\e[0;33m\]  \[\e[0;35m\][\A] \[\e[0;32m\]\u @ \h \[\e[0;34m\]in \w \[\e[0;32m\]✔\n \$ \[\e[0m\]" - else - PS1="\[\e[0;33m\]  \[\e[0;35m\][\A] \[\e[0;32m\]\u @ \h \[\e[0;34m\]in \w \[\e[0;31m\]✘\n \$ \[\e[0m\]" - fi -} - -PROMPT_COMMAND=update_ps1 diff --git a/common/starship.toml.bak b/common/starship.toml.bak deleted file mode 100644 index 02d4358..0000000 --- a/common/starship.toml.bak +++ /dev/null @@ -1,455 +0,0 @@ -# $DOTFILES/common/starship.toml -# vim:foldmethod=marker -# Date: 2025-01-26 -# Description: Use one starship config for all shells - -# Location: $XDG_CONFIG_HOME/starship.toml -# Linking: ln -s $DOTFILES/common/starship.toml $XDG_CONFIG_HOME/starship.toml - -# Modified from the Powerline Preset - -"$schema" = 'https://starship.rs/config-schema.json' - - -# {{{ format -format = """ -$sudo\ -$jobs\ -$os\ -$time\ -[](bg:#DA627D fg:#9A348E)\ -$username\ -$hostname\ -[](fg:#DA627D bg:#FCA17D)\ -$directory\ -$git_branch\ -$git_status\ -[](fg:#FCA17D bg:#86BBD8)\ -$custom\ -$bun\ -$c\ -$cmake\ -$cobol\ -$daml\ -$dart\ -$deno\ -$dotnet\ -$elixir\ -$elm\ -$erlang\ -$fennel\ -$gleam\ -$golang\ -$guix_shell\ -$haskell\ -$haxe\ -$helm\ -$java\ -$julia\ -$kotlin\ -$gradle\ -$lua\ -$nim\ -$nodejs\ -$ocaml\ -$opa\ -$perl\ -$php\ -$pulumi\ -$purescript\ -$python\ -$quarto\ -$raku\ -$rlang\ -$red\ -$ruby\ -$rust\ -$scala\ -$solidity\ -$swift\ -$terraform\ -$typst\ -$vlang\ -$vagrant\ -$zig\ -[](fg:#86BBD8) -$character\ -$shell\ -[](fg:#06969A)\ -""" -# }}} - -# {{{ TODO: -# -# $buf\ -# $nix_shell\ -# $conda\ -# $meson\ -# $spack\ -# $memory_usage\ -# $aws\ -# $gcloud\ -# $openstack\ -# $azure\ -# $nats\ -# $direnv\ -# $env_var\ -# $crystal\ -# $sudo\ -# $cmd_duration\ -# $line_break\ -# $battery\ -# $container\ -# }}} - -# Disable the blank line at the start of the prompt -# add_newline = false - -# You can also replace your username with a neat symbol like  or disable this -# and use the os module below - -# {{{ Part 1 -[jobs] -style = "bg:#9A348E" -format = '[$symbol $number]($style)' - -[os] -style = "bg:#9A348E" -format = '[ $symbol ]($style)' -disabled = false # Disabled by default - -[os.symbols] -Alpaquita = " " -Alpine = " " -AlmaLinux = " " -Amazon = " " -Android = " " -Arch = " " -Artix = " " -CentOS = " " -Debian = " " -DragonFly = " " -Emscripten = " " -EndeavourOS = " " -Fedora = " " -FreeBSD = " " -Garuda = "󰛓 " -Gentoo = " " -HardenedBSD = "󰞌 " -Illumos = "󰈸 " -Kali = " " -Linux = " " -Mabox = " " -Macos = " " -Manjaro = " " -Mariner = " " -MidnightBSD = " " -Mint = " " -NetBSD = " " -NixOS = " " -OpenBSD = "󰈺 " -openSUSE = " " -OracleLinux = "󰌷 " -Pop = " " -Raspbian = " " -Redhat = " " -RedHatEnterprise = " " -RockyLinux = " " -Redox = "󰀘 " -Solus = "󰠳 " -SUSE = " " -Ubuntu = " " -Unknown = " " -Void = " " -Windows = "󰍲 " - -[time] -disabled = false -time_format = "%R" # Hour:Minute Format -# style = "bg:#33658A" -style = "bg:#9A348E" -format = '[$time ]($style)' -# }}} - -# {{{ Part 2 -[username] -show_always = true -style_user = "bg:#DA627D" -style_root = "bg:#DA627D" -# style_user = "bg:#9A348E" -# style_root = "bg:#9A348E" -format = '[ $user ]($style)' -disabled = false - - -[hostname] -ssh_only = false -# format = '[$ssh_symbol](bold blue) [$hostname](bold red) ' -style = "bg:#DA627D" -format = '[@ $hostname ]($style)' -trim_at = '.companyname.com' -disabled = false - - -# }}} - -# {{{ Part 3 -[directory] -style = "bg:#FCA17D fg:#035E82" -format = "[ $path ]($style)" -fish_style_pwd_dir_length = 1 -# truncation_length = 100 -truncation_length = 2 -truncation_symbol = ":" -truncate_to_repo = true - -# Here is how you can shorten some long paths by text replacementtruncation_symbol = ":" -# similar to mapped_locations in Oh My Posh: -[directory.substitutions] -# "Documents" = "󰈙 " -# "Downloads" = " " -# "Music" = " " -# "Pictures" = " " -# "Source" = " " -# ".dotfiles" = " " -# Keep in mind that the order matters. For example: -# "Important Documents" = " 󰈙 " -# will not be replaced, because "Documents" was already substituted before. -# So either put "Important Documents" before "Documents" or use the substituted version: -# "Important 󰈙 " = " 󰈙 " - -[git_branch] -symbol = "" -style = "bg:#FCA17D fg:#035E82" -format = '[ $symbol $branch ]($style)' - -[git_status] -style = "bg:#FCA17D fg:#035E82" -renamed = " " -modified = " " -staged = " " -deleted = " " -format = '[$all_status$ahead_behind ]($style)' -# }}} - -# {{{ Part 4 - - -[custom.just] -detect_files = ["Justfile", "justfile", ".Justfile", ".justfile"] -style = "bg:#86BBD8 fg:#794427" -format = "[ Just ]($style)" - -[custom.dotenv] -detect_files = [ - ".env", - ".env.local", - ".env.development", - ".env.test", - ".env.production", - ".env.staging", -] -style = "bg:#86BBD8 fg:#794427" -format = "[  ]($style)" -[custom.tex] -detect_extensions = ["tex", "bib"] -style = "bg:#86BBD8 fg:#794427" -format = "[  ]($style)" -[custom.readme] -detect_files = [ - "README.md", - "readme.md", - "README", - "readme", - "README.org", - "readme.org", -] -style = "bg:#86BBD8 fg:#794427" -format = "[ 󰂺 ]($style)" -[c] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[cmake] -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[dart] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[deno] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[dotnet] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' -detect_extensions = [ - "sln", - "csproj", - "fsproj", - "xproj", - "vbproj", - "cs", - "csx", - "fs", - "fsx", -] - -[docker_context] -symbol = " " -style = "bg:#06969A" -format = '[ $symbol $context ]($style)' - -[elixir] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[elm] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[golang] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[gradle] -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[haskell] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[java] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[julia] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[lua] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[nodejs] -symbol = "" -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[nim] -symbol = "󰆥 " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[rust] -symbol = "" -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[scala] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[python] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[ruby] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[bun] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[typst] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[zig] -symbol = "↯ " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -[kotlin] -symbol = " " -style = "bg:#86BBD8 fg:#794427" -format = '[ $symbol ($version) ]($style)' - -# }}} - -# {{{ Part 5 -[shell] -style = "bg:#06969A" -format = '[ $indicator ]($style)' -fish_indicator = "󰈺 " -bash_indicator = '\$ ' -zsh_indicator = "% " -powershell_indicator = "PS" -cmd_indicator = "cm" -nu_indicator = "nu" -disabled = false - -[character] -success_symbol = "[ ](bg:#33658A)[](fg:#33658A bg:#06969A)" -error_symbol = "[  ](fg:bold red bg:#33658A)[](fg:#33658A bg:#06969A)" -vimcmd_symbol = "[  ](fg:#32ff6c bg:#33658A)[](fg:#33658A bg:#06969A)" -vimcmd_visual_symbol = "[  ](fg:bold yellow bg:#33658A)[](fg:#33658A bg:#06969A)" -vimcmd_replace_symbol = "[  ](fg:bold purple bg:#33658A)[](fg:#33658A bg:#06969A)" -vimcmd_replace_one_symbol = "[  ](fg:bold purple bg:#33658A)[](fg:#33658A bg:#06969A)" -# success_symbol = "[ ](bg:#33658A)[](fg:#33658A bg:#06969A)" -# success_symbol = "[](fg:#86BBD8 bg:#33658A)" -format = "$symbol" -disabled = false -# }}} - -# {{{ Misc - -[palettes.catppuccin_mocha] -rosewater = "#f5e0dc" -flamingo = "#f2cdcd" -pink = "#f5c2e7" -mauve = "#cba6f7" -red = "#f38ba8" -maroon = "#eba0ac" -peach = "#fab387" -yellow = "#f9e2af" -green = "#a6e3a1" -teal = "#94e2d5" -sky = "#89dceb" -sapphire = "#74c7ec" -blue = "#89b4fa" -lavender = "#b4befe" -text = "#cdd6f4" -subtext1 = "#bac2de" -subtext0 = "#a6adc8" -overlay2 = "#9399b2" -overlay1 = "#7f849c" -overlay0 = "#6c7086" -surface2 = "#585b70" -surface1 = "#45475a" -surface0 = "#313244" -base = "#1e1e2e" -mantle = "#181825" -crust = "#11111b" - -# }}} diff --git a/common/vim.noxdg.vimrc b/common/vim.noxdg.vimrc deleted file mode 100644 index 08b99b8..0000000 --- a/common/vim.noxdg.vimrc +++ /dev/null @@ -1,60 +0,0 @@ - -" Source a global configuration file if available -if filereadable("/etc/vim/vimrc.local") - source /etc/vim/vimrc.local -endif - -" 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 -nnoremap N 5j -nnoremap E 5k -vnoremap H ^ -xnoremap H ^ -onoremap H ^ -vnoremap I $ -xnoremap I $ -onoremap I $ -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 -set ignorecase -set smartcase -set showcmd -set mouse=a " Enable mouse usage (all modes) - -set number -set relativenumber - -set laststatus=2 -set showcmd -set statusline=%<%f\ %h%m%r\ %=\ [%l,%v]\ [%p%%]\ [\ %Y]\ [󱑉\ %{strftime('%H:%M:%S')}] - -syntax on diff --git a/common/vimrc b/common/vimrc deleted file mode 100644 index 8bac7e8..0000000 --- a/common/vimrc +++ /dev/null @@ -1,74 +0,0 @@ -" $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 -nnoremap N 5j -nnoremap E 5k -vnoremap H ^ -xnoremap H ^ -onoremap H ^ -vnoremap I $ -xnoremap I $ -onoremap I $ -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 -set ignorecase -set smartcase - -set number -set relativenumber - -set laststatus=2 -set showcmd -set statusline=%<%f\ %h%m%r\ %=\ [%l,%v]\ [%p%%]\ [\ %Y]\ [󱑉\ %{strftime('%H:%M:%S')}] - - -" 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 -" Leader -let mapleader = "\" -nnoremap :FZF -" Misc -syntax on diff --git a/common/wakatime.example.cfg b/common/wakatime.example.cfg deleted file mode 100644 index 4d3410b..0000000 --- a/common/wakatime.example.cfg +++ /dev/null @@ -1,19 +0,0 @@ - -[settings] -api_key = FILL_YOUR_API_KEY_HERE -exclude = - ^COMMIT_EDITMSG$ - ^TAG_EDITMSG$ - *.md - *.org - *.txt - *.log -include = - readme.md - README.md - readme.org - README.org - readme.txt - README.txt - readme - README diff --git a/home/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl new file mode 100644 index 0000000..140a8b9 --- /dev/null +++ b/home/.chezmoi.toml.tmpl @@ -0,0 +1,17 @@ +{{/* https://github.com/twpayne/dotfiles/blob/master/home/.chezmoi.toml.tmpl */}} +{{- $headless := false -}} + +{{/* darwin hostname hack */}} +{{- $hostname := .chezmoi.hostname -}} +{{- if eq .chezmoi.os "darwin" -}} +{{- $hostname := output "scutil" "--get" "LocalHostName" | trim -}} +{{- end -}} + +sourceDir = "~/.dotfiles" + +{{ $email := promptStringOnce . "email" "What is your email address" -}} +{{ $username := promptStringOnce . "username" "What is your username" -}} + +[data] + email = {{ $email | quote }} + username = {{ $username | quote }} \ No newline at end of file diff --git a/home/.chezmoiignore.tmpl b/home/.chezmoiignore.tmpl new file mode 100644 index 0000000..49898d6 --- /dev/null +++ b/home/.chezmoiignore.tmpl @@ -0,0 +1,61 @@ + +scripts +.chezmoiscripts/* + + +{{ if ne .chezmoi.os "linux" }} +.config/awesome +.config/dunst +.config/fcitx5 +.config/hypr +.config/keyd +.config/mako +.config/readline +.config/rofi +.config/swaylock +.config/waybar +.config/wlogout +.config/krunnerrc +.config/systemd +.config/user-dirs.dirs +.config/user-dirs.locale +.local/share/kio/ +{{ end }} + +{{ if eq .chezmoi.os "linux" }} +{{ if ne .chezmoi.osRelease.id "arch" }} +.config/*-flags.conf +{{ end }} +{{ if eq .chezmoi.osRelease.id "nixos" }} +.config/bash +.config/bat +.config/doom +.config/dunst +.config/fastfetch +.config/fcitx5 +.config/fish +.config/zsh +.config/lsd +.config/keyd +.config/readline +.config/krunnerrc +.bashrc +{{ end }} +{{ end }} + +{{ if ne .chezmoi.os "darwin" }} +Library +.config/karabiner +.config/sketchybar +.config/skhd +.config/yabai +.config/powershell +{{ end }} + +{{ if ne .chezmoi.os "windows" }} +.gitconfig +.glzr +.wslconfig +.wslgconfig +Appdata/ +{{ end }} diff --git a/home/.chezmoiscripts/run_once_bash.sh b/home/.chezmoiscripts/run_once_bash.sh new file mode 100644 index 0000000..6f6af51 --- /dev/null +++ b/home/.chezmoiscripts/run_once_bash.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# shellcheck shell=sh + +sudo cp $CHEZMOI_SOURCE_DIR/dot_config/bash/xdg-compat.sh /etc/profile.d/xdg-compat.sh diff --git a/home/.chezmoiscripts/run_once_bat.sh b/home/.chezmoiscripts/run_once_bat.sh new file mode 100644 index 0000000..5fac4b6 --- /dev/null +++ b/home/.chezmoiscripts/run_once_bat.sh @@ -0,0 +1,11 @@ +#!/bin/sh + + +if command -v bat > /dev/null 2>&1; then + mkdir -p "$(bat --config-dir)/themes" + wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Latte.tmTheme + wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Frappe.tmTheme + wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Macchiato.tmTheme + wget -P "$(bat --config-dir)/themes" https://github.com/catppuccin/bat/raw/main/themes/Catppuccin%20Mocha.tmTheme +fi + diff --git a/home/.chezmoiscripts/run_once_fish.sh b/home/.chezmoiscripts/run_once_fish.sh new file mode 100644 index 0000000..7dd6b1f --- /dev/null +++ b/home/.chezmoiscripts/run_once_fish.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +curl https://raw.githubusercontent.com/SpaceAceMonkey/dotenv-for-fish/refs/heads/main/dotenv.fish -o "$CHEZMOI_SOURCE_DIR/dot_config/fish/functions/dotenv.fish" diff --git a/home/.chezmoiscripts/run_once_fonts.sh b/home/.chezmoiscripts/run_once_fonts.sh new file mode 100644 index 0000000..4a38564 --- /dev/null +++ b/home/.chezmoiscripts/run_once_fonts.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +curl -L https://github.com/lxgw/LxgwWenKai/releases/download/v1.520/lxgw-wenkai-v1.520.zip -o /tmp/lxgw-wenkai.zip +unzip /tmp/lxgw-wenkai.zip -d ~/.local/share/fonts/ + +curl -L https://github.com/lxgw/LxgwNeoXiHei/releases/download/v1.223/LXGWNeoXiHeiPlus.ttf -o /tmp/lxgw-xihei.zip +unzip /tmp/lxgw-xihei.zip -d ~/.local/share/fonts/ + +curl -L https://github.com/subframe7536/maple-font/releases/download/v7.7/MapleMono-NF-CN-unhinted.zip -o /tmp/maple-mono.zip +unzip /tmp/maple-mono.zip -d ~/.local/share/fonts/ + +fc-cache -fv diff --git a/home/.chezmoiscripts/run_once_nvim.sh b/home/.chezmoiscripts/run_once_nvim.sh new file mode 100644 index 0000000..02ffe19 --- /dev/null +++ b/home/.chezmoiscripts/run_once_nvim.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# shellcheck shell=sh + +if command -v nvim > /dev/null 2>&1; then + nvim --headless +checkhealth +"w nvim-healthcheck.txt" +qall +fi diff --git a/home/.chezmoiscripts/run_once_rtorrent.sh b/home/.chezmoiscripts/run_once_rtorrent.sh new file mode 100644 index 0000000..64ed218 --- /dev/null +++ b/home/.chezmoiscripts/run_once_rtorrent.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh + +XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" + +mkdir -p $XDG_DATA_HOME/rtorrent/session +mkdir -p $XDG_DATA_HOME/rtorrent/watch + diff --git a/home/.chezmoiscripts/run_once_vim.sh b/home/.chezmoiscripts/run_once_vim.sh new file mode 100644 index 0000000..5b22bb0 --- /dev/null +++ b/home/.chezmoiscripts/run_once_vim.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" +XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}" + + +mkdir -p $XDG_DATA_HOME/vim/after +mkdir -p $XDG_STATE_HOME/vim/{backup,swap,undo,view} + diff --git a/home/.chezmoiscripts/run_once_yazi.sh b/home/.chezmoiscripts/run_once_yazi.sh new file mode 100644 index 0000000..4085fa1 --- /dev/null +++ b/home/.chezmoiscripts/run_once_yazi.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +if command -v yazi > /dev/null 2>&1; then + ya pkg add llanosrocas/yaziline + ya pkg add yazi-rs/plugins:git + ya pkg add Rolv-Apneseth/starship +fi +exit 0 + diff --git a/home/.chezmoiscripts/run_once_zsh-install-plugins.sh b/home/.chezmoiscripts/run_once_zsh-install-plugins.sh new file mode 100644 index 0000000..6286776 --- /dev/null +++ b/home/.chezmoiscripts/run_once_zsh-install-plugins.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" + +test -d "$XDG_CONFIG_HOME/zsh/plugins/zsh-autosuggestions" || git clone --depth 1 https://github.com/zsh-users/zsh-autosuggestions.git "$XDG_CONFIG_HOME/zsh/plugins/zsh-autosuggestions" +test -d "$XDG_CONFIG_HOME/zsh/plugins/zsh-syntax-highlighting" || git clone --depth 1 https://github.com/zsh-users/zsh-syntax-highlighting.git "$XDG_CONFIG_HOME/zsh/plugins/zsh-syntax-highlighting" +test -d "$XDG_CONFIG_HOME/zsh/plugins/zsh-history-substring-search" || git clone --depth 1 https://github.com/zsh-users/zsh-history-substring-search.git "$XDG_CONFIG_HOME/zsh/plugins/zsh-history-substring-search" +test -d "$XDG_CONFIG_HOME/zsh/plugins/zsh-completions" || git clone --depth 1 https://github.com/zsh-users/zsh-completions.git "$XDG_CONFIG_HOME/zsh/plugins/zsh-completions" + diff --git a/home/.chezmoiscripts/run_once_zsh-set-env.sh b/home/.chezmoiscripts/run_once_zsh-set-env.sh new file mode 100644 index 0000000..edb4b9f --- /dev/null +++ b/home/.chezmoiscripts/run_once_zsh-set-env.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" + +if [ -f /etc/zshenv ]; then + sudo cp "$CHEZMOI_SOURCE_DIR/dot_config/zsh/global.zshenv" /etc/zshenv +fi + +if [ -f /etc/zsh/zshenv ]; then + sudo cp "$CHEZMOI_SOURCE_DIR/dot_config/zsh/global.zshenv" /etc/zsh/zshenv +fi + +mkdir -p $XDG_STATE_HOME/zsh diff --git a/platforms/win/komorebi/komorebi.ahk b/home/Appdata/Roaming/komorebi/komorebi.ahk similarity index 100% rename from platforms/win/komorebi/komorebi.ahk rename to home/Appdata/Roaming/komorebi/komorebi.ahk diff --git a/platforms/win/komorebi/komorebi.bar.json b/home/Appdata/Roaming/komorebi/komorebi.bar.json similarity index 100% rename from platforms/win/komorebi/komorebi.bar.json rename to home/Appdata/Roaming/komorebi/komorebi.bar.json diff --git a/platforms/win/komorebi/komorebi.json b/home/Appdata/Roaming/komorebi/komorebi.json similarity index 100% rename from platforms/win/komorebi/komorebi.json rename to home/Appdata/Roaming/komorebi/komorebi.json diff --git a/common/NuGet.Config b/home/dot_config/NuGet/nuget.config old mode 100755 new mode 100644 similarity index 78% rename from common/NuGet.Config rename to home/dot_config/NuGet/nuget.config index 4a9acec..81596d1 --- a/common/NuGet.Config +++ b/home/dot_config/NuGet/nuget.config @@ -1,6 +1,6 @@ - - - - - + + + + + \ No newline at end of file diff --git a/platforms/linux/awesome/rc.lua b/home/dot_config/awesome/rc.lua similarity index 100% rename from platforms/linux/awesome/rc.lua rename to home/dot_config/awesome/rc.lua diff --git a/tools/bash/bash_aliases b/home/dot_config/bash/bash_aliases similarity index 100% rename from tools/bash/bash_aliases rename to home/dot_config/bash/bash_aliases diff --git a/tools/bash/bashrc b/home/dot_config/bash/bashrc similarity index 100% rename from tools/bash/bashrc rename to home/dot_config/bash/bashrc diff --git a/tools/bash/global.bashrc b/home/dot_config/bash/global.bashrc similarity index 100% rename from tools/bash/global.bashrc rename to home/dot_config/bash/global.bashrc diff --git a/tools/bash/profile b/home/dot_config/bash/profile similarity index 100% rename from tools/bash/profile rename to home/dot_config/bash/profile diff --git a/tools/bash/xdg-compat.sh b/home/dot_config/bash/xdg-compat.sh similarity index 100% rename from tools/bash/xdg-compat.sh rename to home/dot_config/bash/xdg-compat.sh diff --git a/common/bat.config.dark b/home/dot_config/bat/bat.config.dark similarity index 100% rename from common/bat.config.dark rename to home/dot_config/bat/bat.config.dark diff --git a/common/bat.config.light b/home/dot_config/bat/bat.config.light similarity index 100% rename from common/bat.config.light rename to home/dot_config/bat/bat.config.light diff --git a/home/dot_config/bat/symlink_bat.config b/home/dot_config/bat/symlink_bat.config new file mode 100644 index 0000000..51b80b1 --- /dev/null +++ b/home/dot_config/bat/symlink_bat.config @@ -0,0 +1 @@ +bat.config.dark diff --git a/platforms/linux/chromium-flags.conf b/home/dot_config/chromium-flags.conf similarity index 100% rename from platforms/linux/chromium-flags.conf rename to home/dot_config/chromium-flags.conf diff --git a/common/condarc.yaml b/home/dot_config/conda/dot_condarc similarity index 97% rename from common/condarc.yaml rename to home/dot_config/conda/dot_condarc index 5c7ef3f..4e9da9b 100644 --- a/common/condarc.yaml +++ b/home/dot_config/conda/dot_condarc @@ -1,14 +1,14 @@ -# $DOTFILES/common/condarc.yaml -# Date: 2024-12-22 -# Author: js0ny - -# Location: -# $XDG_CONFIG_HOME/conda/.condarc -# Linking: -# ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc -# ================================================================================ -# Reference: -# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html - -# Use system python by default for better script compatibility -auto_activate_base: false +# $DOTFILES/common/condarc.yaml +# Date: 2024-12-22 +# Author: js0ny + +# Location: +# $XDG_CONFIG_HOME/conda/.condarc +# Linking: +# ln -s $DOTFILES/.config/conda/condarc.yaml $XDG_CONFIG_HOME/conda/.condarc +# ================================================================================ +# Reference: +# https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/use-condarc.html + +# Use system python by default for better script compatibility +auto_activate_base: false diff --git a/tools/doom/beancount.el b/home/dot_config/doom/beancount.el similarity index 100% rename from tools/doom/beancount.el rename to home/dot_config/doom/beancount.el diff --git a/tools/doom/calendar.el b/home/dot_config/doom/calendar.el similarity index 100% rename from tools/doom/calendar.el rename to home/dot_config/doom/calendar.el diff --git a/tools/doom/config.el b/home/dot_config/doom/config.el similarity index 100% rename from tools/doom/config.el rename to home/dot_config/doom/config.el diff --git a/home/dot_config/doom/dot_custom.el b/home/dot_config/doom/dot_custom.el new file mode 100644 index 0000000..418534a --- /dev/null +++ b/home/dot_config/doom/dot_custom.el @@ -0,0 +1,13 @@ +;;; -*- lexical-binding: t -*- +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(auth-source-save-behavior nil)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) diff --git a/tools/doom/.gitignore b/home/dot_config/doom/dot_gitignore similarity index 100% rename from tools/doom/.gitignore rename to home/dot_config/doom/dot_gitignore diff --git a/tools/doom/evil.el b/home/dot_config/doom/evil.el similarity index 100% rename from tools/doom/evil.el rename to home/dot_config/doom/evil.el diff --git a/tools/doom/init.el b/home/dot_config/doom/init.el similarity index 100% rename from tools/doom/init.el rename to home/dot_config/doom/init.el diff --git a/tools/doom/lisp/org-pomodoro-music-controller.el b/home/dot_config/doom/lisp/org-pomodoro-music-controller.el similarity index 100% rename from tools/doom/lisp/org-pomodoro-music-controller.el rename to home/dot_config/doom/lisp/org-pomodoro-music-controller.el diff --git a/tools/doom/lisp/org-pomodoro-telegram-notifier.el b/home/dot_config/doom/lisp/org-pomodoro-telegram-notifier.el similarity index 100% rename from tools/doom/lisp/org-pomodoro-telegram-notifier.el rename to home/dot_config/doom/lisp/org-pomodoro-telegram-notifier.el diff --git a/tools/doom/org.el b/home/dot_config/doom/org.el similarity index 100% rename from tools/doom/org.el rename to home/dot_config/doom/org.el diff --git a/tools/doom/packages.el b/home/dot_config/doom/packages.el similarity index 100% rename from tools/doom/packages.el rename to home/dot_config/doom/packages.el diff --git a/tools/doom/snippets/org-mode/align-math b/home/dot_config/doom/snippets/org-mode/align-math similarity index 100% rename from tools/doom/snippets/org-mode/align-math rename to home/dot_config/doom/snippets/org-mode/align-math diff --git a/tools/doom/snippets/org-mode/display-math b/home/dot_config/doom/snippets/org-mode/display-math similarity index 100% rename from tools/doom/snippets/org-mode/display-math rename to home/dot_config/doom/snippets/org-mode/display-math diff --git a/tools/doom/snippets/org-mode/inline-math b/home/dot_config/doom/snippets/org-mode/inline-math similarity index 100% rename from tools/doom/snippets/org-mode/inline-math rename to home/dot_config/doom/snippets/org-mode/inline-math diff --git a/tools/doom/snippets/org-mode/limit b/home/dot_config/doom/snippets/org-mode/limit similarity index 100% rename from tools/doom/snippets/org-mode/limit rename to home/dot_config/doom/snippets/org-mode/limit diff --git a/tools/doom/snippets/org-mode/summation b/home/dot_config/doom/snippets/org-mode/summation similarity index 100% rename from tools/doom/snippets/org-mode/summation rename to home/dot_config/doom/snippets/org-mode/summation diff --git a/tools/doom/snippets/org-mode/unnumbered b/home/dot_config/doom/snippets/org-mode/unnumbered similarity index 100% rename from tools/doom/snippets/org-mode/unnumbered rename to home/dot_config/doom/snippets/org-mode/unnumbered diff --git a/tools/doom/telega.el b/home/dot_config/doom/telega.el similarity index 100% rename from tools/doom/telega.el rename to home/dot_config/doom/telega.el diff --git a/tools/doom/treemacs.el b/home/dot_config/doom/treemacs.el similarity index 100% rename from tools/doom/treemacs.el rename to home/dot_config/doom/treemacs.el diff --git a/platforms/linux/dunstrc b/home/dot_config/dunst/dunstrc similarity index 100% rename from platforms/linux/dunstrc rename to home/dot_config/dunst/dunstrc diff --git a/platforms/linux/electron-flags.conf b/home/dot_config/electron-flags.conf similarity index 100% rename from platforms/linux/electron-flags.conf rename to home/dot_config/electron-flags.conf diff --git a/platforms/linux/fastfetch.jsonc b/home/dot_config/fastfetch/config.jsonc similarity index 97% rename from platforms/linux/fastfetch.jsonc rename to home/dot_config/fastfetch/config.jsonc index f2df0ef..3295236 100644 --- a/platforms/linux/fastfetch.jsonc +++ b/home/dot_config/fastfetch/config.jsonc @@ -3,7 +3,7 @@ "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", "logo": { // "type": "auto", - "source": "arch_small", + "source": "fedora_small", "padding": { "top": 2, "left": 1, @@ -58,4 +58,4 @@ "poweradapter", "locale" ] -} \ No newline at end of file +} diff --git a/home/dot_config/fcitx5/conf/cached_layouts b/home/dot_config/fcitx5/conf/cached_layouts new file mode 100644 index 0000000..578b704 --- /dev/null +++ b/home/dot_config/fcitx5/conf/cached_layouts @@ -0,0 +1,3710 @@ +[keyboard-bqn] +Description="Keyboard - BQN" +Language=en +Label=bqn + +[keyboard-apl] +Description="Keyboard - APL" +Language=en +Label=apl + +[keyboard-apl-dyalog] +Description="Keyboard - APL - APL symbols (Dyalog APL)" +Language=en +Label="dlg (dyalog)" + +[keyboard-apl-sax] +Description="Keyboard - APL - APL symbols (SAX, Sharp APL for Unix)" +Language=en +Label=sax + +[keyboard-apl-unified] +Description="Keyboard - APL - APL symbols (unified)" +Language=en +Label="ufd (unified)" + +[keyboard-apl-apl2] +Description="Keyboard - APL - APL symbols (IBM APL2)" +Language=en +Label=apl2 + +[keyboard-apl-aplplusII] +Description="Keyboard - APL - APL symbols (Manugistics APL*PLUS II)" +Language=en +Label="aplII (aplplusII)" + +[keyboard-apl-aplx] +Description="Keyboard - APL - APL symbols (APLX unified)" +Language=en +Label=aplx + +[keyboard-ua] +Description="Keyboard - Ukrainian" +Language=uk +Label=uk + +[keyboard-ua-phonetic] +Description="Keyboard - Ukrainian - Ukrainian (phonetic)" +Language=uk +Label="ua (phonetic)" + +[keyboard-ua-typewriter] +Description="Keyboard - Ukrainian - Ukrainian (typewriter)" +Language=uk +Label="ua (typewriter)" + +[keyboard-ua-winkeys] +Description="Keyboard - Ukrainian - Ukrainian (Windows)" +Language=uk +Label="ua (winkeys)" + +[keyboard-ua-macOS] +Description="Keyboard - Ukrainian - Ukrainian (macOS)" +Language=uk +Label="ua (macOS)" + +[keyboard-ua-legacy] +Description="Keyboard - Ukrainian - Ukrainian (legacy)" +Language=uk +Label="ua (legacy)" + +[keyboard-ua-homophonic] +Description="Keyboard - Ukrainian - Ukrainian (homophonic)" +Language=uk +Label="ua (homophonic)" + +[keyboard-ua-crh] +Description="Keyboard - Ukrainian - Crimean Tatar (Turkish Q)" +Language=crh +Label=crh + +[keyboard-ua-crh_f] +Description="Keyboard - Ukrainian - Crimean Tatar (Turkish F)" +Language=crh +Label="crh (crh_f)" + +[keyboard-ua-crh_alt] +Description="Keyboard - Ukrainian - Crimean Tatar (Turkish Alt-Q)" +Language=crh +Label="crh (crh_alt)" + +[keyboard-ua-sun_type6] +Description="Keyboard - Ukrainian - Ukrainian (Sun Type 6/7)" +Language=uk +Label="ua (sun_type6)" + +[keyboard-th] +Description="Keyboard - Thai" +Language=th +Label=th + +[keyboard-th-tis] +Description="Keyboard - Thai - Thai (TIS-820.2538)" +Language=th +Label="th (tis)" + +[keyboard-th-pat] +Description="Keyboard - Thai - Thai (Pattachote)" +Language=th +Label="th (pat)" + +[keyboard-tz] +Description="Keyboard - Swahili (Tanzania)" +Language=sw +Label=sw + +[keyboard-latam] +Description="Keyboard - Spanish (Latin American)" +Language=es +Label=es + +[keyboard-latam-nodeadkeys] +Description="Keyboard - Spanish (Latin American) - Spanish (Latin American, no dead keys)" +Language=es +Label="latam (nodeadkeys)" + +[keyboard-latam-deadtilde] +Description="Keyboard - Spanish (Latin American) - Spanish (Latin American, dead tilde)" +Language=es +Label="latam (deadtilde)" + +[keyboard-latam-dvorak] +Description="Keyboard - Spanish (Latin American) - Spanish (Latin American, Dvorak)" +Language=es +Label="latam (dvorak)" + +[keyboard-latam-colemak] +Description="Keyboard - Spanish (Latin American) - Spanish (Latin American, Colemak)" +Language=es +Label="latam (colemak)" + +[keyboard-sk] +Description="Keyboard - Slovak" +Language=sk +Label=sk + +[keyboard-sk-bksl] +Description="Keyboard - Slovak - Slovak (extra backslash)" +Language=sk +Label="sk (bksl)" + +[keyboard-sk-qwerty] +Description="Keyboard - Slovak - Slovak (QWERTY)" +Language=sk +Label="sk (qwerty)" + +[keyboard-sk-qwerty_bksl] +Description="Keyboard - Slovak - Slovak (QWERTY, extra backslash)" +Language=sk +Label="sk (qwerty_bksl)" + +[keyboard-sk-acc] +Description="Keyboard - Slovak - Slovak (ACC layout, only accented letters)" +Language=sk +Label="sk (acc)" + +[keyboard-sk-sun_type6] +Description="Keyboard - Slovak - Slovak (Sun Type 6/7)" +Language=sk +Label="sk (sun_type6)" + +[keyboard-ru] +Description="Keyboard - Russian" +Language=ru +Label=ru + +[keyboard-ru-phonetic] +Description="Keyboard - Russian - Russian (phonetic)" +Language=ru +Label="ru (phonetic)" + +[keyboard-ru-phonetic_winkeys] +Description="Keyboard - Russian - Russian (phonetic, Windows)" +Language=ru +Label="ru (phonetic_winkeys)" + +[keyboard-ru-phonetic_YAZHERTY] +Description="Keyboard - Russian - Russian (phonetic, YAZHERTY)" +Language=ru +Label="ru (phonetic_YAZHERTY)" + +[keyboard-ru-phonetic_azerty] +Description="Keyboard - Russian - Russian (phonetic, AZERTY)" +Language=ru +Label="ru (phonetic_azerty)" + +[keyboard-ru-phonetic_dvorak] +Description="Keyboard - Russian - Russian (phonetic, Dvorak)" +Language=ru +Label="ru (phonetic_dvorak)" + +[keyboard-ru-typewriter] +Description="Keyboard - Russian - Russian (typewriter)" +Language=ru +Label="ru (typewriter)" + +[keyboard-ru-ruchey_ru] +Description="Keyboard - Russian - Russian (engineering, RU)" +Language=ru +Label="ru (ruchey_ru)" + +[keyboard-ru-ruchey_en] +Description="Keyboard - Russian - Russian (engineering, EN)" +Language=ru +Label="en (ruchey_en)" + +[keyboard-ru-legacy] +Description="Keyboard - Russian - Russian (legacy)" +Language=ru +Label="ru (legacy)" + +[keyboard-ru-typewriter-legacy] +Description="Keyboard - Russian - Russian (typewriter, legacy)" +Language=ru +Label="ru (typewriter-legacy)" + +[keyboard-ru-dos] +Description="Keyboard - Russian - Russian (DOS)" +Language=ru +Label="ru (dos)" + +[keyboard-ru-mac] +Description="Keyboard - Russian - Russian (Macintosh)" +Language=ru +Label="ru (mac)" + +[keyboard-ru-ab] +Description="Keyboard - Russian - Abkhazian (Russia)" +Language=ab +Label="ru (ab)" + +[keyboard-ru-bak] +Description="Keyboard - Russian - Bashkirian" +Language=ba +Label="ru (bak)" + +[keyboard-ru-cv] +Description="Keyboard - Russian - Chuvash" +Language=cv +Label="ru (cv)" + +[keyboard-ru-cv_latin] +Description="Keyboard - Russian - Chuvash (Latin)" +Language=cv +Label="ru (cv_latin)" + +[keyboard-ru-xal] +Description="Keyboard - Russian - Kalmyk" +Language=xal +Label="ru (xal)" + +[keyboard-ru-kom] +Description="Keyboard - Russian - Komi" +Language=kv +Label="ru (kom)" + +[keyboard-ru-chm] +Description="Keyboard - Russian - Mari" +Language=chm +Label="ru (chm)" + +[keyboard-ru-os_legacy] +Description="Keyboard - Russian - Ossetian (legacy)" +Language=os +Label="ru (os_legacy)" + +[keyboard-ru-os_winkeys] +Description="Keyboard - Russian - Ossetian (Windows)" +Language=os +Label="ru (os_winkeys)" + +[keyboard-ru-srp] +Description="Keyboard - Russian - Serbian (Russia)" +Language=ru +Label="ru (srp)" + +[keyboard-ru-tt] +Description="Keyboard - Russian - Tatar" +Language=tt +Label="ru (tt)" + +[keyboard-ru-udm] +Description="Keyboard - Russian - Udmurt" +Language=udm +Label="ru (udm)" + +[keyboard-ru-sah] +Description="Keyboard - Russian - Yakut" +Language=sah +Label="ru (sah)" + +[keyboard-ru-chu] +Description="Keyboard - Russian - Church Slavonic" +Language=cu +Label="ru (chu)" + +[keyboard-ru-ruu] +Description="Keyboard - Russian - Russian (plus Ukrainian and Belarusian letters)" +Language=ru +Label="ru (ruu)" + +[keyboard-ru-rulemak] +Description="Keyboard - Russian - Russian (Rulemak, phonetic Colemak)" +Language=ru +Label="ru (rulemak)" + +[keyboard-ru-phonetic_mac] +Description="Keyboard - Russian - Russian (phonetic, Macintosh)" +Language=ru +Label="ru (phonetic_mac)" + +[keyboard-ru-sun_type6] +Description="Keyboard - Russian - Russian (Sun Type 6/7)" +Language=ru +Label="ru (sun_type6)" + +[keyboard-ru-unipunct] +Description="Keyboard - Russian - Russian (with US punctuation)" +Language=ru +Label="ru (unipunct)" + +[keyboard-ru-gost-6431-75-48] +Description="Keyboard - Russian - Russian (GOST 6431-75)" +Language=ru +Label="ru (gost-6431-75-48)" + +[keyboard-ru-gost-14289-88] +Description="Keyboard - Russian - Russian (GOST 14289-88)" +Language=ru +Label="ru (gost-14289-88)" + +[keyboard-ru-prxn] +Description="Keyboard - Russian - Russian (Polyglot and Reactionary)" +Language=ru +Label="ru (prxn)" + +[keyboard-ru-winkeys-p] +Description="Keyboard - Russian - Russian (Programmer)" +Language=ru +Label=winkeys-p + +[keyboard-ru-typo] +Description="Keyboard - Russian - Russian (plus typographic symbols)" +Language=ru +Label="ru (typo)" + +[keyboard-ru-rtu] +Description="Keyboard - Russian - Russian (plus Tatar letters)" +Language=ru +Label="ru (rtu)" + +[keyboard-ru-diktor] +Description="Keyboard - Russian - Russian (Diktor)" +Language=ru +Label=diktor + +[keyboard-ru-ruintl_ru] +Description="Keyboard - Russian - Russian (international, RU)" +Language=ru +Label="ru (ruintl_ru)" + +[keyboard-ru-ruintl_en] +Description="Keyboard - Russian - Russian (international, EN)" +Language=en +Label="en (ruintl_en)" + +[keyboard-br] +Description="Keyboard - Portuguese (Brazil)" +Language=pt +Label=pt + +[keyboard-br-nodeadkeys] +Description="Keyboard - Portuguese (Brazil) - Portuguese (Brazil, no dead keys)" +Language=pt +Label="br (nodeadkeys)" + +[keyboard-br-dvorak] +Description="Keyboard - Portuguese (Brazil) - Portuguese (Brazil, Dvorak)" +Language=pt +Label="br (dvorak)" + +[keyboard-br-nativo] +Description="Keyboard - Portuguese (Brazil) - Portuguese (Brazil, Nativo)" +Language=pt +Label="br (nativo)" + +[keyboard-br-nativo-us] +Description="Keyboard - Portuguese (Brazil) - Portuguese (Brazil, Nativo for US keyboards)" +Language=pt +Label="br (nativo-us)" + +[keyboard-br-thinkpad] +Description="Keyboard - Portuguese (Brazil) - Portuguese (Brazil, IBM/Lenovo ThinkPad)" +Language=pt +Label="br (thinkpad)" + +[keyboard-br-nativo-epo] +Description="Keyboard - Portuguese (Brazil) - Esperanto (Brazil, Nativo)" +Language=eo +Label="br (nativo-epo)" + +[keyboard-br-rus] +Description="Keyboard - Portuguese (Brazil) - Russian (Brazil, phonetic)" +Language=ru +Label="ru (rus)" + +[keyboard-br-sun_type6] +Description="Keyboard - Portuguese (Brazil) - Portuguese (Brazil, Sun Type 6/7)" +Language=pt +Label="br (sun_type6)" + +[keyboard-ro] +Description="Keyboard - Romanian" +Language=ro +Label=ro + +[keyboard-ro-std] +Description="Keyboard - Romanian - Romanian (standard)" +Language=ro +Label="ro (std)" + +[keyboard-ro-winkeys] +Description="Keyboard - Romanian - Romanian (Windows)" +Language=ro +Label="ro (winkeys)" + +[keyboard-ro-crh_dobruja] +Description="Keyboard - Romanian - Crimean Tatar (Dobruja Q)" +Language=crh +Label="crh (crh_dobruja)" + +[keyboard-ro-ergonomic] +Description="Keyboard - Romanian - Romanian (ergonomic Touchtype)" +Language=ro +Label="ro (ergonomic)" + +[keyboard-ro-sun_type6] +Description="Keyboard - Romanian - Romanian (Sun Type 6/7)" +Language=ro +Label="ro (sun_type6)" + +[keyboard-pl] +Description="Keyboard - Polish" +Language=pl +Label=pl + +[keyboard-pl-legacy] +Description="Keyboard - Polish - Polish (legacy)" +Language=pl +Label="pl (legacy)" + +[keyboard-pl-qwertz] +Description="Keyboard - Polish - Polish (QWERTZ)" +Language=pl +Label="pl (qwertz)" + +[keyboard-pl-dvorak] +Description="Keyboard - Polish - Polish (Dvorak)" +Language=pl +Label="pl (dvorak)" + +[keyboard-pl-dvorak_quotes] +Description="Keyboard - Polish - Polish (Dvorak, with Polish quotes on quotemark key)" +Language=pl +Label="pl (dvorak_quotes)" + +[keyboard-pl-dvorak_altquotes] +Description="Keyboard - Polish - Polish (Dvorak, with Polish quotes on key 1)" +Language=pl +Label="pl (dvorak_altquotes)" + +[keyboard-pl-dvp] +Description="Keyboard - Polish - Polish (programmer Dvorak)" +Language=pl +Label="pl (dvp)" + +[keyboard-pl-csb] +Description="Keyboard - Polish - Kashubian" +Language=csb +Label="pl (csb)" + +[keyboard-pl-szl] +Description="Keyboard - Polish - Silesian" +Language=szl +Label="pl (szl)" + +[keyboard-pl-ru_phonetic_dvorak] +Description="Keyboard - Polish - Russian (Poland, phonetic Dvorak)" +Language=ru +Label="ru (ru_phonetic_dvorak)" + +[keyboard-pl-intl] +Description="Keyboard - Polish - Polish (intl., with dead keys)" +Language=pl +Label="pl (intl)" + +[keyboard-pl-colemak] +Description="Keyboard - Polish - Polish (Colemak)" +Language=pl +Label="pl (colemak)" + +[keyboard-pl-colemak_dh_ansi] +Description="Keyboard - Polish - Polish (Colemak-DH)" +Language=pl +Label="pl (colemak_dh_ansi)" + +[keyboard-pl-colemak_dh] +Description="Keyboard - Polish - Polish (Colemak-DH ISO)" +Language=pl +Label="pl (colemak_dh)" + +[keyboard-pl-sun_type6] +Description="Keyboard - Polish - Polish (Sun Type 6/7)" +Language=pl +Label="pl (sun_type6)" + +[keyboard-pl-glagolica] +Description="Keyboard - Polish - Polish (Glagolica)" +Language=pl +Label="pl (glagolica)" + +[keyboard-pl-lefty] +Description="Keyboard - Polish - Polish (lefty)" +Language=pl +Label="pl (lefty)" + +[keyboard-trans] +Description="Keyboard - International Phonetic Alphabet" +Language= +Label=ipa + +[keyboard-trans-qwerty] +Description="Keyboard - International Phonetic Alphabet - International Phonetic Alphabet (QWERTY)" +Language= +Label="trans (qwerty)" + +[keyboard-ir] +Description="Keyboard - Persian" +Language=fa +Label=fa + +[keyboard-ir-pes_keypad] +Description="Keyboard - Persian - Persian (with Persian keypad)" +Language=fa +Label="ir (pes_keypad)" + +[keyboard-ir-winkeys] +Description="Keyboard - Persian - Persian (Windows)" +Language=fa +Label="ir (winkeys)" + +[keyboard-ir-azb] +Description="Keyboard - Persian - Azerbaijani (Iran)" +Language=azb +Label=azb + +[keyboard-ir-ku] +Description="Keyboard - Persian - Kurdish (Iran, Latin Q)" +Language=ku +Label=ku + +[keyboard-ir-ku_alt] +Description="Keyboard - Persian - Kurdish (Iran, Latin Alt-Q)" +Language=ku +Label="ku (ku_alt)" + +[keyboard-ir-ku_f] +Description="Keyboard - Persian - Kurdish (Iran, F)" +Language=ku +Label="ku (ku_f)" + +[keyboard-ir-ku_ara] +Description="Keyboard - Persian - Kurdish (Iran, Arabic-Latin)" +Language=ku +Label="ku (ku_ara)" + +[keyboard-custom] +Description="Keyboard - A user-defined custom Layout" +Language=und +Label=custom + +[keyboard-no] +Description="Keyboard - Norwegian" +Language=no +Label=no + +[keyboard-no-nodeadkeys] +Description="Keyboard - Norwegian - Norwegian (no dead keys)" +Language=no +Label="no (nodeadkeys)" + +[keyboard-no-winkeys] +Description="Keyboard - Norwegian - Norwegian (Windows)" +Language=no +Label="no (winkeys)" + +[keyboard-no-mac] +Description="Keyboard - Norwegian - Norwegian (Macintosh)" +Language=no +Label="no (mac)" + +[keyboard-no-mac_nodeadkeys] +Description="Keyboard - Norwegian - Norwegian (Macintosh, no dead keys)" +Language=no +Label="no (mac_nodeadkeys)" + +[keyboard-no-colemak] +Description="Keyboard - Norwegian - Norwegian (Colemak)" +Language=no +Label="no (colemak)" + +[keyboard-no-colemak_dh] +Description="Keyboard - Norwegian - Norwegian (Colemak-DH)" +Language=no +Label="no (colemak_dh)" + +[keyboard-no-colemak_dh_wide] +Description="Keyboard - Norwegian - Norwegian (Colemak-DH Wide)" +Language=no +Label="no (colemak_dh_wide)" + +[keyboard-no-dvorak] +Description="Keyboard - Norwegian - Norwegian (Dvorak)" +Language=no +Label="no (dvorak)" + +[keyboard-no-smi] +Description="Keyboard - Norwegian - Northern Saami (Norway)" +Language=se +Label="no (smi)" + +[keyboard-no-smi_nodeadkeys] +Description="Keyboard - Norwegian - Northern Saami (Norway, no dead keys)" +Language=se +Label="no (smi_nodeadkeys)" + +[keyboard-no-sun_type6] +Description="Keyboard - Norwegian - Norwegian (Sun Type 6/7)" +Language=no +Label="no (sun_type6)" + +[keyboard-gn] +Description="Keyboard - N'Ko (AZERTY)" +Language=nqo +Label=nqo + +[keyboard-tm] +Description="Keyboard - Turkmen" +Language=tk +Label=tk + +[keyboard-tm-alt] +Description="Keyboard - Turkmen - Turkmen (Alt-Q)" +Language=tk +Label="tm (alt)" + +[keyboard-np] +Description="Keyboard - Nepali" +Language=ne +Label=ne + +[keyboard-ancient] +Description="Keyboard - Ancient" +Language=got +Label=xx + +[keyboard-ancient-got] +Description="Keyboard - Ancient - Gothic" +Language=got +Label="ancient (got)" + +[keyboard-ancient-uga] +Description="Keyboard - Ancient - Ugaritic" +Language=uga +Label="ancient (uga)" + +[keyboard-ancient-ave] +Description="Keyboard - Ancient - Avestan" +Language=ae +Label="ancient (ave)" + +[keyboard-mt] +Description="Keyboard - Maltese" +Language=mt +Label=mt + +[keyboard-mt-us] +Description="Keyboard - Maltese - Maltese (US)" +Language=mt +Label="mt (us)" + +[keyboard-mt-alt-us] +Description="Keyboard - Maltese - Maltese (US, with AltGr overrides)" +Language=mt +Label="mt (alt-us)" + +[keyboard-mt-alt-gb] +Description="Keyboard - Maltese - Maltese (UK, with AltGr overrides)" +Language=mt +Label="mt (alt-gb)" + +[keyboard-pt] +Description="Keyboard - Portuguese" +Language=pt +Label=pt + +[keyboard-pt-nodeadkeys] +Description="Keyboard - Portuguese - Portuguese (no dead keys)" +Language=pt +Label="pt (nodeadkeys)" + +[keyboard-pt-mac] +Description="Keyboard - Portuguese - Portuguese (Macintosh)" +Language=pt +Label="pt (mac)" + +[keyboard-pt-mac_nodeadkeys] +Description="Keyboard - Portuguese - Portuguese (Macintosh, no dead keys)" +Language=pt +Label="pt (mac_nodeadkeys)" + +[keyboard-pt-nativo] +Description="Keyboard - Portuguese - Portuguese (Nativo)" +Language=pt +Label="pt (nativo)" + +[keyboard-pt-nativo-us] +Description="Keyboard - Portuguese - Portuguese (Nativo for US keyboards)" +Language=pt +Label="pt (nativo-us)" + +[keyboard-pt-nativo-epo] +Description="Keyboard - Portuguese - Esperanto (Portugal, Nativo)" +Language=eo +Label="pt (nativo-epo)" + +[keyboard-pt-sun_type6] +Description="Keyboard - Portuguese - Portuguese (Sun Type 6/7)" +Language=pt +Label="pt (sun_type6)" + +[keyboard-pt-colemak] +Description="Keyboard - Portuguese - Portuguese (Colemak)" +Language=pt +Label="pt (colemak)" + +[keyboard-my] +Description="Keyboard - Malay (Jawi, Arabic Keyboard)" +Language=id +Label=ms + +[keyboard-my-phonetic] +Description="Keyboard - Malay (Jawi, Arabic Keyboard) - Malay (Jawi, phonetic)" +Language=id +Label="my (phonetic)" + +[keyboard-mk] +Description="Keyboard - Macedonian" +Language=mk +Label=mk + +[keyboard-mk-nodeadkeys] +Description="Keyboard - Macedonian - Macedonian (no dead keys)" +Language=mk +Label="mk (nodeadkeys)" + +[keyboard-kg] +Description="Keyboard - Kyrgyz" +Language=ky +Label=ki + +[keyboard-kg-phonetic] +Description="Keyboard - Kyrgyz - Kyrgyz (phonetic)" +Language=ky +Label="kg (phonetic)" + +[keyboard-tj] +Description="Keyboard - Tajik" +Language=tg +Label=tg + +[keyboard-tj-legacy] +Description="Keyboard - Tajik - Tajik (legacy)" +Language=tg +Label="tj (legacy)" + +[keyboard-mv] +Description="Keyboard - Dhivehi" +Language=dv +Label=dv + +[keyboard-lk] +Description="Keyboard - Sinhala (phonetic)" +Language=si +Label=si + +[keyboard-lk-us] +Description="Keyboard - Sinhala (phonetic) - Sinhala (US)" +Language=si +Label="si (us)" + +[keyboard-lk-tam_unicode] +Description="Keyboard - Sinhala (phonetic) - Tamil (Sri Lanka, TamilNet '99)" +Language=ta +Label="ta (tam_unicode)" + +[keyboard-lk-tam_TAB] +Description="Keyboard - Sinhala (phonetic) - Tamil (Sri Lanka, TamilNet '99, TAB encoding)" +Language=ta +Label="lk (tam_TAB)" + +[keyboard-al] +Description="Keyboard - Albanian" +Language=sq +Label=sq + +[keyboard-al-plisi] +Description="Keyboard - Albanian - Albanian (Plisi)" +Language=sq +Label="al (plisi)" + +[keyboard-al-veqilharxhi] +Description="Keyboard - Albanian - Albanian (Veqilharxhi)" +Language=sq +Label="al (veqilharxhi)" + +[keyboard-cz] +Description="Keyboard - Czech" +Language=cs +Label=cs + +[keyboard-cz-bksl] +Description="Keyboard - Czech - Czech (extra backslash)" +Language=cs +Label="cz (bksl)" + +[keyboard-cz-qwerty] +Description="Keyboard - Czech - Czech (QWERTY)" +Language=cs +Label="cz (qwerty)" + +[keyboard-cz-qwerty_bksl] +Description="Keyboard - Czech - Czech (QWERTY, extra backslash)" +Language=cs +Label="cz (qwerty_bksl)" + +[keyboard-cz-winkeys] +Description="Keyboard - Czech - Czech (QWERTZ, Windows)" +Language=cs +Label="cz (winkeys)" + +[keyboard-cz-winkeys-qwerty] +Description="Keyboard - Czech - Czech (QWERTY, Windows)" +Language=cs +Label="cz (winkeys-qwerty)" + +[keyboard-cz-qwerty-mac] +Description="Keyboard - Czech - Czech (QWERTY, Macintosh)" +Language=cs +Label="cz (qwerty-mac)" + +[keyboard-cz-ucw] +Description="Keyboard - Czech - Czech (UCW, only accented letters)" +Language=cs +Label="cz (ucw)" + +[keyboard-cz-dvorak-ucw] +Description="Keyboard - Czech - Czech (US, Dvorak, UCW support)" +Language=cs +Label="cz (dvorak-ucw)" + +[keyboard-cz-rus] +Description="Keyboard - Czech - Russian (Czechia, phonetic)" +Language=ru +Label="ru (rus)" + +[keyboard-cz-sun_type6] +Description="Keyboard - Czech - Czech (Sun Type 6/7)" +Language=cs +Label="cz (sun_type6)" + +[keyboard-cz-prog] +Description="Keyboard - Czech - Czech (programming)" +Language=cs +Label="cz (prog)" + +[keyboard-cz-prog_typo] +Description="Keyboard - Czech - Czech (programming, typographic)" +Language=cs +Label="cz (prog_typo)" + +[keyboard-cz-coder] +Description="Keyboard - Czech - Czech (coder)" +Language=cs +Label="cz (coder)" + +[keyboard-cz-colemak-ucw] +Description="Keyboard - Czech - Czech (US, Colemak, UCW support)" +Language=cs +Label="cz (colemak-ucw)" + +[keyboard-brai] +Description="Keyboard - Braille" +Language= +Label=brl + +[keyboard-brai-left_hand] +Description="Keyboard - Braille - Braille (one-handed, left)" +Language= +Label="brai (left_hand)" + +[keyboard-brai-left_hand_invert] +Description="Keyboard - Braille - Braille (one-handed, left, inverted thumb)" +Language= +Label="brai (left_hand_invert)" + +[keyboard-brai-right_hand] +Description="Keyboard - Braille - Braille (one-handed, right)" +Language= +Label="brai (right_hand)" + +[keyboard-brai-right_hand_invert] +Description="Keyboard - Braille - Braille (one-handed, right, inverted thumb)" +Language= +Label="brai (right_hand_invert)" + +[keyboard-se] +Description="Keyboard - Swedish" +Language=sv +Label=sv + +[keyboard-se-nodeadkeys] +Description="Keyboard - Swedish - Swedish (no dead keys)" +Language=sv +Label="se (nodeadkeys)" + +[keyboard-se-dvorak] +Description="Keyboard - Swedish - Swedish (Dvorak)" +Language=sv +Label="se (dvorak)" + +[keyboard-se-us_dvorak] +Description="Keyboard - Swedish - Swedish (Dvorak, intl.)" +Language=sv +Label="se (us_dvorak)" + +[keyboard-se-svdvorak] +Description="Keyboard - Swedish - Swedish (Svdvorak)" +Language=sv +Label="se (svdvorak)" + +[keyboard-se-mac] +Description="Keyboard - Swedish - Swedish (Macintosh)" +Language=sv +Label="se (mac)" + +[keyboard-se-us] +Description="Keyboard - Swedish - Swedish (US)" +Language=sv +Label="se (us)" + +[keyboard-se-swl] +Description="Keyboard - Swedish - Swedish Sign Language" +Language=swl +Label="se (swl)" + +[keyboard-se-smi] +Description="Keyboard - Swedish - Northern Saami (Sweden)" +Language=se +Label="se (smi)" + +[keyboard-se-rus] +Description="Keyboard - Swedish - Russian (Sweden, phonetic)" +Language=ru +Label="ru (rus)" + +[keyboard-se-dvorak_a5] +Description="Keyboard - Swedish - Swedish (Dvorak A5)" +Language=sv +Label="se (dvorak_a5)" + +[keyboard-se-sun_type6] +Description="Keyboard - Swedish - Swedish (Sun Type 6/7)" +Language=sv +Label="se (sun_type6)" + +[keyboard-se-ovd] +Description="Keyboard - Swedish - Elfdalian (Sweden, with combining ogonek)" +Language=ovd +Label="se (ovd)" + +[keyboard-bg] +Description="Keyboard - Bulgarian" +Language=bg +Label=bg + +[keyboard-bg-phonetic] +Description="Keyboard - Bulgarian - Bulgarian (traditional phonetic)" +Language=bg +Label="bg (phonetic)" + +[keyboard-bg-bas_phonetic] +Description="Keyboard - Bulgarian - Bulgarian (new phonetic)" +Language=bg +Label="bg (bas_phonetic)" + +[keyboard-bg-bekl] +Description="Keyboard - Bulgarian - Bulgarian (enhanced)" +Language=bg +Label="bg (bekl)" + +[keyboard-pk] +Description="Keyboard - Urdu (Pakistan)" +Language=ur +Label=ur + +[keyboard-pk-urd-crulp] +Description="Keyboard - Urdu (Pakistan) - Urdu (Pakistan, CRULP)" +Language=ur +Label="pk (urd-crulp)" + +[keyboard-pk-urd-nla] +Description="Keyboard - Urdu (Pakistan) - Urdu (Pakistan, NLA)" +Language=ur +Label="pk (urd-nla)" + +[keyboard-pk-ara] +Description="Keyboard - Urdu (Pakistan) - Arabic (Pakistan)" +Language=ar +Label="ar (ara)" + +[keyboard-pk-snd] +Description="Keyboard - Urdu (Pakistan) - Sindhi" +Language=sd +Label="sd (snd)" + +[keyboard-pk-urd-navees] +Description="Keyboard - Urdu (Pakistan) - Urdu (Pakistan, Navees)" +Language=ur +Label="pk (urd-navees)" + +[keyboard-au] +Description="Keyboard - English (Australia)" +Language=en +Label=en + +[keyboard-mn] +Description="Keyboard - Mongolian" +Language=mn +Label=mn + +[keyboard-dz] +Description="Keyboard - Berber (Algeria, Latin)" +Language=tzm +Label=kab + +[keyboard-dz-ber] +Description="Keyboard - Berber (Algeria, Latin) - Berber (Algeria, Tifinagh)" +Language=kab +Label="kab (ber)" + +[keyboard-dz-azerty-deadkeys] +Description="Keyboard - Berber (Algeria, Latin) - Kabyle (AZERTY, with dead keys)" +Language=kab +Label="kab (azerty-deadkeys)" + +[keyboard-dz-qwerty-gb-deadkeys] +Description="Keyboard - Berber (Algeria, Latin) - Kabyle (QWERTY, UK, with dead keys)" +Language=kab +Label="kab (qwerty-gb-deadkeys)" + +[keyboard-dz-qwerty-us-deadkeys] +Description="Keyboard - Berber (Algeria, Latin) - Kabyle (QWERTY, US, with dead keys)" +Language=kab +Label="kab (qwerty-us-deadkeys)" + +[keyboard-dz-ar] +Description="Keyboard - Berber (Algeria, Latin) - Arabic (Algeria)" +Language=ar +Label=ar + +[keyboard-me] +Description="Keyboard - Montenegrin" +Language=sr +Label=sr + +[keyboard-me-cyrillic] +Description="Keyboard - Montenegrin - Montenegrin (Cyrillic)" +Language=sr +Label="me (cyrillic)" + +[keyboard-me-cyrillicyz] +Description="Keyboard - Montenegrin - Montenegrin (Cyrillic, ZE and ZHE swapped)" +Language=sr +Label="me (cyrillicyz)" + +[keyboard-me-cyrillicalternatequotes] +Description="Keyboard - Montenegrin - Montenegrin (Cyrillic, with guillemets)" +Language=sr +Label="me (cyrillicalternatequotes)" + +[keyboard-me-latinunicode] +Description="Keyboard - Montenegrin - Montenegrin (Latin, Unicode)" +Language=sr +Label="me (latinunicode)" + +[keyboard-me-latinyz] +Description="Keyboard - Montenegrin - Montenegrin (Latin, QWERTY)" +Language=sr +Label="me (latinyz)" + +[keyboard-me-latinunicodeyz] +Description="Keyboard - Montenegrin - Montenegrin (Latin, Unicode, QWERTY)" +Language=sr +Label="me (latinunicodeyz)" + +[keyboard-me-latinalternatequotes] +Description="Keyboard - Montenegrin - Montenegrin (Latin, with guillemets)" +Language=sr +Label="me (latinalternatequotes)" + +[keyboard-lv] +Description="Keyboard - Latvian" +Language=lv +Label=lv + +[keyboard-lv-apostrophe] +Description="Keyboard - Latvian - Latvian (apostrophe)" +Language=lv +Label="lv (apostrophe)" + +[keyboard-lv-tilde] +Description="Keyboard - Latvian - Latvian (tilde)" +Language=lv +Label="lv (tilde)" + +[keyboard-lv-fkey] +Description="Keyboard - Latvian - Latvian (F)" +Language=lv +Label="lv (fkey)" + +[keyboard-lv-modern] +Description="Keyboard - Latvian - Latvian (Modern Latin)" +Language=lv +Label="lv (modern)" + +[keyboard-lv-modern-cyr] +Description="Keyboard - Latvian - Latvian (Modern Cyrillic)" +Language=lv +Label="lv (modern-cyr)" + +[keyboard-lv-ergonomic] +Description="Keyboard - Latvian - Latvian (ergonomic, ŪGJRMV)" +Language=lv +Label="lv (ergonomic)" + +[keyboard-lv-adapted] +Description="Keyboard - Latvian - Latvian (adapted)" +Language=lv +Label="lv (adapted)" + +[keyboard-lv-dvorak] +Description="Keyboard - Latvian - Latvian (Dvorak)" +Language=lv +Label="lv (dvorak)" + +[keyboard-lv-ykeydvorak] +Description="Keyboard - Latvian - Latvian (Dvorak, with Y)" +Language=lv +Label="lv (ykeydvorak)" + +[keyboard-lv-minuskeydvorak] +Description="Keyboard - Latvian - Latvian (Dvorak, with minus)" +Language=lv +Label="lv (minuskeydvorak)" + +[keyboard-lv-dvorakprogr] +Description="Keyboard - Latvian - Latvian (programmer Dvorak)" +Language=lv +Label="lv (dvorakprogr)" + +[keyboard-lv-ykeydvorakprogr] +Description="Keyboard - Latvian - Latvian (programmer Dvorak, with Y)" +Language=lv +Label="lv (ykeydvorakprogr)" + +[keyboard-lv-minuskeydvorakprogr] +Description="Keyboard - Latvian - Latvian (programmer Dvorak, with minus)" +Language=lv +Label="lv (minuskeydvorakprogr)" + +[keyboard-lv-colemak] +Description="Keyboard - Latvian - Latvian (Colemak)" +Language=lv +Label="lv (colemak)" + +[keyboard-lv-apostrophecolemak] +Description="Keyboard - Latvian - Latvian (Colemak, with apostrophe)" +Language=lv +Label="lv (apostrophecolemak)" + +[keyboard-lv-sun_type6] +Description="Keyboard - Latvian - Latvian (Sun Type 6/7)" +Language=lv +Label="lv (sun_type6)" + +[keyboard-lv-apostrophe-deadquotes] +Description="Keyboard - Latvian - Latvian (apostrophe, dead quotes)" +Language=lv +Label="lv (apostrophe-deadquotes)" + +[keyboard-ba] +Description="Keyboard - Bosnian" +Language=bs +Label=bs + +[keyboard-ba-alternatequotes] +Description="Keyboard - Bosnian - Bosnian (with guillemets)" +Language=bs +Label="ba (alternatequotes)" + +[keyboard-ba-unicode] +Description="Keyboard - Bosnian - Bosnian (with Bosnian digraphs)" +Language=bs +Label="ba (unicode)" + +[keyboard-ba-unicodeus] +Description="Keyboard - Bosnian - Bosnian (US, with Bosnian digraphs)" +Language=bs +Label="ba (unicodeus)" + +[keyboard-ba-us] +Description="Keyboard - Bosnian - Bosnian (US)" +Language=bs +Label="ba (us)" + +[keyboard-tw] +Description="Keyboard - Taiwanese" +Language= +Label=zh + +[keyboard-tw-indigenous] +Description="Keyboard - Taiwanese - Taiwanese (indigenous)" +Language=tay +Label="tw (indigenous)" + +[keyboard-tw-saisiyat] +Description="Keyboard - Taiwanese - Saisiyat (Taiwan)" +Language=xsy +Label="xsy (saisiyat)" + +[keyboard-rs] +Description="Keyboard - Serbian" +Language=sr +Label=sr + +[keyboard-rs-alternatequotes] +Description="Keyboard - Serbian - Serbian (Cyrillic, with guillemets)" +Language=sr +Label="rs (alternatequotes)" + +[keyboard-rs-yz] +Description="Keyboard - Serbian - Serbian (Cyrillic, ZE and ZHE swapped)" +Language=sr +Label="rs (yz)" + +[keyboard-rs-latin] +Description="Keyboard - Serbian - Serbian (Latin)" +Language=sr +Label="rs (latin)" + +[keyboard-rs-latinalternatequotes] +Description="Keyboard - Serbian - Serbian (Latin, with guillemets)" +Language=sr +Label="rs (latinalternatequotes)" + +[keyboard-rs-latinunicode] +Description="Keyboard - Serbian - Serbian (Latin, Unicode)" +Language=sr +Label="rs (latinunicode)" + +[keyboard-rs-latinyz] +Description="Keyboard - Serbian - Serbian (Latin, QWERTY)" +Language=sr +Label="rs (latinyz)" + +[keyboard-rs-latinunicodeyz] +Description="Keyboard - Serbian - Serbian (Latin, Unicode, QWERTY)" +Language=sr +Label="rs (latinunicodeyz)" + +[keyboard-rs-rue] +Description="Keyboard - Serbian - Pannonian Rusyn" +Language=rue +Label="rs (rue)" + +[keyboard-rs-combiningkeys] +Description="Keyboard - Serbian - Serbian (combining accents instead of dead keys)" +Language=sr +Label="rs (combiningkeys)" + +[keyboard-dk] +Description="Keyboard - Danish" +Language=da +Label=da + +[keyboard-dk-nodeadkeys] +Description="Keyboard - Danish - Danish (no dead keys)" +Language=da +Label="dk (nodeadkeys)" + +[keyboard-dk-winkeys] +Description="Keyboard - Danish - Danish (Windows)" +Language=da +Label="dk (winkeys)" + +[keyboard-dk-mac] +Description="Keyboard - Danish - Danish (Macintosh)" +Language=da +Label="dk (mac)" + +[keyboard-dk-mac_nodeadkeys] +Description="Keyboard - Danish - Danish (Macintosh, no dead keys)" +Language=da +Label="dk (mac_nodeadkeys)" + +[keyboard-dk-dvorak] +Description="Keyboard - Danish - Danish (Dvorak)" +Language=da +Label="dk (dvorak)" + +[keyboard-dk-sun_type6] +Description="Keyboard - Danish - Danish (Sun Type 6/7)" +Language=da +Label="dk (sun_type6)" + +[keyboard-bw] +Description="Keyboard - Tswana" +Language=tn +Label=tn + +[keyboard-kr] +Description="Keyboard - Korean" +Language=ko +Label=ko + +[keyboard-kr-kr104] +Description="Keyboard - Korean - Korean (101/104-key compatible)" +Language=ko +Label="kr (kr104)" + +[keyboard-kr-sun_type6] +Description="Keyboard - Korean - Korean (Sun Type 6/7)" +Language=ko +Label="kr (sun_type6)" + +[keyboard-nl] +Description="Keyboard - Dutch" +Language=nl +Label=nl + +[keyboard-nl-us] +Description="Keyboard - Dutch - Dutch (US)" +Language=nl +Label="nl (us)" + +[keyboard-nl-mac] +Description="Keyboard - Dutch - Dutch (Macintosh)" +Language=nl +Label="nl (mac)" + +[keyboard-nl-std] +Description="Keyboard - Dutch - Dutch (standard)" +Language=nl +Label="nl (std)" + +[keyboard-nl-sun_type6] +Description="Keyboard - Dutch - Dutch (Sun Type 6/7)" +Language=nl +Label="nl (sun_type6)" + +[keyboard-et] +Description="Keyboard - Amharic" +Language=am +Label=am + +[keyboard-be] +Description="Keyboard - Belgian" +Language=de +Label=be + +[keyboard-be-oss] +Description="Keyboard - Belgian - Belgian (alt.)" +Language=de +Label="be (oss)" + +[keyboard-be-oss_latin9] +Description="Keyboard - Belgian - Belgian (Latin-9 only, alt.)" +Language=de +Label="be (oss_latin9)" + +[keyboard-be-iso-alternate] +Description="Keyboard - Belgian - Belgian (ISO, alt.)" +Language=de +Label="be (iso-alternate)" + +[keyboard-be-nodeadkeys] +Description="Keyboard - Belgian - Belgian (no dead keys)" +Language=de +Label="be (nodeadkeys)" + +[keyboard-be-wang] +Description="Keyboard - Belgian - Belgian (Wang 724 AZERTY)" +Language=de +Label="be (wang)" + +[keyboard-be-sun_type6] +Description="Keyboard - Belgian - Belgian (Sun Type 6/7)" +Language=de +Label="be (sun_type6)" + +[keyboard-la] +Description="Keyboard - Lao" +Language=lo +Label=lo + +[keyboard-la-stea] +Description="Keyboard - Lao - Lao (STEA)" +Language=lo +Label="la (stea)" + +[keyboard-bt] +Description="Keyboard - Dzongkha" +Language=dz +Label=dz + +[keyboard-mm] +Description="Keyboard - Burmese" +Language=my +Label=my + +[keyboard-mm-zawgyi] +Description="Keyboard - Burmese - Burmese (Zawgyi)" +Language=my +Label="my-zwg (zawgyi)" + +[keyboard-mm-mnw] +Description="Keyboard - Burmese - Mon" +Language=mnw +Label=mnw + +[keyboard-mm-mnw-a1] +Description="Keyboard - Burmese - Mon (A1)" +Language=mnw +Label="mnw (mnw-a1)" + +[keyboard-mm-shn] +Description="Keyboard - Burmese - Shan" +Language=shn +Label=shn + +[keyboard-mm-zgt] +Description="Keyboard - Burmese - Shan (Zawgyi)" +Language=shn +Label="shn-zwg (zgt)" + +[keyboard-si] +Description="Keyboard - Slovenian" +Language=sl +Label=sl + +[keyboard-si-alternatequotes] +Description="Keyboard - Slovenian - Slovenian (with guillemets)" +Language=sl +Label="si (alternatequotes)" + +[keyboard-si-us] +Description="Keyboard - Slovenian - Slovenian (US)" +Language=sl +Label="si (us)" + +[keyboard-am] +Description="Keyboard - Armenian" +Language=hy +Label=hy + +[keyboard-am-phonetic] +Description="Keyboard - Armenian - Armenian (phonetic)" +Language=hy +Label="am (phonetic)" + +[keyboard-am-phonetic-alt] +Description="Keyboard - Armenian - Armenian (alt. phonetic)" +Language=hy +Label="am (phonetic-alt)" + +[keyboard-am-eastern] +Description="Keyboard - Armenian - Armenian (eastern)" +Language=hy +Label="am (eastern)" + +[keyboard-am-eastern-alt] +Description="Keyboard - Armenian - Armenian (alt. eastern)" +Language=hy +Label="am (eastern-alt)" + +[keyboard-am-western] +Description="Keyboard - Armenian - Armenian (western)" +Language=hy +Label="am (western)" + +[keyboard-am-olpc-phonetic] +Description="Keyboard - Armenian - Armenian (OLPC, phonetic)" +Language=hy +Label="am (olpc-phonetic)" + +[keyboard-by] +Description="Keyboard - Belarusian" +Language=be +Label=by + +[keyboard-by-legacy] +Description="Keyboard - Belarusian - Belarusian (legacy)" +Language=be +Label="by (legacy)" + +[keyboard-by-latin] +Description="Keyboard - Belarusian - Belarusian (Latin)" +Language=be +Label="by (latin)" + +[keyboard-by-intl] +Description="Keyboard - Belarusian - Belarusian (intl.)" +Language=be +Label="by (intl)" + +[keyboard-by-phonetic] +Description="Keyboard - Belarusian - Belarusian (phonetic)" +Language=be +Label="by (phonetic)" + +[keyboard-by-ru] +Description="Keyboard - Belarusian - Russian (Belarus)" +Language=ru +Label="by (ru)" + +[keyboard-vn] +Description="Keyboard - Vietnamese" +Language=vi +Label=vi + +[keyboard-vn-us] +Description="Keyboard - Vietnamese - Vietnamese (US)" +Language=vi +Label="vn (us)" + +[keyboard-vn-fr] +Description="Keyboard - Vietnamese - Vietnamese (France)" +Language=vi +Label="vn (fr)" + +[keyboard-vn-aderty] +Description="Keyboard - Vietnamese - Vietnamese (AÐERTY)" +Language=vi +Label="vn (aderty)" + +[keyboard-vn-qderty] +Description="Keyboard - Vietnamese - Vietnamese (QĐERTY)" +Language=vi +Label="vn (qderty)" + +[keyboard-ml] +Description="Keyboard - Bambara" +Language=bm +Label=bm + +[keyboard-ml-fr-oss] +Description="Keyboard - Bambara - French (Mali, alt.)" +Language=fr +Label="fr (fr-oss)" + +[keyboard-ml-us-mac] +Description="Keyboard - Bambara - English (Mali, US, Macintosh)" +Language=en +Label="en (us-mac)" + +[keyboard-ml-us-intl] +Description="Keyboard - Bambara - English (Mali, US, intl.)" +Language=en +Label="en (us-intl)" + +[keyboard-ara] +Description="Keyboard - Arabic" +Language=ar +Label=ar + +[keyboard-ara-digits] +Description="Keyboard - Arabic - Arabic (Eastern Arabic numerals)" +Language=ar +Label="ara (digits)" + +[keyboard-ara-azerty] +Description="Keyboard - Arabic - Arabic (AZERTY)" +Language=ar +Label="ara (azerty)" + +[keyboard-ara-azerty_digits] +Description="Keyboard - Arabic - Arabic (AZERTY, Eastern Arabic numerals)" +Language=ar +Label="ara (azerty_digits)" + +[keyboard-ara-buckwalter] +Description="Keyboard - Arabic - Arabic (Buckwalter)" +Language=ar +Label="ara (buckwalter)" + +[keyboard-ara-mac] +Description="Keyboard - Arabic - Arabic (Macintosh)" +Language=ar +Label="ara (mac)" + +[keyboard-ara-mac-phonetic] +Description="Keyboard - Arabic - Arabic (Macintosh, phonetic)" +Language=ar +Label="ara (mac-phonetic)" + +[keyboard-ara-olpc] +Description="Keyboard - Arabic - Arabic (OLPC)" +Language=ar +Label="ara (olpc)" + +[keyboard-ara-sun_type6] +Description="Keyboard - Arabic - Arabic (Sun Type 6/7)" +Language=ar +Label="ara (sun_type6)" + +[keyboard-ara-basic_ext] +Description="Keyboard - Arabic - Arabic (Arabic numerals, extensions in the 4th level)" +Language=ar +Label="ara (basic_ext)" + +[keyboard-ara-basic_ext_digits] +Description="Keyboard - Arabic - Arabic (Eastern Arabic numerals, extensions in the 4th level)" +Language=ar +Label="ara (basic_ext_digits)" + +[keyboard-ara-ergoarabic] +Description="Keyboard - Arabic - Arabic (ErgoArabic)" +Language=ar +Label="ara (ergoarabic)" + +[keyboard-ie] +Description="Keyboard - Irish" +Language=en +Label=ie + +[keyboard-ie-UnicodeExpert] +Description="Keyboard - Irish - Irish (UnicodeExpert)" +Language=en +Label="ie (UnicodeExpert)" + +[keyboard-ie-CloGaelach] +Description="Keyboard - Irish - CloGaelach" +Language=ga +Label="ie (CloGaelach)" + +[keyboard-ie-ogam] +Description="Keyboard - Irish - Ogham" +Language=sga +Label="ie (ogam)" + +[keyboard-ie-ogam_is434] +Description="Keyboard - Irish - Ogham (IS434)" +Language=sga +Label="ie (ogam_is434)" + +[keyboard-cm] +Description="Keyboard - English (Cameroon)" +Language=en +Label=cm + +[keyboard-cm-french] +Description="Keyboard - English (Cameroon) - French (Cameroon)" +Language=fr +Label="fr (french)" + +[keyboard-cm-qwerty] +Description="Keyboard - English (Cameroon) - Cameroon Multilingual (QWERTY, intl.)" +Language=en +Label="cm (qwerty)" + +[keyboard-cm-azerty] +Description="Keyboard - English (Cameroon) - Cameroon (AZERTY, intl.)" +Language=fr +Label="cm (azerty)" + +[keyboard-cm-dvorak] +Description="Keyboard - English (Cameroon) - Cameroon (Dvorak, intl.)" +Language=en +Label="cm (dvorak)" + +[keyboard-cm-mmuock] +Description="Keyboard - English (Cameroon) - Mmuock" +Language=en +Label="cm (mmuock)" + +[keyboard-iq] +Description="Keyboard - Arabic (Iraq)" +Language=ar +Label=ar + +[keyboard-iq-ku] +Description="Keyboard - Arabic (Iraq) - Kurdish (Iraq, Latin Q)" +Language=ku +Label=ku + +[keyboard-iq-ku_alt] +Description="Keyboard - Arabic (Iraq) - Kurdish (Iraq, Latin Alt-Q)" +Language=ku +Label="ku (ku_alt)" + +[keyboard-iq-ku_f] +Description="Keyboard - Arabic (Iraq) - Kurdish (Iraq, F)" +Language=ku +Label="ku (ku_f)" + +[keyboard-iq-ku_ara] +Description="Keyboard - Arabic (Iraq) - Kurdish (Iraq, Arabic-Latin)" +Language=ku +Label="ku (ku_ara)" + +[keyboard-af] +Description="Keyboard - Dari" +Language=prs +Label=fa + +[keyboard-af-ps] +Description="Keyboard - Dari - Pashto" +Language=ps +Label=ps + +[keyboard-af-uz] +Description="Keyboard - Dari - Uzbek (Afghanistan)" +Language=uz +Label=uz + +[keyboard-af-fa-olpc] +Description="Keyboard - Dari - Dari (Afghanistan, OLPC)" +Language=prs +Label="fa (fa-olpc)" + +[keyboard-af-ps-olpc] +Description="Keyboard - Dari - Pashto (Afghanistan, OLPC)" +Language=ps +Label="ps (ps-olpc)" + +[keyboard-af-uz-olpc] +Description="Keyboard - Dari - Uzbek (Afghanistan, OLPC)" +Language=uz +Label="uz (uz-olpc)" + +[keyboard-hr] +Description="Keyboard - Croatian" +Language=hr +Label=hr + +[keyboard-hr-alternatequotes] +Description="Keyboard - Croatian - Croatian (with guillemets)" +Language=hr +Label="hr (alternatequotes)" + +[keyboard-hr-unicode] +Description="Keyboard - Croatian - Croatian (with Croatian digraphs)" +Language=hr +Label="hr (unicode)" + +[keyboard-hr-unicodeus] +Description="Keyboard - Croatian - Croatian (US, with Croatian digraphs)" +Language=hr +Label="hr (unicodeus)" + +[keyboard-hr-us] +Description="Keyboard - Croatian - Croatian (US)" +Language=hr +Label="hr (us)" + +[keyboard-ma] +Description="Keyboard - Arabic (Morocco)" +Language=ary +Label=ar + +[keyboard-ma-tifinagh] +Description="Keyboard - Arabic (Morocco) - Berber (Morocco, Tifinagh)" +Language= +Label="ber (tifinagh)" + +[keyboard-ma-tifinagh-alt] +Description="Keyboard - Arabic (Morocco) - Berber (Morocco, Tifinagh alt.)" +Language= +Label="ber (tifinagh-alt)" + +[keyboard-ma-tifinagh-alt-phonetic] +Description="Keyboard - Arabic (Morocco) - Berber (Morocco, Tifinagh phonetic, alt.)" +Language= +Label="ber (tifinagh-alt-phonetic)" + +[keyboard-ma-tifinagh-extended] +Description="Keyboard - Arabic (Morocco) - Berber (Morocco, Tifinagh extended)" +Language= +Label="ber (tifinagh-extended)" + +[keyboard-ma-tifinagh-phonetic] +Description="Keyboard - Arabic (Morocco) - Berber (Morocco, Tifinagh phonetic)" +Language= +Label="ber (tifinagh-phonetic)" + +[keyboard-ma-tifinagh-extended-phonetic] +Description="Keyboard - Arabic (Morocco) - Berber (Morocco, Tifinagh extended phonetic)" +Language= +Label="ber (tifinagh-extended-phonetic)" + +[keyboard-ma-french] +Description="Keyboard - Arabic (Morocco) - French (Morocco)" +Language=fr +Label="fr (french)" + +[keyboard-ma-rif] +Description="Keyboard - Arabic (Morocco) - Tarifit" +Language=rif +Label=rif + +[keyboard-sy] +Description="Keyboard - Arabic (Syria)" +Language=syr +Label=ar + +[keyboard-sy-syc] +Description="Keyboard - Arabic (Syria) - Syriac" +Language=syr +Label=syc + +[keyboard-sy-syc_phonetic] +Description="Keyboard - Arabic (Syria) - Syriac (phonetic)" +Language=syr +Label="syc (syc_phonetic)" + +[keyboard-sy-ku] +Description="Keyboard - Arabic (Syria) - Kurdish (Syria, Latin Q)" +Language=ku +Label=ku + +[keyboard-sy-ku_alt] +Description="Keyboard - Arabic (Syria) - Kurdish (Syria, Latin Alt-Q)" +Language=ku +Label="ku (ku_alt)" + +[keyboard-sy-ku_f] +Description="Keyboard - Arabic (Syria) - Kurdish (Syria, F)" +Language=ku +Label="ku (ku_f)" + +[keyboard-at] +Description="Keyboard - German (Austria)" +Language=de +Label=de + +[keyboard-at-nodeadkeys] +Description="Keyboard - German (Austria) - German (Austria, no dead keys)" +Language=de +Label="at (nodeadkeys)" + +[keyboard-at-mac] +Description="Keyboard - German (Austria) - German (Austria, Macintosh)" +Language=de +Label="at (mac)" + +[keyboard-nz] +Description="Keyboard - English (New Zealand)" +Language=en +Label=en + +[keyboard-nz-mao] +Description="Keyboard - English (New Zealand) - Maori" +Language=mi +Label="mi (mao)" + +[keyboard-epo] +Description="Keyboard - Esperanto" +Language=eo +Label=eo + +[keyboard-epo-legacy] +Description="Keyboard - Esperanto - Esperanto (legacy)" +Language=eo +Label="epo (legacy)" + +[keyboard-eu] +Description="Keyboard - EurKEY (US)" +Language=ca +Label=eu + +[keyboard-za] +Description="Keyboard - English (South Africa)" +Language=en +Label=en + +[keyboard-fo] +Description="Keyboard - Faroese" +Language=fo +Label=fo + +[keyboard-fo-nodeadkeys] +Description="Keyboard - Faroese - Faroese (no dead keys)" +Language=fo +Label="fo (nodeadkeys)" + +[keyboard-gb] +Description="Keyboard - English (UK)" +Language=en +Label=en + +[keyboard-gb-extd] +Description="Keyboard - English (UK) - English (UK, extended, Windows)" +Language=en +Label="gb (extd)" + +[keyboard-gb-intl] +Description="Keyboard - English (UK) - English (UK, intl., with dead keys)" +Language=en +Label="gb (intl)" + +[keyboard-gb-dvorak] +Description="Keyboard - English (UK) - English (UK, Dvorak)" +Language=en +Label="gb (dvorak)" + +[keyboard-gb-dvorakukp] +Description="Keyboard - English (UK) - English (UK, Dvorak, with UK punctuation)" +Language=en +Label="gb (dvorakukp)" + +[keyboard-gb-mac] +Description="Keyboard - English (UK) - English (UK, Macintosh)" +Language=en +Label="gb (mac)" + +[keyboard-gb-mac_intl] +Description="Keyboard - English (UK) - English (UK, Macintosh, intl.)" +Language=en +Label="gb (mac_intl)" + +[keyboard-gb-colemak] +Description="Keyboard - English (UK) - English (UK, Colemak)" +Language=en +Label="gb (colemak)" + +[keyboard-gb-colemak_dh] +Description="Keyboard - English (UK) - English (UK, Colemak-DH)" +Language=en +Label="gb (colemak_dh)" + +[keyboard-gb-gla] +Description="Keyboard - English (UK) - Scottish Gaelic" +Language=en +Label="gd (gla)" + +[keyboard-gb-pl] +Description="Keyboard - English (UK) - Polish (British keyboard)" +Language=pl +Label=pl + +[keyboard-gb-sun_type6] +Description="Keyboard - English (UK) - English (UK, Sun Type 6/7)" +Language=en +Label="gb (sun_type6)" + +[keyboard-ke] +Description="Keyboard - Swahili (Kenya)" +Language=sw +Label=sw + +[keyboard-ke-kik] +Description="Keyboard - Swahili (Kenya) - Kikuyu" +Language=ki +Label="ki (kik)" + +[keyboard-md] +Description="Keyboard - Moldavian" +Language=ro +Label=ro + +[keyboard-md-gag] +Description="Keyboard - Moldavian - Gagauz (Moldova)" +Language=gag +Label=gag + +[keyboard-us] +Description="Keyboard - English (US)" +Language=en +Label=en + +[keyboard-us-euro] +Description="Keyboard - English (US) - English (US, euro on 5)" +Language=en +Label="us (euro)" + +[keyboard-us-intl] +Description="Keyboard - English (US) - English (US, intl., with dead keys)" +Language=en +Label="us (intl)" + +[keyboard-us-alt-intl] +Description="Keyboard - English (US) - English (US, alt. intl.)" +Language=en +Label="us (alt-intl)" + +[keyboard-us-altgr-intl] +Description="Keyboard - English (US) - English (intl., with AltGr dead keys)" +Language=en +Label="us (altgr-intl)" + +[keyboard-us-mac] +Description="Keyboard - English (US) - English (Macintosh)" +Language=en +Label="us (mac)" + +[keyboard-us-colemak] +Description="Keyboard - English (US) - English (Colemak)" +Language=en +Label="us (colemak)" + +[keyboard-us-colemak_dh] +Description="Keyboard - English (US) - English (Colemak-DH)" +Language=en +Label="us (colemak_dh)" + +[keyboard-us-colemak_dh_wide] +Description="Keyboard - English (US) - English (Colemak-DH Wide)" +Language=en +Label="us (colemak_dh_wide)" + +[keyboard-us-colemak_dh_ortho] +Description="Keyboard - English (US) - English (Colemak-DH Ortholinear)" +Language=en +Label="us (colemak_dh_ortho)" + +[keyboard-us-colemak_dh_iso] +Description="Keyboard - English (US) - English (Colemak-DH ISO)" +Language=en +Label="us (colemak_dh_iso)" + +[keyboard-us-colemak_dh_wide_iso] +Description="Keyboard - English (US) - English (Colemak-DH Wide ISO)" +Language=en +Label="us (colemak_dh_wide_iso)" + +[keyboard-us-dvorak] +Description="Keyboard - English (US) - English (Dvorak)" +Language=en +Label="us (dvorak)" + +[keyboard-us-dvorak-intl] +Description="Keyboard - English (US) - English (Dvorak, intl., with dead keys)" +Language=en +Label="us (dvorak-intl)" + +[keyboard-us-dvorak-alt-intl] +Description="Keyboard - English (US) - English (Dvorak, alt. intl.)" +Language=en +Label="us (dvorak-alt-intl)" + +[keyboard-us-dvorak-l] +Description="Keyboard - English (US) - English (Dvorak, one-handed, left)" +Language=en +Label="us (dvorak-l)" + +[keyboard-us-dvorak-r] +Description="Keyboard - English (US) - English (Dvorak, one-handed, right)" +Language=en +Label="us (dvorak-r)" + +[keyboard-us-dvorak-classic] +Description="Keyboard - English (US) - English (classic Dvorak)" +Language=en +Label="us (dvorak-classic)" + +[keyboard-us-dvp] +Description="Keyboard - English (US) - English (programmer Dvorak)" +Language=en +Label="us (dvp)" + +[keyboard-us-dvorak-mac] +Description="Keyboard - English (US) - English (Dvorak, Macintosh)" +Language=en +Label="us (dvorak-mac)" + +[keyboard-us-norman] +Description="Keyboard - English (US) - English (Norman)" +Language=en +Label="us (norman)" + +[keyboard-us-symbolic] +Description="Keyboard - English (US) - English (US, Symbolic)" +Language=en +Label="us (symbolic)" + +[keyboard-us-workman] +Description="Keyboard - English (US) - English (Workman)" +Language=en +Label="us (workman)" + +[keyboard-us-workman-intl] +Description="Keyboard - English (US) - English (Workman, intl., with dead keys)" +Language=en +Label="us (workman-intl)" + +[keyboard-us-olpc2] +Description="Keyboard - English (US) - English (the divide/multiply toggle the layout)" +Language=en +Label="us (olpc2)" + +[keyboard-us-chr] +Description="Keyboard - English (US) - Cherokee" +Language=chr +Label=chr + +[keyboard-us-haw] +Description="Keyboard - English (US) - Hawaiian" +Language=haw +Label=haw + +[keyboard-us-rus] +Description="Keyboard - English (US) - Russian (US, phonetic)" +Language=ru +Label="ru (rus)" + +[keyboard-us-hbs] +Description="Keyboard - English (US) - Serbo-Croatian (US)" +Language=en +Label="us (hbs)" + +[keyboard-us-intl-unicode] +Description="Keyboard - English (US) - English (US, intl., AltGr Unicode combining)" +Language=en +Label="us (intl-unicode)" + +[keyboard-us-alt-intl-unicode] +Description="Keyboard - English (US) - English (US, intl., AltGr Unicode combining, alt.)" +Language=en +Label="us (alt-intl-unicode)" + +[keyboard-us-ats] +Description="Keyboard - English (US) - Atsina" +Language=en +Label="us (ats)" + +[keyboard-us-crd] +Description="Keyboard - English (US) - Coeur d'Alene Salish" +Language=crd +Label="us (crd)" + +[keyboard-us-cz_sk_de] +Description="Keyboard - English (US) - Czech, Slovak and German (US)" +Language=en +Label="us (cz_sk_de)" + +[keyboard-us-cz_sk_pl_de_es_fi_sv] +Description="Keyboard - English (US) - Czech, Slovak, Polish, Spanish, Finnish, Swedish and German (US)" +Language=en +Label="us (cz_sk_pl_de_es_fi_sv)" + +[keyboard-us-drix] +Description="Keyboard - English (US) - English (Drix)" +Language=en +Label="us (drix)" + +[keyboard-us-de_se_fi] +Description="Keyboard - English (US) - German, Swedish and Finnish (US)" +Language=en +Label="us (de_se_fi)" + +[keyboard-us-ibm238l] +Description="Keyboard - English (US) - English (US, IBM Arabic 238_L)" +Language=en +Label="us (ibm238l)" + +[keyboard-us-sun_type6] +Description="Keyboard - English (US) - English (US, Sun Type 6/7)" +Language=en +Label="us (sun_type6)" + +[keyboard-us-carpalx] +Description="Keyboard - English (US) - English (Carpalx)" +Language=en +Label="us (carpalx)" + +[keyboard-us-carpalx-intl] +Description="Keyboard - English (US) - English (Carpalx, intl., with dead keys)" +Language=en +Label="us (carpalx-intl)" + +[keyboard-us-carpalx-altgr-intl] +Description="Keyboard - English (US) - English (Carpalx, intl., with AltGr dead keys)" +Language=en +Label="us (carpalx-altgr-intl)" + +[keyboard-us-carpalx-full] +Description="Keyboard - English (US) - English (Carpalx, full optimization)" +Language=en +Label="us (carpalx-full)" + +[keyboard-us-carpalx-full-intl] +Description="Keyboard - English (US) - English (Carpalx, full optimization, intl., with dead keys)" +Language=en +Label="us (carpalx-full-intl)" + +[keyboard-us-carpalx-full-altgr-intl] +Description="Keyboard - English (US) - English (Carpalx, full optimization, intl., with AltGr dead keys)" +Language=en +Label="us (carpalx-full-altgr-intl)" + +[keyboard-us-3l] +Description="Keyboard - English (US) - English (3l)" +Language=en +Label="us (3l)" + +[keyboard-us-3l-cros] +Description="Keyboard - English (US) - English (3l, Chromebook)" +Language=en +Label="us (3l-cros)" + +[keyboard-us-3l-emacs] +Description="Keyboard - English (US) - English (3l, emacs)" +Language=en +Label="us (3l-emacs)" + +[keyboard-us-workman-p] +Description="Keyboard - English (US) - English (Workman-P)" +Language=en +Label=workman-p + +[keyboard-us-scn] +Description="Keyboard - English (US) - Sicilian (US keyboard)" +Language=en +Label="us (scn)" + +[keyboard-us-altgr-weur] +Description="Keyboard - English (US) - English (Western European AltGr dead keys)" +Language=en +Label="us (altgr-weur)" + +[keyboard-ge] +Description="Keyboard - Georgian" +Language=ka +Label=ka + +[keyboard-ge-ergonomic] +Description="Keyboard - Georgian - Georgian (ergonomic)" +Language=ka +Label="ge (ergonomic)" + +[keyboard-ge-mess] +Description="Keyboard - Georgian - Georgian (MESS)" +Language=ka +Label="ge (mess)" + +[keyboard-ge-os] +Description="Keyboard - Georgian - Ossetian (Georgia)" +Language=os +Label="ge (os)" + +[keyboard-ge-ru] +Description="Keyboard - Georgian - Russian (Georgia)" +Language=ru +Label=ru + +[keyboard-es] +Description="Keyboard - Spanish" +Language=es +Label=es + +[keyboard-es-nodeadkeys] +Description="Keyboard - Spanish - Spanish (no dead keys)" +Language=es +Label="es (nodeadkeys)" + +[keyboard-es-deadtilde] +Description="Keyboard - Spanish - Spanish (dead tilde)" +Language=es +Label="es (deadtilde)" + +[keyboard-es-winkeys] +Description="Keyboard - Spanish - Spanish (Windows)" +Language=es +Label="es (winkeys)" + +[keyboard-es-dvorak] +Description="Keyboard - Spanish - Spanish (Dvorak)" +Language=es +Label="es (dvorak)" + +[keyboard-es-ast] +Description="Keyboard - Spanish - Asturian (Spain, with bottom-dot H and L)" +Language=ast +Label=ast + +[keyboard-es-cat] +Description="Keyboard - Spanish - Catalan (Spain, with middle-dot L)" +Language=ca +Label="ca (cat)" + +[keyboard-es-sun_type6] +Description="Keyboard - Spanish - Spanish (Sun Type 6/7)" +Language=es +Label="es (sun_type6)" + +[keyboard-ee] +Description="Keyboard - Estonian" +Language=et +Label=et + +[keyboard-ee-nodeadkeys] +Description="Keyboard - Estonian - Estonian (no dead keys)" +Language=et +Label="ee (nodeadkeys)" + +[keyboard-ee-dvorak] +Description="Keyboard - Estonian - Estonian (Dvorak)" +Language=et +Label="ee (dvorak)" + +[keyboard-ee-us] +Description="Keyboard - Estonian - Estonian (US)" +Language=et +Label="ee (us)" + +[keyboard-ee-sun_type6] +Description="Keyboard - Estonian - Estonian (Sun Type 6/7)" +Language=et +Label="ee (sun_type6)" + +[keyboard-bd] +Description="Keyboard - Bangla" +Language=bn +Label=bn + +[keyboard-bd-probhat] +Description="Keyboard - Bangla - Bangla (Probhat)" +Language=bn +Label="bd (probhat)" + +[keyboard-ph] +Description="Keyboard - Filipino" +Language=fil +Label=ph + +[keyboard-ph-qwerty-bay] +Description="Keyboard - Filipino - Filipino (QWERTY, Baybayin)" +Language=fil +Label="ph (qwerty-bay)" + +[keyboard-ph-capewell-dvorak] +Description="Keyboard - Filipino - Filipino (Capewell-Dvorak, Latin)" +Language=fil +Label="ph (capewell-dvorak)" + +[keyboard-ph-capewell-dvorak-bay] +Description="Keyboard - Filipino - Filipino (Capewell-Dvorak, Baybayin)" +Language=fil +Label="ph (capewell-dvorak-bay)" + +[keyboard-ph-capewell-qwerf2k6] +Description="Keyboard - Filipino - Filipino (Capewell-QWERF 2006, Latin)" +Language=fil +Label="ph (capewell-qwerf2k6)" + +[keyboard-ph-capewell-qwerf2k6-bay] +Description="Keyboard - Filipino - Filipino (Capewell-QWERF 2006, Baybayin)" +Language=fil +Label="ph (capewell-qwerf2k6-bay)" + +[keyboard-ph-colemak] +Description="Keyboard - Filipino - Filipino (Colemak, Latin)" +Language=fil +Label="ph (colemak)" + +[keyboard-ph-colemak-bay] +Description="Keyboard - Filipino - Filipino (Colemak, Baybayin)" +Language=fil +Label="ph (colemak-bay)" + +[keyboard-ph-dvorak] +Description="Keyboard - Filipino - Filipino (Dvorak, Latin)" +Language=fil +Label="ph (dvorak)" + +[keyboard-ph-dvorak-bay] +Description="Keyboard - Filipino - Filipino (Dvorak, Baybayin)" +Language=fil +Label="ph (dvorak-bay)" + +[keyboard-uz] +Description="Keyboard - Uzbek" +Language=uz +Label=uz + +[keyboard-uz-latin] +Description="Keyboard - Uzbek - Uzbek (Latin)" +Language=uz +Label="uz (latin)" + +[keyboard-lt] +Description="Keyboard - Lithuanian" +Language=lt +Label=lt + +[keyboard-lt-std] +Description="Keyboard - Lithuanian - Lithuanian (standard)" +Language=lt +Label="lt (std)" + +[keyboard-lt-us] +Description="Keyboard - Lithuanian - Lithuanian (US)" +Language=lt +Label="lt (us)" + +[keyboard-lt-ibm] +Description="Keyboard - Lithuanian - Lithuanian (IBM)" +Language=lt +Label="lt (ibm)" + +[keyboard-lt-lekp] +Description="Keyboard - Lithuanian - Lithuanian (LEKP)" +Language=lt +Label="lt (lekp)" + +[keyboard-lt-lekpa] +Description="Keyboard - Lithuanian - Lithuanian (LEKPa)" +Language=lt +Label="lt (lekpa)" + +[keyboard-lt-ratise] +Description="Keyboard - Lithuanian - Lithuanian (Ratise)" +Language=lt +Label="lt (ratise)" + +[keyboard-lt-sgs] +Description="Keyboard - Lithuanian - Samogitian" +Language=sgs +Label="lt (sgs)" + +[keyboard-lt-us_dvorak] +Description="Keyboard - Lithuanian - Lithuanian (Dvorak)" +Language=lt +Label="lt (us_dvorak)" + +[keyboard-lt-sun_type6] +Description="Keyboard - Lithuanian - Lithuanian (Sun Type 6/7)" +Language=lt +Label="lt (sun_type6)" + +[keyboard-fi] +Description="Keyboard - Finnish" +Language=fi +Label=fi + +[keyboard-fi-winkeys] +Description="Keyboard - Finnish - Finnish (Windows)" +Language=fi +Label="fi (winkeys)" + +[keyboard-fi-classic] +Description="Keyboard - Finnish - Finnish (classic)" +Language=fi +Label="fi (classic)" + +[keyboard-fi-nodeadkeys] +Description="Keyboard - Finnish - Finnish (classic, no dead keys)" +Language=fi +Label="fi (nodeadkeys)" + +[keyboard-fi-mac] +Description="Keyboard - Finnish - Finnish (Macintosh)" +Language=fi +Label="fi (mac)" + +[keyboard-fi-smi] +Description="Keyboard - Finnish - Northern Saami (Finland)" +Language=se +Label="fi (smi)" + +[keyboard-fi-sun_type6] +Description="Keyboard - Finnish - Finnish (Sun Type 6/7)" +Language=fi +Label="fi (sun_type6)" + +[keyboard-fi-das] +Description="Keyboard - Finnish - Finnish (DAS)" +Language=fi +Label="fi (das)" + +[keyboard-fi-fidvorak] +Description="Keyboard - Finnish - Finnish (Dvorak)" +Language=fi +Label="fi (fidvorak)" + +[keyboard-cn] +Description="Keyboard - Chinese" +Language=zh +Label=zh + +[keyboard-cn-altgr-pinyin] +Description="Keyboard - Chinese - Hanyu Pinyin Letters (with AltGr dead keys)" +Language=zh +Label="cn (altgr-pinyin)" + +[keyboard-cn-mon_trad] +Description="Keyboard - Chinese - Mongolian (Bichig)" +Language=mvf +Label="cn (mon_trad)" + +[keyboard-cn-mon_trad_todo] +Description="Keyboard - Chinese - Mongolian (Todo)" +Language=mvf +Label="cn (mon_trad_todo)" + +[keyboard-cn-mon_trad_xibe] +Description="Keyboard - Chinese - Mongolian (Xibe)" +Language=sjo +Label="cn (mon_trad_xibe)" + +[keyboard-cn-mon_trad_manchu] +Description="Keyboard - Chinese - Mongolian (Manchu)" +Language=mnc +Label="cn (mon_trad_manchu)" + +[keyboard-cn-mon_trad_galik] +Description="Keyboard - Chinese - Mongolian (Galik)" +Language=mvf +Label="cn (mon_trad_galik)" + +[keyboard-cn-mon_todo_galik] +Description="Keyboard - Chinese - Mongolian (Todo Galik)" +Language=mvf +Label="cn (mon_todo_galik)" + +[keyboard-cn-mon_manchu_galik] +Description="Keyboard - Chinese - Mongolian (Manchu Galik)" +Language=mnc +Label="cn (mon_manchu_galik)" + +[keyboard-cn-tib] +Description="Keyboard - Chinese - Tibetan" +Language=bo +Label="cn (tib)" + +[keyboard-cn-tib_asciinum] +Description="Keyboard - Chinese - Tibetan (with ASCII numerals)" +Language=bo +Label="cn (tib_asciinum)" + +[keyboard-cn-ug] +Description="Keyboard - Chinese - Uyghur" +Language=ug +Label=ug + +[keyboard-ca] +Description="Keyboard - French (Canada)" +Language=fr +Label=fr + +[keyboard-ca-fr-dvorak] +Description="Keyboard - French (Canada) - French (Canada, Dvorak)" +Language=fr +Label="fr (fr-dvorak)" + +[keyboard-ca-fr-legacy] +Description="Keyboard - French (Canada) - French (Canada, legacy)" +Language=fr +Label="fr (fr-legacy)" + +[keyboard-ca-multix] +Description="Keyboard - French (Canada) - Canadian (CSA)" +Language=fr +Label="ca (multix)" + +[keyboard-ca-eng] +Description="Keyboard - French (Canada) - English (Canada)" +Language=en +Label="en (eng)" + +[keyboard-ca-ike] +Description="Keyboard - French (Canada) - Inuktitut" +Language=iu +Label=ike + +[keyboard-ca-kut] +Description="Keyboard - French (Canada) - Kutenai" +Language=fr +Label=kut + +[keyboard-ca-shs] +Description="Keyboard - French (Canada) - Secwepemctsin" +Language=fr +Label=shs + +[keyboard-ca-sun_type6] +Description="Keyboard - French (Canada) - Multilingual (Canada, Sun Type 6/7)" +Language=fr +Label="ca (sun_type6)" + +[keyboard-gh] +Description="Keyboard - English (Ghana)" +Language=en +Label=en + +[keyboard-gh-generic] +Description="Keyboard - English (Ghana) - English (Ghana, multilingual)" +Language=en +Label="gh (generic)" + +[keyboard-gh-gillbt] +Description="Keyboard - English (Ghana) - English (Ghana, GILLBT)" +Language=en +Label="gh (gillbt)" + +[keyboard-gh-akan] +Description="Keyboard - English (Ghana) - Akan" +Language=ak +Label="ak (akan)" + +[keyboard-gh-avn] +Description="Keyboard - English (Ghana) - Avatime" +Language=avn +Label=avn + +[keyboard-gh-ewe] +Description="Keyboard - English (Ghana) - Ewe" +Language=ee +Label="ee (ewe)" + +[keyboard-gh-fula] +Description="Keyboard - English (Ghana) - Fula" +Language=ff +Label="ff (fula)" + +[keyboard-gh-ga] +Description="Keyboard - English (Ghana) - Ga" +Language=gaa +Label="gaa (ga)" + +[keyboard-gh-hausa] +Description="Keyboard - English (Ghana) - Hausa (Ghana)" +Language=ha +Label="ha (hausa)" + +[keyboard-fr] +Description="Keyboard - French" +Language=fr +Label=fr + +[keyboard-fr-nodeadkeys] +Description="Keyboard - French - French (no dead keys)" +Language=fr +Label="fr (nodeadkeys)" + +[keyboard-fr-oss] +Description="Keyboard - French - French (alt.)" +Language=fr +Label="fr (oss)" + +[keyboard-fr-oss_nodeadkeys] +Description="Keyboard - French - French (alt., no dead keys)" +Language=fr +Label="fr (oss_nodeadkeys)" + +[keyboard-fr-oss_latin9] +Description="Keyboard - French - French (alt., Latin-9 only)" +Language=fr +Label="fr (oss_latin9)" + +[keyboard-fr-latin9] +Description="Keyboard - French - French (legacy, alt.)" +Language=fr +Label="fr (latin9)" + +[keyboard-fr-latin9_nodeadkeys] +Description="Keyboard - French - French (legacy, alt., no dead keys)" +Language=fr +Label="fr (latin9_nodeadkeys)" + +[keyboard-fr-azerty] +Description="Keyboard - French - French (AZERTY)" +Language=fr +Label="fr (azerty)" + +[keyboard-fr-afnor] +Description="Keyboard - French - French (AZERTY, AFNOR)" +Language=fr +Label="fr (afnor)" + +[keyboard-fr-bepo] +Description="Keyboard - French - French (BEPO)" +Language=fr +Label="fr (bepo)" + +[keyboard-fr-bepo_latin9] +Description="Keyboard - French - French (BEPO, Latin-9 only)" +Language=fr +Label="fr (bepo_latin9)" + +[keyboard-fr-bepo_afnor] +Description="Keyboard - French - French (BEPO, AFNOR)" +Language=fr +Label="fr (bepo_afnor)" + +[keyboard-fr-dvorak] +Description="Keyboard - French - French (Dvorak)" +Language=fr +Label="fr (dvorak)" + +[keyboard-fr-ergol] +Description="Keyboard - French - French (Ergo‑L)" +Language=fr +Label="fr (ergol)" + +[keyboard-fr-ergol_iso] +Description="Keyboard - French - French (Ergo‑L, ISO variant)" +Language=fr +Label="fr (ergol_iso)" + +[keyboard-fr-mac] +Description="Keyboard - French - French (Macintosh)" +Language=fr +Label="fr (mac)" + +[keyboard-fr-us] +Description="Keyboard - French - French (US)" +Language=fr +Label="fr (us)" + +[keyboard-fr-bre] +Description="Keyboard - French - Breton (France)" +Language=br +Label="fr (bre)" + +[keyboard-fr-oci] +Description="Keyboard - French - Occitan" +Language=oc +Label="fr (oci)" + +[keyboard-fr-geo] +Description="Keyboard - French - Georgian (France, AZERTY Tskapo)" +Language=ka +Label="fr (geo)" + +[keyboard-fr-sun_type6] +Description="Keyboard - French - French (Sun Type 6/7)" +Language=fr +Label="fr (sun_type6)" + +[keyboard-fr-us-alt] +Description="Keyboard - French - French (US with dead keys, alt.)" +Language=fr +Label="fr (us-alt)" + +[keyboard-fr-us-azerty] +Description="Keyboard - French - French (US, AZERTY)" +Language=fr +Label="fr (us-azerty)" + +[keyboard-eg] +Description="Keyboard - Arabic (Egypt)" +Language=ar +Label=ar + +[keyboard-eg-cop] +Description="Keyboard - Arabic (Egypt) - Coptic" +Language=cop +Label=cop + +[keyboard-cd] +Description="Keyboard - French (Democratic Republic of the Congo)" +Language=fr +Label=fr + +[keyboard-tg] +Description="Keyboard - French (Togo)" +Language=fr +Label=fr + +[keyboard-kz] +Description="Keyboard - Kazakh" +Language=kk +Label=kk + +[keyboard-kz-kazrus] +Description="Keyboard - Kazakh - Kazakh (with Russian)" +Language=kk +Label="kz (kazrus)" + +[keyboard-kz-ext] +Description="Keyboard - Kazakh - Kazakh (extended)" +Language=kk +Label="kz (ext)" + +[keyboard-kz-latin] +Description="Keyboard - Kazakh - Kazakh (Latin)" +Language=kk +Label="kz (latin)" + +[keyboard-kz-ruskaz] +Description="Keyboard - Kazakh - Russian (Kazakhstan, with Kazakh)" +Language=ru +Label="ru (ruskaz)" + +[keyboard-ch] +Description="Keyboard - German (Switzerland)" +Language=de +Label=de + +[keyboard-ch-de_nodeadkeys] +Description="Keyboard - German (Switzerland) - German (Switzerland, no dead keys)" +Language=de +Label="de (de_nodeadkeys)" + +[keyboard-ch-de_mac] +Description="Keyboard - German (Switzerland) - German (Switzerland, Macintosh)" +Language=de +Label="de (de_mac)" + +[keyboard-ch-legacy] +Description="Keyboard - German (Switzerland) - German (Switzerland, legacy)" +Language=de +Label="ch (legacy)" + +[keyboard-ch-fr] +Description="Keyboard - German (Switzerland) - French (Switzerland)" +Language=fr +Label=fr + +[keyboard-ch-fr_nodeadkeys] +Description="Keyboard - German (Switzerland) - French (Switzerland, no dead keys)" +Language=fr +Label="fr (fr_nodeadkeys)" + +[keyboard-ch-fr_mac] +Description="Keyboard - German (Switzerland) - French (Switzerland, Macintosh)" +Language=fr +Label="fr (fr_mac)" + +[keyboard-ch-sun_type6_de] +Description="Keyboard - German (Switzerland) - German (Switzerland, Sun Type 6/7)" +Language=de +Label="ch (sun_type6_de)" + +[keyboard-ch-sun_type6_fr] +Description="Keyboard - German (Switzerland) - French (Switzerland, Sun Type 6/7)" +Language=de +Label="ch (sun_type6_fr)" + +[keyboard-gr] +Description="Keyboard - Greek" +Language=el +Label=gr + +[keyboard-gr-simple] +Description="Keyboard - Greek - Greek (simple)" +Language=el +Label="gr (simple)" + +[keyboard-gr-nodeadkeys] +Description="Keyboard - Greek - Greek (no dead keys)" +Language=el +Label="gr (nodeadkeys)" + +[keyboard-gr-polytonic] +Description="Keyboard - Greek - Greek (polytonic)" +Language=el +Label="gr (polytonic)" + +[keyboard-gr-sun_type6] +Description="Keyboard - Greek - Greek (Sun Type 6/7)" +Language=el +Label="gr (sun_type6)" + +[keyboard-gr-colemak] +Description="Keyboard - Greek - Greek (Colemak)" +Language=el +Label="gr (colemak)" + +[keyboard-tr] +Description="Keyboard - Turkish" +Language=tr +Label=tr + +[keyboard-tr-f] +Description="Keyboard - Turkish - Turkish (F)" +Language=tr +Label="tr (f)" + +[keyboard-tr-e] +Description="Keyboard - Turkish - Turkish (E)" +Language=tr +Label="tr (e)" + +[keyboard-tr-alt] +Description="Keyboard - Turkish - Turkish (Alt-Q)" +Language=tr +Label="tr (alt)" + +[keyboard-tr-intl] +Description="Keyboard - Turkish - Turkish (intl., with dead keys)" +Language=tr +Label="tr (intl)" + +[keyboard-tr-ku] +Description="Keyboard - Turkish - Kurdish (Turkey, Latin Q)" +Language=ku +Label=ku + +[keyboard-tr-ku_f] +Description="Keyboard - Turkish - Kurdish (Turkey, F)" +Language=ku +Label="ku (ku_f)" + +[keyboard-tr-ku_alt] +Description="Keyboard - Turkish - Kurdish (Turkey, Latin Alt-Q)" +Language=ku +Label="ku (ku_alt)" + +[keyboard-tr-sun_type6] +Description="Keyboard - Turkish - Turkish (Sun Type 6/7)" +Language=tr +Label="tr (sun_type6)" + +[keyboard-tr-us] +Description="Keyboard - Turkish - Turkish (i and ı swapped)" +Language=tr +Label="tr (us)" + +[keyboard-tr-otk] +Description="Keyboard - Turkish - Old Turkic" +Language=tr +Label="tr (otk)" + +[keyboard-tr-otkf] +Description="Keyboard - Turkish - Old Turkic (F)" +Language=tr +Label="tr (otkf)" + +[keyboard-tr-ot] +Description="Keyboard - Turkish - Ottoman (Q)" +Language=tr +Label="tr (ot)" + +[keyboard-tr-otf] +Description="Keyboard - Turkish - Ottoman (F)" +Language=tr +Label="tr (otf)" + +[keyboard-il] +Description="Keyboard - Hebrew" +Language=he +Label=he + +[keyboard-il-si2] +Description="Keyboard - Hebrew - Hebrew (SI-1452-2)" +Language=he +Label="il (si2)" + +[keyboard-il-lyx] +Description="Keyboard - Hebrew - Hebrew (lyx)" +Language=he +Label="il (lyx)" + +[keyboard-il-phonetic] +Description="Keyboard - Hebrew - Hebrew (phonetic)" +Language=he +Label="il (phonetic)" + +[keyboard-il-biblical] +Description="Keyboard - Hebrew - Hebrew (Biblical, Tiro)" +Language=he +Label="il (biblical)" + +[keyboard-il-biblicalSIL] +Description="Keyboard - Hebrew - Hebrew (Biblical, SIL phonetic)" +Language=he +Label="il (biblicalSIL)" + +[keyboard-de] +Description="Keyboard - German" +Language=de +Label=de + +[keyboard-de-deadacute] +Description="Keyboard - German - German (dead acute)" +Language=de +Label="de (deadacute)" + +[keyboard-de-deadgraveacute] +Description="Keyboard - German - German (dead grave acute)" +Language=de +Label="de (deadgraveacute)" + +[keyboard-de-deadtilde] +Description="Keyboard - German - German (dead tilde)" +Language=de +Label="de (deadtilde)" + +[keyboard-de-nodeadkeys] +Description="Keyboard - German - German (no dead keys)" +Language=de +Label="de (nodeadkeys)" + +[keyboard-de-e1] +Description="Keyboard - German - German (E1)" +Language=de +Label="de (e1)" + +[keyboard-de-e2] +Description="Keyboard - German - German (E2)" +Language=de +Label="de (e2)" + +[keyboard-de-T3] +Description="Keyboard - German - German (T3)" +Language=de +Label="de (T3)" + +[keyboard-de-us] +Description="Keyboard - German - German (US)" +Language=de +Label="de (us)" + +[keyboard-de-dvorak] +Description="Keyboard - German - German (Dvorak)" +Language=de +Label="de (dvorak)" + +[keyboard-de-mac] +Description="Keyboard - German - German (Macintosh)" +Language=de +Label="de (mac)" + +[keyboard-de-mac_nodeadkeys] +Description="Keyboard - German - German (Macintosh, no dead keys)" +Language=de +Label="de (mac_nodeadkeys)" + +[keyboard-de-neo] +Description="Keyboard - German - German (Neo 2)" +Language=de +Label="de (neo)" + +[keyboard-de-qwerty] +Description="Keyboard - German - German (QWERTY)" +Language=de +Label="de (qwerty)" + +[keyboard-de-dsb] +Description="Keyboard - German - Lower Sorbian" +Language=dsb +Label="de (dsb)" + +[keyboard-de-dsb_qwertz] +Description="Keyboard - German - Lower Sorbian (QWERTZ)" +Language=dsb +Label="de (dsb_qwertz)" + +[keyboard-de-ro] +Description="Keyboard - German - Romanian (Germany)" +Language=ro +Label="de (ro)" + +[keyboard-de-ro_nodeadkeys] +Description="Keyboard - German - Romanian (Germany, no dead keys)" +Language=ro +Label="de (ro_nodeadkeys)" + +[keyboard-de-ru] +Description="Keyboard - German - Russian (Germany, phonetic)" +Language=ru +Label=ru + +[keyboard-de-tr] +Description="Keyboard - German - Turkish (Germany)" +Language=tr +Label="de (tr)" + +[keyboard-de-hu] +Description="Keyboard - German - German (with Hungarian letters, no dead keys)" +Language=de +Label="de (hu)" + +[keyboard-de-pl] +Description="Keyboard - German - Polish (Germany, no dead keys)" +Language=de +Label="de (pl)" + +[keyboard-de-sun_type6] +Description="Keyboard - German - German (Sun Type 6/7)" +Language=de +Label="de (sun_type6)" + +[keyboard-de-adnw] +Description="Keyboard - German - German (Aus der Neo-Welt)" +Language=de +Label="de (adnw)" + +[keyboard-de-koy] +Description="Keyboard - German - German (KOY)" +Language=de +Label="de (koy)" + +[keyboard-de-bone] +Description="Keyboard - German - German (Bone)" +Language=de +Label="de (bone)" + +[keyboard-de-bone_eszett_home] +Description="Keyboard - German - German (Bone, eszett in the home row)" +Language=de +Label="de (bone_eszett_home)" + +[keyboard-de-neo_qwertz] +Description="Keyboard - German - German (Neo, QWERTZ)" +Language=de +Label="de (neo_qwertz)" + +[keyboard-de-neo_qwerty] +Description="Keyboard - German - German (Neo, QWERTY)" +Language=de +Label="de (neo_qwerty)" + +[keyboard-de-noted] +Description="Keyboard - German - German (Noted)" +Language=de +Label="de (noted)" + +[keyboard-de-ru-recom] +Description="Keyboard - German - Russian (Germany, recommended)" +Language=ru +Label="ru (ru-recom)" + +[keyboard-de-ru-translit] +Description="Keyboard - German - Russian (Germany, transliteration)" +Language=ru +Label="ru (ru-translit)" + +[keyboard-id] +Description="Keyboard - Indonesian (Latin)" +Language=id +Label=id + +[keyboard-id-melayu-phonetic] +Description="Keyboard - Indonesian (Latin) - Indonesian (Arab Melayu, phonetic)" +Language=id +Label="id (melayu-phonetic)" + +[keyboard-id-melayu-phoneticx] +Description="Keyboard - Indonesian (Latin) - Indonesian (Arab Melayu, extended phonetic)" +Language=id +Label="id (melayu-phoneticx)" + +[keyboard-id-pegon-phonetic] +Description="Keyboard - Indonesian (Latin) - Indonesian (Arab Pegon, phonetic)" +Language=id +Label="id (pegon-phonetic)" + +[keyboard-id-javanese] +Description="Keyboard - Indonesian (Latin) - Javanese" +Language=jax +Label="id (javanese)" + +[keyboard-sn] +Description="Keyboard - Wolof" +Language=wo +Label=wo + +[keyboard-az] +Description="Keyboard - Azerbaijani" +Language=az +Label=az + +[keyboard-az-cyrillic] +Description="Keyboard - Azerbaijani - Azerbaijani (Cyrillic)" +Language=az +Label="az (cyrillic)" + +[keyboard-kh] +Description="Keyboard - Khmer (Cambodia)" +Language=km +Label=km + +[keyboard-hu] +Description="Keyboard - Hungarian" +Language=hu +Label=hu + +[keyboard-hu-standard] +Description="Keyboard - Hungarian - Hungarian (standard)" +Language=hu +Label="hu (standard)" + +[keyboard-hu-nodeadkeys] +Description="Keyboard - Hungarian - Hungarian (no dead keys)" +Language=hu +Label="hu (nodeadkeys)" + +[keyboard-hu-qwerty] +Description="Keyboard - Hungarian - Hungarian (QWERTY)" +Language=hu +Label="hu (qwerty)" + +[keyboard-hu-101_qwertz_comma_dead] +Description="Keyboard - Hungarian - Hungarian (QWERTZ, 101-key, comma, dead keys)" +Language=hu +Label="hu (101_qwertz_comma_dead)" + +[keyboard-hu-101_qwertz_comma_nodead] +Description="Keyboard - Hungarian - Hungarian (QWERTZ, 101-key, comma, no dead keys)" +Language=hu +Label="hu (101_qwertz_comma_nodead)" + +[keyboard-hu-101_qwertz_dot_dead] +Description="Keyboard - Hungarian - Hungarian (QWERTZ, 101-key, dot, dead keys)" +Language=hu +Label="hu (101_qwertz_dot_dead)" + +[keyboard-hu-101_qwertz_dot_nodead] +Description="Keyboard - Hungarian - Hungarian (QWERTZ, 101-key, dot, no dead keys)" +Language=hu +Label="hu (101_qwertz_dot_nodead)" + +[keyboard-hu-101_qwerty_comma_dead] +Description="Keyboard - Hungarian - Hungarian (QWERTY, 101-key, comma, dead keys)" +Language=hu +Label="hu (101_qwerty_comma_dead)" + +[keyboard-hu-101_qwerty_comma_nodead] +Description="Keyboard - Hungarian - Hungarian (QWERTY, 101-key, comma, no dead keys)" +Language=hu +Label="hu (101_qwerty_comma_nodead)" + +[keyboard-hu-101_qwerty_dot_dead] +Description="Keyboard - Hungarian - Hungarian (QWERTY, 101-key, dot, dead keys)" +Language=hu +Label="hu (101_qwerty_dot_dead)" + +[keyboard-hu-101_qwerty_dot_nodead] +Description="Keyboard - Hungarian - Hungarian (QWERTY, 101-key, dot, no dead keys)" +Language=hu +Label="hu (101_qwerty_dot_nodead)" + +[keyboard-hu-102_qwertz_comma_dead] +Description="Keyboard - Hungarian - Hungarian (QWERTZ, 102-key, comma, dead keys)" +Language=hu +Label="hu (102_qwertz_comma_dead)" + +[keyboard-hu-102_qwertz_comma_nodead] +Description="Keyboard - Hungarian - Hungarian (QWERTZ, 102-key, comma, no dead keys)" +Language=hu +Label="hu (102_qwertz_comma_nodead)" + +[keyboard-hu-102_qwertz_dot_dead] +Description="Keyboard - Hungarian - Hungarian (QWERTZ, 102-key, dot, dead keys)" +Language=hu +Label="hu (102_qwertz_dot_dead)" + +[keyboard-hu-102_qwertz_dot_nodead] +Description="Keyboard - Hungarian - Hungarian (QWERTZ, 102-key, dot, no dead keys)" +Language=hu +Label="hu (102_qwertz_dot_nodead)" + +[keyboard-hu-102_qwerty_comma_dead] +Description="Keyboard - Hungarian - Hungarian (QWERTY, 102-key, comma, dead keys)" +Language=hu +Label="hu (102_qwerty_comma_dead)" + +[keyboard-hu-102_qwerty_comma_nodead] +Description="Keyboard - Hungarian - Hungarian (QWERTY, 102-key, comma, no dead keys)" +Language=hu +Label="hu (102_qwerty_comma_nodead)" + +[keyboard-hu-102_qwerty_dot_dead] +Description="Keyboard - Hungarian - Hungarian (QWERTY, 102-key, dot, dead keys)" +Language=hu +Label="hu (102_qwerty_dot_dead)" + +[keyboard-hu-102_qwerty_dot_nodead] +Description="Keyboard - Hungarian - Hungarian (QWERTY, 102-key, dot, no dead keys)" +Language=hu +Label="hu (102_qwerty_dot_nodead)" + +[keyboard-hu-oldhunlig] +Description="Keyboard - Hungarian - Old Hungarian (for ligatures)" +Language=hu +Label="oldhun(lig) (oldhunlig)" + +[keyboard-hu-oldhun_sk_sh] +Description="Keyboard - Hungarian - Old Hungarian (Carpathian Highlands, S as Sh)" +Language=hu +Label="oldhun(SK,Sh) (oldhun_sk_sh)" + +[keyboard-hu-oldhun_sk_sz] +Description="Keyboard - Hungarian - Old Hungarian (Carpathian Highlands, S as Sz)" +Language=hu +Label="oldhun(SK,Sz) (oldhun_sk_sz)" + +[keyboard-hu-us] +Description="Keyboard - Hungarian - Hungarian (US)" +Language=hu +Label=us + +[keyboard-ng] +Description="Keyboard - English (Nigeria)" +Language=en +Label=en + +[keyboard-ng-hausa] +Description="Keyboard - English (Nigeria) - Hausa (Nigeria)" +Language=ha +Label="ha (hausa)" + +[keyboard-ng-igbo] +Description="Keyboard - English (Nigeria) - Igbo" +Language=ig +Label="ig (igbo)" + +[keyboard-ng-yoruba] +Description="Keyboard - English (Nigeria) - Yoruba" +Language=yo +Label="yo (yoruba)" + +[keyboard-is] +Description="Keyboard - Icelandic" +Language=is +Label=is + +[keyboard-is-mac_legacy] +Description="Keyboard - Icelandic - Icelandic (Macintosh, legacy)" +Language=is +Label="is (mac_legacy)" + +[keyboard-is-mac] +Description="Keyboard - Icelandic - Icelandic (Macintosh)" +Language=is +Label="is (mac)" + +[keyboard-is-dvorak] +Description="Keyboard - Icelandic - Icelandic (Dvorak)" +Language=is +Label="is (dvorak)" + +[keyboard-in] +Description="Keyboard - Indian" +Language=hi +Label=in + +[keyboard-in-asm-kagapa] +Description="Keyboard - Indian - Assamese (KaGaPa, phonetic)" +Language=as +Label="as (asm-kagapa)" + +[keyboard-in-ben] +Description="Keyboard - Indian - Bangla (India)" +Language=bn +Label="bn (ben)" + +[keyboard-in-ben_probhat] +Description="Keyboard - Indian - Bangla (India, Probhat)" +Language=bn +Label="bn (ben_probhat)" + +[keyboard-in-ben_baishakhi] +Description="Keyboard - Indian - Bangla (India, Baishakhi)" +Language=bn +Label="in (ben_baishakhi)" + +[keyboard-in-ben_bornona] +Description="Keyboard - Indian - Bangla (India, Bornona)" +Language=bn +Label="in (ben_bornona)" + +[keyboard-in-ben-kagapa] +Description="Keyboard - Indian - Bangla (India, KaGaPa, phonetic)" +Language=bn +Label="in (ben-kagapa)" + +[keyboard-in-ben_gitanjali] +Description="Keyboard - Indian - Bangla (India, Gitanjali)" +Language=bn +Label="in (ben_gitanjali)" + +[keyboard-in-ben_inscript] +Description="Keyboard - Indian - Bangla (India, Baishakhi InScript)" +Language=bn +Label="in (ben_inscript)" + +[keyboard-in-eng] +Description="Keyboard - Indian - English (India, with rupee)" +Language=en +Label="en (eng)" + +[keyboard-in-guj] +Description="Keyboard - Indian - Gujarati" +Language=gu +Label="gu (guj)" + +[keyboard-in-guj-kagapa] +Description="Keyboard - Indian - Gujarati (KaGaPa, phonetic)" +Language=gu +Label="gu (guj-kagapa)" + +[keyboard-in-bolnagri] +Description="Keyboard - Indian - Hindi (Bolnagri)" +Language=hi +Label="hi (bolnagri)" + +[keyboard-in-hin-wx] +Description="Keyboard - Indian - Hindi (Wx)" +Language=hi +Label="hi (hin-wx)" + +[keyboard-in-hin-kagapa] +Description="Keyboard - Indian - Hindi (KaGaPa, phonetic)" +Language=hi +Label="hi (hin-kagapa)" + +[keyboard-in-kan] +Description="Keyboard - Indian - Kannada" +Language=kn +Label="kn (kan)" + +[keyboard-in-kan-kagapa] +Description="Keyboard - Indian - Kannada (KaGaPa, phonetic)" +Language=kn +Label="kn (kan-kagapa)" + +[keyboard-in-mal] +Description="Keyboard - Indian - Malayalam" +Language=ml +Label="ml (mal)" + +[keyboard-in-mal_lalitha] +Description="Keyboard - Indian - Malayalam (Lalitha)" +Language=ml +Label="ml (mal_lalitha)" + +[keyboard-in-mal_enhanced] +Description="Keyboard - Indian - Malayalam (enhanced InScript, with rupee)" +Language=ml +Label="ml (mal_enhanced)" + +[keyboard-in-mal_poorna] +Description="Keyboard - Indian - Malayalam (Poorna, extended InScript)" +Language=ml +Label="ml (mal_poorna)" + +[keyboard-in-mni] +Description="Keyboard - Indian - Manipuri (Meitei)" +Language=mni +Label="in (mni)" + +[keyboard-in-mar-kagapa] +Description="Keyboard - Indian - Marathi (KaGaPa, phonetic)" +Language=mr +Label="mr (mar-kagapa)" + +[keyboard-in-marathi] +Description="Keyboard - Indian - Marathi (enhanced InScript)" +Language=mr +Label="in (marathi)" + +[keyboard-in-ori] +Description="Keyboard - Indian - Oriya" +Language=or +Label="or (ori)" + +[keyboard-in-ori-bolnagri] +Description="Keyboard - Indian - Oriya (Bolnagri)" +Language=or +Label="or (ori-bolnagri)" + +[keyboard-in-ori-wx] +Description="Keyboard - Indian - Oriya (Wx)" +Language=or +Label="or (ori-wx)" + +[keyboard-in-guru] +Description="Keyboard - Indian - Punjabi (Gurmukhi)" +Language=pa +Label="pa (guru)" + +[keyboard-in-jhelum] +Description="Keyboard - Indian - Punjabi (Gurmukhi Jhelum)" +Language=pa +Label="pa (jhelum)" + +[keyboard-in-san-kagapa] +Description="Keyboard - Indian - Sanskrit (KaGaPa, phonetic)" +Language=sa +Label="sa (san-kagapa)" + +[keyboard-in-sat] +Description="Keyboard - Indian - Santali (Ol Chiki)" +Language=sat +Label=sat + +[keyboard-in-tamilnet] +Description="Keyboard - Indian - Tamil (TamilNet '99)" +Language=ta +Label="ta (tamilnet)" + +[keyboard-in-tamilnet_tamilnumbers] +Description="Keyboard - Indian - Tamil (TamilNet '99 with Tamil numerals)" +Language=ta +Label="ta (tamilnet_tamilnumbers)" + +[keyboard-in-tamilnet_TAB] +Description="Keyboard - Indian - Tamil (TamilNet '99, TAB encoding)" +Language=ta +Label="ta (tamilnet_TAB)" + +[keyboard-in-tamilnet_TSCII] +Description="Keyboard - Indian - Tamil (TamilNet '99, TSCII encoding)" +Language=ta +Label="ta (tamilnet_TSCII)" + +[keyboard-in-tam] +Description="Keyboard - Indian - Tamil (InScript, with Arabic numerals)" +Language=ta +Label="ta (tam)" + +[keyboard-in-tam_tamilnumbers] +Description="Keyboard - Indian - Tamil (InScript, with Tamil numerals)" +Language=ta +Label="ta (tam_tamilnumbers)" + +[keyboard-in-tel] +Description="Keyboard - Indian - Telugu" +Language=te +Label="te (tel)" + +[keyboard-in-tel-kagapa] +Description="Keyboard - Indian - Telugu (KaGaPa, phonetic)" +Language=te +Label="te (tel-kagapa)" + +[keyboard-in-tel-sarala] +Description="Keyboard - Indian - Telugu (Sarala)" +Language=te +Label="te (tel-sarala)" + +[keyboard-in-urd-phonetic] +Description="Keyboard - Indian - Urdu (phonetic)" +Language=ur +Label="ur (urd-phonetic)" + +[keyboard-in-urd-phonetic3] +Description="Keyboard - Indian - Urdu (alt. phonetic)" +Language=ur +Label="ur (urd-phonetic3)" + +[keyboard-in-urd-winkeys] +Description="Keyboard - Indian - Urdu (Windows)" +Language=ur +Label="ur (urd-winkeys)" + +[keyboard-in-iipa] +Description="Keyboard - Indian - Indic IPA" +Language=en +Label="in (iipa)" + +[keyboard-in-modi-kagapa] +Description="Keyboard - Indian - Modi (KaGaPa, phonetic)" +Language=mr +Label="mr (modi-kagapa)" + +[keyboard-in-san-misc] +Description="Keyboard - Indian - Sanskrit symbols" +Language=sa +Label="sas (san-misc)" + +[keyboard-in-urd-navees] +Description="Keyboard - Indian - Urdu (Navees)" +Language=ur +Label="ur (urd-navees)" + +[keyboard-it] +Description="Keyboard - Italian" +Language=it +Label=it + +[keyboard-it-nodeadkeys] +Description="Keyboard - Italian - Italian (no dead keys)" +Language=it +Label="it (nodeadkeys)" + +[keyboard-it-winkeys] +Description="Keyboard - Italian - Italian (Windows)" +Language=it +Label="it (winkeys)" + +[keyboard-it-mac] +Description="Keyboard - Italian - Italian (Macintosh)" +Language=it +Label="it (mac)" + +[keyboard-it-us] +Description="Keyboard - Italian - Italian (US)" +Language=it +Label="it (us)" + +[keyboard-it-ibm] +Description="Keyboard - Italian - Italian (IBM 142)" +Language=it +Label="it (ibm)" + +[keyboard-it-fur] +Description="Keyboard - Italian - Friulian (Italy)" +Language=fur +Label="it (fur)" + +[keyboard-it-scn] +Description="Keyboard - Italian - Sicilian" +Language=it +Label="it (scn)" + +[keyboard-it-geo] +Description="Keyboard - Italian - Georgian (Italy)" +Language=ka +Label="it (geo)" + +[keyboard-it-sun_type6] +Description="Keyboard - Italian - Italian (Sun Type 6/7)" +Language=it +Label="it (sun_type6)" + +[keyboard-it-lld] +Description="Keyboard - Italian - Ladin (Italian keyboard)" +Language=it +Label="it_lld (lld)" + +[keyboard-it-lldde] +Description="Keyboard - Italian - Ladin (German keyboard)" +Language=de +Label="de_lld (lldde)" + +[keyboard-it-dvorak] +Description="Keyboard - Italian - Italian (Dvorak)" +Language=it +Label="it (dvorak)" + +[keyboard-jp] +Description="Keyboard - Japanese" +Language=ja +Label=ja + +[keyboard-jp-kana] +Description="Keyboard - Japanese - Japanese (Kana)" +Language=ja +Label="jp (kana)" + +[keyboard-jp-kana86] +Description="Keyboard - Japanese - Japanese (Kana 86)" +Language=ja +Label="jp (kana86)" + +[keyboard-jp-OADG109A] +Description="Keyboard - Japanese - Japanese (OADG 109A)" +Language=ja +Label="jp (OADG109A)" + +[keyboard-jp-mac] +Description="Keyboard - Japanese - Japanese (Macintosh)" +Language=ja +Label="jp (mac)" + +[keyboard-jp-dvorak] +Description="Keyboard - Japanese - Japanese (Dvorak)" +Language=ja +Label="jp (dvorak)" + +[keyboard-jp-sun_type6] +Description="Keyboard - Japanese - Japanese (Sun Type 6)" +Language=ja +Label="jp (sun_type6)" + +[keyboard-jp-sun_type7] +Description="Keyboard - Japanese - Japanese (Sun Type 7, PC-compatible)" +Language=ja +Label="jp (sun_type7)" + +[keyboard-jp-sun_type7_suncompat] +Description="Keyboard - Japanese - Japanese (Sun Type 7, Sun-compatible)" +Language=ja +Label="jp (sun_type7_suncompat)" + diff --git a/home/dot_config/fcitx5/conf/notifications.conf b/home/dot_config/fcitx5/conf/notifications.conf new file mode 100644 index 0000000..6e7d1b9 --- /dev/null +++ b/home/dot_config/fcitx5/conf/notifications.conf @@ -0,0 +1,3 @@ +# Hidden Notifications +HiddenNotifications= + diff --git a/platforms/linux/fcitx5/config b/home/dot_config/fcitx5/config similarity index 59% rename from platforms/linux/fcitx5/config rename to home/dot_config/fcitx5/config index 2c98456..5fba3dc 100644 --- a/platforms/linux/fcitx5/config +++ b/home/dot_config/fcitx5/config @@ -1,15 +1,13 @@ [Hotkey] -# 反复按切换键时进行轮换 +# Enumerate when press trigger key repeatedly EnumerateWithTriggerKeys=True -# 向前切换输入法 +# Enumerate Input Method Forward EnumerateForwardKeys= -# 向后切换输入法 +# Enumerate Input Method Backward EnumerateBackwardKeys= -# 轮换输入法时跳过第一个输入法 +# Skip first input method while enumerating EnumerateSkipFirst=False -# 切换是否使用嵌入预编辑 -TogglePreedit= -# 触发修饰键快捷键的时限 (毫秒) +# Time limit in milliseconds for triggering modifier key shortcuts ModifierOnlyKeyTimeout=250 [Hotkey/TriggerKeys] @@ -44,28 +42,31 @@ ModifierOnlyKeyTimeout=250 [Hotkey/NextCandidate] 0=Tab +[Hotkey/TogglePreedit] +0=Control+Alt+P + [Behavior] -# 默认状态为激活 +# Active By Default ActiveByDefault=False -# 重新聚焦时重置状态 +# Reset state on Focus In resetStateWhenFocusIn=No -# 共享输入状态 +# Share Input State ShareInputState=No -# 在程序中显示预编辑文本 +# Show preedit in application PreeditEnabledByDefault=True -# 切换输入法时显示输入法信息 +# Show Input Method Information when switch input method ShowInputMethodInformation=True -# 在焦点更改时显示输入法信息 +# Show Input Method Information when changing focus showInputMethodInformationWhenFocusIn=False -# 显示紧凑的输入法信息 +# Show compact input method information CompactInputMethodInformation=True -# 显示第一个输入法的信息 +# Show first input method information ShowFirstInputMethodInformation=True -# 默认页大小 +# Default page size DefaultPageSize=5 -# 覆盖 Xkb 选项 +# Override Xkb Option OverrideXkbOption=False -# 自定义 Xkb 选项 +# Custom Xkb Option CustomXkbOption= # Force Enabled Addons EnabledAddons= @@ -73,10 +74,10 @@ EnabledAddons= DisabledAddons= # Preload input method to be used by default PreloadInputMethod=True -# 允许在密码框中使用输入法 +# Allow input method in the password field AllowInputMethodForPassword=False -# 输入密码时显示预编辑文本 +# Show preedit text when typing password ShowPreeditForPassword=False -# 保存用户数据的时间间隔(以分钟为单位) +# Interval of saving user data in minutes AutoSavePeriod=30 diff --git a/platforms/linux/fcitx5/profile b/home/dot_config/fcitx5/profile similarity index 54% rename from platforms/linux/fcitx5/profile rename to home/dot_config/fcitx5/profile index d264f5e..f1922f1 100644 --- a/platforms/linux/fcitx5/profile +++ b/home/dot_config/fcitx5/profile @@ -1,10 +1,10 @@ [Groups/0] # Group Name -Name=默认 +Name="Group 2" # Layout Default Layout=us # Default Input Method -DefaultIM=rime +DefaultIM=keyboard-us [Groups/0/Items/0] # Name @@ -12,12 +12,21 @@ Name=keyboard-us # Layout Layout= -[Groups/0/Items/1] +[Groups/1] +# Group Name +Name="Group 1" +# Layout +Default Layout=us +# Default Input Method +DefaultIM=rime + +[Groups/1/Items/0] # Name Name=rime # Layout Layout= [GroupOrder] -0=默认 +0="Group 1" +1="Group 2" diff --git a/platforms/mac/readme.md b/home/dot_config/fish/completions/.keep similarity index 100% rename from platforms/mac/readme.md rename to home/dot_config/fish/completions/.keep diff --git a/tools/fish/conf.d/0init.fish b/home/dot_config/fish/conf.d/0init.fish similarity index 96% rename from tools/fish/conf.d/0init.fish rename to home/dot_config/fish/conf.d/0init.fish index e8969ed..ff5f28c 100644 --- a/tools/fish/conf.d/0init.fish +++ b/home/dot_config/fish/conf.d/0init.fish @@ -19,6 +19,7 @@ set -gx XDG_CACHE_HOME (set -q XDG_CACHE_HOME; and echo $XDG_CACHE_HOME; or echo if test (uname) = "Darwin" set -gx XDG_RUNTIME_DIR $HOME/.tmp/run/ + fish_add_path /run/current-system/sw/bin else set -gx XDG_RUNTIME_DIR /run/user/(id -u) end @@ -54,10 +55,9 @@ if command -v bun > /dev/null set -gx PATH $BUN_INSTALL/bin $PATH end # Rust Cargo -if command -v cargo > /dev/null - set -gx CARGO_HOME $XDG_DATA_HOME/cargo - set -gx PATH $CARGO_HOME/bin $PATH -end +set -gx RUSTUP_HOME $XDG_DATA_HOME/rustup +set -gx CARGO_HOME $XDG_DATA_HOME/cargo +set -gx PATH $CARGO_HOME/bin $PATH # CGDB if command -v cgdb > /dev/null set -gx CGDB_DIR $XDG_CONFIG_HOME/cgdb @@ -173,4 +173,3 @@ test -f /opt/miniconda3/etc/fish/conf.d/conda.fish && source /opt/miniconda3/etc test -d $HOME/.local/scripts && fish_add_path $HOME/.local/scripts test -d $HOME/.local/build && fish_add_path $HOME/.local/build -source "/home/js0ny/.deno/env.fish" diff --git a/tools/fish/conf.d/alias.fish b/home/dot_config/fish/conf.d/alias.fish similarity index 100% rename from tools/fish/conf.d/alias.fish rename to home/dot_config/fish/conf.d/alias.fish diff --git a/tools/fish/conf.d/colorscheme.fish b/home/dot_config/fish/conf.d/colorscheme.fish similarity index 100% rename from tools/fish/conf.d/colorscheme.fish rename to home/dot_config/fish/conf.d/colorscheme.fish diff --git a/tools/fish/conf.d/keymap.fish b/home/dot_config/fish/conf.d/keymap.fish similarity index 100% rename from tools/fish/conf.d/keymap.fish rename to home/dot_config/fish/conf.d/keymap.fish diff --git a/tools/fish/conf.d/keymap/+colemak.fish b/home/dot_config/fish/conf.d/keymap/+colemak.fish similarity index 100% rename from tools/fish/conf.d/keymap/+colemak.fish rename to home/dot_config/fish/conf.d/keymap/+colemak.fish diff --git a/tools/fish/conf.d/navi.fish b/home/dot_config/fish/conf.d/navi.fish similarity index 100% rename from tools/fish/conf.d/navi.fish rename to home/dot_config/fish/conf.d/navi.fish diff --git a/tools/fish/conf.d/prompt.fish b/home/dot_config/fish/conf.d/prompt.fish similarity index 100% rename from tools/fish/conf.d/prompt.fish rename to home/dot_config/fish/conf.d/prompt.fish diff --git a/tools/fish/conf.d/winterop.fish b/home/dot_config/fish/conf.d/winterop.fish similarity index 100% rename from tools/fish/conf.d/winterop.fish rename to home/dot_config/fish/conf.d/winterop.fish diff --git a/tools/fish/config.fish b/home/dot_config/fish/config.fish similarity index 100% rename from tools/fish/config.fish rename to home/dot_config/fish/config.fish diff --git a/tools/zsh/zprofile b/home/dot_config/fish/functions/.keep similarity index 100% rename from tools/zsh/zprofile rename to home/dot_config/fish/functions/.keep diff --git a/home/dot_config/fish/functions/dotenv.fish b/home/dot_config/fish/functions/dotenv.fish new file mode 100644 index 0000000..eaf5c6c --- /dev/null +++ b/home/dot_config/fish/functions/dotenv.fish @@ -0,0 +1,73 @@ +function dotenv + # Parses commend-line arguments and sets _flag_[xuh] variables. Complains if the user tries to use both -x and -u. + argparse --name=dotenv -x 'u,x' 'u/unset' 'h/help' 'x/export' 'q/quiet' -- $argv + + # If the h or --help flags are set (both can be checked using _flag_h), display help, and ignore everything else. + if test $_flag_h + __help_dotenv + else + # Any non-option command-line arguments are assumed to be .env files, so we check to see if any are present. + if set -q argv; and test (count $argv) -gt 0 + set env_files $argv + # If no environment files are specified on the command-line, we default to .env + else + set env_files .env + end + # Loop through all of the specified environment variable files and set any variables found within + for env_file in $env_files + if test -r $env_file + while read -l line + # Set variables to be global, otherwise they will not be available in your shell once this script + # has finished running. + set set_args "-g" + + # Remove the "export" directive from the line if present, and set a variable indicating whether or + # not it was found. Negate the return value of "string replace" so that 1/true means we found the + # export directive. This makes its usage easier to follow in subsequent lines. + set trimmed_line (not string replace -r '^\s*export\s+' '' -- $line) + set export $status + + # If we found the export directive in the previous step, or if -x/--export was specified on the + # command-line, set the export flag for the upcoming 'set' command. + if test $export -eq 1; or begin; set -q _flag_x; and test "$_flag_x" = "-x"; end; + set set_args "$set_args"x + end + + # Check to see if the line we are processing is basically sane. The fish set command will ignore + # leading white space on the variable name, so we allow it in our check. + if string match -q --regex -- '^\s*[a-zA-Z0-9_]+=' "$trimmed_line" + # Split the current line into name and value, and store them in $kv. We use -m1 because we only + # want to split on the first "=" we encounter. Everything after that, including additional "=" + # characters, is part of the value. + set kv (string split -m 1 = -- $trimmed_line) + # If -u/--unset has been specified, erase the variable. + if set -q _flag_u; and test "$_flag_u" = "-u" + set -e $kv[1] + # Otherwise, set the shell variable. The variable $kv contains both the name and the value we + # want to set. + else + set $set_args $kv + end + end + # Combined with the `while` keyword, this reads $env_file one line at a time. + end <$env_file + else + if not set -q _flag_q; or test "$_flag_q" != '-q' + echo "Unable to locate file $env_file" + end + end + end + end + + # This function will be available to be called directly from the shell, even though it is defined inside of dotenv. + # I put it into its own function because I think it looks a little cleaner than having a big blob of echoes inside + # the "if" statement near the top of this function. + function __help_dotenv + echo "Usage: dotenv [-u] [files]" + echo "-h/--help: Display this help message." + echo "-u/--unset: Read [files] and unset the variables found therein." + echo "-x/--export: Force variables to be exported, regardless of whether or not they are preceded by 'export' in the env file." + echo "[files]: One or more files containing name=value pairs to be read into the environment. Defaults to .env." + echo "" + end +end diff --git a/tools/fish/readme.md b/home/dot_config/fish/readme.md similarity index 100% rename from tools/fish/readme.md rename to home/dot_config/fish/readme.md diff --git a/tools/fish/themes/Catppuccin Latte.theme b/home/dot_config/fish/themes/Catppuccin Latte.theme similarity index 100% rename from tools/fish/themes/Catppuccin Latte.theme rename to home/dot_config/fish/themes/Catppuccin Latte.theme diff --git a/tools/fish/themes/Catppuccin Mocha.theme b/home/dot_config/fish/themes/Catppuccin Mocha.theme similarity index 100% rename from tools/fish/themes/Catppuccin Mocha.theme rename to home/dot_config/fish/themes/Catppuccin Mocha.theme diff --git a/tools/fish/themes/Rosé Pine Dawn.theme b/home/dot_config/fish/themes/Rosé Pine Dawn.theme similarity index 100% rename from tools/fish/themes/Rosé Pine Dawn.theme rename to home/dot_config/fish/themes/Rosé Pine Dawn.theme diff --git a/common/gitconfig.example b/home/dot_config/git/_gitconfig.shared.tmpl similarity index 92% rename from common/gitconfig.example rename to home/dot_config/git/_gitconfig.shared.tmpl index 5462581..aefb356 100644 --- a/common/gitconfig.example +++ b/home/dot_config/git/_gitconfig.shared.tmpl @@ -7,9 +7,9 @@ # *nix: ~/.config/git/config # Linking: (Note that this file is an example, only copy this then edit) # cp $DOTFILES/common/gitconfig.example ~/.config/git/config -[user] # Modify the name and email - name = whoami - email = whoami@example.com +[user] + name = {{ .username }} + email = {{ .email }} [alias] cl = clone clnh = clone --depth 1 # Clone with no history @@ -28,10 +28,12 @@ excludesfile = $XDG_CONFIG_HOME/git/ignore quotePath = false # zh-CN: 解决中文路径问题 eol = lf -[include] - path = ~/.config/git/catppuccin-delta.gitconfig [core] +{{- if eq .chezmoi.os "windows" }} + editor = vim +{{- else }} editor = nvim +{{- end }} pager = delta autocrlf = input # Force End of Line in different platforms [interactive] diff --git a/home/dot_config/git/config.tmpl b/home/dot_config/git/config.tmpl new file mode 100644 index 0000000..c26854a --- /dev/null +++ b/home/dot_config/git/config.tmpl @@ -0,0 +1 @@ +{{ includeTemplate "dot_config/git/_gitconfig.shared.tmpl" . }} diff --git a/common/glow.yaml b/home/dot_config/glow/config.yml similarity index 100% rename from common/glow.yaml rename to home/dot_config/glow/config.yml diff --git a/platforms/linux/hypr/.gitignore b/home/dot_config/hypr/dot_gitignore similarity index 100% rename from platforms/linux/hypr/.gitignore rename to home/dot_config/hypr/dot_gitignore diff --git a/platforms/linux/hypr/hypridle.conf b/home/dot_config/hypr/hypridle.conf similarity index 100% rename from platforms/linux/hypr/hypridle.conf rename to home/dot_config/hypr/hypridle.conf diff --git a/platforms/linux/hypr/hyprland.conf b/home/dot_config/hypr/hyprland.conf similarity index 96% rename from platforms/linux/hypr/hyprland.conf rename to home/dot_config/hypr/hyprland.conf index 01c11e5..b7f2b11 100644 --- a/platforms/linux/hypr/hyprland.conf +++ b/home/dot_config/hypr/hyprland.conf @@ -49,6 +49,7 @@ xwayland { # Format: # MONITOR_NAME,RESOLUTION@REFRESH_RATE,OFFSET_XxOFFSET_Y,SCALE monitor=DP-2,3840x2160@60,0x0,1.667 +monitor=eDP-1,disable ################### @@ -72,7 +73,7 @@ monitor=DP-2,3840x2160@60,0x0,1.667 # Top Bar exec-once = waybar & # Notifications -exec-once = dunst & +# exec-once = dunst & # exec-once = hyprpanel & # wallpapers exec-once = swww-daemon & @@ -86,8 +87,6 @@ exec-once = wl-paste --watch cliphist store # exec-once = QT_SCALE_FACTOR=1 albert & # Bluetooth Manager exec-once = blueman-applet & -# Time Tracker -exec-once = aw-qt & @@ -137,7 +136,7 @@ general { # https://wiki.hyprland.org/Configuring/Variables/#decoration decoration { - rounding = 0 + rounding = 20 # Change transparency of focused and unfocused windows # active_opacity = 1 @@ -235,6 +234,7 @@ input { } } +# gesture = 4, horizontal, workspace # https://wiki.hyprland.org/Configuring/Variables/#gestures gestures { workspace_swipe = true @@ -247,6 +247,10 @@ gestures { # name = epic-mouse-v1 # sensitivity = -0.5 # } +# gesture = 3, horizontal, workspace +# gesture = 3, down, mod: ALT, close +# gesture = 3, up, mod: SUPER, scale: 1.5, fullscreen +# gesture = 3, left, scale: 1.5, float windowrulev2 = opaque, workspace:2 diff --git a/platforms/linux/hypr/hyprland/+colemak.conf b/home/dot_config/hypr/hyprland/+colemak.conf similarity index 94% rename from platforms/linux/hypr/hyprland/+colemak.conf rename to home/dot_config/hypr/hyprland/+colemak.conf index d03a30f..25549fc 100644 --- a/platforms/linux/hypr/hyprland/+colemak.conf +++ b/home/dot_config/hypr/hyprland/+colemak.conf @@ -13,6 +13,8 @@ bind = $mainMod CTRL, h, resizeactive, -10 0 bind = $mainMod CTRL, e, resizeactive, 0 -10 bind = $mainMod CTRL, n, resizeactive, 0 10 +bind = $mainMod SHIFT, l, exec, LC_ALL="en_GB.UTF-8" swaylock + submap = resize binde = , right, resizeactive, 10 0 diff --git a/platforms/linux/hypr/hyprland/+qwerty.conf b/home/dot_config/hypr/hyprland/+qwerty.conf similarity index 94% rename from platforms/linux/hypr/hyprland/+qwerty.conf rename to home/dot_config/hypr/hyprland/+qwerty.conf index 0b86be7..b12dbb5 100644 --- a/platforms/linux/hypr/hyprland/+qwerty.conf +++ b/home/dot_config/hypr/hyprland/+qwerty.conf @@ -13,6 +13,8 @@ bind = $mainMod CTRL, h, resizeactive, -10 0 bind = $mainMod CTRL, k, resizeactive, 0 -10 bind = $mainMod CTRL, j, resizeactive, 0 10 +bind = $mainMod SHIFT, i, exec, LC_ALL="en_GB.UTF-8" swaylock + submap = resize binde = , right, resizeactive, 10 0 diff --git a/platforms/linux/hypr/hyprland/dark.conf b/home/dot_config/hypr/hyprland/dark.conf similarity index 100% rename from platforms/linux/hypr/hyprland/dark.conf rename to home/dot_config/hypr/hyprland/dark.conf diff --git a/platforms/linux/hypr/hyprland/keymaps.conf b/home/dot_config/hypr/hyprland/keymaps.conf similarity index 98% rename from platforms/linux/hypr/hyprland/keymaps.conf rename to home/dot_config/hypr/hyprland/keymaps.conf index 9e8ea2f..4caf009 100644 --- a/platforms/linux/hypr/hyprland/keymaps.conf +++ b/home/dot_config/hypr/hyprland/keymaps.conf @@ -34,8 +34,6 @@ bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d -bind = $mainMod SHIFT, l, exec, LC_ALL="en_GB.UTF-8" swaylock - bind = $mainMod, c, exec, grimblast copysave area $HOME/Pictures/Screenshots/"$(date +%Y%m%d-%H%M%S)" bind = $mainMod SHIFT, c, exec, notify-send "Color: $(hyprpicker)" diff --git a/platforms/linux/hypr/hyprland/light.conf b/home/dot_config/hypr/hyprland/light.conf similarity index 100% rename from platforms/linux/hypr/hyprland/light.conf rename to home/dot_config/hypr/hyprland/light.conf diff --git a/platforms/linux/hypr/hyprland/rules.conf b/home/dot_config/hypr/hyprland/rules.conf similarity index 100% rename from platforms/linux/hypr/hyprland/rules.conf rename to home/dot_config/hypr/hyprland/rules.conf diff --git a/home/dot_config/hypr/hyprland/symlink_current.conf b/home/dot_config/hypr/hyprland/symlink_current.conf new file mode 100644 index 0000000..bee4ce0 --- /dev/null +++ b/home/dot_config/hypr/hyprland/symlink_current.conf @@ -0,0 +1 @@ +dark.conf diff --git a/platforms/linux/hypr/hyprlock.conf b/home/dot_config/hypr/hyprlock.conf similarity index 100% rename from platforms/linux/hypr/hyprlock.conf rename to home/dot_config/hypr/hyprlock.conf diff --git a/platforms/linux/hypr/hyprpaper.conf b/home/dot_config/hypr/hyprpaper.conf similarity index 100% rename from platforms/linux/hypr/hyprpaper.conf rename to home/dot_config/hypr/hyprpaper.conf diff --git a/common/ideavimrc b/home/dot_config/ideavim/ideavimrc similarity index 91% rename from common/ideavimrc rename to home/dot_config/ideavim/ideavimrc index 3e4e251..e011456 100644 --- a/common/ideavimrc +++ b/home/dot_config/ideavim/ideavimrc @@ -1,239 +1,226 @@ -" $DOTFILES/common/ideavimrc -" Date: 2024-12-22 -" Author: js0ny - -" Location: -" $XDG_CONFIG_HOME/ideavim/ideavimrc -" Linking: -" ln -sf $DOTFILES/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc - -source ~/.local/share/intellimacs/spacemacs.vim - -source ~/.local/share/intellimacs/extra.vim -source ~/.local/share/intellimacs/major.vim -source ~/.local/share/intellimacs/hybrid.vim - -source ~/.local/share/intellimacs/which-key.vim - - -" """ Basic Configs """ -let mapleader = " " " set to - -""" Colemak """ -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 - -nnoremap H :bp -nnoremap I :bn -noremap N 5j -noremap E 5k -vnoremap H ^ -xnoremap H ^ -onoremap H ^ -vnoremap I $ -xnoremap I $ -onoremap I $ - - - -" Y to yank to end of line -noremap Y y$ - -""" Options """ -" search for actions: :actionlist - -"" Vim Compat "" -set clipboard=unnamedplus,unnamed,ideaput " integrate with system clipboard -set gdefault " substitute all occurrences in line per default -set history=4096 " keep x lines of command line history -set hlsearch -set ignorecase -set incsearch -set keymodel=startsel,stopsel -set matchpairs+=<:> -set showcmd -set smartcase " no ignore case when pattern is uppercase -set wrapscan " searches wrap around the end of the file - -"" IDE Settings "" -set scrolloff=5 -set sidescrolloff=10 - -"" IDE Features "" -set relativenumber " Hybrid Line Number shown - -"" IdeaVim Only "" -set ideajoin -set ideastatusicon=enabled - -""" Plugins """ - -Plug 'justinmk/vim-sneak' -Plug 'preservim/nerdtree' -Plug 'tpope/vim-surround' -Plug 'tpope/vim-commentary' -Plug 'terryma/vim-multiple-cursors' -Plug 'machakann/vim-highlightedyank' -Plug 'easymotion/vim-easymotion' - -""" Keybindings """ - -"" don't lose selection when indenting "" -vnoremap < >gv -vnoremap = =gv - -"" edit ideavim config v + "" -nnoremap vv :e ~/.ideavimrc -nnoremap vr :source ~/.ideavimrc - -"" NERDTree "" -nnoremap e :NERDTreeToggle - -"" EasyMotion "" -nmap s (easymotion-f) -nmap S (easymotion-F) - -"" Sneak "" -nmap f (sneak-s) -nmap F (sneak-S) - -"" Language Server Protocol "" -nnoremap gd :action GotoDeclaration -nnoremap gtd :action GotoTypeDeclaration -nnoremap gtD :action QuickTypeDefinition -nnoremap gr :action ShowUsages -nnoremap gi :action GotoImplementation -nnoremap gpi :action QuickImplementations -nnoremap gs :action GotoSuperMethod -nnoremap ga :action ShowIntentionActions -nnoremap gq :action ShowIntentionActions -nnoremap ge :action GotoNextError - -"" Collapse and Expand z + "" -nnoremap zi :action ExpandCollapseToggleAction -nnoremap zc :action CollapseRegion -nnoremap zC :action CollapseRegionRecursively -nnoremap zM :action CollapseAll -nnoremap zo :action ExpandRegion -nnoremap zO :action ExpandRegionRecursively -nnoremap zR :action ExpandAll - -"" Miscs "" -nnoremap : :action GotoAction -nnoremap :action GotoFile -nnoremap h :action PrevSplitter -nnoremap i :action NextSplitter - -"" AI Related a + "" -nnoremap ac :action copilot.chat.show -nnoremap ad :action copilot.disableCopilot -nnoremap ae :action copilot.enableCopilot -nnoremap aa :action copilot.openCopilot - -" b : +buffer -nnoremap bb :action Switcher -noremap bd :bdelete -noremap bh :bprevious -noremap bi :bnext -noremap bp :bprevious -noremap bn :bnext - -" c : +code/compile -nnoremap cr :action Run -nnoremap cf :action ReformatCode -nnoremap cs :action GotoSymbol -nnoremap cS :action GotoSymbol -nnoremap cR :action RenameElement -""" Works for Rider only -nnoremap ce :action ReSharperGotoNextErrorInSolution -nnoremap cE :action ReSharperGotoPrevErrorInSolution - -" d : +debug - -" f : +file -nnoremap ff :action GotoFile -nnoremap fF :action TextSearchAction -nnoremap fc :action ShowSettings -nnoremap fC :action ShowSettings -nnoremap fe :NERDTreeToggle -nnoremap fo :OpenInAssociatedApplication -nnoremap ft :action ActivateTerminalToolWindow -nnoremap fx :action WelcomeScreen.Plugins - -" g : +git -nnoremap gp :action Git.Pull -nnoremap gP :action Vcs.Push -nnoremap gb :action Git.Branches -nnoremap gR :action Git.Rebase -nnoremap gM :action Git.Merge -nnoremap gc :action CheckinProject -nnoremap gC :action Git.Clone -nnoremap gg :action ActivateVersionControlToolWindow -nnoremap gS :action Git.Stash - -" h : +help - -" p : +project -nnoremap pr :action Run -nnoremap pd :action Debug -nnoremap pb :action Build - -" q : +quit -nnoremap qq :action Exit -nnoremap Q :action Exit - -" r : +refactor -nnoremap ri :action Inline -nnoremap rr :action RenamElement -nnoremap rev :action IntroduceVariable -vnoremap rev :action IntroduceVariable -nnoremap rem :action ExtractMethod -vnoremap rem :action ExtractMethod -nnoremap rm :action Move -nnoremap ro :action OptimizeImports -nnoremap rG :action Generate - -" t : +test -nnoremap tt :action RiderUnitTestRunSolutionAction -nnoremap tT :action Rider.UnitTesting.MainMenu - -" u : +ui -nnoremap ui :action ChangeLaf -nnoremap uw :action EditorToggleUseSoftWraps - -" w : +write/window -nnoremap ww :write -nnoremap wa :wall -nnoremap wq :wq -nnoremap W :write -nnoremap wh :action PrevSplitter -nnoremap wi :action NextSplitter -nnoremap wH :action SplitHorizontally -nnoremap wI :action SplitHorizontally -nnoremap wN :action SplitVertically -nnoremap wE :action SplitVertically -nnoremap w- :action SplitHorizontally -nnoremap w| :action SplitVertically -nnoremap w\ :action SplitVertically - -nnoremap :action ParameterInfo -inoremap :action ParameterInfo - -""" Handling Ctrls """ - -sethandler i:ide -sethandler n-v:vim i:ide -sethandler a:ide -sethandler > a:ide +" $DOTFILES/common/ideavimrc +" Date: 2024-12-22 +" Author: js0ny + +" Location: +" $XDG_CONFIG_HOME/ideavim/ideavimrc +" Linking: +" ln -sf $DOTFILES/common/ideavimrc $XDG_CONFIG_HOME/ideavim/ideavimrc + +source ~/.local/share/intellimacs/spacemacs.vim + +source ~/.local/share/intellimacs/extra.vim +source ~/.local/share/intellimacs/major.vim +source ~/.local/share/intellimacs/hybrid.vim + +source ~/.local/share/intellimacs/which-key.vim + + +" """ Basic Configs """ +let mapleader = " " " set to + +""" Colemak """ + +nnoremap H :bp +nnoremap L :bn +noremap J 5j +noremap K 5k +vnoremap H ^ +xnoremap H ^ +onoremap H ^ +vnoremap L $ +xnoremap L $ +onoremap L $ + + + +" Y to yank to end of line +noremap Y y$ + +""" Options """ +" search for actions: :actionlist + +"" Vim Compat "" +set clipboard=unnamedplus,unnamed,ideaput " integrate with system clipboard +set gdefault " substitute all occurrences in line per default +set history=4096 " keep x lines of command line history +set hlsearch +set ignorecase +set incsearch +set keymodel=startsel,stopsel +set matchpairs+=<:> +set showcmd +set smartcase " no ignore case when pattern is uppercase +set wrapscan " searches wrap around the end of the file + +"" IDE Settings "" +set scrolloff=5 +set sidescrolloff=10 + +"" IDE Features "" +set relativenumber " Hybrid Line Number shown + +"" IdeaVim Only "" +set ideajoin +set ideastatusicon=enabled + +""" Plugins """ + +Plug 'justinmk/vim-sneak' +Plug 'preservim/nerdtree' +Plug 'tpope/vim-surround' +Plug 'tpope/vim-commentary' +Plug 'terryma/vim-multiple-cursors' +Plug 'machakann/vim-highlightedyank' +Plug 'easymotion/vim-easymotion' + +""" Keybindings """ + +"" don't lose selection when indenting "" +vnoremap < >gv +vnoremap = =gv + +"" edit ideavim config v + "" +nnoremap vv :e ~/.ideavimrc +nnoremap vr :source ~/.ideavimrc + +"" NERDTree "" +nnoremap e :NERDTreeToggle + +"" EasyMotion "" +nmap s (easymotion-f) +nmap S (easymotion-F) + +"" Sneak "" +nmap f (sneak-s) +nmap F (sneak-S) + +"" Language Server Protocol "" +nnoremap gd :action GotoDeclaration +nnoremap gtd :action GotoTypeDeclaration +nnoremap gtD :action QuickTypeDefinition +nnoremap gr :action ShowUsages +nnoremap gi :action GotoImplementation +nnoremap gpi :action QuickImplementations +nnoremap gs :action GotoSuperMethod +nnoremap ga :action ShowIntentionActions +nnoremap gq :action ShowIntentionActions +nnoremap ge :action GotoNextError + +"" Collapse and Expand z + "" +nnoremap zi :action ExpandCollapseToggleAction +nnoremap zc :action CollapseRegion +nnoremap zC :action CollapseRegionRecursively +nnoremap zM :action CollapseAll +nnoremap zo :action ExpandRegion +nnoremap zO :action ExpandRegionRecursively +nnoremap zR :action ExpandAll + +"" Miscs "" +nnoremap : :action GotoAction +nnoremap :action GotoFile +nnoremap h :action PrevSplitter +nnoremap i :action NextSplitter + +"" AI Related a + "" +nnoremap ac :action copilot.chat.show +nnoremap ad :action copilot.disableCopilot +nnoremap ae :action copilot.enableCopilot +nnoremap aa :action copilot.openCopilot + +" b : +buffer +nnoremap bb :action Switcher +noremap bd :bdelete +noremap bh :bprevious +noremap bi :bnext +noremap bp :bprevious +noremap bn :bnext + +" c : +code/compile +nnoremap cr :action Run +nnoremap cf :action ReformatCode +nnoremap cs :action GotoSymbol +nnoremap cS :action GotoSymbol +nnoremap cR :action RenameElement +""" Works for Rider only +nnoremap ce :action ReSharperGotoNextErrorInSolution +nnoremap cE :action ReSharperGotoPrevErrorInSolution + +" d : +debug + +" f : +file +nnoremap ff :action GotoFile +nnoremap fF :action TextSearchAction +nnoremap fc :action ShowSettings +nnoremap fC :action ShowSettings +nnoremap fe :NERDTreeToggle +nnoremap fo :OpenInAssociatedApplication +nnoremap ft :action ActivateTerminalToolWindow +nnoremap fx :action WelcomeScreen.Plugins + +" g : +git +nnoremap gp :action Git.Pull +nnoremap gP :action Vcs.Push +nnoremap gb :action Git.Branches +nnoremap gR :action Git.Rebase +nnoremap gM :action Git.Merge +nnoremap gc :action CheckinProject +nnoremap gC :action Git.Clone +nnoremap gg :action ActivateVersionControlToolWindow +nnoremap gS :action Git.Stash + +" h : +help + +" p : +project +nnoremap pr :action Run +nnoremap pd :action Debug +nnoremap pb :action Build + +" q : +quit +nnoremap qq :action Exit +nnoremap Q :action Exit + +" r : +refactor +nnoremap ri :action Inline +nnoremap rr :action RenamElement +nnoremap rev :action IntroduceVariable +vnoremap rev :action IntroduceVariable +nnoremap rem :action ExtractMethod +vnoremap rem :action ExtractMethod +nnoremap rm :action Move +nnoremap ro :action OptimizeImports +nnoremap rG :action Generate + +" t : +test +nnoremap tt :action RiderUnitTestRunSolutionAction +nnoremap tT :action Rider.UnitTesting.MainMenu + +" u : +ui +nnoremap ui :action ChangeLaf +nnoremap uw :action EditorToggleUseSoftWraps + +" w : +write/window +nnoremap ww :write +nnoremap wa :wall +nnoremap wq :wq +nnoremap W :write +nnoremap wh :action PrevSplitter +nnoremap wi :action NextSplitter +nnoremap wH :action SplitHorizontally +nnoremap wL :action SplitHorizontally +nnoremap wJ :action SplitVertically +nnoremap wK :action SplitVertically +nnoremap w- :action SplitHorizontally +nnoremap w| :action SplitVertically +nnoremap w\ :action SplitVertically + +nnoremap :action ParameterInfo +inoremap :action ParameterInfo + +""" Handling Ctrls """ + +sethandler i:ide +sethandler n-v:vim i:ide +sethandler a:ide +sethandler > a:ide diff --git a/tools/ipython/.gitignore b/home/dot_config/ipython/dot_gitignore similarity index 100% rename from tools/ipython/.gitignore rename to home/dot_config/ipython/dot_gitignore diff --git a/home/dot_config/ipython/profile_default/db/.keep b/home/dot_config/ipython/profile_default/db/.keep new file mode 100644 index 0000000..e69de29 diff --git a/home/dot_config/ipython/profile_default/history.sqlite b/home/dot_config/ipython/profile_default/history.sqlite new file mode 100644 index 0000000..f10e871 Binary files /dev/null and b/home/dot_config/ipython/profile_default/history.sqlite differ diff --git a/tools/ipython/profile_default/ipython_config.py b/home/dot_config/ipython/profile_default/ipython_config.py similarity index 100% rename from tools/ipython/profile_default/ipython_config.py rename to home/dot_config/ipython/profile_default/ipython_config.py diff --git a/home/dot_config/ipython/profile_default/log/.keep b/home/dot_config/ipython/profile_default/log/.keep new file mode 100644 index 0000000..e69de29 diff --git a/tools/ipython/profile_default/startup/README b/home/dot_config/ipython/profile_default/startup/README similarity index 100% rename from tools/ipython/profile_default/startup/README rename to home/dot_config/ipython/profile_default/startup/README diff --git a/tools/ipython/profile_default/startup/keymap.py b/home/dot_config/ipython/profile_default/startup/keymap.py similarity index 100% rename from tools/ipython/profile_default/startup/keymap.py rename to home/dot_config/ipython/profile_default/startup/keymap.py diff --git a/tools/ipython/profile_default/startup/magic_ps.py b/home/dot_config/ipython/profile_default/startup/magic_ps.py similarity index 100% rename from tools/ipython/profile_default/startup/magic_ps.py rename to home/dot_config/ipython/profile_default/startup/magic_ps.py diff --git a/platforms/mac/karabiner/assets/complex_modifications/1739653723.json b/home/dot_config/karabiner/assets/complex_modifications/1739653723.json similarity index 100% rename from platforms/mac/karabiner/assets/complex_modifications/1739653723.json rename to home/dot_config/karabiner/assets/complex_modifications/1739653723.json diff --git a/platforms/mac/karabiner/assets/complex_modifications/1741027882.json b/home/dot_config/karabiner/assets/complex_modifications/1741027882.json similarity index 100% rename from platforms/mac/karabiner/assets/complex_modifications/1741027882.json rename to home/dot_config/karabiner/assets/complex_modifications/1741027882.json diff --git a/platforms/mac/karabiner/.gitignore b/home/dot_config/karabiner/dot_gitignore similarity index 100% rename from platforms/mac/karabiner/.gitignore rename to home/dot_config/karabiner/dot_gitignore diff --git a/platforms/mac/karabiner/karabiner.json b/home/dot_config/karabiner/karabiner.json similarity index 100% rename from platforms/mac/karabiner/karabiner.json rename to home/dot_config/karabiner/karabiner.json diff --git a/platforms/mac/karabiner/readme.md b/home/dot_config/karabiner/readme.md similarity index 100% rename from platforms/mac/karabiner/readme.md rename to home/dot_config/karabiner/readme.md diff --git a/home/dot_config/keyd/app.conf b/home/dot_config/keyd/app.conf new file mode 100644 index 0000000..ebbba44 --- /dev/null +++ b/home/dot_config/keyd/app.conf @@ -0,0 +1,19 @@ +[org-telegram-desktop] + +alt.j = macro(C-tab) +alt.k = C-S-tab + +[wechat] + +alt.j = A-down +alt.k = A-up + +[qq] +alt.j = C-down +alt.k = C-up +alt.h = C-left +alt.l = enter + +[zotero] +alt.j = pagedown +alt.k = pageup diff --git a/tools/kitty/dark-theme.auto.conf b/home/dot_config/kitty/dark-theme.auto.conf similarity index 100% rename from tools/kitty/dark-theme.auto.conf rename to home/dot_config/kitty/dark-theme.auto.conf diff --git a/tools/kitty/kitty.conf b/home/dot_config/kitty/kitty.conf similarity index 100% rename from tools/kitty/kitty.conf rename to home/dot_config/kitty/kitty.conf diff --git a/tools/kitty/light-theme.auto.conf b/home/dot_config/kitty/light-theme.auto.conf similarity index 100% rename from tools/kitty/light-theme.auto.conf rename to home/dot_config/kitty/light-theme.auto.conf diff --git a/tools/kitty/window.py b/home/dot_config/kitty/window.py similarity index 100% rename from tools/kitty/window.py rename to home/dot_config/kitty/window.py diff --git a/platforms/linux/kde/krunnerrc b/home/dot_config/krunnerrc similarity index 100% rename from platforms/linux/kde/krunnerrc rename to home/dot_config/krunnerrc diff --git a/home/dot_config/lazygit/empty_config.yml b/home/dot_config/lazygit/empty_config.yml new file mode 100644 index 0000000..e69de29 diff --git a/common/lesskey b/home/dot_config/lesskey similarity index 83% rename from common/lesskey rename to home/dot_config/lesskey index 4e7233c..0edf7ae 100644 --- a/common/lesskey +++ b/home/dot_config/lesskey @@ -1,27 +1,27 @@ -# $DOTFILES/common/lesskey -# Date: 2024-12-22 -# Author: js0ny -# Less the pager. - -# Location: -# *nix: $XDG_CONFIG_HOME/lesskey (Or specified by the environment variable $LESSKEYIN) -# Windows: %LESSKEYIN% (environment variable, default: %UserProfile%/_lesskey) -# $Env:LESSKEYIN = $Env:AppData\less\lesskey -# Linking: -# ln -sf $DOTFILES/common/lesskey ~/.config/lesskey -# New-Item -ItemType SymbolicLink -Target $DOTFILES\common\lesskey -Path $Env:LESSKEYIN -# =========================================================== -# work for less -V > 582, for mac, use brew install less to override the system less -# In Windows (current version), the default pager is `more`, should be specifed to `less` by `$Env:Pager = less` - -# Format: key action - -# Arrow Remap (hnei -> hjkl) -n forw-line -e back-line -N forw-line-force -E back-line-force - -# search with k : ne[k]st -k repeat-search -K reverse-search +# $DOTFILES/common/lesskey +# Date: 2024-12-22 +# Author: js0ny +# Less the pager. + +# Location: +# *nix: $XDG_CONFIG_HOME/lesskey (Or specified by the environment variable $LESSKEYIN) +# Windows: %LESSKEYIN% (environment variable, default: %UserProfile%/_lesskey) +# $Env:LESSKEYIN = $Env:AppData\less\lesskey +# Linking: +# ln -sf $DOTFILES/common/lesskey ~/.config/lesskey +# New-Item -ItemType SymbolicLink -Target $DOTFILES\common\lesskey -Path $Env:LESSKEYIN +# =========================================================== +# work for less -V > 582, for mac, use brew install less to override the system less +# In Windows (current version), the default pager is `more`, should be specifed to `less` by `$Env:Pager = less` + +# Format: key action + +# Arrow Remap (hnei -> hjkl) +# n forw-line +# e back-line +# N forw-line-force +# E back-line-force +# +# # search with k : ne[k]st +# k repeat-search +# K reverse-search diff --git a/common/lsd.yaml b/home/dot_config/lsd/lsd.yaml similarity index 100% rename from common/lsd.yaml rename to home/dot_config/lsd/lsd.yaml diff --git a/platforms/linux/mako-config b/home/dot_config/mako/config similarity index 79% rename from platforms/linux/mako-config rename to home/dot_config/mako/config index 717e84a..792d35e 100644 --- a/platforms/linux/mako-config +++ b/home/dot_config/mako/config @@ -1,9 +1,11 @@ # Colors +default-timeout=5000 background-color=#1e1e2e text-color=#cdd6f4 border-color=#b4befe progress-color=over #313244 +max-visible=10 [urgency=high] border-color=#fab387 diff --git a/platforms/linux/neovide.toml b/home/dot_config/neovide/config.toml similarity index 90% rename from platforms/linux/neovide.toml rename to home/dot_config/neovide/config.toml index 93cf59c..d73a2f8 100644 --- a/platforms/linux/neovide.toml +++ b/home/dot_config/neovide/config.toml @@ -8,7 +8,7 @@ fork = true idle = true maximized = false # neovim-bin = "/opt/homebrew/bin/nvim" -frame = "transparent" +frame = "full" no-multigrid = false srgb = false tabs = true @@ -19,8 +19,7 @@ wsl = false [font] normal = [ - "Maple Mono NF CN", + "Maple Mono NF", "Iosevka Nerd Font", - "霞鹜文楷等宽", ] # Will use the bundled Fira Code Nerd Font by default size = 14.0 diff --git a/nix/flake.lock b/home/dot_config/nix-config/flake.lock similarity index 100% rename from nix/flake.lock rename to home/dot_config/nix-config/flake.lock diff --git a/nix/flake.nix b/home/dot_config/nix-config/flake.nix similarity index 99% rename from nix/flake.nix rename to home/dot_config/nix-config/flake.nix index 586b4e5..8029369 100644 --- a/nix/flake.nix +++ b/home/dot_config/nix-config/flake.nix @@ -16,6 +16,6 @@ ./hosts/macbook/system.nix ]; }; - + }; } diff --git a/tools/nvim/.editorconfig b/home/dot_config/nvim/dot_editorconfig similarity index 100% rename from tools/nvim/.editorconfig rename to home/dot_config/nvim/dot_editorconfig diff --git a/tools/nvim/init.lua b/home/dot_config/nvim/init.lua similarity index 86% rename from tools/nvim/init.lua rename to home/dot_config/nvim/init.lua index 17084ea..b0cf105 100644 --- a/tools/nvim/init.lua +++ b/home/dot_config/nvim/init.lua @@ -8,8 +8,12 @@ -- Entry point of neovim configuration require("config.options") +local term = os.getenv("TERM") or "" if vim.g.vscode then -- TODO: VSCode Neovim Integration require("config.vscode") +elseif term == "linux" then -- Under tty + require("config.tty") + vim.cmd("colorscheme vim") -- Use minimal colorscheme else require("config.plugins") require("config.colorscheme") diff --git a/tools/nvim/lsp/bashls.lua b/home/dot_config/nvim/lsp/bashls.lua similarity index 100% rename from tools/nvim/lsp/bashls.lua rename to home/dot_config/nvim/lsp/bashls.lua diff --git a/tools/nvim/lsp/beancount.lua b/home/dot_config/nvim/lsp/beancount.lua similarity index 100% rename from tools/nvim/lsp/beancount.lua rename to home/dot_config/nvim/lsp/beancount.lua diff --git a/tools/nvim/lsp/clangd.lua b/home/dot_config/nvim/lsp/clangd.lua similarity index 100% rename from tools/nvim/lsp/clangd.lua rename to home/dot_config/nvim/lsp/clangd.lua diff --git a/tools/nvim/lsp/gopls.lua b/home/dot_config/nvim/lsp/gopls.lua similarity index 100% rename from tools/nvim/lsp/gopls.lua rename to home/dot_config/nvim/lsp/gopls.lua diff --git a/tools/nvim/lsp/jdtls.lua b/home/dot_config/nvim/lsp/jdtls.lua similarity index 100% rename from tools/nvim/lsp/jdtls.lua rename to home/dot_config/nvim/lsp/jdtls.lua diff --git a/tools/nvim/lsp/jsonls.lua b/home/dot_config/nvim/lsp/jsonls.lua similarity index 100% rename from tools/nvim/lsp/jsonls.lua rename to home/dot_config/nvim/lsp/jsonls.lua diff --git a/home/dot_config/nvim/lsp/luals.lua b/home/dot_config/nvim/lsp/luals.lua new file mode 100644 index 0000000..6decef3 --- /dev/null +++ b/home/dot_config/nvim/lsp/luals.lua @@ -0,0 +1,87 @@ +-- Lua +--[[ Installation +scoop install lua-language-server +brew install lua-language-server +sudo port install lua-language-server +--]] +--[[ Build: Ninja & C++17 Required +git clone https://github.com/LuaLS/lua-language-server --depth 1 +cd lua-language-server +./make.sh +--]] +--[[ Note: For building from source, wrapper script is required +Accompanied with a wrapper script +#!/bin/bash +exec "$HOME/.local/build/lua-language-server/bin/lua-language-server" "$@" +--]] +return { + cmd = { "lua-language-server" }, + filetypes = { "lua" }, + root_markers = { + ".luarc.json", + ".luarc.jsonc", + ".luacheckrc", + ".stylua.toml", + "stylua.toml", + "selene.toml", + "selene.yml", + ".git", + }, + on_init = function(client) + local path = client.workspace_folders and client.workspace_folders[1] and client.workspace_folders[1].name + if path and (vim.uv.fs_stat(path .. "/.luarc.json") or vim.uv.fs_stat(path .. "/.luarc.jsonc")) then + return + end + client.config.settings = vim.tbl_deep_extend("force", client.config.settings, { + Lua = { + runtime = { + version = "LuaJIT", + }, + workspace = { + checkThirdParty = false, + library = { + vim.env.VIMRUNTIME, + "${3rd}/luv/library", + }, + }, + }, + }) + end, + settings = { + Lua = { + -- Inlay hints + hint = { + enable = true, + setType = true, + arrayIndex = "Disable", + }, + codeLens = { + enable = true, + }, + completion = { + callSnippet = "Replace", + postfix = ".", + displayContext = 50, + }, + telemetry = { + enable = false, + }, + -- Lua LS offers a code formatter + -- Ref: https://github.com/LuaLS/lua-language-server/wiki/Formatter + -- format = { + -- enable = true, + -- defaultConfig = { + -- indent_size = "4", + -- max_line_length = "100", + -- continuation_indent = "8", + -- }, + -- }, + -- diagnostics = { + -- -- Code style checking offered by the Lua LS code formatter + -- neededFileStatus = { + -- ["codestyle-check"] = "Any", + -- }, + -- }, + }, + }, +} diff --git a/tools/nvim/lsp/markdown_oxide.lua b/home/dot_config/nvim/lsp/markdown_oxide.lua similarity index 100% rename from tools/nvim/lsp/markdown_oxide.lua rename to home/dot_config/nvim/lsp/markdown_oxide.lua diff --git a/home/dot_config/nvim/lsp/nil.lua b/home/dot_config/nvim/lsp/nil.lua new file mode 100644 index 0000000..7c99192 --- /dev/null +++ b/home/dot_config/nvim/lsp/nil.lua @@ -0,0 +1,32 @@ +-- /lsp/nil.lua +-- Nil LSP config + +vim.lsp.config("nil", { + cmd = { "nil" }, + root_markers = { + "flake.nix", + "flake.lock", + }, + filetypes = { + "nix", + }, + -- Global config options + settings = { + ["nil"] = { + formatting = { + command = { "alejandra" }, + }, + diagnostics = { + ignored = {}, + }, + nix = { + maxMemoryMB = 2560, + }, + flake = { + autoArchive = false, + autoEvalImputs = true, + nixpkgsInputName = "nixpkgs", + }, + }, + }, +}) diff --git a/tools/nvim/lsp/pyright.lua b/home/dot_config/nvim/lsp/pyright.lua similarity index 100% rename from tools/nvim/lsp/pyright.lua rename to home/dot_config/nvim/lsp/pyright.lua diff --git a/tools/nvim/lsp/rust_analyzer.lua b/home/dot_config/nvim/lsp/rust_analyzer.lua similarity index 100% rename from tools/nvim/lsp/rust_analyzer.lua rename to home/dot_config/nvim/lsp/rust_analyzer.lua diff --git a/tools/nvim/lsp/taplo.lua b/home/dot_config/nvim/lsp/taplo.lua similarity index 100% rename from tools/nvim/lsp/taplo.lua rename to home/dot_config/nvim/lsp/taplo.lua diff --git a/tools/nvim/lsp/vimls.lua b/home/dot_config/nvim/lsp/vimls.lua similarity index 100% rename from tools/nvim/lsp/vimls.lua rename to home/dot_config/nvim/lsp/vimls.lua diff --git a/tools/nvim/lsp/yamlls.lua b/home/dot_config/nvim/lsp/yamlls.lua similarity index 100% rename from tools/nvim/lsp/yamlls.lua rename to home/dot_config/nvim/lsp/yamlls.lua diff --git a/tools/nvim/lua/config/colors.lua b/home/dot_config/nvim/lua/config/colors.lua similarity index 100% rename from tools/nvim/lua/config/colors.lua rename to home/dot_config/nvim/lua/config/colors.lua diff --git a/tools/nvim/lua/config/colorscheme.lua b/home/dot_config/nvim/lua/config/colorscheme.lua similarity index 100% rename from tools/nvim/lua/config/colorscheme.lua rename to home/dot_config/nvim/lua/config/colorscheme.lua diff --git a/tools/nvim/lua/config/diagnostics.lua b/home/dot_config/nvim/lua/config/diagnostics.lua similarity index 100% rename from tools/nvim/lua/config/diagnostics.lua rename to home/dot_config/nvim/lua/config/diagnostics.lua diff --git a/tools/nvim/lua/config/icons.lua b/home/dot_config/nvim/lua/config/icons.lua similarity index 100% rename from tools/nvim/lua/config/icons.lua rename to home/dot_config/nvim/lua/config/icons.lua diff --git a/tools/nvim/lua/config/keymaps.lua b/home/dot_config/nvim/lua/config/keymaps.lua similarity index 100% rename from tools/nvim/lua/config/keymaps.lua rename to home/dot_config/nvim/lua/config/keymaps.lua diff --git a/tools/nvim/lua/config/migration.lua b/home/dot_config/nvim/lua/config/migration.lua similarity index 100% rename from tools/nvim/lua/config/migration.lua rename to home/dot_config/nvim/lua/config/migration.lua diff --git a/tools/nvim/lua/config/options.lua b/home/dot_config/nvim/lua/config/options.lua similarity index 100% rename from tools/nvim/lua/config/options.lua rename to home/dot_config/nvim/lua/config/options.lua diff --git a/tools/nvim/lua/config/plugins.lua b/home/dot_config/nvim/lua/config/plugins.lua similarity index 100% rename from tools/nvim/lua/config/plugins.lua rename to home/dot_config/nvim/lua/config/plugins.lua diff --git a/tools/nvim/lua/config/servers.lua b/home/dot_config/nvim/lua/config/servers.lua similarity index 100% rename from tools/nvim/lua/config/servers.lua rename to home/dot_config/nvim/lua/config/servers.lua diff --git a/home/dot_config/nvim/lua/config/tty.lua b/home/dot_config/nvim/lua/config/tty.lua new file mode 100644 index 0000000..8ff9b33 --- /dev/null +++ b/home/dot_config/nvim/lua/config/tty.lua @@ -0,0 +1,15 @@ +require("plugins.lazy-nvim") + +-- Setup lazy.nvim +require("lazy").setup({ + spec = { + -- { import = "plugins.appearance" }, + { import = "plugins.completion" }, + { import = "plugins.fileutils" }, + { import = "plugins.lang" }, + { import = "plugins.dap" }, + { import = "plugins.edit" }, + { import = "plugins.misc" }, + }, + checker = { enabled = false }, +}) diff --git a/tools/nvim/lua/config/vscode.lua b/home/dot_config/nvim/lua/config/vscode.lua similarity index 100% rename from tools/nvim/lua/config/vscode.lua rename to home/dot_config/nvim/lua/config/vscode.lua diff --git a/tools/nvim/lua/keymaps/basic.lua b/home/dot_config/nvim/lua/keymaps/basic.lua similarity index 100% rename from tools/nvim/lua/keymaps/basic.lua rename to home/dot_config/nvim/lua/keymaps/basic.lua diff --git a/tools/nvim/lua/keymaps/buffer.lua b/home/dot_config/nvim/lua/keymaps/buffer.lua similarity index 100% rename from tools/nvim/lua/keymaps/buffer.lua rename to home/dot_config/nvim/lua/keymaps/buffer.lua diff --git a/tools/nvim/lua/keymaps/init.lua b/home/dot_config/nvim/lua/keymaps/init.lua similarity index 100% rename from tools/nvim/lua/keymaps/init.lua rename to home/dot_config/nvim/lua/keymaps/init.lua diff --git a/tools/nvim/lua/keymaps/language.lua b/home/dot_config/nvim/lua/keymaps/language.lua similarity index 83% rename from tools/nvim/lua/keymaps/language.lua rename to home/dot_config/nvim/lua/keymaps/language.lua index a2093b1..8e4203d 100644 --- a/tools/nvim/lua/keymaps/language.lua +++ b/home/dot_config/nvim/lua/keymaps/language.lua @@ -25,4 +25,12 @@ vim.api.nvim_create_autocmd("FileType", { end, }) +vim.api.nvim_create_autocmd("FileType", { + pattern = "nix", + callback = function() + vim.opt_local.shiftwidth = 2 + vim.opt_local.tabstop = 2 + end, +}) + return M diff --git a/tools/nvim/lua/keymaps/leaders.bak b/home/dot_config/nvim/lua/keymaps/leaders.bak similarity index 100% rename from tools/nvim/lua/keymaps/leaders.bak rename to home/dot_config/nvim/lua/keymaps/leaders.bak diff --git a/tools/nvim/lua/keymaps/leaders.lua b/home/dot_config/nvim/lua/keymaps/leaders.lua similarity index 95% rename from tools/nvim/lua/keymaps/leaders.lua rename to home/dot_config/nvim/lua/keymaps/leaders.lua index 4146870..27aa3a6 100644 --- a/tools/nvim/lua/keymaps/leaders.lua +++ b/home/dot_config/nvim/lua/keymaps/leaders.lua @@ -132,13 +132,13 @@ local leader_mappings = { }, w = { -- +window { keys = "h", cmd = "h", opts = { desc = "Left Window" } }, - { keys = "n", cmd = "j", opts = { desc = "Down Window" } }, - { keys = "e", cmd = "k", opts = { desc = "Up Window" } }, - { keys = "i", cmd = "l", opts = { desc = "Right Window" } }, + { keys = "j", cmd = "j", opts = { desc = "Down Window" } }, + { keys = "k", cmd = "k", opts = { desc = "Up Window" } }, + { keys = "l", cmd = "l", opts = { desc = "Right Window" } }, { keys = "H", cmd = "H", opts = { desc = "Move Window Left" } }, - { keys = "N", cmd = "J", opts = { desc = "Move Window Down" } }, - { keys = "E", cmd = "K", opts = { desc = "Move Window Up" } }, - { keys = "I", cmd = "L", opts = { desc = "Move Window Right" } }, + { keys = "J", cmd = "J", opts = { desc = "Move Window Down" } }, + { keys = "K", cmd = "K", opts = { desc = "Move Window Up" } }, + { keys = "L", cmd = "L", opts = { desc = "Move Window Right" } }, { keys = "-", cmd = ":split", opts = { desc = "Split to down" } }, { keys = "|", cmd = ":vsplit", opts = { desc = "Split to right" } }, { keys = "/", cmd = ":vsplit", opts = { desc = "Split to right" } }, diff --git a/tools/nvim/lua/keymaps/lspkeys.lua b/home/dot_config/nvim/lua/keymaps/lspkeys.lua similarity index 100% rename from tools/nvim/lua/keymaps/lspkeys.lua rename to home/dot_config/nvim/lua/keymaps/lspkeys.lua diff --git a/tools/nvim/lua/keymaps/modifier.lua b/home/dot_config/nvim/lua/keymaps/modifier.lua similarity index 100% rename from tools/nvim/lua/keymaps/modifier.lua rename to home/dot_config/nvim/lua/keymaps/modifier.lua diff --git a/tools/nvim/lua/keymaps/nvim-tree.lua b/home/dot_config/nvim/lua/keymaps/nvim-tree.lua similarity index 100% rename from tools/nvim/lua/keymaps/nvim-tree.lua rename to home/dot_config/nvim/lua/keymaps/nvim-tree.lua diff --git a/tools/nvim/lua/keymaps/user-command.lua b/home/dot_config/nvim/lua/keymaps/user-command.lua similarity index 100% rename from tools/nvim/lua/keymaps/user-command.lua rename to home/dot_config/nvim/lua/keymaps/user-command.lua diff --git a/tools/nvim/lua/keymaps/utils.lua b/home/dot_config/nvim/lua/keymaps/utils.lua similarity index 100% rename from tools/nvim/lua/keymaps/utils.lua rename to home/dot_config/nvim/lua/keymaps/utils.lua diff --git a/tools/nvim/lua/keymaps/visual-multi.lua b/home/dot_config/nvim/lua/keymaps/visual-multi.lua similarity index 100% rename from tools/nvim/lua/keymaps/visual-multi.lua rename to home/dot_config/nvim/lua/keymaps/visual-multi.lua diff --git a/tools/nvim/lua/keymaps/which.lua b/home/dot_config/nvim/lua/keymaps/which.lua similarity index 100% rename from tools/nvim/lua/keymaps/which.lua rename to home/dot_config/nvim/lua/keymaps/which.lua diff --git a/tools/nvim/lua/plugins/appearance.lua b/home/dot_config/nvim/lua/plugins/appearance.lua similarity index 100% rename from tools/nvim/lua/plugins/appearance.lua rename to home/dot_config/nvim/lua/plugins/appearance.lua diff --git a/tools/nvim/lua/plugins/completion.lua b/home/dot_config/nvim/lua/plugins/completion.lua similarity index 100% rename from tools/nvim/lua/plugins/completion.lua rename to home/dot_config/nvim/lua/plugins/completion.lua diff --git a/tools/nvim/lua/plugins/dap.lua b/home/dot_config/nvim/lua/plugins/dap.lua similarity index 100% rename from tools/nvim/lua/plugins/dap.lua rename to home/dot_config/nvim/lua/plugins/dap.lua diff --git a/tools/nvim/lua/plugins/edit.lua b/home/dot_config/nvim/lua/plugins/edit.lua similarity index 100% rename from tools/nvim/lua/plugins/edit.lua rename to home/dot_config/nvim/lua/plugins/edit.lua diff --git a/tools/nvim/lua/plugins/fileutils.lua b/home/dot_config/nvim/lua/plugins/fileutils.lua similarity index 100% rename from tools/nvim/lua/plugins/fileutils.lua rename to home/dot_config/nvim/lua/plugins/fileutils.lua diff --git a/tools/nvim/lua/plugins/init.lua b/home/dot_config/nvim/lua/plugins/init.lua similarity index 100% rename from tools/nvim/lua/plugins/init.lua rename to home/dot_config/nvim/lua/plugins/init.lua diff --git a/tools/nvim/lua/plugins/lang/beancount.lua b/home/dot_config/nvim/lua/plugins/lang/beancount.lua similarity index 100% rename from tools/nvim/lua/plugins/lang/beancount.lua rename to home/dot_config/nvim/lua/plugins/lang/beancount.lua diff --git a/tools/nvim/lua/plugins/lang/init.lua b/home/dot_config/nvim/lua/plugins/lang/init.lua similarity index 100% rename from tools/nvim/lua/plugins/lang/init.lua rename to home/dot_config/nvim/lua/plugins/lang/init.lua diff --git a/tools/nvim/lua/plugins/lang/just.lua b/home/dot_config/nvim/lua/plugins/lang/just.lua similarity index 100% rename from tools/nvim/lua/plugins/lang/just.lua rename to home/dot_config/nvim/lua/plugins/lang/just.lua diff --git a/tools/nvim/lua/plugins/lang/lua.lua b/home/dot_config/nvim/lua/plugins/lang/lua.lua similarity index 100% rename from tools/nvim/lua/plugins/lang/lua.lua rename to home/dot_config/nvim/lua/plugins/lang/lua.lua diff --git a/tools/nvim/lua/plugins/lang/markdown/init.lua b/home/dot_config/nvim/lua/plugins/lang/markdown/init.lua similarity index 100% rename from tools/nvim/lua/plugins/lang/markdown/init.lua rename to home/dot_config/nvim/lua/plugins/lang/markdown/init.lua diff --git a/tools/nvim/lua/plugins/lang/markdown/markview.lua.bak b/home/dot_config/nvim/lua/plugins/lang/markdown/markview.lua.bak similarity index 100% rename from tools/nvim/lua/plugins/lang/markdown/markview.lua.bak rename to home/dot_config/nvim/lua/plugins/lang/markdown/markview.lua.bak diff --git a/tools/nvim/lua/plugins/lang/markdown/obsidian-nvim.lua b/home/dot_config/nvim/lua/plugins/lang/markdown/obsidian-nvim.lua similarity index 93% rename from tools/nvim/lua/plugins/lang/markdown/obsidian-nvim.lua rename to home/dot_config/nvim/lua/plugins/lang/markdown/obsidian-nvim.lua index 0b1aa92..032d574 100644 --- a/tools/nvim/lua/plugins/lang/markdown/obsidian-nvim.lua +++ b/home/dot_config/nvim/lua/plugins/lang/markdown/obsidian-nvim.lua @@ -58,6 +58,9 @@ return { "ibhagwan/fzf-lua", }, opts = { + footer = { + enabled = false, + }, workspaces = { { name = "personal", @@ -132,14 +135,14 @@ return { return string.format("%s-", os.time()) end, }, - mappings = { - [""] = { - action = function() - require("obsidian").util.smart_action() - end, - opts = { buffer = true, expr = true }, - }, - }, + -- mappings = { + -- [""] = { + -- action = function() + -- require("obsidian").util.smart_action() + -- end, + -- opts = { buffer = true, expr = true }, + -- }, + -- }, new_notes_location = "current_dir", }, } diff --git a/tools/nvim/lua/plugins/lang/markdown/render-markdown.lua b/home/dot_config/nvim/lua/plugins/lang/markdown/render-markdown.lua similarity index 100% rename from tools/nvim/lua/plugins/lang/markdown/render-markdown.lua rename to home/dot_config/nvim/lua/plugins/lang/markdown/render-markdown.lua diff --git a/tools/nvim/lua/plugins/lang/org.lua b/home/dot_config/nvim/lua/plugins/lang/org.lua similarity index 100% rename from tools/nvim/lua/plugins/lang/org.lua rename to home/dot_config/nvim/lua/plugins/lang/org.lua diff --git a/tools/nvim/lua/plugins/lang/tex.lua b/home/dot_config/nvim/lua/plugins/lang/tex.lua similarity index 100% rename from tools/nvim/lua/plugins/lang/tex.lua rename to home/dot_config/nvim/lua/plugins/lang/tex.lua diff --git a/tools/nvim/lua/plugins/lang/treesitter.lua b/home/dot_config/nvim/lua/plugins/lang/treesitter.lua similarity index 100% rename from tools/nvim/lua/plugins/lang/treesitter.lua rename to home/dot_config/nvim/lua/plugins/lang/treesitter.lua diff --git a/tools/nvim/lua/plugins/lang/typst.lua b/home/dot_config/nvim/lua/plugins/lang/typst.lua similarity index 100% rename from tools/nvim/lua/plugins/lang/typst.lua rename to home/dot_config/nvim/lua/plugins/lang/typst.lua diff --git a/tools/nvim/lua/plugins/lazy-nvim.lua b/home/dot_config/nvim/lua/plugins/lazy-nvim.lua similarity index 100% rename from tools/nvim/lua/plugins/lazy-nvim.lua rename to home/dot_config/nvim/lua/plugins/lazy-nvim.lua diff --git a/tools/nvim/lua/plugins/misc.lua b/home/dot_config/nvim/lua/plugins/misc.lua similarity index 88% rename from tools/nvim/lua/plugins/misc.lua rename to home/dot_config/nvim/lua/plugins/misc.lua index cb9db10..061ea06 100644 --- a/tools/nvim/lua/plugins/misc.lua +++ b/home/dot_config/nvim/lua/plugins/misc.lua @@ -3,8 +3,8 @@ return { { "wakatime/vim-wakatime", lazy = false }, { import = "plugins.mod.toggleterm" }, { import = "plugins.mod.which-keys-nvim" }, - { import = "plugins.mod.copilot-lua" }, - { import = "plugins.mod.avante-nvim" }, + -- { import = "plugins.mod.copilot-lua" }, + -- { import = "plugins.mod.avante-nvim" }, { "kawre/leetcode.nvim", build = ":TSUpdate html", -- if you have `nvim-treesitter` installed diff --git a/tools/nvim/lua/plugins/mod/alpha-nvim.lua b/home/dot_config/nvim/lua/plugins/mod/alpha-nvim.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/alpha-nvim.lua rename to home/dot_config/nvim/lua/plugins/mod/alpha-nvim.lua diff --git a/tools/nvim/lua/plugins/mod/autopairs.lua b/home/dot_config/nvim/lua/plugins/mod/autopairs.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/autopairs.lua rename to home/dot_config/nvim/lua/plugins/mod/autopairs.lua diff --git a/tools/nvim/lua/plugins/mod/avante-nvim.lua b/home/dot_config/nvim/lua/plugins/mod/avante-nvim.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/avante-nvim.lua rename to home/dot_config/nvim/lua/plugins/mod/avante-nvim.lua diff --git a/tools/nvim/lua/plugins/mod/blink-cmp.lua b/home/dot_config/nvim/lua/plugins/mod/blink-cmp.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/blink-cmp.lua rename to home/dot_config/nvim/lua/plugins/mod/blink-cmp.lua diff --git a/tools/nvim/lua/plugins/mod/bufferline.lua b/home/dot_config/nvim/lua/plugins/mod/bufferline.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/bufferline.lua rename to home/dot_config/nvim/lua/plugins/mod/bufferline.lua diff --git a/tools/nvim/lua/plugins/mod/conform-nvim.lua b/home/dot_config/nvim/lua/plugins/mod/conform-nvim.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/conform-nvim.lua rename to home/dot_config/nvim/lua/plugins/mod/conform-nvim.lua diff --git a/tools/nvim/lua/plugins/mod/copilot-lua.lua b/home/dot_config/nvim/lua/plugins/mod/copilot-lua.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/copilot-lua.lua rename to home/dot_config/nvim/lua/plugins/mod/copilot-lua.lua diff --git a/tools/nvim/lua/plugins/mod/fzf.lua b/home/dot_config/nvim/lua/plugins/mod/fzf.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/fzf.lua rename to home/dot_config/nvim/lua/plugins/mod/fzf.lua diff --git a/tools/nvim/lua/plugins/mod/hover-nvim.lua b/home/dot_config/nvim/lua/plugins/mod/hover-nvim.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/hover-nvim.lua rename to home/dot_config/nvim/lua/plugins/mod/hover-nvim.lua diff --git a/tools/nvim/lua/plugins/mod/image-nvim.lua b/home/dot_config/nvim/lua/plugins/mod/image-nvim.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/image-nvim.lua rename to home/dot_config/nvim/lua/plugins/mod/image-nvim.lua diff --git a/tools/nvim/lua/plugins/mod/img-clip.lua b/home/dot_config/nvim/lua/plugins/mod/img-clip.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/img-clip.lua rename to home/dot_config/nvim/lua/plugins/mod/img-clip.lua diff --git a/tools/nvim/lua/plugins/mod/lualine/components.lua b/home/dot_config/nvim/lua/plugins/mod/lualine/components.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/lualine/components.lua rename to home/dot_config/nvim/lua/plugins/mod/lualine/components.lua diff --git a/tools/nvim/lua/plugins/mod/lualine/init.lua b/home/dot_config/nvim/lua/plugins/mod/lualine/init.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/lualine/init.lua rename to home/dot_config/nvim/lua/plugins/mod/lualine/init.lua diff --git a/tools/nvim/lua/plugins/mod/mc.lua b/home/dot_config/nvim/lua/plugins/mod/mc.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/mc.lua rename to home/dot_config/nvim/lua/plugins/mod/mc.lua diff --git a/tools/nvim/lua/plugins/mod/neo-tree.lua b/home/dot_config/nvim/lua/plugins/mod/neo-tree.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/neo-tree.lua rename to home/dot_config/nvim/lua/plugins/mod/neo-tree.lua diff --git a/tools/nvim/lua/plugins/mod/nvim-cmp.lua b/home/dot_config/nvim/lua/plugins/mod/nvim-cmp.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/nvim-cmp.lua rename to home/dot_config/nvim/lua/plugins/mod/nvim-cmp.lua diff --git a/tools/nvim/lua/plugins/mod/nvim-lspconfig.lua b/home/dot_config/nvim/lua/plugins/mod/nvim-lspconfig.lua similarity index 99% rename from tools/nvim/lua/plugins/mod/nvim-lspconfig.lua rename to home/dot_config/nvim/lua/plugins/mod/nvim-lspconfig.lua index 4a9d190..fa931e5 100644 --- a/tools/nvim/lua/plugins/mod/nvim-lspconfig.lua +++ b/home/dot_config/nvim/lua/plugins/mod/nvim-lspconfig.lua @@ -37,4 +37,4 @@ return { lspconfig[server].setup(config) end end, - +} diff --git a/tools/nvim/lua/plugins/mod/nvim-tree.lua b/home/dot_config/nvim/lua/plugins/mod/nvim-tree.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/nvim-tree.lua rename to home/dot_config/nvim/lua/plugins/mod/nvim-tree.lua diff --git a/tools/nvim/lua/plugins/mod/snacks-nvim.lua b/home/dot_config/nvim/lua/plugins/mod/snacks-nvim.lua similarity index 99% rename from tools/nvim/lua/plugins/mod/snacks-nvim.lua rename to home/dot_config/nvim/lua/plugins/mod/snacks-nvim.lua index 85c1a34..ee398cc 100644 --- a/tools/nvim/lua/plugins/mod/snacks-nvim.lua +++ b/home/dot_config/nvim/lua/plugins/mod/snacks-nvim.lua @@ -81,7 +81,7 @@ return { -- words = { enabled = true }, image = { enabled = true, - img_dirs = { "_Global/Assets" } + img_dirs = { "90 - System/Assets" } }, }, keys = { diff --git a/tools/nvim/lua/plugins/mod/telescope.lua b/home/dot_config/nvim/lua/plugins/mod/telescope.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/telescope.lua rename to home/dot_config/nvim/lua/plugins/mod/telescope.lua diff --git a/tools/nvim/lua/plugins/mod/toggleterm.lua b/home/dot_config/nvim/lua/plugins/mod/toggleterm.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/toggleterm.lua rename to home/dot_config/nvim/lua/plugins/mod/toggleterm.lua diff --git a/tools/nvim/lua/plugins/mod/trouble-nvim.lua b/home/dot_config/nvim/lua/plugins/mod/trouble-nvim.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/trouble-nvim.lua rename to home/dot_config/nvim/lua/plugins/mod/trouble-nvim.lua diff --git a/tools/nvim/lua/plugins/mod/which-keys-nvim.lua b/home/dot_config/nvim/lua/plugins/mod/which-keys-nvim.lua similarity index 100% rename from tools/nvim/lua/plugins/mod/which-keys-nvim.lua rename to home/dot_config/nvim/lua/plugins/mod/which-keys-nvim.lua diff --git a/home/dot_config/nvim/luarc.jsonc b/home/dot_config/nvim/luarc.jsonc new file mode 100644 index 0000000..30c5223 --- /dev/null +++ b/home/dot_config/nvim/luarc.jsonc @@ -0,0 +1,20 @@ +{ + "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json", + "runtime": { + "version": "LuaJIT" + }, + "workspace": { + "checkThirdParty" : false, + "library": [ + // Runtime and builtin libraries + "$VIMRUNTIME", + "${3rd}/luv/library" + ], + "ignoreDir": [ + "luasnippets" + ] + }, + "diagnostics.disable": [ + "missing-fields" + ] +} diff --git a/tools/nvim/readme.md b/home/dot_config/nvim/readme.md similarity index 100% rename from tools/nvim/readme.md rename to home/dot_config/nvim/readme.md diff --git a/tools/nvim/stylua.toml b/home/dot_config/nvim/stylua.toml similarity index 100% rename from tools/nvim/stylua.toml rename to home/dot_config/nvim/stylua.toml diff --git a/common/pip.conf b/home/dot_config/pip/pip.conf similarity index 98% rename from common/pip.conf rename to home/dot_config/pip/pip.conf index 75044dc..359fd84 100644 --- a/common/pip.conf +++ b/home/dot_config/pip/pip.conf @@ -1,5 +1,5 @@ -# $XDG_CONFIG_HOME/pip/pip.conf -# ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf -# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/pip/pip.conp -Value $DOTFILES\.config\pip\pip.conf -[global] +# $XDG_CONFIG_HOME/pip/pip.conf +# ln -sf $DOTFILES/.config/pip/pip.conf $XDG_CONFIG_HOME/pip/pip.conf +# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/pip/pip.conp -Value $DOTFILES\.config\pip\pip.conf +[global] # index-url = https://pypi.tuna.tsinghua.edu.cn/simple \ No newline at end of file diff --git a/tools/powershell/Aliases.ps1 b/home/dot_config/powershell/Aliases.ps1 similarity index 96% rename from tools/powershell/Aliases.ps1 rename to home/dot_config/powershell/Aliases.ps1 index 45948f7..440782f 100644 --- a/tools/powershell/Aliases.ps1 +++ b/home/dot_config/powershell/Aliases.ps1 @@ -1,41 +1,41 @@ -# $DOTFILES/tools\powershell\Aliases.ps1 -# Date: 2024-12-01 -# Author: js0ny -# Aliases for PowerShell - -# Unix Shell Equivalents # -Set-Alias "touch" "New-Item" -${function:l} = { Get-ChildItem -Force } -${function:tree} = { lsd --tree $args } -Set-Alias "which" "Get-Command" - -# Editors # -Set-Alias "v" "nvim" -Set-Alias "c" "code" -Get-Command neovide -ErrorAction SilentlyContinue > $null && Set-Alias "gvi" "neovide" - - - -# File Creation # -function mkcd { param ( [string] $dirname) New-Item -ItemType Directory -Name $dirname && Set-Location $dirname } -function tc { param ( [string] $filename) New-Item $filename && code $filename } -function tv { param ( [string] $filename) New-Item $filename && nvim $filename } -function cdls { param( [string] $dirname) Set-Location $dirname && Get-ChildItem } -function zls { param( [string] $dirname) z $dirname && Get-ChildItem } -function zl { param( [string] $dirname) z $dirname && lsd } -function mt { param( [string] $dirname) New-Item -ItemType File -Name $dirname -Force } - - -### Dev ### - -# Python & Conda # -Set-Alias "py" "python" -Set-Alias "ipy" "ipython" - -if ($Env:WEZTERM) { - # Environment variable injected by wezterm/wezterm.lua - ${function:icat} = { wezterm imgcat $args } -} -elseif ($Env:KITTY) { - ${function:icat} = { kitty +kitten icat $args } -} +# $DOTFILES/tools\powershell\Aliases.ps1 +# Date: 2024-12-01 +# Author: js0ny +# Aliases for PowerShell + +# Unix Shell Equivalents # +Set-Alias "touch" "New-Item" +${function:l} = { Get-ChildItem -Force } +${function:tree} = { lsd --tree $args } +Set-Alias "which" "Get-Command" + +# Editors # +Set-Alias "v" "nvim" +Set-Alias "c" "code" +Get-Command neovide -ErrorAction SilentlyContinue > $null && Set-Alias "gvi" "neovide" + + + +# File Creation # +function mkcd { param ( [string] $dirname) New-Item -ItemType Directory -Name $dirname && Set-Location $dirname } +function tc { param ( [string] $filename) New-Item $filename && code $filename } +function tv { param ( [string] $filename) New-Item $filename && nvim $filename } +function cdls { param( [string] $dirname) Set-Location $dirname && Get-ChildItem } +function zls { param( [string] $dirname) z $dirname && Get-ChildItem } +function zl { param( [string] $dirname) z $dirname && lsd } +function mt { param( [string] $dirname) New-Item -ItemType File -Name $dirname -Force } + + +### Dev ### + +# Python & Conda # +Set-Alias "py" "python" +Set-Alias "ipy" "ipython" + +if ($Env:WEZTERM) { + # Environment variable injected by wezterm/wezterm.lua + ${function:icat} = { wezterm imgcat $args } +} +elseif ($Env:KITTY) { + ${function:icat} = { kitty +kitten icat $args } +} diff --git a/tools/powershell/Completions.ps1 b/home/dot_config/powershell/Completions.ps1 similarity index 100% rename from tools/powershell/Completions.ps1 rename to home/dot_config/powershell/Completions.ps1 diff --git a/tools/powershell/Environment.ps1 b/home/dot_config/powershell/Environment.ps1 similarity index 100% rename from tools/powershell/Environment.ps1 rename to home/dot_config/powershell/Environment.ps1 diff --git a/tools/powershell/Keymap.ps1 b/home/dot_config/powershell/Keymap.ps1 similarity index 98% rename from tools/powershell/Keymap.ps1 rename to home/dot_config/powershell/Keymap.ps1 index 5e67b1f..184bd44 100644 --- a/tools/powershell/Keymap.ps1 +++ b/home/dot_config/powershell/Keymap.ps1 @@ -1,31 +1,31 @@ -# aka PSReadLine - -# read key: [System.Console]::ReadKey() -# get current bindings: Get-PSReadLineKeyHandler - -# PSReadLineOptions -Set-PSReadLineOption -EditMode Vi # Vi Keybindings -Set-PSReadLineOption -PredictionViewStyle InlineView -Set-PSReadLineOption -PredictionSource HistoryAndPlugin -# Set-PSReadLineOption -ContinuationPrompt "`e[36m CR > " # Use Starship instead -# PSReadLineKeyHandlers -Set-PSReadLineKeyHandler -Chord "Control+Oem4" -Function ViCommandMode -ViMode Insert # ^[ to Escape -Set-PSReadLineKeyHandler -Chord "Ctrl+a" -Function BeginningOfLine -Set-PSReadLineKeyHandler -Chord "Ctrl+e" -Function EndOfLine -Set-PSReadLineKeyHandler -Chord "Ctrl+p" -Function PreviousHistory -Set-PSReadLineKeyHandler -Chord "Ctrl+f" -Function AcceptNextSuggestionWord -Set-PSReadLineKeyHandler -Chord "Alt+f" -Function AcceptSuggestion -Set-PSReadLineKeyHandler -Chord "Ctrl+n" -Function NextHistory -Set-PSReadLineKeyHandler -Chord "Ctrl+w" -Function BackwardKillWord -Set-PSReadLineKeyHandler -Chord "Ctrl+Backspace" -Function BackwardKillWord -Set-PSReadLineKeyHandler -Chord "Ctrl+Shift+Backspace" -Function BackwardKillLine -Set-PSReadLineKeyHandler -Chord "Alt+Backspace" -Function BackwardKillLine -Set-PSReadLineKeyHandler -Chord "Ctrl+Delete" -Function KillWord -Set-PSReadLineKeyHandler -Chord "Ctrl+Shift+Delete" -Function KillLine -Set-PSReadLineKeyHandler -Chord "Alt+Delete" -Function KillLine -Set-PSReadLineKeyHandler -Chord "Ctrl+c" -Function CopyOrCancelLine -ViMode Insert -Set-PSReadLineKeyHandler -Chord "Ctrl+c" -Function CopyOrCancelLine -ViMode Command -## Use to Invoke MenuComplete -Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete - +# aka PSReadLine + +# read key: [System.Console]::ReadKey() +# get current bindings: Get-PSReadLineKeyHandler + +# PSReadLineOptions +Set-PSReadLineOption -EditMode Vi # Vi Keybindings +Set-PSReadLineOption -PredictionViewStyle InlineView +Set-PSReadLineOption -PredictionSource HistoryAndPlugin +# Set-PSReadLineOption -ContinuationPrompt "`e[36m CR > " # Use Starship instead +# PSReadLineKeyHandlers +Set-PSReadLineKeyHandler -Chord "Control+Oem4" -Function ViCommandMode -ViMode Insert # ^[ to Escape +Set-PSReadLineKeyHandler -Chord "Ctrl+a" -Function BeginningOfLine +Set-PSReadLineKeyHandler -Chord "Ctrl+e" -Function EndOfLine +Set-PSReadLineKeyHandler -Chord "Ctrl+p" -Function PreviousHistory +Set-PSReadLineKeyHandler -Chord "Ctrl+f" -Function AcceptNextSuggestionWord +Set-PSReadLineKeyHandler -Chord "Alt+f" -Function AcceptSuggestion +Set-PSReadLineKeyHandler -Chord "Ctrl+n" -Function NextHistory +Set-PSReadLineKeyHandler -Chord "Ctrl+w" -Function BackwardKillWord +Set-PSReadLineKeyHandler -Chord "Ctrl+Backspace" -Function BackwardKillWord +Set-PSReadLineKeyHandler -Chord "Ctrl+Shift+Backspace" -Function BackwardKillLine +Set-PSReadLineKeyHandler -Chord "Alt+Backspace" -Function BackwardKillLine +Set-PSReadLineKeyHandler -Chord "Ctrl+Delete" -Function KillWord +Set-PSReadLineKeyHandler -Chord "Ctrl+Shift+Delete" -Function KillLine +Set-PSReadLineKeyHandler -Chord "Alt+Delete" -Function KillLine +Set-PSReadLineKeyHandler -Chord "Ctrl+c" -Function CopyOrCancelLine -ViMode Insert +Set-PSReadLineKeyHandler -Chord "Ctrl+c" -Function CopyOrCancelLine -ViMode Command +## Use to Invoke MenuComplete +Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete + . $(Join-Path $DOTFILES "tools" "powershell" "Keymap" "Colemak.ps1") \ No newline at end of file diff --git a/tools/powershell/Keymap/Colemak.ps1 b/home/dot_config/powershell/Keymap/Colemak.ps1 similarity index 100% rename from tools/powershell/Keymap/Colemak.ps1 rename to home/dot_config/powershell/Keymap/Colemak.ps1 diff --git a/platforms/mac/pwshProfile.ps1 b/home/dot_config/powershell/Microsoft.PowerShell_profile.ps1 similarity index 100% rename from platforms/mac/pwshProfile.ps1 rename to home/dot_config/powershell/Microsoft.PowerShell_profile.ps1 diff --git a/tools/powershell/Modules.ps1 b/home/dot_config/powershell/Modules.ps1 similarity index 97% rename from tools/powershell/Modules.ps1 rename to home/dot_config/powershell/Modules.ps1 index cdc48e8..34440e4 100644 --- a/tools/powershell/Modules.ps1 +++ b/home/dot_config/powershell/Modules.ps1 @@ -1,13 +1,13 @@ -# Import-Module -Name Terminal-Icons -Import-Module -Name CompletionPredictor -if ($IsWindows) { - # Chocolatey - $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" } - # WinGet - Import-Module -Name Microsoft.WinGet.CommandNotFound #f45873b3-b655-43a6-b217-97c00aa0db58 -} - -Import-Module -Name PSFzf - -Set-PSReadLineKeyHandler -Chord "Ctrl-r" -ScriptBlock { Invoke-FuzzyHistory } +# Import-Module -Name Terminal-Icons +Import-Module -Name CompletionPredictor +if ($IsWindows) { + # Chocolatey + $ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" + if (Test-Path($ChocolateyProfile)) { Import-Module "$ChocolateyProfile" } + # WinGet + Import-Module -Name Microsoft.WinGet.CommandNotFound #f45873b3-b655-43a6-b217-97c00aa0db58 +} + +Import-Module -Name PSFzf + +Set-PSReadLineKeyHandler -Chord "Ctrl-r" -ScriptBlock { Invoke-FuzzyHistory } diff --git a/tools/powershell/Navigation.ps1 b/home/dot_config/powershell/Navigation.ps1 similarity index 98% rename from tools/powershell/Navigation.ps1 rename to home/dot_config/powershell/Navigation.ps1 index 99a55ac..ece1c11 100644 --- a/tools/powershell/Navigation.ps1 +++ b/home/dot_config/powershell/Navigation.ps1 @@ -1,11 +1,11 @@ -# ${function:~} = { Set-Location -Path ~ } cd is better -${function:...} = { Set-Location -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) } -${function:....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) } -${function:.....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) } -${function:......} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) } - -# Absolute navigation -${function:docs} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Documents") } -${function:down} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Downloads") } -${function:dt} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Desktop") } -${function:one} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "OneDrive") } +# ${function:~} = { Set-Location -Path ~ } cd is better +${function:...} = { Set-Location -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) } +${function:....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) } +${function:.....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) } +${function:......} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) } + +# Absolute navigation +${function:docs} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Documents") } +${function:down} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Downloads") } +${function:dt} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "Desktop") } +${function:one} = { Set-Location -Path (Join-Path -Path $HOME -ChildPath "OneDrive") } diff --git a/tools/powershell/Prompt.ps1 b/home/dot_config/powershell/Prompt.ps1 similarity index 97% rename from tools/powershell/Prompt.ps1 rename to home/dot_config/powershell/Prompt.ps1 index 1ae9545..5257100 100644 --- a/tools/powershell/Prompt.ps1 +++ b/home/dot_config/powershell/Prompt.ps1 @@ -1,144 +1,144 @@ -# $DOTFILES/tools\powershell\Prompt.ps1 -# Date: 2024-12-01 -# Author: js0ny -# Use starship to set prompt - -# Invoke-Expression (&starship init powershell) - - -function formatFG { - param( - [string]$RGB - ) - if ($RGB -eq "-1") { - return "`e[39m" - } - $R = $RGB.Substring(0, 2) - $G = $RGB.Substring(2, 2) - $B = $RGB.Substring(4, 2) - # Convert hex to RGB - $R = [int]::Parse($R, [System.Globalization.NumberStyles]::HexNumber) - $G = [int]::Parse($G, [System.Globalization.NumberStyles]::HexNumber) - $B = [int]::Parse($B, [System.Globalization.NumberStyles]::HexNumber) - return "`e[38;2;$R;$G;${B}m" -} - -function formatBG { - param( - [string]$RGB - ) - if ($RGB -eq "-1") { - return "`e[49m" - } - $R = $RGB.Substring(0, 2) - $G = $RGB.Substring(2, 2) - $B = $RGB.Substring(4, 2) - # Convert hex to RGB - $R = [int]::Parse($R, [System.Globalization.NumberStyles]::HexNumber) - $G = [int]::Parse($G, [System.Globalization.NumberStyles]::HexNumber) - $B = [int]::Parse($B, [System.Globalization.NumberStyles]::HexNumber) - return "`e[48;2;$R;$G;${B}m" -} -function formatPowerlineText { - param( - [string]$FG, - [string]$BG, - [string]$PLBG, - [string]$Text - ) - $ResumeSequece = "`e[0m" - $TextFG = formatFG -RGB $FG - $TextBG = formatBG -RGB $BG - $PLFG = formatFG -RGB $BG - $PLBG = formatBG -RGB $PLBG - return "$TextFG$TextBG $Text $PLFG$PLBG$ResumeSequece" -} - -function prompt { - if ($pwd.Path -eq $HOME) { - $cwd = "~" - } else { - $cwd = $pwd.ProviderPath - } - $time = Get-Date -Format "HH:mm" - $ResumeSequece = "`e[0m" - $FG0 = "FFFFFF" - $BG0 = "9A348E" - $BG1 = "DA627D" - $BG2 = "FCA17D" - $FG1 = "035E82" - $time = formatPowerlineText $FG0 $BG0 $BG1 $time - $cwd = formatPowerlineText $FG0 $BG1 $BG2 $cwd - $ps = formatPowerlineText $FG1 $BG2 "-1" "PS" - - "$time$cwd$ps$ResumeSequece " - -} - -function Invoke-Starship { - Invoke-Expression (&starship init powershell) -} - -Import-Module Catppuccin - -$Flavor = $Catppuccin['Mocha'] - -# The following colors are used by PowerShell's formatting -# Again PS 7.2+ only -$PSStyle.Formatting.Debug = $Flavor.Sky.Foreground() -$PSStyle.Formatting.Error = $Flavor.Red.Foreground() -$PSStyle.Formatting.ErrorAccent = $Flavor.Blue.Foreground() -$PSStyle.Formatting.FormatAccent = $Flavor.Teal.Foreground() -$PSStyle.Formatting.TableHeader = $Flavor.Rosewater.Foreground() -$PSStyle.Formatting.Verbose = $Flavor.Yellow.Foreground() -$PSStyle.Formatting.Warning = $Flavor.Peach.Foreground() - -$Colors = @{ - # Largely based on the Code Editor style guide - # Emphasis, ListPrediction and ListPredictionSelected are inspired by the Catppuccin fzf theme - - # Powershell colours - Emphasis = $Flavor.Red.Foreground() - Selection = $Flavor.Surface0.Background() - - # PSReadLine prediction colours - InlinePrediction = $Flavor.Overlay0.Foreground() - ListPrediction = $Flavor.Mauve.Foreground() - ListPredictionSelected = $Flavor.Surface0.Background() - - # Syntax highlighting - Command = $Flavor.Blue.Foreground() - Comment = $Flavor.Overlay0.Foreground() - Default = $Flavor.Text.Foreground() - Error = $Flavor.Red.Foreground() - Keyword = $Flavor.Mauve.Foreground() - Member = $Flavor.Rosewater.Foreground() - Number = $Flavor.Peach.Foreground() - Operator = $Flavor.Sky.Foreground() - Parameter = $Flavor.Pink.Foreground() - String = $Flavor.Green.Foreground() - Type = $Flavor.Yellow.Foreground() - Variable = $Flavor.Lavender.Foreground() -} - -# Set the colours -Set-PSReadLineOption -Colors $Colors - -# Smarter cd -# Init zoxide apter starship to avoid conflicts -# https://github.com/ajeetdsouza/zoxide/issues/723 -if (Get-Command zoxide -ErrorAction SilentlyContinue) { - Invoke-Expression (& { (zoxide init powershell | Out-String) }) - ${function:...} = { z -Path (Join-Path -Path .. -ChildPath ..) } - ${function:....} = { z -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) } - ${function:.....} = { z -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) } - ${function:......} = { z -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) } - ${function:z-} = { z - } -} -else { - ${function:...} = { Set-Location -Path (Join-Path -Path .. -ChildPath ..) } - ${function:....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) } - ${function:.....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) } - ${function:......} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) } - ${function:z-} = { Set-Location - } -} +# $DOTFILES/tools\powershell\Prompt.ps1 +# Date: 2024-12-01 +# Author: js0ny +# Use starship to set prompt + +# Invoke-Expression (&starship init powershell) + + +function formatFG { + param( + [string]$RGB + ) + if ($RGB -eq "-1") { + return "`e[39m" + } + $R = $RGB.Substring(0, 2) + $G = $RGB.Substring(2, 2) + $B = $RGB.Substring(4, 2) + # Convert hex to RGB + $R = [int]::Parse($R, [System.Globalization.NumberStyles]::HexNumber) + $G = [int]::Parse($G, [System.Globalization.NumberStyles]::HexNumber) + $B = [int]::Parse($B, [System.Globalization.NumberStyles]::HexNumber) + return "`e[38;2;$R;$G;${B}m" +} + +function formatBG { + param( + [string]$RGB + ) + if ($RGB -eq "-1") { + return "`e[49m" + } + $R = $RGB.Substring(0, 2) + $G = $RGB.Substring(2, 2) + $B = $RGB.Substring(4, 2) + # Convert hex to RGB + $R = [int]::Parse($R, [System.Globalization.NumberStyles]::HexNumber) + $G = [int]::Parse($G, [System.Globalization.NumberStyles]::HexNumber) + $B = [int]::Parse($B, [System.Globalization.NumberStyles]::HexNumber) + return "`e[48;2;$R;$G;${B}m" +} +function formatPowerlineText { + param( + [string]$FG, + [string]$BG, + [string]$PLBG, + [string]$Text + ) + $ResumeSequece = "`e[0m" + $TextFG = formatFG -RGB $FG + $TextBG = formatBG -RGB $BG + $PLFG = formatFG -RGB $BG + $PLBG = formatBG -RGB $PLBG + return "$TextFG$TextBG $Text $PLFG$PLBG$ResumeSequece" +} + +function prompt { + if ($pwd.Path -eq $HOME) { + $cwd = "~" + } else { + $cwd = $pwd.ProviderPath + } + $time = Get-Date -Format "HH:mm" + $ResumeSequece = "`e[0m" + $FG0 = "FFFFFF" + $BG0 = "9A348E" + $BG1 = "DA627D" + $BG2 = "FCA17D" + $FG1 = "035E82" + $time = formatPowerlineText $FG0 $BG0 $BG1 $time + $cwd = formatPowerlineText $FG0 $BG1 $BG2 $cwd + $ps = formatPowerlineText $FG1 $BG2 "-1" "PS" + + "$time$cwd$ps$ResumeSequece " + +} + +function Invoke-Starship { + Invoke-Expression (&starship init powershell) +} + +Import-Module Catppuccin + +$Flavor = $Catppuccin['Mocha'] + +# The following colors are used by PowerShell's formatting +# Again PS 7.2+ only +$PSStyle.Formatting.Debug = $Flavor.Sky.Foreground() +$PSStyle.Formatting.Error = $Flavor.Red.Foreground() +$PSStyle.Formatting.ErrorAccent = $Flavor.Blue.Foreground() +$PSStyle.Formatting.FormatAccent = $Flavor.Teal.Foreground() +$PSStyle.Formatting.TableHeader = $Flavor.Rosewater.Foreground() +$PSStyle.Formatting.Verbose = $Flavor.Yellow.Foreground() +$PSStyle.Formatting.Warning = $Flavor.Peach.Foreground() + +$Colors = @{ + # Largely based on the Code Editor style guide + # Emphasis, ListPrediction and ListPredictionSelected are inspired by the Catppuccin fzf theme + + # Powershell colours + Emphasis = $Flavor.Red.Foreground() + Selection = $Flavor.Surface0.Background() + + # PSReadLine prediction colours + InlinePrediction = $Flavor.Overlay0.Foreground() + ListPrediction = $Flavor.Mauve.Foreground() + ListPredictionSelected = $Flavor.Surface0.Background() + + # Syntax highlighting + Command = $Flavor.Blue.Foreground() + Comment = $Flavor.Overlay0.Foreground() + Default = $Flavor.Text.Foreground() + Error = $Flavor.Red.Foreground() + Keyword = $Flavor.Mauve.Foreground() + Member = $Flavor.Rosewater.Foreground() + Number = $Flavor.Peach.Foreground() + Operator = $Flavor.Sky.Foreground() + Parameter = $Flavor.Pink.Foreground() + String = $Flavor.Green.Foreground() + Type = $Flavor.Yellow.Foreground() + Variable = $Flavor.Lavender.Foreground() +} + +# Set the colours +Set-PSReadLineOption -Colors $Colors + +# Smarter cd +# Init zoxide apter starship to avoid conflicts +# https://github.com/ajeetdsouza/zoxide/issues/723 +if (Get-Command zoxide -ErrorAction SilentlyContinue) { + Invoke-Expression (& { (zoxide init powershell | Out-String) }) + ${function:...} = { z -Path (Join-Path -Path .. -ChildPath ..) } + ${function:....} = { z -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) } + ${function:.....} = { z -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) } + ${function:......} = { z -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) } + ${function:z-} = { z - } +} +else { + ${function:...} = { Set-Location -Path (Join-Path -Path .. -ChildPath ..) } + ${function:....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) } + ${function:.....} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) } + ${function:......} = { Set-Location -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path (Join-Path -Path .. -ChildPath ..) -ChildPath ..) -ChildPath ..) -ChildPath ..) } + ${function:z-} = { Set-Location - } +} diff --git a/tools/powershell/readme.md b/home/dot_config/powershell/readme.md similarity index 97% rename from tools/powershell/readme.md rename to home/dot_config/powershell/readme.md index db44094..6d7b1f2 100644 --- a/tools/powershell/readme.md +++ b/home/dot_config/powershell/readme.md @@ -1,39 +1,39 @@ -# PowerShell Profile - -This is the cross-platform PowerShell profile for PowerShell Core - -```text -. -├── Aliases.ps1 -├── Keymap.ps1 # keymaps, optimize for Vi-Mode and Colemak -├── Modules.ps1 -├── Navigation.ps1 -├── Prompt.ps1 -├── readme.md -└── Scripts.ps1 - -1 directory, 7 files -``` - -| Keymap | Action | Mode | -| ------ | -------------------- | ------ | -| `^a` | To Beginning of Line | All | -| `^e` | To End of Line | All | -| `^[` | To Normal Mode | Insert | - -## `Get-Command` vs `which.exe` under Windows - -```powershell -PS > hyperfine "pwsh.exe -NoProfile -Command 'Get-Command which'" "pwsh.exe -NoProfile -Command 'which which'" --warmup 10 -Benchmark 1: pwsh.exe -NoProfile -Command 'Get-Command which' - Time (mean ± σ): 152.1 ms ± 1.3 ms [User: 112.2 ms, System: 89.3 ms] - Range (min … max): 150.0 ms … 155.3 ms 18 runs - -Benchmark 2: pwsh.exe -NoProfile -Command 'which which' - Time (mean ± σ): 153.7 ms ± 6.4 ms [User: 126.7 ms, System: 101.9 ms] - Range (min … max): 147.8 ms … 169.5 ms 19 runs - -Summary - pwsh.exe -NoProfile -Command 'Get-Command which' ran - 1.01 ± 0.04 times faster than pwsh.exe -NoProfile -Command 'which which' -``` +# PowerShell Profile + +This is the cross-platform PowerShell profile for PowerShell Core + +```text +. +├── Aliases.ps1 +├── Keymap.ps1 # keymaps, optimize for Vi-Mode and Colemak +├── Modules.ps1 +├── Navigation.ps1 +├── Prompt.ps1 +├── readme.md +└── Scripts.ps1 + +1 directory, 7 files +``` + +| Keymap | Action | Mode | +| ------ | -------------------- | ------ | +| `^a` | To Beginning of Line | All | +| `^e` | To End of Line | All | +| `^[` | To Normal Mode | Insert | + +## `Get-Command` vs `which.exe` under Windows + +```powershell +PS > hyperfine "pwsh.exe -NoProfile -Command 'Get-Command which'" "pwsh.exe -NoProfile -Command 'which which'" --warmup 10 +Benchmark 1: pwsh.exe -NoProfile -Command 'Get-Command which' + Time (mean ± σ): 152.1 ms ± 1.3 ms [User: 112.2 ms, System: 89.3 ms] + Range (min … max): 150.0 ms … 155.3 ms 18 runs + +Benchmark 2: pwsh.exe -NoProfile -Command 'which which' + Time (mean ± σ): 153.7 ms ± 6.4 ms [User: 126.7 ms, System: 101.9 ms] + Range (min … max): 147.8 ms … 169.5 ms 19 runs + +Summary + pwsh.exe -NoProfile -Command 'Get-Command which' ran + 1.01 ± 0.04 times faster than pwsh.exe -NoProfile -Command 'which which' +``` diff --git a/home/dot_config/powershell/xaa b/home/dot_config/powershell/xaa new file mode 100644 index 0000000..67fbfd1 --- /dev/null +++ b/home/dot_config/powershell/xaa @@ -0,0 +1 @@ +/home/js0ny/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/opt/microsoft/powershell/7/Modules diff --git a/common/inputrc b/home/dot_config/readline/inputrc similarity index 94% rename from common/inputrc rename to home/dot_config/readline/inputrc index 705dcdd..4d1a231 100644 --- a/common/inputrc +++ b/home/dot_config/readline/inputrc @@ -5,9 +5,10 @@ # e.g. Python REPL, Lua REPL, Bash on Linux # Location: -# ~/.inputrc +# $INPUTRC +# export INPUTRC="$XDG_CONFIG_HOME"/readline/inputrc # Linking: -# ln -sf $DOTFILES/common/inputrc ~/.inputrc +# ln -sf $DOTFILES/common/inputrc $INPUTRC # Use `man readline` to see all the options # Reference: https://wiki.archlinux.org/title/Readline diff --git a/platforms/linux/rofi/config.rasi b/home/dot_config/rofi/config.rasi similarity index 100% rename from platforms/linux/rofi/config.rasi rename to home/dot_config/rofi/config.rasi diff --git a/platforms/linux/rofi/dark.rasi b/home/dot_config/rofi/dark.rasi similarity index 100% rename from platforms/linux/rofi/dark.rasi rename to home/dot_config/rofi/dark.rasi diff --git a/platforms/linux/rofi/light.rasi b/home/dot_config/rofi/light.rasi similarity index 100% rename from platforms/linux/rofi/light.rasi rename to home/dot_config/rofi/light.rasi diff --git a/home/dot_config/rofi/symlink_current.rasi b/home/dot_config/rofi/symlink_current.rasi new file mode 100644 index 0000000..1f760c2 --- /dev/null +++ b/home/dot_config/rofi/symlink_current.rasi @@ -0,0 +1 @@ +dark.rasi diff --git a/common/rtorrent.rc b/home/dot_config/rtorrent/rtorrent.rc similarity index 100% rename from common/rtorrent.rc rename to home/dot_config/rtorrent/rtorrent.rc diff --git a/tools/screen/+colemak.screenrc b/home/dot_config/screen/+colemak.screenrc similarity index 100% rename from tools/screen/+colemak.screenrc rename to home/dot_config/screen/+colemak.screenrc diff --git a/tools/screen/+qwerty.screenrc b/home/dot_config/screen/+qwerty.screenrc similarity index 100% rename from tools/screen/+qwerty.screenrc rename to home/dot_config/screen/+qwerty.screenrc diff --git a/tools/screen/screenrc b/home/dot_config/screen/screenrc similarity index 100% rename from tools/screen/screenrc rename to home/dot_config/screen/screenrc diff --git a/tools/sioyek/keys_user.config b/home/dot_config/sioyek/keys_user.config similarity index 100% rename from tools/sioyek/keys_user.config rename to home/dot_config/sioyek/keys_user.config diff --git a/tools/sioyek/prefs_user.config b/home/dot_config/sioyek/prefs_user.config similarity index 100% rename from tools/sioyek/prefs_user.config rename to home/dot_config/sioyek/prefs_user.config diff --git a/platforms/mac/sketchybar/sketchybarrc b/home/dot_config/sketchybar/executable_sketchybarrc old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/sketchybarrc rename to home/dot_config/sketchybar/executable_sketchybarrc diff --git a/platforms/mac/sketchybar/variables.sh b/home/dot_config/sketchybar/executable_variables.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/variables.sh rename to home/dot_config/sketchybar/executable_variables.sh diff --git a/platforms/mac/sketchybar/items/battery.sh b/home/dot_config/sketchybar/items/executable_battery.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/items/battery.sh rename to home/dot_config/sketchybar/items/executable_battery.sh diff --git a/platforms/mac/sketchybar/items/calendar.sh b/home/dot_config/sketchybar/items/executable_calendar.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/items/calendar.sh rename to home/dot_config/sketchybar/items/executable_calendar.sh diff --git a/platforms/mac/sketchybar/items/clock.sh b/home/dot_config/sketchybar/items/executable_clock.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/items/clock.sh rename to home/dot_config/sketchybar/items/executable_clock.sh diff --git a/platforms/mac/sketchybar/items/cpu.sh b/home/dot_config/sketchybar/items/executable_cpu.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/items/cpu.sh rename to home/dot_config/sketchybar/items/executable_cpu.sh diff --git a/platforms/mac/sketchybar/items/front_app.sh b/home/dot_config/sketchybar/items/executable_front_app.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/items/front_app.sh rename to home/dot_config/sketchybar/items/executable_front_app.sh diff --git a/platforms/mac/sketchybar/items/memory.sh b/home/dot_config/sketchybar/items/executable_memory.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/items/memory.sh rename to home/dot_config/sketchybar/items/executable_memory.sh diff --git a/platforms/mac/sketchybar/items/spaces.sh b/home/dot_config/sketchybar/items/executable_spaces.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/items/spaces.sh rename to home/dot_config/sketchybar/items/executable_spaces.sh diff --git a/platforms/mac/sketchybar/items/spotify.sh b/home/dot_config/sketchybar/items/executable_spotify.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/items/spotify.sh rename to home/dot_config/sketchybar/items/executable_spotify.sh diff --git a/platforms/mac/sketchybar/items/volume.sh b/home/dot_config/sketchybar/items/executable_volume.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/items/volume.sh rename to home/dot_config/sketchybar/items/executable_volume.sh diff --git a/platforms/mac/sketchybar/plugins/calendar.sh b/home/dot_config/sketchybar/plugins/executable_calendar.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/plugins/calendar.sh rename to home/dot_config/sketchybar/plugins/executable_calendar.sh diff --git a/platforms/mac/sketchybar/plugins/clock.sh b/home/dot_config/sketchybar/plugins/executable_clock.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/plugins/clock.sh rename to home/dot_config/sketchybar/plugins/executable_clock.sh diff --git a/platforms/mac/sketchybar/plugins/cpu.sh b/home/dot_config/sketchybar/plugins/executable_cpu.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/plugins/cpu.sh rename to home/dot_config/sketchybar/plugins/executable_cpu.sh diff --git a/platforms/mac/sketchybar/plugins/front_app.sh b/home/dot_config/sketchybar/plugins/executable_front_app.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/plugins/front_app.sh rename to home/dot_config/sketchybar/plugins/executable_front_app.sh diff --git a/platforms/mac/sketchybar/plugins/memory.sh b/home/dot_config/sketchybar/plugins/executable_memory.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/plugins/memory.sh rename to home/dot_config/sketchybar/plugins/executable_memory.sh diff --git a/platforms/mac/sketchybar/plugins/power.sh b/home/dot_config/sketchybar/plugins/executable_power.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/plugins/power.sh rename to home/dot_config/sketchybar/plugins/executable_power.sh diff --git a/platforms/mac/sketchybar/plugins/sound.sh b/home/dot_config/sketchybar/plugins/executable_sound.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/plugins/sound.sh rename to home/dot_config/sketchybar/plugins/executable_sound.sh diff --git a/platforms/mac/sketchybar/plugins/space.sh b/home/dot_config/sketchybar/plugins/executable_space.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/plugins/space.sh rename to home/dot_config/sketchybar/plugins/executable_space.sh diff --git a/platforms/mac/sketchybar/plugins/spotify.sh b/home/dot_config/sketchybar/plugins/executable_spotify.sh old mode 100755 new mode 100644 similarity index 100% rename from platforms/mac/sketchybar/plugins/spotify.sh rename to home/dot_config/sketchybar/plugins/executable_spotify.sh diff --git a/platforms/mac/skhdrc b/home/dot_config/skhd/skhdrc similarity index 100% rename from platforms/mac/skhdrc rename to home/dot_config/skhd/skhdrc diff --git a/common/starship.toml b/home/dot_config/starship.toml similarity index 100% rename from common/starship.toml rename to home/dot_config/starship.toml diff --git a/platforms/linux/swaylock b/home/dot_config/swaylock/config similarity index 73% rename from platforms/linux/swaylock rename to home/dot_config/swaylock/config index adce2d5..72a8a50 100644 --- a/platforms/linux/swaylock +++ b/home/dot_config/swaylock/config @@ -1,4 +1,4 @@ -image=~/Pictures/Wallpaper/lock.png +image=~/System/Customization/Wallpaper/lock.png # screenshots ignore-empty-password show-failed-attempts @@ -35,19 +35,19 @@ text-clear-color=f5e0dc text-caps-lock-color=fab387 text-ver-color=89b4fa text-wrong-color=eba0ac -# -# indicator-radius 100 -# indicator-thickness 7 -# fade-in 0.2 -# grace 2 -# -# effect-blur 7x5 -# effect-vignette 0.5:0.5 -# ring-color bb00cc -# key-hl-color 880033 -# line-color 00000000 -# inside-color 00000088 -# # separator-color 00000000 -# # --grace 2 \ +indicator-radius 100 +indicator-thickness 7 + +fade-in 0.2 +grace 2 + +# effect-blur 10x10 +# effect-vignette 0.5:0.5 +# ring-color bb00cc +# key-hl-color 880033 +# line-color 00000000 +# inside-color 00000088 +# separator-color 00000000 +# --grace 2 \ # --fade-in 0.2 diff --git a/platforms/linux/systemd/user/emacs-daemon.service b/home/dot_config/systemd/user/emacs-daemon.service similarity index 100% rename from platforms/linux/systemd/user/emacs-daemon.service rename to home/dot_config/systemd/user/emacs-daemon.service diff --git a/platforms/linux/systemd/user/keyd-app.service b/home/dot_config/systemd/user/keyd-app.service similarity index 100% rename from platforms/linux/systemd/user/keyd-app.service rename to home/dot_config/systemd/user/keyd-app.service diff --git a/home/dot_config/systemd/user/mihomo.service b/home/dot_config/systemd/user/mihomo.service new file mode 100644 index 0000000..1dc1a0e --- /dev/null +++ b/home/dot_config/systemd/user/mihomo.service @@ -0,0 +1,27 @@ +# ~/.config/systemd/user/mihomo.service + +[Unit] +Description=mihomo Service +# This ensures the service only starts after your network is online. +After=network-online.target +Wants=network-online.target + +[Service] +# The main process to run. +# The WorkingDirectory is set to your user's home directory. +# This assumes your mihomo configuration is located at ~/.config/mihomo/ +WorkingDirectory=%h/.config/mihomo +# It's common for user-level applications to be in a directory like ~/.local/bin +# or simply in your PATH. +ExecStart=mihomo + +# This tells systemd to restart the service if it stops unexpectedly. +Restart=on-failure +# This sets the restart interval to 5 seconds. +RestartSec=5s + +[Install] +# This unit should be active when the user's session is active, +# ensuring it starts when you log in. +WantedBy=default.target + diff --git a/platforms/wsl/systemd/user/symlink-wayland-socket.service b/home/dot_config/systemd/user/symlink-wayland-socket.service similarity index 96% rename from platforms/wsl/systemd/user/symlink-wayland-socket.service rename to home/dot_config/systemd/user/symlink-wayland-socket.service index fc0c8a2..03821e3 100644 --- a/platforms/wsl/systemd/user/symlink-wayland-socket.service +++ b/home/dot_config/systemd/user/symlink-wayland-socket.service @@ -1,3 +1,4 @@ +# NOTE: FOR WSL ONLY # https://github.com/microsoft/WSL/issues/11261 # ~/.config/systemd/user/symlink-wayland-socket.service # Usage: diff --git a/tools/tmux/+colemak.tmux b/home/dot_config/tmux/+colemak.tmux similarity index 100% rename from tools/tmux/+colemak.tmux rename to home/dot_config/tmux/+colemak.tmux diff --git a/tools/tmux/+qwerty.tmux b/home/dot_config/tmux/+qwerty.tmux similarity index 100% rename from tools/tmux/+qwerty.tmux rename to home/dot_config/tmux/+qwerty.tmux diff --git a/tools/tmux/tmux.conf b/home/dot_config/tmux/tmux.conf similarity index 100% rename from tools/tmux/tmux.conf rename to home/dot_config/tmux/tmux.conf diff --git a/home/dot_config/user-dirs.dirs b/home/dot_config/user-dirs.dirs new file mode 100644 index 0000000..7f9a959 --- /dev/null +++ b/home/dot_config/user-dirs.dirs @@ -0,0 +1,15 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/Desktop" +XDG_DOWNLOAD_DIR="$HOME/Downloads" +XDG_TEMPLATES_DIR="$HOME/Templates" +XDG_PUBLICSHARE_DIR="$HOME/Public" +XDG_DOCUMENTS_DIR="$HOME/Documents" +XDG_MUSIC_DIR="$HOME/Music" +XDG_PICTURES_DIR="$HOME/Pictures" +XDG_VIDEOS_DIR="$HOME/Videos" diff --git a/home/dot_config/user-dirs.locale b/home/dot_config/user-dirs.locale new file mode 100644 index 0000000..187dffb --- /dev/null +++ b/home/dot_config/user-dirs.locale @@ -0,0 +1 @@ +zh_CN diff --git a/common/vimrc+qwerty.vimrc b/home/dot_config/vim/vimrc similarity index 100% rename from common/vimrc+qwerty.vimrc rename to home/dot_config/vim/vimrc diff --git a/platforms/linux/waybar/config.jsonc b/home/dot_config/waybar/config.bak similarity index 85% rename from platforms/linux/waybar/config.jsonc rename to home/dot_config/waybar/config.bak index de9ce34..da794cb 100644 --- a/platforms/linux/waybar/config.jsonc +++ b/home/dot_config/waybar/config.bak @@ -5,12 +5,13 @@ "include": [ "~/.config/waybar/modules/hyprland-workspace.jsonc", "~/.config/waybar/modules/misc.jsonc", + "~/.config/waybar/modules/niri.jsonc" ], "height": 30, // Waybar height (to be removed for auto height) // "width": 1280, // Waybar width "spacing": 4, // Gaps between modules (4px) // Choose the order of the modules - "modules-left": ["hyprland/workspaces", "sway/mode", "sway/scratchpad"], + "modules-left": ["custom/osicon", "hyprland/workspaces", "sway/mode", "sway/scratchpad"], "modules-center": ["hyprland/window"], "modules-right": [ "tray", diff --git a/home/dot_config/waybar/config.jsonc b/home/dot_config/waybar/config.jsonc new file mode 100644 index 0000000..afc52ed --- /dev/null +++ b/home/dot_config/waybar/config.jsonc @@ -0,0 +1,194 @@ +{ + "layer": "top", // Waybar at top layer + // "position": "bottom", // Waybar position (top|bottom|left|right) + // "position": "right", + // "position": "left", + // "output": "eDP-1", + "height": 32, // Waybar height (to be removed for auto height) + "margin-top": 4, + "margin-left": 4, + "margin-right": 4, + // "width": 300, // Waybar width + "spacing": 0, // Gaps between modules (4px) + "include": [ + // "~/.config/waybar/modules/hyprland-workspace.jsonc", + "~/.config/waybar/modules/misc.jsonc" + // "~/.config/waybar/modules/niri.jsonc" + ], + // Choose the order of the modules + "modules-left": ["custom/osicon", "wlr/taskbar"], + // "modules-center": ["clock"], + "modules-right": ["tray", "pulseaudio", "cpu", "memory", "network", "battery", "clock"], + // "modules-right": ["cpu", "memory", "battery", "network", "tray"], + // Modules configuration + // "sway/workspaces": { + // "disable-scroll": true, + // "all-outputs": true, + // "warp-on-scroll": false, + // "format": "{name}: {icon}", + // "format-icons": { + // "1": "", + // "2": "", + // "3": "", + // "4": "", + // "5": "", + // "urgent": "", + // "focused": "", + // "default": "" + // } + // }, + "custom/logout": { + "format": "⏻", + "tooltip": false, + "on-click": "niri msg action quit" + }, + "wlr/taskbar": { + // "all-outputs": true, + // "format": "{icon} {title} {short_state}", + "format": "{icon}", + "tooltip-format": "{title} | {app_id}", + "on-click": "activate", + "on-click-middle": "close", + "on-click-right": "fullscreen" + }, + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "sway/mode": { + "format": "{}" + }, + "sway/scratchpad": { + "format": "{icon} {count}", + "show-empty": false, + "format-icons": ["", ""], + "tooltip": true, + "tooltip-format": "{app}: {title}" + }, + "mpd": { + "format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ⸨{songPosition}|{queueLength}⸩ {volume}% ", + "format-disconnected": "Disconnected ", + "format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ", + "unknown-tag": "N/A", + "interval": 2, + "consume-icons": { + "on": " " + }, + "random-icons": { + "off": " ", + "on": " " + }, + "repeat-icons": { + "on": " " + }, + "single-icons": { + "on": "1 " + }, + "state-icons": { + "paused": "", + "playing": "" + }, + "tooltip-format": "MPD (connected)", + "tooltip-format-disconnected": "MPD (disconnected)" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + // "icon-size": 21, + "spacing": 10 + }, + "clock": { + "tooltip-format": "{:%Y %B}\n{calendar}", + "format": "{:%e %B %H:%M}" + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false + }, + "memory": { + "format": "{}% " + }, + "temperature": { + // "thermal-zone": 2, + // "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input", + "critical-threshold": 80, + // "format-critical": "{temperatureC}°C {icon}", + "format": "{temperatureC}°C {icon}", + "format-icons": ["", "", ""] + }, + "backlight": { + // "device": "acpi_video1", + "format": "{percent}% {icon}", + "format-icons": ["", "", "", "", "", "", "", "", ""] + }, + "battery": { + "states": { + // "good": 95, + "warning": 30, + "critical": 15 + }, + "format": "{capacity}% {icon}", + "format-charging": "{capacity}% ", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + // "format-good": "", // An empty format will hide the module + // "format-full": "", + "format-icons": ["", "", "", "", ""] + }, + "battery#bat2": { + "bat": "BAT2" + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "", + "format-ethernet": "", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "", + "format-disconnected": "⚠", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "pulseaudio": { + "scroll-step": 5, // %, can be a float + "format": "{icon}", + "tooltip-format": "{volume}% {icon}", + "format-bluetooth": "{volume}% {icon}", + "format-bluetooth-muted": " {icon}", + "format-muted": "", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol", + "on-click-right": "pactl set-sink-mute @DEFAULT_SINK@ toggle" + }, + "custom/media": { + "format": "{icon} {}", + "return-type": "json", + "max-length": 40, + "format-icons": { + "spotify": "", + "default": "🎜" + }, + "escape": true, + "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder + // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name + } +} + diff --git a/home/dot_config/waybar/current.css b/home/dot_config/waybar/current.css new file mode 100644 index 0000000..8cae229 --- /dev/null +++ b/home/dot_config/waybar/current.css @@ -0,0 +1,28 @@ +@define-color rosewater #f5e0dc; +@define-color flamingo #f2cdcd; +@define-color pink #f5c2e7; +@define-color mauve #cba6f7; +@define-color red #f38ba8; +@define-color maroon #eba0ac; +@define-color peach #fab387; +@define-color yellow #f9e2af; +@define-color green #a6e3a1; +@define-color teal #94e2d5; +@define-color sky #89dceb; +@define-color sapphire #74c7ec; +@define-color blue #89b4fa; +@define-color lavender #b4befe; +@define-color text #cdd6f4; +@define-color subtext1 #bac2de; +@define-color subtext0 #a6adc8; +@define-color overlay2 #9399b2; +@define-color overlay1 #7f849c; +@define-color overlay0 #6c7086; +@define-color surface2 #585b70; +@define-color surface1 #45475a; +@define-color surface0 #313244; +@define-color base #1e1e2e; +@define-color mantle #181825; +@define-color crust #11111b; +@define-color accent #f5c2e7; + diff --git a/platforms/linux/waybar/dark.css b/home/dot_config/waybar/dark.css similarity index 100% rename from platforms/linux/waybar/dark.css rename to home/dot_config/waybar/dark.css diff --git a/platforms/linux/waybar/light.css b/home/dot_config/waybar/light.css similarity index 100% rename from platforms/linux/waybar/light.css rename to home/dot_config/waybar/light.css diff --git a/platforms/linux/waybar/modules/hyprland-workspace.jsonc b/home/dot_config/waybar/modules/hyprland-workspace.jsonc similarity index 98% rename from platforms/linux/waybar/modules/hyprland-workspace.jsonc rename to home/dot_config/waybar/modules/hyprland-workspace.jsonc index 892823f..ab20d89 100644 --- a/platforms/linux/waybar/modules/hyprland-workspace.jsonc +++ b/home/dot_config/waybar/modules/hyprland-workspace.jsonc @@ -9,9 +9,9 @@ "on-click": "activate", "on-scroll-up": "hyprctl dispatch workspace e+1", "on-scroll-down": "hyprctl dispatch workspace e-1", - "persistent-workspaces": { - "*": 5 - }, + // "persistent-workspaces": { + // "*": 5 + // }, "format-icons": { "1": "一", diff --git a/platforms/linux/waybar/modules/misc.jsonc b/home/dot_config/waybar/modules/misc.jsonc similarity index 97% rename from platforms/linux/waybar/modules/misc.jsonc rename to home/dot_config/waybar/modules/misc.jsonc index 59c0fbf..98c03d5 100644 --- a/platforms/linux/waybar/modules/misc.jsonc +++ b/home/dot_config/waybar/modules/misc.jsonc @@ -183,5 +183,9 @@ "suspend": "systemctl suspend", "hibernate": "systemctl hibernate" } + }, + "custom/osicon": { + "format": "", + "on-click-right": "rofi -show drun" } -} \ No newline at end of file +} diff --git a/home/dot_config/waybar/style.css b/home/dot_config/waybar/style.css new file mode 100644 index 0000000..100f4f8 --- /dev/null +++ b/home/dot_config/waybar/style.css @@ -0,0 +1,339 @@ +* { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: Cantarell, 'Font Awesome 6 Free'; + font-size: 14px; + font-feature-settings: "tnum"; +} + +window#waybar { + background: transparent; + /* background-color: rgba(30, 30, 46, 0.5); */ + /* border-bottom: 2px solid rgba(147, 153, 178, 0.5); */ + /* border: 1px solid rgba(166, 173, 200, 1.0); */ + color: #ffffff; + /* transition-property: background-color; */ + /* transition-duration: .5s; */ +} + +window#waybar.hidden { + opacity: 0.2; +} + +/* +window#waybar.empty { + background-color: transparent; +} +window#waybar.solo { + background-color: #FFFFFF; +} +*/ + +window#waybar.termite { + background-color: #3F3F3F; +} + +window#waybar.chromium { + background-color: #000000; + border: none; +} + +button { + /* Use box-shadow instead of border so the text isn't offset */ + box-shadow: none; + /* Avoid rounded borders under each button name */ + border: none; + border-radius: 0; + transition-property: none; +} + +/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ +button:hover { + background: none; + box-shadow: none; + text-shadow: none; + border: none; + -gtk-icon-effect: none; + -gtk-icon-shadow: none; +} + +#workspaces button { + padding: 0 5px; + background-color: transparent; + color: #ffffff; +} + +#workspaces button:hover { + background: rgba(0, 0, 0, 0.2); +} + +#workspaces button.focused { + background-color: #64727D; + box-shadow: inset 0 -3px #ffffff; +} + +#workspaces button.urgent { + background-color: #eb4d4b; +} + +#mode { + background-color: #64727D; + border-bottom: 3px solid #ffffff; +} + +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#wireplumber, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#custom-osicon, +#mpd { + padding: 0 10px; + color: #f0f0ff; + background-color: rgba(30, 30, 46, 0.6); + border-radius: 99px; +} + +#window, +#workspaces { + margin: 0 4px; +} + +/* If workspaces is the leftmost module, omit left margin */ +.modules-left > widget:first-child > #workspaces { + margin-left: 0; +} + +/* If workspaces is the rightmost module, omit right margin */ +.modules-right > widget:last-child > #workspaces { + margin-right: 0; +} + +#clock { + /* background-color: #64727D; */ + font-weight: bold; + /* background-color: rgba(0, 0, 0, 0.3); */ + /* border-radius: 99px; */ +} + +#battery { + /* background-color: #f9e2af; */ + /* color: #000000; */ + margin-left: 4px; +} + +/* +#battery.charging, #battery.plugged { + color: #ffffff; + background-color: #26A65B; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: #000000; + } +} + +#battery.critical:not(.charging) { + background-color: #f53c3c; + color: #ffffff; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} +*/ + +label:focus { + background-color: #000000; +} + +#cpu { + /* background-color: #f38ba8; */ + /* color: #000000; */ + border-radius: 99px 0px 0px 99px; + padding: 0 0 0 10px; + margin-left: 4px; +} + +#memory { + /* background-color: #fab387; */ + /* color: #000000; */ + border-radius: 0px 99px 99px 0px; + /* padding: 0 10px 0 0; */ +} + +#disk { + background-color: #964B00; +} + +#backlight { + background-color: #90b1b1; +} + +#network { + /* background-color: #a6e3a1; */ + /* color: #000000; */ +} + +/* +#network.disconnected { + background-color: #f53c3c; +} +*/ + +#taskbar { + margin-left: 4px; +} + +#taskbar button { + color: #f0f0ff; + background-color: rgba(30, 30, 46, 0.6); +} + +#taskbar button:first-child { + border-radius: 99px 0 0 99px; +} + +#taskbar button:last-child { + border-radius: 0 99px 99px 0; +} + +#taskbar button:first-child:last-child { + border-radius: 99px; +} + +#taskbar button:hover { + background-color: rgba(49, 50, 68, 0.6); +} + +#taskbar button.active { + background-color: rgba(88, 91, 112, 0.6); +} + +#taskbar button.active:hover { + background-color: rgba(108, 112, 134, 0.6); +} + +#pulseaudio { + background-color: #f1c40f; + color: #000000; +} + +#pulseaudio.muted { + background-color: #90b1b1; + color: #2a5c45; +} + +#wireplumber { + background-color: #fff0f5; + color: #000000; +} + +#wireplumber.muted { + background-color: #f53c3c; +} + +#custom-media { + background-color: #66cc99; + color: #2a5c45; + min-width: 100px; +} + +#custom-media.custom-spotify { + background-color: #66cc99; +} + +#custom-media.custom-vlc { + background-color: #ffa000; +} + +#temperature { + background-color: #f0932b; +} + +#temperature.critical { + background-color: #eb4d4b; +} + +#tray { + /* background-color: #2980b9; */ +} + +#tray > .passive { + -gtk-icon-effect: dim; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: #eb4d4b; +} + +#idle_inhibitor { + background-color: #2d3436; +} + +#idle_inhibitor.activated { + background-color: #ecf0f1; + color: #2d3436; +} + +#mpd { + background-color: #66cc99; + color: #2a5c45; +} + +#mpd.disconnected { + background-color: #f53c3c; +} + +#mpd.stopped { + background-color: #90b1b1; +} + +#mpd.paused { + background-color: #51a37a; +} + +#language { + background: #00b093; + color: #740864; + padding: 0 5px; + margin: 0 5px; + min-width: 16px; +} + +#keyboard-state { + background: #97e1ad; + color: #000000; + padding: 0 0px; + margin: 0 5px; + min-width: 16px; +} + +#keyboard-state > label { + padding: 0 5px; +} + +#keyboard-state > label.locked { + background: rgba(0, 0, 0, 0.2); +} + +#scratchpad { + background: rgba(0, 0, 0, 0.2); +} + +#scratchpad.empty { + background-color: transparent; +} diff --git a/platforms/linux/waybar/style.css b/home/dot_config/waybar/style.css.bak similarity index 100% rename from platforms/linux/waybar/style.css rename to home/dot_config/waybar/style.css.bak diff --git a/tools/wezterm/appearance.lua b/home/dot_config/wezterm/appearance.lua similarity index 100% rename from tools/wezterm/appearance.lua rename to home/dot_config/wezterm/appearance.lua diff --git a/tools/wezterm/color.lua b/home/dot_config/wezterm/color.lua similarity index 100% rename from tools/wezterm/color.lua rename to home/dot_config/wezterm/color.lua diff --git a/tools/wezterm/.gitignore b/home/dot_config/wezterm/dot_gitignore similarity index 100% rename from tools/wezterm/.gitignore rename to home/dot_config/wezterm/dot_gitignore diff --git a/tools/wezterm/keymaps/colemak.lua b/home/dot_config/wezterm/keymaps/colemak.lua similarity index 100% rename from tools/wezterm/keymaps/colemak.lua rename to home/dot_config/wezterm/keymaps/colemak.lua diff --git a/tools/wezterm/keymaps/init.lua b/home/dot_config/wezterm/keymaps/init.lua similarity index 100% rename from tools/wezterm/keymaps/init.lua rename to home/dot_config/wezterm/keymaps/init.lua diff --git a/tools/wezterm/keymaps/leaders.lua b/home/dot_config/wezterm/keymaps/leaders.lua similarity index 100% rename from tools/wezterm/keymaps/leaders.lua rename to home/dot_config/wezterm/keymaps/leaders.lua diff --git a/tools/wezterm/keymaps/qwerty.lua b/home/dot_config/wezterm/keymaps/qwerty.lua similarity index 100% rename from tools/wezterm/keymaps/qwerty.lua rename to home/dot_config/wezterm/keymaps/qwerty.lua diff --git a/tools/wezterm/launcher.lua b/home/dot_config/wezterm/launcher.lua similarity index 100% rename from tools/wezterm/launcher.lua rename to home/dot_config/wezterm/launcher.lua diff --git a/tools/wezterm/misc.lua b/home/dot_config/wezterm/misc.lua similarity index 100% rename from tools/wezterm/misc.lua rename to home/dot_config/wezterm/misc.lua diff --git a/tools/wezterm/tab.lua b/home/dot_config/wezterm/tab.lua similarity index 100% rename from tools/wezterm/tab.lua rename to home/dot_config/wezterm/tab.lua diff --git a/tools/wezterm/utils.lua b/home/dot_config/wezterm/utils.lua similarity index 100% rename from tools/wezterm/utils.lua rename to home/dot_config/wezterm/utils.lua diff --git a/tools/wezterm/wezterm.lua b/home/dot_config/wezterm/wezterm.lua similarity index 100% rename from tools/wezterm/wezterm.lua rename to home/dot_config/wezterm/wezterm.lua diff --git a/platforms/linux/wlogout/actions b/home/dot_config/wlogout/actions similarity index 100% rename from platforms/linux/wlogout/actions rename to home/dot_config/wlogout/actions diff --git a/platforms/linux/wlogout/icons/hibernate.png b/home/dot_config/wlogout/icons/hibernate.png similarity index 100% rename from platforms/linux/wlogout/icons/hibernate.png rename to home/dot_config/wlogout/icons/hibernate.png diff --git a/platforms/linux/wlogout/icons/lock.png b/home/dot_config/wlogout/icons/lock.png similarity index 100% rename from platforms/linux/wlogout/icons/lock.png rename to home/dot_config/wlogout/icons/lock.png diff --git a/platforms/linux/wlogout/icons/logout.png b/home/dot_config/wlogout/icons/logout.png similarity index 100% rename from platforms/linux/wlogout/icons/logout.png rename to home/dot_config/wlogout/icons/logout.png diff --git a/platforms/linux/wlogout/icons/reboot.png b/home/dot_config/wlogout/icons/reboot.png similarity index 100% rename from platforms/linux/wlogout/icons/reboot.png rename to home/dot_config/wlogout/icons/reboot.png diff --git a/platforms/linux/wlogout/icons/shutdown.png b/home/dot_config/wlogout/icons/shutdown.png similarity index 100% rename from platforms/linux/wlogout/icons/shutdown.png rename to home/dot_config/wlogout/icons/shutdown.png diff --git a/platforms/linux/wlogout/icons/suspend.png b/home/dot_config/wlogout/icons/suspend.png similarity index 100% rename from platforms/linux/wlogout/icons/suspend.png rename to home/dot_config/wlogout/icons/suspend.png diff --git a/platforms/linux/wlogout/layout b/home/dot_config/wlogout/layout similarity index 100% rename from platforms/linux/wlogout/layout rename to home/dot_config/wlogout/layout diff --git a/platforms/linux/wlogout/style.css b/home/dot_config/wlogout/style.css similarity index 100% rename from platforms/linux/wlogout/style.css rename to home/dot_config/wlogout/style.css diff --git a/platforms/mac/yabairc b/home/dot_config/yabai/yabairc similarity index 100% rename from platforms/mac/yabairc rename to home/dot_config/yabai/yabairc diff --git a/tools/yazi/dark.toml b/home/dot_config/yazi/dark.toml similarity index 100% rename from tools/yazi/dark.toml rename to home/dot_config/yazi/dark.toml diff --git a/tools/yazi/.gitignore b/home/dot_config/yazi/dot_gitignore similarity index 100% rename from tools/yazi/.gitignore rename to home/dot_config/yazi/dot_gitignore diff --git a/tools/yazi/init.lua b/home/dot_config/yazi/init.lua similarity index 94% rename from tools/yazi/init.lua rename to home/dot_config/yazi/init.lua index a2ef3df..4836798 100644 --- a/tools/yazi/init.lua +++ b/home/dot_config/yazi/init.lua @@ -15,4 +15,4 @@ end -- require("dual-pane"):setup({ enabled = true }) require("starship"):setup() -require("yaziline"):setup() +-- require("yaziline"):setup() diff --git a/home/dot_config/yazi/keymap.toml b/home/dot_config/yazi/keymap.toml new file mode 100644 index 0000000..31bca00 --- /dev/null +++ b/home/dot_config/yazi/keymap.toml @@ -0,0 +1,18 @@ +# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. +# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. +"$schema" = "https://yazi-rs.github.io/schemas/prepend_keymap.json" + +[mgr] + +prepend_keymap = [ + + + # Seeking + { on = "E", run = "seek -5", desc = "Seek up 5 units in the preview" }, + { on = "N", run = "seek 5", desc = "Seek down 5 units in the preview" }, + + # Find + { on = ["g", "p"], run = "cd ~/Pictures", desc = "Go ~/Pictures/"} + + +] diff --git a/tools/yazi/light.toml b/home/dot_config/yazi/light.toml similarity index 100% rename from tools/yazi/light.toml rename to home/dot_config/yazi/light.toml diff --git a/home/dot_config/yazi/symlink_theme.toml b/home/dot_config/yazi/symlink_theme.toml new file mode 100644 index 0000000..1988c72 --- /dev/null +++ b/home/dot_config/yazi/symlink_theme.toml @@ -0,0 +1 @@ +light.toml diff --git a/tools/yazi/yazi.toml b/home/dot_config/yazi/yazi.toml similarity index 100% rename from tools/yazi/yazi.toml rename to home/dot_config/yazi/yazi.toml diff --git a/home/dot_config/zed/keymap.json b/home/dot_config/zed/keymap.json new file mode 100644 index 0000000..1030004 --- /dev/null +++ b/home/dot_config/zed/keymap.json @@ -0,0 +1,127 @@ +// $DOTFILES/tools/zed/keymaps.json +// Date: 2025-01-25 +// Author: js0ny +// Description: Zed keymaps + +// Location: +// GNU/Linux: ~/.config/zed/keymaps.json +// Windows: %APPDATA%\Zed\keymaps.json +// Linking: (link the whole directory) +// ln -sf $DOTFILES/tools/zed ~/.config/zed +// Zed keymap +// For information on binding keys, see the Zed +// documentation: https://zed.dev/docs/key-bindings +// To see the default key bindings run `zed: open default keymap` +// from the command palette. +// https://github.com/zed-industries/zed/tree/main/assets/keymaps +// Sequence: https://zed.dev/docs/key-bindings#remapping-keys +[ + { + "context": "Workspace", + + "bindings": { + // "shift shift": "file_finder::Toggle" + } + }, + + { + "context": "Editor", + + "bindings": { + // "j k": ["workspace::SendKeystrokes", "escape"] + "alt-k": "editor::AddSelectionAbove", // Insert Cursor Above + "alt-j": "editor::AddSelectionBelow" // Insert Cursor Below + } + }, + { + "context": "vim_mode == normal || vim_mode == visual", + + "bindings": { + "J": "vim::JoinLines", + "i": "vim::InsertBefore", + "I": "vim::InsertFirstNonWhitespace" + } + }, + { + "context": "vim_mode == visual || vim_mode == operator", + + "bindings": { + "H": "vim::StartOfLine", + "L": "vim::EndOfLine" + } + }, + { + "context": "vim_mode == normal", + + "bindings": { + "H": "pane::ActivatePreviousItem", + "L": "pane::ActivateNextItem" + } + }, + { + // "context": "GitPanel || ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView", + "context": "Editor && vim_mode == normal && !VimWaiting && !menu", + + "bindings": { + "space space": "file_finder::Toggle", + "space ;": "command_palette::Toggle", + "space /": "pane::DeploySearch", + "space f c": "zed::OpenSettings", + "space f e c": "zed::OpenSettings", + "space f t": "project_panel::ToggleFocus", + "space c f": "editor::Format", + "ctrl-w h": "workspace::ActivatePaneLeft", + "ctrl-w l": "workspace::ActivatePaneRight", + "ctrl-w k": "workspace::ActivatePaneUp", + "ctrl-w j": "workspace::ActivatePaneDown", + "ctrl-w alt-h": "workspace::ToggleLeftDock", + "ctrl-w alt-l": "workspace::ToggleRightDock", + "ctrl-w alt-j": "workspace::ToggleBottomDock", + "[ d": "editor::GoToPreviousDiagnostic", + "] d": "editor::GoToDiagnostic", + "[ g": "editor::GoToPreviousHunk", + "] g": "editor::GoToHunk" + } + }, + { + "context": "vim_mode == normal || vim_mode == visual || vim_mode == operator", + + "bindings": { + "j": "vim::Down", + "k": "vim::Up", + "l": "vim::Right", + "n": "search::SelectNextMatch", + "N": "search::SelectPreviousMatch", + "J": ["workspace::SendKeystrokes", "j j j j j"], + "K": ["workspace::SendKeystrokes", "k k k k k"], + "Y": ["workspace::SendKeystrokes", "y $"] + } + }, + { + "context": "ProjectPanel && not_editing", + + "bindings": { + "j": "menu::SelectNext", + "k": "menu::SelectPrevious", + "i": "project_panel::ExpandSelectedEntry", + "A": "project_panel::NewDirectory", + "a": "project_panel::NewFile", + "d": "project_panel::Delete" + } + }, + { + "context": "Terminal", + + "bindings": { + "ctrl-p": ["terminal::SendKeystroke", "ctrl-p"], + "ctrl-n": ["terminal::SendKeystroke", "ctrl-n"], + "ctrl-T": "workspace::NewTerminal", + "ctrl-w": null, + "ctrl-w ctrl-w": ["terminal::SendKeystroke", "ctrl-w"], + "ctrl-w h": "workspace::ActivatePaneLeft", + "ctrl-w k": "workspace::ActivatePaneUp", + "ctrl-w l": "workspace::ActivatePaneRight", + "ctrl-w j": "workspace::ActivatePaneDown" + } + } +] diff --git a/tools/zed/settings.json b/home/dot_config/zed/settings.json similarity index 71% rename from tools/zed/settings.json rename to home/dot_config/zed/settings.json index 259798f..867d045 100644 --- a/tools/zed/settings.json +++ b/home/dot_config/zed/settings.json @@ -18,6 +18,25 @@ // custom settings, run `zed: open default settings` from the // command palette (cmd-shift-p / ctrl-shift-p) { + // Theming + "icon_theme": "Material Icon Theme", + "theme": { + "mode": "system", + "light": "Rosé Pine Dawn", + "dark": "Catppuccin Macchiato" + }, + "tabs": { + "show_diagnostics": "errors", + "show_close_button": "hover", + "file_icons": true + }, + // Base keymaps + "base_keymap": "VSCode", + "vim_mode": true, + "vim": { + "use_system_clipboard": "on_yank", + "use_smartcase_find": true + }, "features": { "edit_prediction_provider": "zed" }, @@ -32,32 +51,32 @@ "proxy_no_verify": null } }, - "base_keymap": "VSCode", - "vim_mode": true, "ui_font_size": 16, "buffer_font_size": null, - "theme": { - "mode": "system", - "light": "Rosé Pine Dawn", - "dark": "Kanagawa Dragon" - }, "relative_line_numbers": true, - "buffer_font_family": "Maple Mono NF CN", + "buffer_font_family": "Zed Plex Mono", "remove_trailing_whitespace_on_save": true, - "assistant": { + "agent": { "default_model": { "provider": "copilot_chat", "model": "claude-3-7-sonnet" - }, - "version": "2" + } }, "inlay_hints": { "enabled": true, - "show_type_hints": true + "show_type_hints": true, + "show_parameter_hints": true }, "terminal": { "env": { "EDITOR": "zed --wait" } + }, + "file_types": { + "JSON": ["*.code-snippets"] + }, + "telemetry": { + "diagnostics": false, + "metrics": false } } diff --git a/tools/zed/snippets/c.json b/home/dot_config/zed/snippets/executable_c.json old mode 100755 new mode 100644 similarity index 100% rename from tools/zed/snippets/c.json rename to home/dot_config/zed/snippets/executable_c.json diff --git a/tools/zed/snippets/org.json b/home/dot_config/zed/snippets/org.json similarity index 100% rename from tools/zed/snippets/org.json rename to home/dot_config/zed/snippets/org.json diff --git a/common/zellij.config.kdl b/home/dot_config/zellij/zellij.config.kdl similarity index 97% rename from common/zellij.config.kdl rename to home/dot_config/zellij/zellij.config.kdl index 9c83644..141493d 100644 --- a/common/zellij.config.kdl +++ b/home/dot_config/zellij/zellij.config.kdl @@ -1,407 +1,407 @@ -// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true" -keybinds { - normal { - // uncomment this and adjust key if using copy_on_select=false - // bind "Alt c" { Copy; } - } - locked { - bind "Ctrl g" { SwitchToMode "Normal"; } - } - resize { - bind "Ctrl n" { SwitchToMode "Normal"; } - bind "h" "Left" { Resize "Increase Left"; } - bind "n" "Down" { Resize "Increase Down"; } - bind "e" "Up" { Resize "Increase Up"; } - bind "i" "Right" { Resize "Increase Right"; } - bind "H" { Resize "Decrease Left"; } - bind "N" { Resize "Decrease Down"; } - bind "E" { Resize "Decrease Up"; } - bind "I" { Resize "Decrease Right"; } - bind "=" "+" { Resize "Increase"; } - bind "-" { Resize "Decrease"; } - } - pane { - bind "Ctrl p" { SwitchToMode "Normal"; } - bind "h" "Left" { MoveFocus "Left"; } - bind "i" "Right" { MoveFocus "Right"; } - bind "n" "Down" { MoveFocus "Down"; } - bind "e" "Up" { MoveFocus "Up"; } - bind "p" { SwitchFocus; } - bind "c" { NewPane; SwitchToMode "Normal"; } - bind "N" { NewPane "Down"; SwitchToMode "Normal"; } - bind "I" { NewPane "Right"; SwitchToMode "Normal"; } - bind "x" { CloseFocus; SwitchToMode "Normal"; } - bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; } - bind "z" { TogglePaneFrames; SwitchToMode "Normal"; } - bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; } - bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; } - bind "r" { SwitchToMode "RenamePane"; PaneNameInput 0;} - } - move { - bind "Ctrl h" { SwitchToMode "Normal"; } - bind "h" "Left" { MovePane "Left"; } - bind "n" "Down" { MovePane "Down"; } - bind "e" "Up" { MovePane "Up"; } - bind "i" "Right" { MovePane "Right"; } - } - tab { - bind "Ctrl t" { SwitchToMode "Normal"; } - bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } - bind "h" "Left" "Up" "e" { GoToPreviousTab; } - bind "i" "Right" "Down" "n" { GoToNextTab; } - bind "c" { NewTab; SwitchToMode "Normal"; } - bind "x" { CloseTab; SwitchToMode "Normal"; } - bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; } - bind "b" { BreakPane; SwitchToMode "Normal"; } - bind "]" { BreakPaneRight; SwitchToMode "Normal"; } - bind "[" { BreakPaneLeft; SwitchToMode "Normal"; } - bind "1" { GoToTab 1; SwitchToMode "Normal"; } - bind "2" { GoToTab 2; SwitchToMode "Normal"; } - bind "3" { GoToTab 3; SwitchToMode "Normal"; } - bind "4" { GoToTab 4; SwitchToMode "Normal"; } - bind "5" { GoToTab 5; SwitchToMode "Normal"; } - bind "6" { GoToTab 6; SwitchToMode "Normal"; } - bind "7" { GoToTab 7; SwitchToMode "Normal"; } - bind "8" { GoToTab 8; SwitchToMode "Normal"; } - bind "9" { GoToTab 9; SwitchToMode "Normal"; } - bind "Tab" { ToggleTab; } - } - scroll { - bind "Ctrl s" { SwitchToMode "Normal"; } - bind "r" { EditScrollback; SwitchToMode "Normal"; } - bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } - bind "n" "Down" { ScrollDown; } - bind "e" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - // uncomment this and adjust key if using copy_on_select=false - // bind "Alt c" { Copy; } - } - search { - bind "Ctrl s" { SwitchToMode "Normal"; } - bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } - bind "n" "Down" { ScrollDown; } - bind "e" "Up" { ScrollUp; } - bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } - bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } - bind "d" { HalfPageScrollDown; } - bind "u" { HalfPageScrollUp; } - bind "k" { Search "down"; } - bind "K" { Search "up"; } - bind "c" { SearchToggleOption "CaseSensitivity"; } - bind "w" { SearchToggleOption "Wrap"; } - bind "o" { SearchToggleOption "WholeWord"; } - } - entersearch { - bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; } - bind "Enter" { SwitchToMode "Search"; } - } - renametab { - bind "Ctrl c" { SwitchToMode "Normal"; } - bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; } - } - renamepane { - bind "Ctrl c" { SwitchToMode "Normal"; } - bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; } - } - session { - bind "Ctrl o" { SwitchToMode "Normal"; } - bind "Ctrl s" { SwitchToMode "Scroll"; } - bind "d" { Detach; } - bind "w" { - LaunchOrFocusPlugin "session-manager" { - floating true - move_to_focused_tab true - }; - SwitchToMode "Normal" - } - bind "c" { - LaunchOrFocusPlugin "configuration" { - floating true - move_to_focused_tab true - }; - SwitchToMode "Normal" - } - bind "p" { - LaunchOrFocusPlugin "plugin-manager" { - floating true - move_to_focused_tab true - }; - SwitchToMode "Normal" - } - } - tmux { - bind "[" { SwitchToMode "Scroll"; } - bind "Ctrl b" { Write 2; SwitchToMode "Normal"; } - bind "\"" { NewPane "Down"; SwitchToMode "Normal"; } - bind "%" { NewPane "Right"; SwitchToMode "Normal"; } - bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; } - bind "c" { NewTab; SwitchToMode "Normal"; } - bind "," { SwitchToMode "RenameTab"; } - bind "p" { GoToPreviousTab; SwitchToMode "Normal"; } - bind "n" { GoToNextTab; SwitchToMode "Normal"; } - bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; } - bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; } - bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; } - bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; } - bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; } - bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; } - bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; } - bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; } - bind "o" { FocusNextPane; } - bind "d" { Detach; } - bind "Space" { NextSwapLayout; } - bind "x" { CloseFocus; SwitchToMode "Normal"; } - } - shared_except "locked" { - bind "Ctrl g" { SwitchToMode "Locked"; } - bind "Ctrl q" { Quit; } - bind "Alt f" { ToggleFloatingPanes; } - bind "Alt n" { NewPane; } - bind "Alt i" { MoveTab "Left"; } - bind "Alt o" { MoveTab "Right"; } - bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } - bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } - bind "Alt j" "Alt Down" { MoveFocus "Down"; } - bind "Alt k" "Alt Up" { MoveFocus "Up"; } - bind "Alt =" "Alt +" { Resize "Increase"; } - bind "Alt -" { Resize "Decrease"; } - bind "Alt [" { PreviousSwapLayout; } - bind "Alt ]" { NextSwapLayout; } - } - shared_except "normal" "locked" { - bind "Enter" "Esc" { SwitchToMode "Normal"; } - } - shared_except "pane" "locked" { - bind "Ctrl p" { SwitchToMode "Pane"; } - } - shared_except "resize" "locked" { - bind "Ctrl n" { SwitchToMode "Resize"; } - } - shared_except "scroll" "locked" { - bind "Ctrl s" { SwitchToMode "Scroll"; } - } - shared_except "session" "locked" { - bind "Ctrl o" { SwitchToMode "Session"; } - } - shared_except "tab" "locked" { - bind "Ctrl t" { SwitchToMode "Tab"; } - } - shared_except "move" "locked" { - bind "Ctrl h" { SwitchToMode "Move"; } - } - shared_except "tmux" "locked" { - bind "Ctrl b" { SwitchToMode "Tmux"; } - } -} - -// Plugin aliases - can be used to change the implementation of Zellij -// changing these requires a restart to take effect -plugins { - tab-bar location="zellij:tab-bar" - status-bar location="zellij:status-bar" - strider location="zellij:strider" - compact-bar location="zellij:compact-bar" - session-manager location="zellij:session-manager" - welcome-screen location="zellij:session-manager" { - welcome_screen true - } - filepicker location="zellij:strider" { - cwd "/" - } - configuration location="zellij:configuration" - plugin-manager location="zellij:plugin-manager" -} - -// Plugins to load in the background when a new session starts -load_plugins { - // "file:/path/to/my-plugin.wasm" - // "https://example.com/my-plugin.wasm" -} - -// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP -// eg. when terminal window with an active zellij session is closed -// (Requires restart) -// Options: -// - detach (Default) -// - quit -// -// on_force_close "quit" - -// Send a request for a simplified ui (without arrow fonts) to plugins -// Options: -// - true -// - false (Default) -// -// simplified_ui true - -// Choose the path to the default shell that zellij will use for opening new panes -// Default: $SHELL -// -// default_shell "fish" - -// Choose the path to override cwd that zellij will use for opening new panes -// -// default_cwd "" - -// Toggle between having pane frames around the panes -// Options: -// - true (default) -// - false -// -// pane_frames true - -// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible -// Options: -// - true (default) -// - false -// -// auto_layout true - -// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected -// (Requires restart) -// Options: -// - true (default) -// - false -// -// session_serialization false - -// Whether pane viewports are serialized along with the session, default is false -// (Requires restart) -// Options: -// - true -// - false (default) -// -// serialize_pane_viewport true - -// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0 -// defaults to the scrollback size. If this number is higher than the scrollback size, it will -// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true. -// (Requires restart) -// -// scrollback_lines_to_serialize 10000 - -// Define color themes for Zellij -// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes -// Once these themes are defined, one of them should to be selected in the "theme" section of this file -// -// themes { -// dracula { -// fg 248 248 242 -// bg 40 42 54 -// red 255 85 85 -// green 80 250 123 -// yellow 241 250 140 -// blue 98 114 164 -// magenta 255 121 198 -// orange 255 184 108 -// cyan 139 233 253 -// black 0 0 0 -// white 255 255 255 -// } -// } - -// Choose the theme that is specified in the themes section. -// Default: default -// -theme "default" - -// The name of the default layout to load on startup -// Default: "default" -// (Requires restart) -// -// default_layout "compact" - -// Choose the mode that zellij uses when starting up. -// Default: normal -// -// default_mode "locked" - -// Toggle enabling the mouse mode. -// On certain configurations, or terminals this could -// potentially interfere with copying text. -// (Requires restart) -// Options: -// - true (default) -// - false -// -// mouse_mode false - -// Configure the scroll back buffer size -// This is the number of lines zellij stores for each pane in the scroll back -// buffer. Excess number of lines are discarded in a FIFO fashion. -// (Requires restart) -// Valid values: positive integers -// Default value: 10000 -// -// scroll_buffer_size 10000 - -// Provide a command to execute when copying text. The text will be piped to -// the stdin of the program to perform the copy. This can be used with -// terminal emulators which do not support the OSC 52 ANSI control sequence -// that will be used by default if this option is not set. -// Examples: -// -// copy_command "xclip -selection clipboard" // x11 -// copy_command "wl-copy" // wayland -// copy_command "pbcopy" // osx - -// Choose the destination for copied text -// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. -// Does not apply when using copy_command. -// Options: -// - system (default) -// - primary -// -// copy_clipboard "primary" - -// Enable or disable automatic copy (and clear) of selection when releasing mouse -// Default: true -// -// copy_on_select false - -// Path to the default editor to use to edit pane scrollbuffer -// Default: $EDITOR or $VISUAL -// -// scrollback_editor "/usr/bin/vim" - -// When attaching to an existing session with other users, -// should the session be mirrored (true) -// or should each user have their own cursor (false) -// (Requires restart) -// Default: false -// -// mirror_session true - -// The folder in which Zellij will look for layouts -// (Requires restart) -// -// layout_dir "/path/to/my/layout_dir" - -// The folder in which Zellij will look for themes -// (Requires restart) -// -// theme_dir "/path/to/my/theme_dir" - -// Enable or disable the rendering of styled and colored underlines (undercurl). -// May need to be disabled for certain unsupported terminals -// (Requires restart) -// Default: true -// -// styled_underlines false - -// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know -// metadata info on this session) -// (Requires restart) -// Default: false -// -// disable_session_metadata true - -// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it) -// (Requires restart) -// Default: true (if the host terminal supports it) -// -// support_kitty_keyboard_protocol false +// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true" +keybinds { + normal { + // uncomment this and adjust key if using copy_on_select=false + // bind "Alt c" { Copy; } + } + locked { + bind "Ctrl g" { SwitchToMode "Normal"; } + } + resize { + bind "Ctrl n" { SwitchToMode "Normal"; } + bind "h" "Left" { Resize "Increase Left"; } + bind "n" "Down" { Resize "Increase Down"; } + bind "e" "Up" { Resize "Increase Up"; } + bind "i" "Right" { Resize "Increase Right"; } + bind "H" { Resize "Decrease Left"; } + bind "N" { Resize "Decrease Down"; } + bind "E" { Resize "Decrease Up"; } + bind "I" { Resize "Decrease Right"; } + bind "=" "+" { Resize "Increase"; } + bind "-" { Resize "Decrease"; } + } + pane { + bind "Ctrl p" { SwitchToMode "Normal"; } + bind "h" "Left" { MoveFocus "Left"; } + bind "i" "Right" { MoveFocus "Right"; } + bind "n" "Down" { MoveFocus "Down"; } + bind "e" "Up" { MoveFocus "Up"; } + bind "p" { SwitchFocus; } + bind "c" { NewPane; SwitchToMode "Normal"; } + bind "N" { NewPane "Down"; SwitchToMode "Normal"; } + bind "I" { NewPane "Right"; SwitchToMode "Normal"; } + bind "x" { CloseFocus; SwitchToMode "Normal"; } + bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; } + bind "z" { TogglePaneFrames; SwitchToMode "Normal"; } + bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; } + bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; } + bind "r" { SwitchToMode "RenamePane"; PaneNameInput 0;} + } + move { + bind "Ctrl h" { SwitchToMode "Normal"; } + bind "h" "Left" { MovePane "Left"; } + bind "n" "Down" { MovePane "Down"; } + bind "e" "Up" { MovePane "Up"; } + bind "i" "Right" { MovePane "Right"; } + } + tab { + bind "Ctrl t" { SwitchToMode "Normal"; } + bind "r" { SwitchToMode "RenameTab"; TabNameInput 0; } + bind "h" "Left" "Up" "e" { GoToPreviousTab; } + bind "i" "Right" "Down" "n" { GoToNextTab; } + bind "c" { NewTab; SwitchToMode "Normal"; } + bind "x" { CloseTab; SwitchToMode "Normal"; } + bind "s" { ToggleActiveSyncTab; SwitchToMode "Normal"; } + bind "b" { BreakPane; SwitchToMode "Normal"; } + bind "]" { BreakPaneRight; SwitchToMode "Normal"; } + bind "[" { BreakPaneLeft; SwitchToMode "Normal"; } + bind "1" { GoToTab 1; SwitchToMode "Normal"; } + bind "2" { GoToTab 2; SwitchToMode "Normal"; } + bind "3" { GoToTab 3; SwitchToMode "Normal"; } + bind "4" { GoToTab 4; SwitchToMode "Normal"; } + bind "5" { GoToTab 5; SwitchToMode "Normal"; } + bind "6" { GoToTab 6; SwitchToMode "Normal"; } + bind "7" { GoToTab 7; SwitchToMode "Normal"; } + bind "8" { GoToTab 8; SwitchToMode "Normal"; } + bind "9" { GoToTab 9; SwitchToMode "Normal"; } + bind "Tab" { ToggleTab; } + } + scroll { + bind "Ctrl s" { SwitchToMode "Normal"; } + bind "r" { EditScrollback; SwitchToMode "Normal"; } + bind "s" { SwitchToMode "EnterSearch"; SearchInput 0; } + bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } + bind "n" "Down" { ScrollDown; } + bind "e" "Up" { ScrollUp; } + bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } + bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } + bind "d" { HalfPageScrollDown; } + bind "u" { HalfPageScrollUp; } + // uncomment this and adjust key if using copy_on_select=false + // bind "Alt c" { Copy; } + } + search { + bind "Ctrl s" { SwitchToMode "Normal"; } + bind "Ctrl c" { ScrollToBottom; SwitchToMode "Normal"; } + bind "n" "Down" { ScrollDown; } + bind "e" "Up" { ScrollUp; } + bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; } + bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; } + bind "d" { HalfPageScrollDown; } + bind "u" { HalfPageScrollUp; } + bind "k" { Search "down"; } + bind "K" { Search "up"; } + bind "c" { SearchToggleOption "CaseSensitivity"; } + bind "w" { SearchToggleOption "Wrap"; } + bind "o" { SearchToggleOption "WholeWord"; } + } + entersearch { + bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; } + bind "Enter" { SwitchToMode "Search"; } + } + renametab { + bind "Ctrl c" { SwitchToMode "Normal"; } + bind "Esc" { UndoRenameTab; SwitchToMode "Tab"; } + } + renamepane { + bind "Ctrl c" { SwitchToMode "Normal"; } + bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; } + } + session { + bind "Ctrl o" { SwitchToMode "Normal"; } + bind "Ctrl s" { SwitchToMode "Scroll"; } + bind "d" { Detach; } + bind "w" { + LaunchOrFocusPlugin "session-manager" { + floating true + move_to_focused_tab true + }; + SwitchToMode "Normal" + } + bind "c" { + LaunchOrFocusPlugin "configuration" { + floating true + move_to_focused_tab true + }; + SwitchToMode "Normal" + } + bind "p" { + LaunchOrFocusPlugin "plugin-manager" { + floating true + move_to_focused_tab true + }; + SwitchToMode "Normal" + } + } + tmux { + bind "[" { SwitchToMode "Scroll"; } + bind "Ctrl b" { Write 2; SwitchToMode "Normal"; } + bind "\"" { NewPane "Down"; SwitchToMode "Normal"; } + bind "%" { NewPane "Right"; SwitchToMode "Normal"; } + bind "z" { ToggleFocusFullscreen; SwitchToMode "Normal"; } + bind "c" { NewTab; SwitchToMode "Normal"; } + bind "," { SwitchToMode "RenameTab"; } + bind "p" { GoToPreviousTab; SwitchToMode "Normal"; } + bind "n" { GoToNextTab; SwitchToMode "Normal"; } + bind "Left" { MoveFocus "Left"; SwitchToMode "Normal"; } + bind "Right" { MoveFocus "Right"; SwitchToMode "Normal"; } + bind "Down" { MoveFocus "Down"; SwitchToMode "Normal"; } + bind "Up" { MoveFocus "Up"; SwitchToMode "Normal"; } + bind "h" { MoveFocus "Left"; SwitchToMode "Normal"; } + bind "l" { MoveFocus "Right"; SwitchToMode "Normal"; } + bind "j" { MoveFocus "Down"; SwitchToMode "Normal"; } + bind "k" { MoveFocus "Up"; SwitchToMode "Normal"; } + bind "o" { FocusNextPane; } + bind "d" { Detach; } + bind "Space" { NextSwapLayout; } + bind "x" { CloseFocus; SwitchToMode "Normal"; } + } + shared_except "locked" { + bind "Ctrl g" { SwitchToMode "Locked"; } + bind "Ctrl q" { Quit; } + bind "Alt f" { ToggleFloatingPanes; } + bind "Alt n" { NewPane; } + bind "Alt i" { MoveTab "Left"; } + bind "Alt o" { MoveTab "Right"; } + bind "Alt h" "Alt Left" { MoveFocusOrTab "Left"; } + bind "Alt l" "Alt Right" { MoveFocusOrTab "Right"; } + bind "Alt j" "Alt Down" { MoveFocus "Down"; } + bind "Alt k" "Alt Up" { MoveFocus "Up"; } + bind "Alt =" "Alt +" { Resize "Increase"; } + bind "Alt -" { Resize "Decrease"; } + bind "Alt [" { PreviousSwapLayout; } + bind "Alt ]" { NextSwapLayout; } + } + shared_except "normal" "locked" { + bind "Enter" "Esc" { SwitchToMode "Normal"; } + } + shared_except "pane" "locked" { + bind "Ctrl p" { SwitchToMode "Pane"; } + } + shared_except "resize" "locked" { + bind "Ctrl n" { SwitchToMode "Resize"; } + } + shared_except "scroll" "locked" { + bind "Ctrl s" { SwitchToMode "Scroll"; } + } + shared_except "session" "locked" { + bind "Ctrl o" { SwitchToMode "Session"; } + } + shared_except "tab" "locked" { + bind "Ctrl t" { SwitchToMode "Tab"; } + } + shared_except "move" "locked" { + bind "Ctrl h" { SwitchToMode "Move"; } + } + shared_except "tmux" "locked" { + bind "Ctrl b" { SwitchToMode "Tmux"; } + } +} + +// Plugin aliases - can be used to change the implementation of Zellij +// changing these requires a restart to take effect +plugins { + tab-bar location="zellij:tab-bar" + status-bar location="zellij:status-bar" + strider location="zellij:strider" + compact-bar location="zellij:compact-bar" + session-manager location="zellij:session-manager" + welcome-screen location="zellij:session-manager" { + welcome_screen true + } + filepicker location="zellij:strider" { + cwd "/" + } + configuration location="zellij:configuration" + plugin-manager location="zellij:plugin-manager" +} + +// Plugins to load in the background when a new session starts +load_plugins { + // "file:/path/to/my-plugin.wasm" + // "https://example.com/my-plugin.wasm" +} + +// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP +// eg. when terminal window with an active zellij session is closed +// (Requires restart) +// Options: +// - detach (Default) +// - quit +// +// on_force_close "quit" + +// Send a request for a simplified ui (without arrow fonts) to plugins +// Options: +// - true +// - false (Default) +// +// simplified_ui true + +// Choose the path to the default shell that zellij will use for opening new panes +// Default: $SHELL +// +// default_shell "fish" + +// Choose the path to override cwd that zellij will use for opening new panes +// +// default_cwd "" + +// Toggle between having pane frames around the panes +// Options: +// - true (default) +// - false +// +// pane_frames true + +// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible +// Options: +// - true (default) +// - false +// +// auto_layout true + +// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected +// (Requires restart) +// Options: +// - true (default) +// - false +// +// session_serialization false + +// Whether pane viewports are serialized along with the session, default is false +// (Requires restart) +// Options: +// - true +// - false (default) +// +// serialize_pane_viewport true + +// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0 +// defaults to the scrollback size. If this number is higher than the scrollback size, it will +// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true. +// (Requires restart) +// +// scrollback_lines_to_serialize 10000 + +// Define color themes for Zellij +// For more examples, see: https://github.com/zellij-org/zellij/tree/main/example/themes +// Once these themes are defined, one of them should to be selected in the "theme" section of this file +// +// themes { +// dracula { +// fg 248 248 242 +// bg 40 42 54 +// red 255 85 85 +// green 80 250 123 +// yellow 241 250 140 +// blue 98 114 164 +// magenta 255 121 198 +// orange 255 184 108 +// cyan 139 233 253 +// black 0 0 0 +// white 255 255 255 +// } +// } + +// Choose the theme that is specified in the themes section. +// Default: default +// +theme "default" + +// The name of the default layout to load on startup +// Default: "default" +// (Requires restart) +// +// default_layout "compact" + +// Choose the mode that zellij uses when starting up. +// Default: normal +// +// default_mode "locked" + +// Toggle enabling the mouse mode. +// On certain configurations, or terminals this could +// potentially interfere with copying text. +// (Requires restart) +// Options: +// - true (default) +// - false +// +// mouse_mode false + +// Configure the scroll back buffer size +// This is the number of lines zellij stores for each pane in the scroll back +// buffer. Excess number of lines are discarded in a FIFO fashion. +// (Requires restart) +// Valid values: positive integers +// Default value: 10000 +// +// scroll_buffer_size 10000 + +// Provide a command to execute when copying text. The text will be piped to +// the stdin of the program to perform the copy. This can be used with +// terminal emulators which do not support the OSC 52 ANSI control sequence +// that will be used by default if this option is not set. +// Examples: +// +// copy_command "xclip -selection clipboard" // x11 +// copy_command "wl-copy" // wayland +// copy_command "pbcopy" // osx + +// Choose the destination for copied text +// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard. +// Does not apply when using copy_command. +// Options: +// - system (default) +// - primary +// +// copy_clipboard "primary" + +// Enable or disable automatic copy (and clear) of selection when releasing mouse +// Default: true +// +// copy_on_select false + +// Path to the default editor to use to edit pane scrollbuffer +// Default: $EDITOR or $VISUAL +// +// scrollback_editor "/usr/bin/vim" + +// When attaching to an existing session with other users, +// should the session be mirrored (true) +// or should each user have their own cursor (false) +// (Requires restart) +// Default: false +// +// mirror_session true + +// The folder in which Zellij will look for layouts +// (Requires restart) +// +// layout_dir "/path/to/my/layout_dir" + +// The folder in which Zellij will look for themes +// (Requires restart) +// +// theme_dir "/path/to/my/theme_dir" + +// Enable or disable the rendering of styled and colored underlines (undercurl). +// May need to be disabled for certain unsupported terminals +// (Requires restart) +// Default: true +// +// styled_underlines false + +// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know +// metadata info on this session) +// (Requires restart) +// Default: false +// +// disable_session_metadata true + +// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it) +// (Requires restart) +// Default: true (if the host terminal supports it) +// +// support_kitty_keyboard_protocol false diff --git a/tools/zsh/zshenv b/home/dot_config/zsh/dot_zshenv similarity index 98% rename from tools/zsh/zshenv rename to home/dot_config/zsh/dot_zshenv index eabb593..22359a2 100644 --- a/tools/zsh/zshenv +++ b/home/dot_config/zsh/dot_zshenv @@ -171,3 +171,6 @@ if command -v vcpkg >/dev/null; then export VCPKG_ROOT="$XDG_DATA_HOME"/vcpkg fi +if [ -d "/nix" ]; then + export PATH="/run/current-system/sw/bin:$PATH" +fi diff --git a/tools/zsh/zshrc b/home/dot_config/zsh/dot_zshrc similarity index 71% rename from tools/zsh/zshrc rename to home/dot_config/zsh/dot_zshrc index d3451c6..e4996b3 100644 --- a/tools/zsh/zshrc +++ b/home/dot_config/zsh/dot_zshrc @@ -1,4 +1,5 @@ # $DOTFILES/tools/zsh/common.zshrc +# vim:ft=zsh # Date: 2024-11-30 # Author: js0ny # This is the entry point for all zsh configuration files @@ -14,15 +15,22 @@ case "$(uname)" in Linux) if grep -q Microsoft /proc/version || [[ -n "$WSL_DISTRO_NAME" ]]; then # WSL-specific configuration - source "$DOTFILES/platforms/wsl/zshrc" + export IS_WSL=true + source $DOTFILES/home/dot_config/zsh/winterop.zsh else # Native Linux configuration - source "$DOTFILES/platforms/linux/zshrc" + if [ -n "$WAYLAND_DISPLAY" ]; then + alias clip="wl-copy" + alias paste="wl-paste" + elif [ -n "$DISPLAY" ]; then + alias clip="xclip" + fi fi ;; Darwin) # macOS-specific configuration - source "$DOTFILES/platforms/mac/zshrc" + alias clip="pbcopy" + alias paste="pbpaste" ;; # CYGWIN*|MINGW*|MSYS*) # source "$DOTFILES/platform/wsl.zsh" @@ -34,4 +42,3 @@ for file in $DOTFILES/tools/zsh/mod/*.zsh; do done [ -f "/home/js0ny/.local/share/ghcup/env" ] && . "/home/js0ny/.local/share/ghcup/env" # ghcup-env -. "/home/js0ny/.deno/env" \ No newline at end of file diff --git a/home/dot_config/zsh/empty_dot_zprofile b/home/dot_config/zsh/empty_dot_zprofile new file mode 100644 index 0000000..e69de29 diff --git a/tools/zsh/global.zshenv b/home/dot_config/zsh/global.zshenv similarity index 100% rename from tools/zsh/global.zshenv rename to home/dot_config/zsh/global.zshenv diff --git a/tools/zsh/mod/alias.zsh b/home/dot_config/zsh/mod/alias.zsh similarity index 100% rename from tools/zsh/mod/alias.zsh rename to home/dot_config/zsh/mod/alias.zsh diff --git a/tools/zsh/mod/config.zsh b/home/dot_config/zsh/mod/config.zsh similarity index 100% rename from tools/zsh/mod/config.zsh rename to home/dot_config/zsh/mod/config.zsh diff --git a/tools/zsh/mod/env.zsh b/home/dot_config/zsh/mod/env.zsh similarity index 100% rename from tools/zsh/mod/env.zsh rename to home/dot_config/zsh/mod/env.zsh diff --git a/tools/zsh/mod/keymap.zsh b/home/dot_config/zsh/mod/keymap.zsh similarity index 100% rename from tools/zsh/mod/keymap.zsh rename to home/dot_config/zsh/mod/keymap.zsh diff --git a/tools/zsh/mod/navi.zsh b/home/dot_config/zsh/mod/navi.zsh similarity index 100% rename from tools/zsh/mod/navi.zsh rename to home/dot_config/zsh/mod/navi.zsh diff --git a/tools/zsh/mod/prompt.zsh b/home/dot_config/zsh/mod/prompt.zsh similarity index 100% rename from tools/zsh/mod/prompt.zsh rename to home/dot_config/zsh/mod/prompt.zsh diff --git a/platforms/wsl/winterop.zsh b/home/dot_config/zsh/winterop.zsh similarity index 100% rename from platforms/wsl/winterop.zsh rename to home/dot_config/zsh/winterop.zsh diff --git a/home/dot_gitconfig b/home/dot_gitconfig new file mode 100644 index 0000000..4729650 --- /dev/null +++ b/home/dot_gitconfig @@ -0,0 +1 @@ +{{ includeTemplate "dot_config/git/_gitconfig.shared.tmpl" . }} \ No newline at end of file diff --git a/platforms/win/glzr/.gitignore b/home/dot_glzr/.gitignore similarity index 100% rename from platforms/win/glzr/.gitignore rename to home/dot_glzr/.gitignore diff --git a/platforms/win/glzr/glazewm/config.yaml b/home/dot_glzr/glazewm/config.yaml similarity index 100% rename from platforms/win/glzr/glazewm/config.yaml rename to home/dot_glzr/glazewm/config.yaml diff --git a/platforms/win/glzr/readme.md b/home/dot_glzr/readme.md similarity index 100% rename from platforms/win/glzr/readme.md rename to home/dot_glzr/readme.md diff --git a/platforms/win/glzr/zebar/minimal/bar.zebar.json b/home/dot_glzr/zebar/minimal/bar.zebar.json similarity index 100% rename from platforms/win/glzr/zebar/minimal/bar.zebar.json rename to home/dot_glzr/zebar/minimal/bar.zebar.json diff --git a/platforms/win/glzr/zebar/minimal/index.html b/home/dot_glzr/zebar/minimal/index.html similarity index 100% rename from platforms/win/glzr/zebar/minimal/index.html rename to home/dot_glzr/zebar/minimal/index.html diff --git a/platforms/win/glzr/zebar/minimal/scripts.jsx b/home/dot_glzr/zebar/minimal/scripts.jsx similarity index 100% rename from platforms/win/glzr/zebar/minimal/scripts.jsx rename to home/dot_glzr/zebar/minimal/scripts.jsx diff --git a/platforms/win/glzr/zebar/minimal/styles.css b/home/dot_glzr/zebar/minimal/styles.css similarity index 100% rename from platforms/win/glzr/zebar/minimal/styles.css rename to home/dot_glzr/zebar/minimal/styles.css diff --git a/platforms/win/glzr/zebar/normalize.css b/home/dot_glzr/zebar/normalize.css similarity index 100% rename from platforms/win/glzr/zebar/normalize.css rename to home/dot_glzr/zebar/normalize.css diff --git a/platforms/win/glzr/zebar/settings.json b/home/dot_glzr/zebar/settings.json similarity index 100% rename from platforms/win/glzr/zebar/settings.json rename to home/dot_glzr/zebar/settings.json diff --git a/home/dot_haskeline b/home/dot_haskeline new file mode 100644 index 0000000..bf0b6cd --- /dev/null +++ b/home/dot_haskeline @@ -0,0 +1 @@ +editMode: Vi diff --git a/home/dot_local/share/kio/servicemenus/executable_office2pdf.desktop b/home/dot_local/share/kio/servicemenus/executable_office2pdf.desktop new file mode 100644 index 0000000..25b1e6a --- /dev/null +++ b/home/dot_local/share/kio/servicemenus/executable_office2pdf.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +MimeType=application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.openxmlformats-officedocument.presentationml.presentation; +Actions=convertToPDF +Icon=application-pdf +X-KDE-Priority=TopLevel +X-KDE-StartupNotify=false + +[Desktop Action convertToPDF] +Name=转换为 PDF +Icon=application-pdf +Exec=soffice --headless --convert-to pdf "%f" --outdir . diff --git a/home/dot_local/share/kio/servicemenus/executable_pdf2zh.desktop b/home/dot_local/share/kio/servicemenus/executable_pdf2zh.desktop new file mode 100644 index 0000000..0cdf073 --- /dev/null +++ b/home/dot_local/share/kio/servicemenus/executable_pdf2zh.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Type=Service +MimeType=application/pdf; +Actions=translateToZh +Icon=translate +X-KDE-Priority=TopLevel +X-KDE-StartupNotify=false + +[Desktop Action translateToZh] +Name=翻译为中文 +Icon=translate +Exec=pdf2zh "%f" + diff --git a/home/dot_local/share/kio/servicemenus/executable_swww-set-wallpaper.desktop b/home/dot_local/share/kio/servicemenus/executable_swww-set-wallpaper.desktop new file mode 100644 index 0000000..0eb1362 --- /dev/null +++ b/home/dot_local/share/kio/servicemenus/executable_swww-set-wallpaper.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Service +MimeType=image/jpeg;image/png; +Actions=setWallpaper +Icon=preferences-desktop-wallpaper +X-KDE-Priority=TopLevel +X-KDE-StartupNotify=false + +[Desktop Action setWallpaper] +Name=设置为壁纸 +Icon=preferences-desktop-wallpaper +Exec=swww img "%f" diff --git a/platforms/win/wslconfig b/home/dot_wslconfig similarity index 100% rename from platforms/win/wslconfig rename to home/dot_wslconfig diff --git a/platforms/win/wslgconfig b/home/dot_wslgconfig similarity index 100% rename from platforms/win/wslgconfig rename to home/dot_wslgconfig diff --git a/platforms/mac/DefaultKeyBinding.dict b/home/private_Library/Keybindings/DefaultKeyBinding.dict similarity index 100% rename from platforms/mac/DefaultKeyBinding.dict rename to home/private_Library/Keybindings/DefaultKeyBinding.dict diff --git a/home/symlink_dot_bashrc b/home/symlink_dot_bashrc new file mode 100644 index 0000000..2ac1df5 --- /dev/null +++ b/home/symlink_dot_bashrc @@ -0,0 +1 @@ +/home/js0ny/.config/bash/bashrc diff --git a/tools/KMonad/linux.kbd b/misc/KMonad/linux.kbd similarity index 100% rename from tools/KMonad/linux.kbd rename to misc/KMonad/linux.kbd diff --git a/tools/KMonad/windows.kbd b/misc/KMonad/windows.kbd similarity index 100% rename from tools/KMonad/windows.kbd rename to misc/KMonad/windows.kbd diff --git a/platforms/win/ahk/Caps.ahk b/misc/autohotkey/Caps.ahk similarity index 100% rename from platforms/win/ahk/Caps.ahk rename to misc/autohotkey/Caps.ahk diff --git a/platforms/win/ahk/Tab.ahk b/misc/autohotkey/Tab.ahk similarity index 100% rename from platforms/win/ahk/Tab.ahk rename to misc/autohotkey/Tab.ahk diff --git a/platforms/win/ahk/bin/Caps.exe b/misc/autohotkey/bin/Caps.exe similarity index 100% rename from platforms/win/ahk/bin/Caps.exe rename to misc/autohotkey/bin/Caps.exe diff --git a/platforms/win/ahk/bin/colemak.exe b/misc/autohotkey/bin/colemak.exe similarity index 100% rename from platforms/win/ahk/bin/colemak.exe rename to misc/autohotkey/bin/colemak.exe diff --git a/platforms/win/ahk/colemak.ahk b/misc/autohotkey/colemak.ahk similarity index 100% rename from platforms/win/ahk/colemak.ahk rename to misc/autohotkey/colemak.ahk diff --git a/platforms/win/ahk/main.ahk b/misc/autohotkey/main.ahk similarity index 100% rename from platforms/win/ahk/main.ahk rename to misc/autohotkey/main.ahk diff --git a/platforms/win/ahk/spcl.ahk b/misc/autohotkey/spcl.ahk similarity index 100% rename from platforms/win/ahk/spcl.ahk rename to misc/autohotkey/spcl.ahk diff --git a/tools/browser/surfingkeys.js b/misc/browser/surfingkeys.js similarity index 95% rename from tools/browser/surfingkeys.js rename to misc/browser/surfingkeys.js index b10cbfa..4f72541 100644 --- a/tools/browser/surfingkeys.js +++ b/misc/browser/surfingkeys.js @@ -1,1040 +1,1040 @@ -// vim:foldmethod=marker:foldmarker=#region,#endregion:foldlevel=0 -// Paste this into surfingkeys advanced settings -// or use: -// Load settings from: https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/tools/browser/surfingkeys.js -// Browse to Extension > Surfingkeys > Allow access to file URLs to enable local file access -// Windows: file:///C:/Users/username/.dotfiles/tools/browser/surfingkeys.js -// Linux: file:///home/username/.dotfiles/tools/browser/surfingkeys.js -// macOS: file:///Users/username/.dotfiles/tools/browser/surfingkeys.js - -// #region Example -/** Examples - -// an example to create a new mapping `ctrl-y` -api.mapkey('', 'Show me the money', function() { - Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).'); -}); - -// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works. -api.map('gt', 'T'); - - -// an example to remove mapkey `Ctrl-i` -api.unmap(''); - -*/ -// #endregion - -// #region Settings -settings.language = "zh-CN"; -settings.showModeStatus = false; -// #endregion - -// #region Helper -// import the API so that no need to use `api` prefix -const { - aceVimMap, - addVimMapKey, - mapkey, - imap, - imapkey, - getClickableElements, - vmapkey, - map, - unmap, - cmap, - addSearchAlias, - removeSearchAlias, - tabOpenLink, - readText, - Clipboard, - Front, - Hints, - Visual, - RUNTIME, -} = api; -// Keymap, reference https://github.com/texiwustion/colemak_config_for_surfingkeys/tree/main -const forward = { - add: function (key) { - // 转发即将被 unmap 的键 - return api.map(`for${key}`, key); - }, - cancel: function (key) { - // 删除转发生成的键 - api.unmap(`for${key}`); - api.unmap(key); - }, - use: function (key) { - return `for${key}`; - }, -}; - -const colemak = { - forward: function (key) { - // 转发即将被 unmap 的键 - api.map(key, `col${key}`); - api.unmap(`col${key}`); - }, - use: function (key) { - return `col${key}`; - }, - map: function (a, b) { - api.map(colemak.use(a), forward.use(b)); - }, -}; - -const vForward = { - add: function (key) { - // 转发即将被 unmap 的键 - return api.vmap(`vfor${key}`, key); - }, - cancel: function (key) { - // 删除转发生成的键 - api.vunmap(`vfor${key}`); - api.vunmap(key); - }, - use: function (key) { - return `vfor${key}`; - }, -}; - -const vColemak = { - forward: function (key) { - // 转发即将被 unmap 的键 - api.vmap(key, `vcol${key}`); - api.vunmap(`vcol${key}`); - }, - use: function (key) { - return `vcol${key}`; - }, - map: function (a, b) { - api.vmap(vColemak.use(a), vForward.use(b)); - }, -}; - -const forwardFactory = { - push: function (mapLists) { - // forward original keys - for (const key in mapLists) { - // `const` better than `let` - forward.add(mapLists[key]); - } - }, - map: function (mapLists) { - for (const key in mapLists) { - colemak.map(key, mapLists[key]); - } - }, - pull: function (mapLists) { - for (const key in mapLists) { - forward.cancel(mapLists[key]); - } - for (const key in mapLists) { - colemak.forward(key); - } - }, -}; -const vForwardFactory = { - push: function (mapLists) { - // forward original keys - for (const key in mapLists) { - vForward.add(mapLists[key]); - } - }, - map: function (mapLists) { - for (const key in mapLists) { - vColemak.map(key, mapLists[key]); - } - }, - pull: function (mapLists) { - for (const key in mapLists) { - vForward.cancel(mapLists[key]); - } - for (const key in mapLists) { - vColemak.forward(key); - } - }, -}; -// TODO: Add more search completion source (with json) -const parseSearchResponse = function (response) { - const res = JSON.parse(response.text); - return res.map((r) => r.phrase); -}; - -const _addSearchAlias = function ( - alias, - name, - searchUrl, - acUrl = "https://duckduckgo.com/ac/?q=", - searchPrefix = "s", - parseResponse = parseSearchResponse, -) { - api.addSearchAlias( - alias, - name, - searchUrl, - searchPrefix, - acUrl, - parseResponse, - ); -}; -// Shortcut for querySelector -const q = (selector) => document.querySelector(selector); -const qs = (selector) => document.querySelectorAll(selector); -// #endregion - -// #region Keymap -// Normal Mode Keymap -const mapLists = { - /// scroll page - // Arrow - n: "j", - e: "k", - i: "l", - // l <-> i - l: "gi", // Focus on first input box by default - L: "I", - // k <-> n - k: "n", - K: "N", - // j <-> e - j: "e", - // PrevTab < H - I > NextTab - H: "E", - I: "R", - // E,N -> Up/Down HalfPage - N: "d", - E: "e", - // F -> Open Link in New Tab - F: "af", - // oH -> Tab History - oH: "H", - // gh/gi -> Prev/Next History - gh: "S", - gi: "D", - gl: "i", // Use `gl` to search and focus on input box - // t -> Open Link in New Tab - t: "gf", - // 缩放 - zu: "zi", - zo: "ze", - zz: "zr", -}; -// Visual Mode Keymap -const vMapLists = { - n: "j", - N: "J", - e: "k", - E: "K", - i: "l", - I: "L", - j: "e", - J: "E", - k: "n", - K: "N", -}; - -forwardFactory.push(mapLists); -forwardFactory.map(mapLists); - -vForwardFactory.push(vMapLists); -vForwardFactory.map(vMapLists); - -// All other unmapped keys should be defined here -// TODO: Add more mouse click keymap -api.unmap("gi"); // conflict with `gi` in `mapLists` -api.unmap("C"); // Use `F` instead (Open Link in New Tab) -api.map("g/", "gU"); // Goto Root Domain -// TODO: Add SPC keymap as leader (maybe change `,` to `SPC`) -api.unmap(""); // Leader Key - -forwardFactory.pull(mapLists); -vForwardFactory.pull(vMapLists); - -api.map("gH", "g/"); -// #endregion - -// #region Omnibar NOTE: Dosn't work -// api.cmap("", ""); -// api.cmap("", ""); -// api.cmap("", ""); -// api.cmap("", ""); -// api.cmap("", ""); -// api.cmap("", ""); -// api.cmap("", ""); -// api.cmap("", ""); -// #endregion - -// #region Search Alias - -const removedSearchAlias = [ - "b", // Baidu - "d", // DuckDuckGo - "e", // Wikipedia - "g", // Google - "s", // StackOverflow - "w", // Bing - "y", // YouTube -]; - -removedSearchAlias.forEach((alias) => removeSearchAlias(alias)); - -const searchAliases = [ - ["a2", "AlternativeTo", "https://alternativeto.net/browse/search/?q="], - ["ap", "APT", "https://packages.ubuntu.com/search?keywords="], - ["au", "AUR", "https://aur.archlinux.org/packages?K="], - ["aw", "ArchWiki", "https://wiki.archlinux.org/index.php?search="], - ["bd", "Baidu", "https://www.baidu.com/s?wd="], - ["bi", "Bing", "https://www.bing.com/search?q="], - ["bl", "Bilibili", "https://search.bilibili.com/all?keyword="], - ["br", "HomeBrew", "https://duckduckgo.com/?q=!brew "], - ["cg", "ChatGPT", "https://chat.openai.com/?q="], - ["cr", "Chrome Web Store", "https://chrome.google.com/webstore/search/"], - ["dd", "DuckDuckGo", "https://duckduckgo.com/?q="], - ["de", "Thesaurus", "https://www.onelook.com/?w="], - ["eb", "ebay", "https://www.ebay.co.uk/sch/i.html?kw="], - ["fe", "Felo", "https://felo.ai/search?q="], - ["gh", "GitHub", "https://github.com/search?type=repositories&q="], - ["gg", "Google", "https://www.google.com/search?q="], - ["mc", "Metacritic", "https://www.metacritic.com/search/"], - ["nx", "NixPackages", "https://search.nixos.org/packages?query="], - ["ng", "NuGet", "https://www.nuget.org/packages?q="], - ["np", "npm", "https://www.npmjs.com/search?q="], - ["pa", "Pacman", "https://archlinux.org/packages/?q="], - ["pp", "Perplexity", "https://www.perplexity.ai/?q="], - ["py", "pypi", "https://pypi.org/search/?q="], - ["re", "Reddit", "https://www.reddit.com/search?q="], - ["sc", "Scoop", "https://scoop.sh/#/apps?q="], - ["se", "StackExchange", "https://stackexchange.com/search?q="], - ["so", "StackOverflow", "https://stackoverflow.com/search?q="], - ["st", "Steam", "https://store.steampowered.com/search/?term="], - ["tw", "X", "https://twitter.com/search?q="], - ["ud", "UrbanDictionary", "https://www.urbandictionary.com/define.php?term="], - ["wa", "WolframAlpha", "https://www.wolframalpha.com/input/?i="], - ["wg", "winget", "https://winget.ragerworks.com/search/all/"], - [ - "wk", - "Wikipedia", - "https://en.wikipedia.org/w/index.php?title=Special:Search&search=", - ], - [ - "ww", - "WantWords", - "https://www.shenyandayi.com/wantWordsResult?lang=zh&query=", - ], - ["yt", "YouTube", "https://www.youtube.com/results?search_query="], -]; - -api.unmap("on"); - -// Add all search aliases -searchAliases.forEach(([alias, name, url]) => { - _addSearchAlias(alias, name, url); -}); -// #endregion - -// #region Site-specific - -// This is a global keymap -mapkey("yY", "yank link without parameter", function () { - const url = new URL(window.location.href); - Clipboard.write(url.origin + url.pathname); -}); - -unmap("yma") -unmap("ymc") -unmap("ymv") - -mapkey("ym", "yank link as markdown", function () { - const url = new URL(window.location.href); - const title = document.title; - Clipboard.write(`[${title}](${url.origin + url.pathname})`); -}); - -// #region bilibili.com -mapkey( - ",n", - "[n]ext Video", - function () { - window.location.href = q("div.next-play").querySelector("a").href; - }, - { domain: /bilibili.com/ }, -); -// #endregion - -// #region chatgpt.com -const chatgptNewChat = function () { - var btn = q( - "div.no-draggable:nth-child(3) > span:nth-child(1) > button:nth-child(1)", - ); - btn.click(); -}; -const chatgptStartStop = function () { - var btn = q("button.h-8:nth-child(2)"); - btn.click(); -}; -mapkey(",n", "New Chat", chatgptNewChat, { domain: /chatgpt.com/ }); -mapkey(",s", "Start/Stop Generating", chatgptStartStop, { - domain: /chatgpt.com/, -}); -// #endregion - -// #region chat.deepseek.com -mapkey( - ",s", - "Toggle Sidebar", - function () { - var btn = qs("div.ds-icon-button"); - btn[0].click(); - }, - { domain: /chat.deepseek.com/ }, -); -mapkey( - ",e", - "[e]dit last input", - function () { - var btn = qs("div.ds-icon-button"); - btn[btn.length - 5].click(); - }, - { domain: /chat.deepseek.com/ }, -); -mapkey( - ",y", - "[y]ank last oupput", - function () { - var btn = qs("div.ds-icon-button"); - btn[btn.length - 4].click(); - }, - { domain: /chat.deepseek.com/ }, -); -mapkey( - ",r", - "[r]egenerate last output", - function () { - var btn = qs("div.ds-icon-button"); - btn[btn.length - 3].click(); - }, - { domain: /chat.deepseek.com/ }, -); -mapkey( - ",n", - "[n]ew Chat", - function () { - window.location.href = "https://chat.deepseek.com/"; - }, - { domain: /chat.deepseek.com/ }, -); -mapkey( - ",t", - "Toggle co[t](R1)", - function () { - var btns = qs("div.ds-button"); - btns[0].click(); - }, - { domain: /chat.deepseek.com/ }, -); -mapkey( - ",w", - "Toggle [w]eb Search", - function () { - var btns = qs("div.ds-button"); - btns[1].click(); - }, - { domain: /chat.deepseek.com/ }, -); -// #endregion - -//#region dropbox.com -//https://www.dropbox.com/scl/fi/u58c2qmqbwq672y3hwmfn/setup.sh?rlkey=d3figouv5eqk1xfwdtyzfr7ua&e=1&st=ehttmy2r&dl=0 -//https://dl.dropboxusercontent.com/scl/fi/u58c2qmqbwq672y3hwmfn/setup.sh?rlkey=d3figouv5eqk1xfwdtyzfr7ua&e=1&st=ehttmy2r -mapkey( - ",r", - "Extract [r]aw link", - function () { - const url = new URL(window.location.href); - if (url.href.endsWith("&dl=0")) { - url.searchParams.delete("dl"); - url.hostname = "dl.dropboxusercontent.com"; - Clipboard.write(url.href); - } - }, - { domain: /dropbox.com/ }, -); -mapkey( - ",d", - "Extract [d]ownload link", - function () { - const url = new URL(window.location.href); - if (url.href.endsWith("&dl=0")) { - url.searchParams.set("dl", "1"); - Clipboard.write(url.href); - } - }, - { domain: /dropbox.com/ }, -); -//#endregion - -// #region app.follow.is -mapkey( - ",t", - "Toggle ", - function () { - var btn = qs("button.no-drag-region"); - btn[btn.length - 4].click(); - }, - { domain: /app.follow.is/ }, -); - -mapkey( - ",a", - "Toggle AI Summary", - function () { - var btn = qs("button.no-drag-region"); - btn[btn.length - 3].click(); - }, - { domain: /app.follow.is/ }, -); - -mapkey( - ",o", - "Toggle Original Website", - function () { - var btn = qs("button.no-drag-region"); - btn[btn.length - 4].click(); - }, - { domain: /app.follow.is/ }, -); -// #endregion - -// #region GitHub -// utils -const gh = {}; -gh.repoLink = (owner, repo) => `https://github.com/${owner}/${repo}`; -gh.pageLink = (owner, repo) => `https://${owner}.github.io/${repo}/`; -gh.sourceLink = (owner, repo, path) => - `${gh.repoLink(owner, repo)}/tree/${path}`; -gh.rawToSource = (url) => { - const ps = url.split("/").slice(3); - return gh.sourceLink(ps[0], ps[1], ps.slice(4).join("/")); -}; -// github.com -mapkey( - ",e", - "Use Web Editor", - function () { - const url = new URL(window.location.href); - url.hostname = "github.dev"; - window.location.href = url.href; - }, - { domain: /github.com/ }, -); -mapkey( - ",E", - "Use Web Editor (New Page)", - function () { - const url = new URL(window.location.href); - url.hostname = "github.dev"; - tabOpenLink(url.href); - }, - { domain: /github.com/ }, -); -mapkey( - ",p", - "Switch to GitHub Page", - function () { - href = window.location.href; - owner = href.split("/")[3]; - repo = href.split("/")[4]; - window.location.href = gh.pageLink(owner, repo); - }, - { domain: /github.com/ }, -); -/// This might be useful for Vim plugins -mapkey( - ",y", - "[y]ank short refeference owner/repo", - function () { - const href = window.location.href; - owner = href.split("/")[3]; - repo = href.split("/")[4]; - Clipboard.write(`${owner}/${repo}`); - }, - { domain: /github.com/ }, -); -// github.dev -mapkey( - ",r", - "Switch to GitHub Repo", - function () { - const url = new URL(window.location.href); - url.hostname = "github.com"; - window.location.href = url.href; - }, - { domain: /github.dev/ }, -); -// github.io -mapkey( - ",r", - "Switch to GitHub Repo", - function () { - const href = window.location.href; - owner = href.split("/")[2].split(".")[0]; - repo = href.split("/")[3]; - tabOpenLink(gh.repoLink(owner, repo)); - }, - { domain: /github.io/ }, -); -mapkey( - ",R", - "Go to GitHub Repo (New tab)", - function () { - const href = window.location.href; - owner = href.split("/")[2].split(".")[0]; - repo = href.split("/")[3]; - tabOpenLink(gh.repoLink(owner, repo)); - }, - { domain: /github.io/ }, -); -// raw.githubusercontent.com -mapkey( - ",r", - "Switch to GitHub Repo", - function () { - const url = new URL(window.location.href); - var owner, repo; - owner, (repo = url.pathname.split("/").slice(1, 3)); - window.location.href = gh.repoLink(owner, repo); - }, - { domain: /raw.githubusercontent.com/ }, -); -mapkey( - ",R", - "Switch to GitHub Repo", - function () { - const url = new URL(window.location.href); - var owner, repo; - owner, (repo = url.pathname.split("/").slice(1, 3)); - tabOpenLink(gh.repoLink(owner, repo)); - }, - { domain: /raw.githubusercontent.com/ }, -); -mapkey( - ",s", - "Open Source in GitHub", - function () { - window.location.href = gh.rawToSource(window.location.href); - }, - { domain: /raw.githubusercontent.com/ }, -); -mapkey( - ",S", - "Open Source in GitHub (New Page)", - function () { - tabOpenLink(gh.rawToSource(window.location.href)); - }, - { domain: /raw.githubusercontent.com/ }, -); -// #endregion GitHub - -//#region app.microsoft.com -// https://apps.microsoft.com/detail/9nl6kd1h33v3?hl=en-GB&gl=GB -// This is useful in `winget` (Windows Package Manager) -mapkey( - ",y", - "[y]ank app id", - function () { - const url = new URL(window.location.href); - const id = url.pathname.split("/")[2]; - Clipboard.write(id); - }, - { domain: /apps.microsoft.com/ }, -); -//#endregion - -// #region perplexity.ai -/** - * 0 - 网络 - * 1 - 学术 - * 2 - 社交 - */ -unmap("", /perplexity.ai/); // allows to use perplexity web keybindings -mapkey( - ",b", - "Add Perplexity [b]ookmark", - function () { - // button.border:nth-child(2) - q("div.sticky.left-0").querySelectorAll("button")[2].click(); - }, - { domain: /perplexity.ai/ }, -); -mapkey( - ",M", - "Toggle [M]odel switching", - function () { - q("div.rounded-md").querySelectorAll("span")[2].click(); - //setTimeout(() => { - // // Wait for the DOM to update - // qs("div.shadow-subtle div.group\\/item")[0].click(); - //}, 100); - }, - { domain: /perplexity.ai/ }, -); -mapkey( - ",m", - "Toggle default [m]odel (Claude 3.7 Sonnet)", - function () { - q("div.rounded-md").querySelectorAll("span")[1].click(); - setTimeout(() => { - // Wait for the DOM to update - qs("div.shadow-subtle div.group\\/item")[3].click(); - }, 100); - }, - { domain: /perplexity.ai/ }, -); -mapkey( - ",w", - "Toggle [w]riting/[w]eb Search", - function () { - q("div.rounded-md").querySelectorAll("span")[2].click(); - setTimeout(() => { - // Wait for the DOM to update - qs("div.shadow-subtle div.group\\/item")[0].click(); - }, 100); - }, - { domain: /perplexity.ai/ }, -); -mapkey( - ",s", - "[s]tart Generating", - function () { - var btns = qs("span.grow button"); - btns[btns.length - 1].click(); - }, - { domain: /perplexity.ai/ }, -); -mapkey( - ",y", - "[y]ank Last Output", - function () { - var toolbars = qs("div.mt-sm"); - var last = toolbars[toolbars.length - 1]; - var btns = last.querySelectorAll("button"); - btns[5].click(); - }, - { domain: /perplexity.ai/ }, -); -mapkey( - ",R", - "Change model to [R]egenerate last output", - function () { - var toolbars = qs("div.mt-sm"); - var last = toolbars[toolbars.length - 1]; - var btns = last.querySelectorAll("button"); - btns[1].click(); - }, - { domain: /perplexity.ai/ }, -); -mapkey( - ",r", - "Toggle [r]easoning", - function () { - q("div.rounded-md").querySelectorAll("span")[0].click(); - setTimeout(() => { - // Wait for the DOM to update - qs("div.shadow-subtle div.group\\/item")[2].click(); - }, 100); - }, - { domain: /perplexity.ai/ }, -); -// #endregion - -// #region sspai.com -unmap("[[", /sspai.com/); -unmap("]]", /sspai.com/); -unmap(",", /sspai.com/); -mapkey( - "[[", - "Previous Page", - function () { - q("button.btn-prev").click(); - }, - { domain: /sspai.com/ }, -); -mapkey( - "]]", - "Next Page", - function () { - q("button.btn-next").click(); - }, - { domain: /sspai.com/ }, -); - -// #endregion - -// #region pixiv.net -// Use site-specific paging method -unmap("[[", /pixiv.net/); -unmap("]]", /pixiv.net/); -unmap(",", /pixiv.net/); -const isArtwork = (url) => /pixiv.net\/artworks/.test(url.href); - -mapkey( - "[[", - "Previous Page", - function () { - const url = new URL(window.location.href); - if (url.href === url.origin) { - return; - } - const page = url.searchParams.get("p"); - const newPage = page ? parseInt(page) - 1 : 1; - url.searchParams.set("p", newPage); - window.location.href = url.href; - }, - { domain: /pixiv.net/ }, -); - -mapkey( - "]]", - "Next Page", - function () { - const url = new URL(window.location.href); - if (url.href === url.origin) { - return; - } - const page = url.searchParams.get("p"); - const newPage = page ? parseInt(page) + 1 : 2; - url.searchParams.set("p", newPage); - window.location.href = url.href; - }, - { domain: /pixiv.net/ }, -); -mapkey( - ",b", - "Add to [b]ookmark", - function () { - const url = new URL(window.location.href); - if (!isArtwork(url)) { - return; - } - const toolbar = q('section [class$="Toolbar"]'); - toolbar.querySelectorAll("div")[2].querySelector("button").click(); - }, - { domain: /pixiv.net/ }, -); -mapkey( - ",B", - "Add to private [B]ookmark", - function () { - const url = new URL(window.location.href); - if (!isArtwork(url)) { - return; - } - const toolbar = q('section [class$="Toolbar"]'); - toolbar.querySelectorAll("div")[0].querySelector("button").click(); - setTimeout(() => { - // Wait for the DOM to update - q("div[role=menu]").querySelector("li").click(); - }, 100); - }, - { domain: /pixiv.net/ }, -); -mapkey( - ",v", - "Up[v]ote Artwork", - function () { - const url = new URL(window.location.href); - if (!isArtwork(url)) { - return; - } - const toolbar = q('section [class$="Toolbar"]'); - toolbar.querySelectorAll("div")[3].querySelector("button").click(); - }, - { domain: /pixiv.net/ }, -); -mapkey( - ",f", - "Toggle [f]ollow the author", - function () { - const url = new URL(window.location.href); - if (!isArtwork(url)) { - return; - } - q("aside").querySelector("section").querySelector("button").click(); - }, - { domain: /pixiv.net/ }, -); -// #endregion - -// #region youtube.com -mapkey( - ",n", - "[n]ext Video", - function () { - window.location.href = q("ytd-compact-video-renderer").querySelector( - "a", - ).href; - }, - { domain: /youtube.com/ }, -); - -mapkey( - ",v", - "Up[v]ote Video", - function () { - qs("like-button-view-model")[0].querySelector("button").click(); - }, - { domain: /youtube.com/ }, -); - -mapkey( - ",V", - "Down[v]ote Video", - function () { - qs("dislike-button-view-model")[0].querySelector("button").click(); - }, - { domain: /youtube.com/ }, -); -// class="ytp-subtitles-button ytp-button" -mapkey( - ",c", - "toggle [c]aptions", - function () { - q("button.ytp-subtitles-button").click(); - }, - { domain: /youtube.com/ }, -); -// #endregion - -//#region zhihu.com -mapkey( - ",d", - "Toggle [d]ark mode", - function () { - const url = new URL(window.location.href); - if (url.searchParams.get("theme") === "dark") { - url.searchParams.set("theme", "light"); - } else { - url.searchParams.set("theme", "dark"); - } - window.location.href = url.href; - }, - { domain: /zhihu.com/ }, -); -//#endregion -// #endregion - -// #region ACE Editor -addVimMapKey( - // Navigation - { - keys: "k", - type: "motion", - motion: "findNext", - motionArgs: { forward: true, toJumplist: true }, - }, - { - keys: "K", - type: "motion", - motion: "findNext", - motionArgs: { forward: false, toJumplist: true }, - }, - // Word movement - { - keys: "j", - type: "motion", - motion: "moveByWords", - motionArgs: { forward: true, wordEnd: true, inclusive: true }, - }, - { - keys: "J", - type: "motion", - motion: "moveByWords", - motionArgs: { - forward: true, - wordEnd: true, - bigWord: true, - inclusive: true, - }, - }, - // Insert mode entries - { - keys: "l", - type: "action", - action: "enterInsertMode", - isEdit: true, - actionArgs: { insertAt: "inplace" }, - context: "normal", - }, - { - keys: "gl", - type: "action", - action: "enterInsertMode", - isEdit: true, - actionArgs: { insertAt: "lastEdit" }, - context: "normal", - }, - { - keys: "L", - type: "action", - action: "enterInsertMode", - isEdit: true, - actionArgs: { insertAt: "firstNonBlank" }, - context: "normal", - }, - { - keys: "gL", - type: "action", - action: "enterInsertMode", - isEdit: true, - actionArgs: { insertAt: "bol" }, - context: "normal", - }, - { - keys: "L", - type: "action", - action: "enterInsertMode", - isEdit: true, - actionArgs: { insertAt: "startOfSelectedArea" }, - context: "visual", - }, - { - keys: "n", - type: "motion", - motion: "moveByLines", - motionArgs: { forward: true, linewise: true }, - }, - { - keys: "e", - type: "motion", - motion: "moveByLines", - motionArgs: { forward: false, linewise: true }, - }, - { - keys: "i", - type: "motion", - motion: "moveByCharacters", - motionArgs: { forward: true }, - }, - { - keys: "H", - type: "keyToKey", - toKeys: "^", - }, - { - keys: "I", - type: "keyToKey", - toKeys: "$", - }, - { - keys: "Y", - type: "keyToKey", - toKeys: "y$", - }, -); - -// #endregion - -// #region Hints -api.Hints.setCharacters("qwfpgarstdcv"); // Left-hand keys -// #endregion +// vim:foldmethod=marker:foldmarker=#region,#endregion:foldlevel=0 +// Paste this into surfingkeys advanced settings +// or use: +// Load settings from: https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/tools/browser/surfingkeys.js +// Browse to Extension > Surfingkeys > Allow access to file URLs to enable local file access +// Windows: file:///C:/Users/username/.dotfiles/tools/browser/surfingkeys.js +// Linux: file:///home/username/.dotfiles/tools/browser/surfingkeys.js +// macOS: file:///Users/username/.dotfiles/tools/browser/surfingkeys.js + +// #region Example +/** Examples + +// an example to create a new mapping `ctrl-y` +api.mapkey('', 'Show me the money', function() { + Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).'); +}); + +// an example to replace `T` with `gt`, click `Default mappings` to see how `T` works. +api.map('gt', 'T'); + + +// an example to remove mapkey `Ctrl-i` +api.unmap(''); + +*/ +// #endregion + +// #region Settings +settings.language = "zh-CN"; +settings.showModeStatus = false; +// #endregion + +// #region Helper +// import the API so that no need to use `api` prefix +const { + aceVimMap, + addVimMapKey, + mapkey, + imap, + imapkey, + getClickableElements, + vmapkey, + map, + unmap, + cmap, + addSearchAlias, + removeSearchAlias, + tabOpenLink, + readText, + Clipboard, + Front, + Hints, + Visual, + RUNTIME, +} = api; +// Keymap, reference https://github.com/texiwustion/colemak_config_for_surfingkeys/tree/main +const forward = { + add: function (key) { + // 转发即将被 unmap 的键 + return api.map(`for${key}`, key); + }, + cancel: function (key) { + // 删除转发生成的键 + api.unmap(`for${key}`); + api.unmap(key); + }, + use: function (key) { + return `for${key}`; + }, +}; + +const colemak = { + forward: function (key) { + // 转发即将被 unmap 的键 + api.map(key, `col${key}`); + api.unmap(`col${key}`); + }, + use: function (key) { + return `col${key}`; + }, + map: function (a, b) { + api.map(colemak.use(a), forward.use(b)); + }, +}; + +const vForward = { + add: function (key) { + // 转发即将被 unmap 的键 + return api.vmap(`vfor${key}`, key); + }, + cancel: function (key) { + // 删除转发生成的键 + api.vunmap(`vfor${key}`); + api.vunmap(key); + }, + use: function (key) { + return `vfor${key}`; + }, +}; + +const vColemak = { + forward: function (key) { + // 转发即将被 unmap 的键 + api.vmap(key, `vcol${key}`); + api.vunmap(`vcol${key}`); + }, + use: function (key) { + return `vcol${key}`; + }, + map: function (a, b) { + api.vmap(vColemak.use(a), vForward.use(b)); + }, +}; + +const forwardFactory = { + push: function (mapLists) { + // forward original keys + for (const key in mapLists) { + // `const` better than `let` + forward.add(mapLists[key]); + } + }, + map: function (mapLists) { + for (const key in mapLists) { + colemak.map(key, mapLists[key]); + } + }, + pull: function (mapLists) { + for (const key in mapLists) { + forward.cancel(mapLists[key]); + } + for (const key in mapLists) { + colemak.forward(key); + } + }, +}; +const vForwardFactory = { + push: function (mapLists) { + // forward original keys + for (const key in mapLists) { + vForward.add(mapLists[key]); + } + }, + map: function (mapLists) { + for (const key in mapLists) { + vColemak.map(key, mapLists[key]); + } + }, + pull: function (mapLists) { + for (const key in mapLists) { + vForward.cancel(mapLists[key]); + } + for (const key in mapLists) { + vColemak.forward(key); + } + }, +}; +// TODO: Add more search completion source (with json) +const parseSearchResponse = function (response) { + const res = JSON.parse(response.text); + return res.map((r) => r.phrase); +}; + +const _addSearchAlias = function ( + alias, + name, + searchUrl, + acUrl = "https://duckduckgo.com/ac/?q=", + searchPrefix = "s", + parseResponse = parseSearchResponse, +) { + api.addSearchAlias( + alias, + name, + searchUrl, + searchPrefix, + acUrl, + parseResponse, + ); +}; +// Shortcut for querySelector +const q = (selector) => document.querySelector(selector); +const qs = (selector) => document.querySelectorAll(selector); +// #endregion + +// #region Keymap +// Normal Mode Keymap +const mapLists = { + /// scroll page + // Arrow + n: "j", + e: "k", + i: "l", + // l <-> i + l: "gi", // Focus on first input box by default + L: "I", + // k <-> n + k: "n", + K: "N", + // j <-> e + j: "e", + // PrevTab < H - I > NextTab + H: "E", + I: "R", + // E,N -> Up/Down HalfPage + N: "d", + E: "e", + // F -> Open Link in New Tab + F: "af", + // oH -> Tab History + oH: "H", + // gh/gi -> Prev/Next History + gh: "S", + gi: "D", + gl: "i", // Use `gl` to search and focus on input box + // t -> Open Link in New Tab + t: "gf", + // 缩放 + zu: "zi", + zo: "ze", + zz: "zr", +}; +// Visual Mode Keymap +const vMapLists = { + n: "j", + N: "J", + e: "k", + E: "K", + i: "l", + I: "L", + j: "e", + J: "E", + k: "n", + K: "N", +}; + +forwardFactory.push(mapLists); +forwardFactory.map(mapLists); + +vForwardFactory.push(vMapLists); +vForwardFactory.map(vMapLists); + +// All other unmapped keys should be defined here +// TODO: Add more mouse click keymap +api.unmap("gi"); // conflict with `gi` in `mapLists` +api.unmap("C"); // Use `F` instead (Open Link in New Tab) +api.map("g/", "gU"); // Goto Root Domain +// TODO: Add SPC keymap as leader (maybe change `,` to `SPC`) +api.unmap(""); // Leader Key + +forwardFactory.pull(mapLists); +vForwardFactory.pull(vMapLists); + +api.map("gH", "g/"); +// #endregion + +// #region Omnibar NOTE: Dosn't work +// api.cmap("", ""); +// api.cmap("", ""); +// api.cmap("", ""); +// api.cmap("", ""); +// api.cmap("", ""); +// api.cmap("", ""); +// api.cmap("", ""); +// api.cmap("", ""); +// #endregion + +// #region Search Alias + +const removedSearchAlias = [ + "b", // Baidu + "d", // DuckDuckGo + "e", // Wikipedia + "g", // Google + "s", // StackOverflow + "w", // Bing + "y", // YouTube +]; + +removedSearchAlias.forEach((alias) => removeSearchAlias(alias)); + +const searchAliases = [ + ["a2", "AlternativeTo", "https://alternativeto.net/browse/search/?q="], + ["ap", "APT", "https://packages.ubuntu.com/search?keywords="], + ["au", "AUR", "https://aur.archlinux.org/packages?K="], + ["aw", "ArchWiki", "https://wiki.archlinux.org/index.php?search="], + ["bd", "Baidu", "https://www.baidu.com/s?wd="], + ["bi", "Bing", "https://www.bing.com/search?q="], + ["bl", "Bilibili", "https://search.bilibili.com/all?keyword="], + ["br", "HomeBrew", "https://duckduckgo.com/?q=!brew "], + ["cg", "ChatGPT", "https://chat.openai.com/?q="], + ["cr", "Chrome Web Store", "https://chrome.google.com/webstore/search/"], + ["dd", "DuckDuckGo", "https://duckduckgo.com/?q="], + ["de", "Thesaurus", "https://www.onelook.com/?w="], + ["eb", "ebay", "https://www.ebay.co.uk/sch/i.html?kw="], + ["fe", "Felo", "https://felo.ai/search?q="], + ["gh", "GitHub", "https://github.com/search?type=repositories&q="], + ["gg", "Google", "https://www.google.com/search?q="], + ["mc", "Metacritic", "https://www.metacritic.com/search/"], + ["nx", "NixPackages", "https://search.nixos.org/packages?query="], + ["ng", "NuGet", "https://www.nuget.org/packages?q="], + ["np", "npm", "https://www.npmjs.com/search?q="], + ["pa", "Pacman", "https://archlinux.org/packages/?q="], + ["pp", "Perplexity", "https://www.perplexity.ai/?q="], + ["py", "pypi", "https://pypi.org/search/?q="], + ["re", "Reddit", "https://www.reddit.com/search?q="], + ["sc", "Scoop", "https://scoop.sh/#/apps?q="], + ["se", "StackExchange", "https://stackexchange.com/search?q="], + ["so", "StackOverflow", "https://stackoverflow.com/search?q="], + ["st", "Steam", "https://store.steampowered.com/search/?term="], + ["tw", "X", "https://twitter.com/search?q="], + ["ud", "UrbanDictionary", "https://www.urbandictionary.com/define.php?term="], + ["wa", "WolframAlpha", "https://www.wolframalpha.com/input/?i="], + ["wg", "winget", "https://winget.ragerworks.com/search/all/"], + [ + "wk", + "Wikipedia", + "https://en.wikipedia.org/w/index.php?title=Special:Search&search=", + ], + [ + "ww", + "WantWords", + "https://www.shenyandayi.com/wantWordsResult?lang=zh&query=", + ], + ["yt", "YouTube", "https://www.youtube.com/results?search_query="], +]; + +api.unmap("on"); + +// Add all search aliases +searchAliases.forEach(([alias, name, url]) => { + _addSearchAlias(alias, name, url); +}); +// #endregion + +// #region Site-specific + +// This is a global keymap +mapkey("yY", "yank link without parameter", function () { + const url = new URL(window.location.href); + Clipboard.write(url.origin + url.pathname); +}); + +unmap("yma") +unmap("ymc") +unmap("ymv") + +mapkey("ym", "yank link as markdown", function () { + const url = new URL(window.location.href); + const title = document.title; + Clipboard.write(`[${title}](${url.origin + url.pathname})`); +}); + +// #region bilibili.com +mapkey( + ",n", + "[n]ext Video", + function () { + window.location.href = q("div.next-play").querySelector("a").href; + }, + { domain: /bilibili.com/ }, +); +// #endregion + +// #region chatgpt.com +const chatgptNewChat = function () { + var btn = q( + "div.no-draggable:nth-child(3) > span:nth-child(1) > button:nth-child(1)", + ); + btn.click(); +}; +const chatgptStartStop = function () { + var btn = q("button.h-8:nth-child(2)"); + btn.click(); +}; +mapkey(",n", "New Chat", chatgptNewChat, { domain: /chatgpt.com/ }); +mapkey(",s", "Start/Stop Generating", chatgptStartStop, { + domain: /chatgpt.com/, +}); +// #endregion + +// #region chat.deepseek.com +mapkey( + ",s", + "Toggle Sidebar", + function () { + var btn = qs("div.ds-icon-button"); + btn[0].click(); + }, + { domain: /chat.deepseek.com/ }, +); +mapkey( + ",e", + "[e]dit last input", + function () { + var btn = qs("div.ds-icon-button"); + btn[btn.length - 5].click(); + }, + { domain: /chat.deepseek.com/ }, +); +mapkey( + ",y", + "[y]ank last oupput", + function () { + var btn = qs("div.ds-icon-button"); + btn[btn.length - 4].click(); + }, + { domain: /chat.deepseek.com/ }, +); +mapkey( + ",r", + "[r]egenerate last output", + function () { + var btn = qs("div.ds-icon-button"); + btn[btn.length - 3].click(); + }, + { domain: /chat.deepseek.com/ }, +); +mapkey( + ",n", + "[n]ew Chat", + function () { + window.location.href = "https://chat.deepseek.com/"; + }, + { domain: /chat.deepseek.com/ }, +); +mapkey( + ",t", + "Toggle co[t](R1)", + function () { + var btns = qs("div.ds-button"); + btns[0].click(); + }, + { domain: /chat.deepseek.com/ }, +); +mapkey( + ",w", + "Toggle [w]eb Search", + function () { + var btns = qs("div.ds-button"); + btns[1].click(); + }, + { domain: /chat.deepseek.com/ }, +); +// #endregion + +//#region dropbox.com +//https://www.dropbox.com/scl/fi/u58c2qmqbwq672y3hwmfn/setup.sh?rlkey=d3figouv5eqk1xfwdtyzfr7ua&e=1&st=ehttmy2r&dl=0 +//https://dl.dropboxusercontent.com/scl/fi/u58c2qmqbwq672y3hwmfn/setup.sh?rlkey=d3figouv5eqk1xfwdtyzfr7ua&e=1&st=ehttmy2r +mapkey( + ",r", + "Extract [r]aw link", + function () { + const url = new URL(window.location.href); + if (url.href.endsWith("&dl=0")) { + url.searchParams.delete("dl"); + url.hostname = "dl.dropboxusercontent.com"; + Clipboard.write(url.href); + } + }, + { domain: /dropbox.com/ }, +); +mapkey( + ",d", + "Extract [d]ownload link", + function () { + const url = new URL(window.location.href); + if (url.href.endsWith("&dl=0")) { + url.searchParams.set("dl", "1"); + Clipboard.write(url.href); + } + }, + { domain: /dropbox.com/ }, +); +//#endregion + +// #region app.follow.is +mapkey( + ",t", + "Toggle ", + function () { + var btn = qs("button.no-drag-region"); + btn[btn.length - 4].click(); + }, + { domain: /app.follow.is/ }, +); + +mapkey( + ",a", + "Toggle AI Summary", + function () { + var btn = qs("button.no-drag-region"); + btn[btn.length - 3].click(); + }, + { domain: /app.follow.is/ }, +); + +mapkey( + ",o", + "Toggle Original Website", + function () { + var btn = qs("button.no-drag-region"); + btn[btn.length - 4].click(); + }, + { domain: /app.follow.is/ }, +); +// #endregion + +// #region GitHub +// utils +const gh = {}; +gh.repoLink = (owner, repo) => `https://github.com/${owner}/${repo}`; +gh.pageLink = (owner, repo) => `https://${owner}.github.io/${repo}/`; +gh.sourceLink = (owner, repo, path) => + `${gh.repoLink(owner, repo)}/tree/${path}`; +gh.rawToSource = (url) => { + const ps = url.split("/").slice(3); + return gh.sourceLink(ps[0], ps[1], ps.slice(4).join("/")); +}; +// github.com +mapkey( + ",e", + "Use Web Editor", + function () { + const url = new URL(window.location.href); + url.hostname = "github.dev"; + window.location.href = url.href; + }, + { domain: /github.com/ }, +); +mapkey( + ",E", + "Use Web Editor (New Page)", + function () { + const url = new URL(window.location.href); + url.hostname = "github.dev"; + tabOpenLink(url.href); + }, + { domain: /github.com/ }, +); +mapkey( + ",p", + "Switch to GitHub Page", + function () { + href = window.location.href; + owner = href.split("/")[3]; + repo = href.split("/")[4]; + window.location.href = gh.pageLink(owner, repo); + }, + { domain: /github.com/ }, +); +/// This might be useful for Vim plugins +mapkey( + ",y", + "[y]ank short refeference owner/repo", + function () { + const href = window.location.href; + owner = href.split("/")[3]; + repo = href.split("/")[4]; + Clipboard.write(`${owner}/${repo}`); + }, + { domain: /github.com/ }, +); +// github.dev +mapkey( + ",r", + "Switch to GitHub Repo", + function () { + const url = new URL(window.location.href); + url.hostname = "github.com"; + window.location.href = url.href; + }, + { domain: /github.dev/ }, +); +// github.io +mapkey( + ",r", + "Switch to GitHub Repo", + function () { + const href = window.location.href; + owner = href.split("/")[2].split(".")[0]; + repo = href.split("/")[3]; + tabOpenLink(gh.repoLink(owner, repo)); + }, + { domain: /github.io/ }, +); +mapkey( + ",R", + "Go to GitHub Repo (New tab)", + function () { + const href = window.location.href; + owner = href.split("/")[2].split(".")[0]; + repo = href.split("/")[3]; + tabOpenLink(gh.repoLink(owner, repo)); + }, + { domain: /github.io/ }, +); +// raw.githubusercontent.com +mapkey( + ",r", + "Switch to GitHub Repo", + function () { + const url = new URL(window.location.href); + var owner, repo; + owner, (repo = url.pathname.split("/").slice(1, 3)); + window.location.href = gh.repoLink(owner, repo); + }, + { domain: /raw.githubusercontent.com/ }, +); +mapkey( + ",R", + "Switch to GitHub Repo", + function () { + const url = new URL(window.location.href); + var owner, repo; + owner, (repo = url.pathname.split("/").slice(1, 3)); + tabOpenLink(gh.repoLink(owner, repo)); + }, + { domain: /raw.githubusercontent.com/ }, +); +mapkey( + ",s", + "Open Source in GitHub", + function () { + window.location.href = gh.rawToSource(window.location.href); + }, + { domain: /raw.githubusercontent.com/ }, +); +mapkey( + ",S", + "Open Source in GitHub (New Page)", + function () { + tabOpenLink(gh.rawToSource(window.location.href)); + }, + { domain: /raw.githubusercontent.com/ }, +); +// #endregion GitHub + +//#region app.microsoft.com +// https://apps.microsoft.com/detail/9nl6kd1h33v3?hl=en-GB&gl=GB +// This is useful in `winget` (Windows Package Manager) +mapkey( + ",y", + "[y]ank app id", + function () { + const url = new URL(window.location.href); + const id = url.pathname.split("/")[2]; + Clipboard.write(id); + }, + { domain: /apps.microsoft.com/ }, +); +//#endregion + +// #region perplexity.ai +/** + * 0 - 网络 + * 1 - 学术 + * 2 - 社交 + */ +unmap("", /perplexity.ai/); // allows to use perplexity web keybindings +mapkey( + ",b", + "Add Perplexity [b]ookmark", + function () { + // button.border:nth-child(2) + q("div.sticky.left-0").querySelectorAll("button")[2].click(); + }, + { domain: /perplexity.ai/ }, +); +mapkey( + ",M", + "Toggle [M]odel switching", + function () { + q("div.rounded-md").querySelectorAll("span")[2].click(); + //setTimeout(() => { + // // Wait for the DOM to update + // qs("div.shadow-subtle div.group\\/item")[0].click(); + //}, 100); + }, + { domain: /perplexity.ai/ }, +); +mapkey( + ",m", + "Toggle default [m]odel (Claude 3.7 Sonnet)", + function () { + q("div.rounded-md").querySelectorAll("span")[1].click(); + setTimeout(() => { + // Wait for the DOM to update + qs("div.shadow-subtle div.group\\/item")[3].click(); + }, 100); + }, + { domain: /perplexity.ai/ }, +); +mapkey( + ",w", + "Toggle [w]riting/[w]eb Search", + function () { + q("div.rounded-md").querySelectorAll("span")[2].click(); + setTimeout(() => { + // Wait for the DOM to update + qs("div.shadow-subtle div.group\\/item")[0].click(); + }, 100); + }, + { domain: /perplexity.ai/ }, +); +mapkey( + ",s", + "[s]tart Generating", + function () { + var btns = qs("span.grow button"); + btns[btns.length - 1].click(); + }, + { domain: /perplexity.ai/ }, +); +mapkey( + ",y", + "[y]ank Last Output", + function () { + var toolbars = qs("div.mt-sm"); + var last = toolbars[toolbars.length - 1]; + var btns = last.querySelectorAll("button"); + btns[5].click(); + }, + { domain: /perplexity.ai/ }, +); +mapkey( + ",R", + "Change model to [R]egenerate last output", + function () { + var toolbars = qs("div.mt-sm"); + var last = toolbars[toolbars.length - 1]; + var btns = last.querySelectorAll("button"); + btns[1].click(); + }, + { domain: /perplexity.ai/ }, +); +mapkey( + ",r", + "Toggle [r]easoning", + function () { + q("div.rounded-md").querySelectorAll("span")[0].click(); + setTimeout(() => { + // Wait for the DOM to update + qs("div.shadow-subtle div.group\\/item")[2].click(); + }, 100); + }, + { domain: /perplexity.ai/ }, +); +// #endregion + +// #region sspai.com +unmap("[[", /sspai.com/); +unmap("]]", /sspai.com/); +unmap(",", /sspai.com/); +mapkey( + "[[", + "Previous Page", + function () { + q("button.btn-prev").click(); + }, + { domain: /sspai.com/ }, +); +mapkey( + "]]", + "Next Page", + function () { + q("button.btn-next").click(); + }, + { domain: /sspai.com/ }, +); + +// #endregion + +// #region pixiv.net +// Use site-specific paging method +unmap("[[", /pixiv.net/); +unmap("]]", /pixiv.net/); +unmap(",", /pixiv.net/); +const isArtwork = (url) => /pixiv.net\/artworks/.test(url.href); + +mapkey( + "[[", + "Previous Page", + function () { + const url = new URL(window.location.href); + if (url.href === url.origin) { + return; + } + const page = url.searchParams.get("p"); + const newPage = page ? parseInt(page) - 1 : 1; + url.searchParams.set("p", newPage); + window.location.href = url.href; + }, + { domain: /pixiv.net/ }, +); + +mapkey( + "]]", + "Next Page", + function () { + const url = new URL(window.location.href); + if (url.href === url.origin) { + return; + } + const page = url.searchParams.get("p"); + const newPage = page ? parseInt(page) + 1 : 2; + url.searchParams.set("p", newPage); + window.location.href = url.href; + }, + { domain: /pixiv.net/ }, +); +mapkey( + ",b", + "Add to [b]ookmark", + function () { + const url = new URL(window.location.href); + if (!isArtwork(url)) { + return; + } + const toolbar = q('section [class$="Toolbar"]'); + toolbar.querySelectorAll("div")[2].querySelector("button").click(); + }, + { domain: /pixiv.net/ }, +); +mapkey( + ",B", + "Add to private [B]ookmark", + function () { + const url = new URL(window.location.href); + if (!isArtwork(url)) { + return; + } + const toolbar = q('section [class$="Toolbar"]'); + toolbar.querySelectorAll("div")[0].querySelector("button").click(); + setTimeout(() => { + // Wait for the DOM to update + q("div[role=menu]").querySelector("li").click(); + }, 100); + }, + { domain: /pixiv.net/ }, +); +mapkey( + ",v", + "Up[v]ote Artwork", + function () { + const url = new URL(window.location.href); + if (!isArtwork(url)) { + return; + } + const toolbar = q('section [class$="Toolbar"]'); + toolbar.querySelectorAll("div")[3].querySelector("button").click(); + }, + { domain: /pixiv.net/ }, +); +mapkey( + ",f", + "Toggle [f]ollow the author", + function () { + const url = new URL(window.location.href); + if (!isArtwork(url)) { + return; + } + q("aside").querySelector("section").querySelector("button").click(); + }, + { domain: /pixiv.net/ }, +); +// #endregion + +// #region youtube.com +mapkey( + ",n", + "[n]ext Video", + function () { + window.location.href = q("ytd-compact-video-renderer").querySelector( + "a", + ).href; + }, + { domain: /youtube.com/ }, +); + +mapkey( + ",v", + "Up[v]ote Video", + function () { + qs("like-button-view-model")[0].querySelector("button").click(); + }, + { domain: /youtube.com/ }, +); + +mapkey( + ",V", + "Down[v]ote Video", + function () { + qs("dislike-button-view-model")[0].querySelector("button").click(); + }, + { domain: /youtube.com/ }, +); +// class="ytp-subtitles-button ytp-button" +mapkey( + ",c", + "toggle [c]aptions", + function () { + q("button.ytp-subtitles-button").click(); + }, + { domain: /youtube.com/ }, +); +// #endregion + +//#region zhihu.com +mapkey( + ",d", + "Toggle [d]ark mode", + function () { + const url = new URL(window.location.href); + if (url.searchParams.get("theme") === "dark") { + url.searchParams.set("theme", "light"); + } else { + url.searchParams.set("theme", "dark"); + } + window.location.href = url.href; + }, + { domain: /zhihu.com/ }, +); +//#endregion +// #endregion + +// #region ACE Editor +addVimMapKey( + // Navigation + { + keys: "k", + type: "motion", + motion: "findNext", + motionArgs: { forward: true, toJumplist: true }, + }, + { + keys: "K", + type: "motion", + motion: "findNext", + motionArgs: { forward: false, toJumplist: true }, + }, + // Word movement + { + keys: "j", + type: "motion", + motion: "moveByWords", + motionArgs: { forward: true, wordEnd: true, inclusive: true }, + }, + { + keys: "J", + type: "motion", + motion: "moveByWords", + motionArgs: { + forward: true, + wordEnd: true, + bigWord: true, + inclusive: true, + }, + }, + // Insert mode entries + { + keys: "l", + type: "action", + action: "enterInsertMode", + isEdit: true, + actionArgs: { insertAt: "inplace" }, + context: "normal", + }, + { + keys: "gl", + type: "action", + action: "enterInsertMode", + isEdit: true, + actionArgs: { insertAt: "lastEdit" }, + context: "normal", + }, + { + keys: "L", + type: "action", + action: "enterInsertMode", + isEdit: true, + actionArgs: { insertAt: "firstNonBlank" }, + context: "normal", + }, + { + keys: "gL", + type: "action", + action: "enterInsertMode", + isEdit: true, + actionArgs: { insertAt: "bol" }, + context: "normal", + }, + { + keys: "L", + type: "action", + action: "enterInsertMode", + isEdit: true, + actionArgs: { insertAt: "startOfSelectedArea" }, + context: "visual", + }, + { + keys: "n", + type: "motion", + motion: "moveByLines", + motionArgs: { forward: true, linewise: true }, + }, + { + keys: "e", + type: "motion", + motion: "moveByLines", + motionArgs: { forward: false, linewise: true }, + }, + { + keys: "i", + type: "motion", + motion: "moveByCharacters", + motionArgs: { forward: true }, + }, + { + keys: "H", + type: "keyToKey", + toKeys: "^", + }, + { + keys: "I", + type: "keyToKey", + toKeys: "$", + }, + { + keys: "Y", + type: "keyToKey", + toKeys: "y$", + }, +); + +// #endregion + +// #region Hints +api.Hints.setCharacters("qwfpgarstdcv"); // Left-hand keys +// #endregion diff --git a/platforms/mac/etc/pam.d/sudo b/misc/mac/etc/pam.d/sudo similarity index 100% rename from platforms/mac/etc/pam.d/sudo rename to misc/mac/etc/pam.d/sudo diff --git a/tools/qmk/keychron_k3_pro.c b/misc/qmk/keychron_k3_pro.c similarity index 100% rename from tools/qmk/keychron_k3_pro.c rename to misc/qmk/keychron_k3_pro.c diff --git a/tools/thunderbird/tbkeys.json b/misc/thunderbird/tbkeys.json similarity index 100% rename from tools/thunderbird/tbkeys.json rename to misc/thunderbird/tbkeys.json diff --git a/tools/vscode/extensions/vspacecode.jsonc b/misc/vscode/extensions/vspacecode.jsonc similarity index 100% rename from tools/vscode/extensions/vspacecode.jsonc rename to misc/vscode/extensions/vspacecode.jsonc diff --git a/tools/vscode/hsnips/latex.hsnips b/misc/vscode/hsnips/latex.hsnips similarity index 95% rename from tools/vscode/hsnips/latex.hsnips rename to misc/vscode/hsnips/latex.hsnips index 7c82b39..d610c84 100644 --- a/tools/vscode/hsnips/latex.hsnips +++ b/misc/vscode/hsnips/latex.hsnips @@ -1,1038 +1,1038 @@ -global -// JavaScript code -function gen_matrix(nrow, ncol) { - let results = ""; - let order = 1; - for (var i=0; i < nrow; i++){ - results += ' '; - for(var j = 0; j < ncol - 1; j++){ - results += "$" + (order).toString() + " & "; - order ++; - } - results += "$" + (order).toString() + " \\\\" + "\\"; - order ++; - } - return results; -} - -function gen_matrix_transposed(nrow, ncol) { - let results = ""; - for (var i = 0; i < nrow; i++){ - results += ' '; - var j = 0; - for(; j < ncol - 1;j++){ - results += "$" + (i + j * ncol + 1).toString() + " & "; - } - results += "$" + (i + j * ncol + 1).toString() + " \\\\" + "\\"; - } - return results; -} - -function tes_matrix(nrow, ncol,t) { - let results = ""; - let order = 1; - for (var i=0; i 1 ){ - results += "${" +(order ).toString() + ":" + t[order-2] + "}\t & "; - } - else{ - results += "$" +(order ).toString() + " & "; - } - order ++; - } - results += "$"+(order).toString() +" \\\\" + "\\ "; - order ++; - } - return results; -} - -// 输出一个表格 -function createTable(rows, cols) { - let ret = ""; - let order = 1; - for (let i = 0; i < parseInt(rows) + 2; i++) { - for (let j = 0; j < parseInt(cols); j++) { - if (i === 1) { - ret += "|---"; - } else { - ret += "| $" + (order).toString() + " "; - order++; - } - } - ret += "|\n" - } - return ret; -} - -endglobal - -snippet example "Example" i -\documentclass{article} -\usepackage{amsmath} -\usepackage{amssymb} - -\begin{document} -\title{${1:title}} -\author{Peikun Yang} -\date{\today} -\maketitle -$0 -\end{document} -endsnippet - -# == Fraction Match == - - -snippet // "Fraction" iAm -\\frac{${1:${VISUAL}}}{$2}$0 -endsnippet - -snippet `((\d+)|(\d*)(\\)?([A-Za-z!]+)((\^|_)(\{\d+\}|\d))*)/` "Fraction no ()" iAm -\frac{``rv = m[1]``}{$1}$0 -endsnippet - -priority 200 -snippet `(?<=\s)(\\mu|\\alpha|\\sigma|\\rho|\\beta|\\gamma|\\delta|\\zeta|\\eta|\\varepsilon|\\theta|\\iota|\\kappa|\\vartheta|\\lambda|\\nu|\\pi|\\rho|\\tau|\\upsilon|\\phi|\\chi|\\psi|\\omega|\\Gamma|\\Delta|\\Theta|\\Lambda|\\Xi|\\Pi|\\Sigma|\\Upsilon|\\Phi|\\Psi|\\Omega|[A-Za-z]{1,2})?(_[A-Za-z0-9]|_\{[^}]+\})?(\^[A-Za-z0-9]|\^\{[^}]+\})?(_[A-Za-z0-9]|_\{[^}]+\})?(\([^)]+\))(_[A-Za-z0-9]|_\{[^}]+\})?(\^[A-Za-z0-9]|\^\{[^}]+\})?(_[A-Za-z0-9]|_\{[^}]+\})?\/` "Fraction with ()" iAm -``rv = "\\frac{" + m.slice(1, m.length).join('') + "}{$1}$2"`` -endsnippet - -# == Hat Operation == - -# ==== Auto Capture Hat Operation ==== -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hbar|BAR)` "Bar" iAm -\overline{``rv = m[1] + m[2] + m[3]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(htd|TD)` "tilde" iAm -\tilde{``rv = m[1]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)bar` "bar" iAm -\bar{``rv = m[1]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hat|HAT)` "hat" iAm -\hat{``rv = m[1]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hvec)` "Vector postfix" iAm -\vec{``rv = m[1]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(rta)` "Vector postfix" iAm -\overrightarrow{``rv = m[1]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(dot)` "dot" iAm -\dot{``rv = m[1]``} -endsnippet - -priority 1000 -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hdd)` "ddot" iAm -\ddot{``rv = m[1]``} -endsnippet - -# ===== Static Hat Operation ==== - -snippet hbar "bar" iAm -\overline{$1}$0 -endsnippet - -snippet hat "hat" iAm -\hat{$1}$0 -endsnippet - -snippet sq "\sqrt{}" iAm -\sqrt{${1}}$0 -endsnippet - -priority 10000 -snippet psq "\sqrt[]{}" iAm -\sqrt[${2}]{${1}} -endsnippet - -# == Superscript Operation == - -snippet invs "inverse" iAm -^{-1} -endsnippet - -snippet dig "digree" iAm -^{\circ} -endsnippet - -priority 10000 -snippet TR "inverse" iAm -^{\mathsf{T}} -endsnippet - -snippet CL "complement" iAm -^{c} -endsnippet - -snippet R+ "R0+" iAm -R_0^+ -endsnippet - -snippet pow "power" iAm -^{${1:n}} -endsnippet - -snippet tp "to the ... power" iAm -^{${1:2}}$0 -endsnippet - -snippet sr "square" iAm -^{2}$0 -endsnippet - -snippet cb "cube" iAm -^{3}$0 -endsnippet - -# == Subscript Operation == - -snippet td "subscript" iAm -_{${1}}$0 -endsnippet - -snippet sb "subscript" iAm -_{${0}} -endsnippet - -snippet `(})(\d)\2` "auto subscript" iAm -`` rv = m[1] + "_" + m[2]`` -endsnippet - -snippet `([A-Za-z])(\d)` "auto subscript" iAm -`` rv = m[1] + "_" + m[2]`` -endsnippet - -priority 100 -snippet `([A-Za-z])_(\d{2})` "auto subscript" iAm -`` rv = m[1] + "_{" + m[2] + "}$0" `` -endsnippet - -priority 100 -snippet `([A-Za-z])S(\d)` "auto subscript" iAm -`` rv = m[1] + "_{" + m[2] + "$1}$2"`` -endsnippet - -snippet `\b(? "${1:_}" + d + "${2:, }").join('');``\cdots${3:${2:, }${1:_}n} -endsnippet - -snippet `(\d\d+),` "0, 1, 2" iAm -``rv = m[1].split('').map((d) => "${1:_}" + d).join("${2:, }");`` -endsnippet - -snippet <> "hokje" iA -\diamond -endsnippet - -# +... -> , \cdots -# - ... -> , \cdots -# add a space if there already is one. -priority 101 -snippet `(?<=[-+])\s*\.\.\.` "smart cdots" imA - \cdots -endsnippet - -# It seems that \ldots is only used when , ..., -# ,... -> , \ldots -# , ... -> , \ldots -priority 101 -snippet `(?<=,)(\s*)\.\.\.` "smart ldots" imA - \ldots -endsnippet - -snippet ** "dot multiply" iAm -\cdot -endsnippet - -snippet +- "pm" iAm -\pm -endsnippet - -snippet -+ "mp" iAm -\mp -endsnippet - -snippet odot "odot" iAm -\odot -endsnippet - -priority 101 -snippet xx "cross" iAm -\times -endsnippet - -snippet eps "epsilon" iAm -\epsilon -endsnippet - -priority 100 -snippet veps "varepsilon" iAm -\varepsilon -endsnippet - -priority 100 -snippet ell "ell" iAm -\ell -endsnippet - -priority 100 -snippet log "log" iAm -\log -endsnippet - -snippet bin "binom" iAm -\binom{$1}{$2} -endsnippet - -snippet oth "otherwise" iAm -\text{otherwise} -endsnippet - -snippet star "star" iAm -^{*} -endsnippet - -snippet `(? "to" iAm -\to -endsnippet - -snippet !> "mapsto" iAm -\mapsto -endsnippet - -snippet => "implies" iAm -\implies -endsnippet - -snippet =< "implied by" iAm -\impliedby -endsnippet - -priority 200 -snippet iff "if and only if" iAm -\iff -endsnippet - -snippet EE "exist" iAm -\exists -endsnippet - -snippet AA "forall" iAm -\forall -endsnippet - -snippet bec "because" iAm -\because -endsnippet - -snippet thr "therefore" iAm -\therefore -endsnippet - - -# ==== Possibility Symbol ==== - -snippet Pr "Pr" iAm -\operatorname{Pr} -endsnippet - -snippet Var "Var" iAm -\operatorname{Var} -endsnippet - -snippet Cov "Cov" iAm -\operatorname{Cov} -endsnippet - -snippet Exp "Expected" iAm -\mathbb{E} -endsnippet - - -# ==== Compare Symbol ==== - -snippet -- "setminus" iAm -\setminus -endsnippet - -snippet >= "greater than" iAm -\ge $0 -endsnippet - -snippet dis "displaystyle" iAm -\displaystyle -endsnippet - -snippet <= "less than" iAm -\le $0 -endsnippet - -snippet != "no equals" iAm -\neq -endsnippet - -snippet == " constan equals" iAm -\equiv -endsnippet - -snippet sim "sim" iAm -\sim -endsnippet - -snippet `\\sim eq` "simeq" iAm -\simeq -endsnippet - -snippet ~~ " Amppro equals" iAm -\approx -endsnippet - -snippet ~= " Amppro equals2" iAm -\cong -endsnippet - -snippet >> ">>" iAm -\gg -endsnippet - - -snippet << "<<" iAm -\ll -endsnippet - - -# == Auto Environment == - -# ==== Auto Math Mode ==== - -snippet mk "inline Math" wA -\(${1}\)$0 -endsnippet - -snippet dm "display Math" w -\[ -${1} -\] -endsnippet - -snippet dmi "display Math" wA -\[$1\]$0 -endsnippet - -snippet eqt "equation" wA -\begin{equation} - ${1} -\end{equation} -endsnippet - -snippet eqs "equation*" wA -\begin{equation*} - ${1} -\end{equation*} -endsnippet - -# ==== Common Environment ==== - -# snippet case "cases" iAm -# \begin{cases} $1, & $2 \\\\ $3, & $4 \end{cases} -# endsnippet - -snippet ali "aligned" iAm -\begin{aligned} -$1 \\\\ -\end{aligned} -endsnippet - -# == Auto Adaptive Close == - -snippet ceil "ceil" iAm -\left\lceil $1 \right\rceil $0 -endsnippet - -snippet floor "floor" iAm -\left\lfloor $1 \right\rfloor$0 -endsnippet - -priority 100 -snippet @) "left( right)" Aim -\left( ${1} \right) $0 -endsnippet - -priority 100 -snippet @| "left| right|" Aim -\left| ${1} \right| $0 -endsnippet - -priority 100 -snippet @\ "left. right|" Aim -\left. ${1} \right|_{${2}}$0 -endsnippet - -priority 100 -snippet @} "left\{ right\}" Aim -\left\\{ ${1} \right\\} $0 -endsnippet - -priority 100 -snippet set "\{ \}" Aim -\\{ ${1} \\}$0 -endsnippet - -priority 100 -snippet @] "left[ right]" Aim -\left[ ${1} \right] $0 -endsnippet - -priority 100 -snippet @> "leftangle rightangle" iAm -\left<${1} \right>$0 -endsnippet - -priority 200 - -# == Snippet == - -# ==== General Snippet ==== - -# ====== Lite Snippet ====== - -snippet tag "tag" iAm -\tag{$1} -endsnippet - -snippet xyb "Auto (x, y)" iAm -(x, y) -endsnippet - -snippet xyzb "Auto (x, y ,z)" iAm -(x, y, z) -endsnippet - -priority 100 -snippet `\b([a-zA-Z])n(\d)` "x[n+1]" iAm -``rv = m[1]``_{${1:n}+``rv = m[2]``}$0 -endsnippet - -# Unkown -snippet rij "mrij" iAm -(${1:x}_${2:n})_{${3:$2} \\in ${4:N}}$0 -endsnippet - -priority 200 -snippet abs "absolute value" iAm -\left\vert ${1} \right\vert $0 -endsnippet - -snippet beg "begin{} / end{}" bA -\\begin{$1} - $0 -\\end{$1} -endsnippet - -# ======== N Series ======== - -priority 100 -snippet comma "comma" iAm -${1:\\alpha}_1,${1:\\alpha}_2,\\cdots,${1:\\alpha}_${2:n} -endsnippet - -priority 100 -snippet plus "plus" iAm -${1:k}_1${2:\\alpha}_1+${1:k}_2${2:\\alpha}_2+\\cdots+${1:k}_${3:n}${2:\\alpha}_${3:n} -endsnippet - -snippet `\b([ijk])=n` "i=1,2,\cdots,n" iAm -``rv = m[1]``=1,2,\cdots,n -endsnippet - -# ======== Common Operator Snippet ======== - -snippet taylor "taylor" iAm -\sum_{${1:k}=${2:0}}^{${3:\infty}} ${4:c_$1} (x-a)^$1 $0 -endsnippet - -snippet `(?= 2) || (b != 1 && !isO && isL)) ? "\\limits" : ""; -let r = (b == 3) ? "E" : (b == 1 && (isL || isO)) ? "C" : "R"; -final += ((b >= 2) || isO || (b == 1 && isL)) ? "_{${1:" + r + "}}" : "_{${1:-\\infty}}^{${2:\\infty}}"; -let x = (b == 2) ? "A" : (b == 3) ? "V" : (b == 1 && isL) ? "s" : "x"; -final += " ${3} \\mathrm{d}${4:" + x + "}$0"; -rv = final; -`` -endsnippet - -# Custom: Can add more defined operator -priority 100 -snippet `(? 0} \\\\ -\end{aligned} -endsnippet - -priority 300 -snippet Argmax "Optimization problem" iAm -\begin{aligned} -\argmax_{${1:\beta}} -&\quad ${2:f(x)} \\\\ -\text{s.t.} -&\quad ${3:g(x) > 0} \\\\ -\end{aligned} -endsnippet - -snippet deff "Definition of function" iAm -$1\colon ${2:\\mathbb{R\}} \to ${3:\\mathbb{R\}}, ${4:x} \mapsto $0 -endsnippet - - -snippet iid "independent and identical distribution" iAm -\overset{\text{i.i.d.}}{\sim} -endsnippet - -snippet defe "define equal" iAm -\overset{\underset{\mathrm{def}}{}}{=} -endsnippet - -snippet deft "define triangleq" iAm -\triangleq -endsnippet - - -# == Matrix == - -# ==== Static Matrix ==== - -snippet pmat "pmat" wm -\begin{pmatrix} - ${1: } -\end{pmatrix} $0 -endsnippet - -snippet bmat "pmat" wm -\begin{bmatrix} - $1 -\end{bmatrix} $0 -endsnippet - -snippet vecC "column vector" iAm -\begin{bmatrix} ${1:x}_1 \\\\ ${1:x}_2 \\\\ \vdots \\\\ ${1:x}_${2:n} \end{bmatrix} -endsnippet - -snippet vecR "row vector" iAm -\begin{bmatrix} ${1:x}_1, ${1:x}_2, \cdots, ${1:x}_${2:n} \end{bmatrix}$0 -endsnippet - -priority 300 -snippet omis "omission" iAm -\\begin{bmatrix}${1:1}&${2:1}&\\cdots&${4:1}\\\\${5:1}&${6:1}&\\cdots&${8:1}\\\\\\vdots&\\vdots&\\ddots&\\vdots\\\\${13:1}&${14:1}&\\cdots&${16:1}\\end{bmatrix} -endsnippet - -priority 300 -snippet submat "omission" iAm -\\begin{bmatrix} - ${1:a}_{11} & ${1:a}_{12} & \\cdots & ${1:a}_{1n} \\\\ - ${1:a}_{21} & ${1:a}_{22} & \\cdots & ${1:a}_{2n} \\\\ - \\vdots & \\vdots & \\ddots & \\vdots \\\\ - ${1:a}_{n1} & ${1:a}_{n2} & \\cdots & ${1:a}_{nn} -\\end{bmatrix} -endsnippet - -priority 300 -snippet subplusmat "omission" iAm -\\begin{bmatrix} - ${1:a}_{11}+${2:b}_{11} & ${1:a}_{12}+${2:b}_{12} & \\cdots & ${1:a}_{1n}+${2:b}_{1n} \\\\ - ${1:a}_{21}+${2:b}_{21} & ${1:a}_{22}+${2:b}_{22} & \\cdots & ${1:a}_{2n}+${2:b}_{2n} \\\\ - \\vdots & \\vdots & \\ddots & \\vdots \\\\ - ${1:a}_{n1}+${2:b}_{n1} & ${1:a}_{n2}+${2:b}_{n2} & \\cdots & ${1:a}_{nn}+${2:b}_{nn} -\\end{bmatrix} -endsnippet - -snippet jacobi "jacobi" iAm -\\begin{bmatrix}\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_${3:n}}\\\\\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_${3:n}}\\\\\\vdots&\\vdots&\\ddots&\\vdots\\\\\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_${3:n}}\\end{bmatrix} -endsnippet - -# ==== Dynamic Matrix ==== - -priority 300 -snippet `(b|p|v)mata([1-9])` "bmatrix" iiAm -\\begin{``rv = m[1]``matrix}`` - let len = m[2]; - let results = ""; - for (var i=0; i 1 ){ + results += "${" +(order ).toString() + ":" + t[order-2] + "}\t & "; + } + else{ + results += "$" +(order ).toString() + " & "; + } + order ++; + } + results += "$"+(order).toString() +" \\\\" + "\\ "; + order ++; + } + return results; +} + +// 输出一个表格 +function createTable(rows, cols) { + let ret = ""; + let order = 1; + for (let i = 0; i < parseInt(rows) + 2; i++) { + for (let j = 0; j < parseInt(cols); j++) { + if (i === 1) { + ret += "|---"; + } else { + ret += "| $" + (order).toString() + " "; + order++; + } + } + ret += "|\n" + } + return ret; +} + +endglobal + +snippet example "Example" i +\documentclass{article} +\usepackage{amsmath} +\usepackage{amssymb} + +\begin{document} +\title{${1:title}} +\author{Peikun Yang} +\date{\today} +\maketitle +$0 +\end{document} +endsnippet + +# == Fraction Match == + + +snippet // "Fraction" iAm +\\frac{${1:${VISUAL}}}{$2}$0 +endsnippet + +snippet `((\d+)|(\d*)(\\)?([A-Za-z!]+)((\^|_)(\{\d+\}|\d))*)/` "Fraction no ()" iAm +\frac{``rv = m[1]``}{$1}$0 +endsnippet + +priority 200 +snippet `(?<=\s)(\\mu|\\alpha|\\sigma|\\rho|\\beta|\\gamma|\\delta|\\zeta|\\eta|\\varepsilon|\\theta|\\iota|\\kappa|\\vartheta|\\lambda|\\nu|\\pi|\\rho|\\tau|\\upsilon|\\phi|\\chi|\\psi|\\omega|\\Gamma|\\Delta|\\Theta|\\Lambda|\\Xi|\\Pi|\\Sigma|\\Upsilon|\\Phi|\\Psi|\\Omega|[A-Za-z]{1,2})?(_[A-Za-z0-9]|_\{[^}]+\})?(\^[A-Za-z0-9]|\^\{[^}]+\})?(_[A-Za-z0-9]|_\{[^}]+\})?(\([^)]+\))(_[A-Za-z0-9]|_\{[^}]+\})?(\^[A-Za-z0-9]|\^\{[^}]+\})?(_[A-Za-z0-9]|_\{[^}]+\})?\/` "Fraction with ()" iAm +``rv = "\\frac{" + m.slice(1, m.length).join('') + "}{$1}$2"`` +endsnippet + +# == Hat Operation == + +# ==== Auto Capture Hat Operation ==== +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hbar|BAR)` "Bar" iAm +\overline{``rv = m[1] + m[2] + m[3]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(htd|TD)` "tilde" iAm +\tilde{``rv = m[1]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)bar` "bar" iAm +\bar{``rv = m[1]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hat|HAT)` "hat" iAm +\hat{``rv = m[1]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hvec)` "Vector postfix" iAm +\vec{``rv = m[1]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(rta)` "Vector postfix" iAm +\overrightarrow{``rv = m[1]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(dot)` "dot" iAm +\dot{``rv = m[1]``} +endsnippet + +priority 1000 +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hdd)` "ddot" iAm +\ddot{``rv = m[1]``} +endsnippet + +# ===== Static Hat Operation ==== + +snippet hbar "bar" iAm +\overline{$1}$0 +endsnippet + +snippet hat "hat" iAm +\hat{$1}$0 +endsnippet + +snippet sq "\sqrt{}" iAm +\sqrt{${1}}$0 +endsnippet + +priority 10000 +snippet psq "\sqrt[]{}" iAm +\sqrt[${2}]{${1}} +endsnippet + +# == Superscript Operation == + +snippet invs "inverse" iAm +^{-1} +endsnippet + +snippet dig "digree" iAm +^{\circ} +endsnippet + +priority 10000 +snippet TR "inverse" iAm +^{\mathsf{T}} +endsnippet + +snippet CL "complement" iAm +^{c} +endsnippet + +snippet R+ "R0+" iAm +R_0^+ +endsnippet + +snippet pow "power" iAm +^{${1:n}} +endsnippet + +snippet tp "to the ... power" iAm +^{${1:2}}$0 +endsnippet + +snippet sr "square" iAm +^{2}$0 +endsnippet + +snippet cb "cube" iAm +^{3}$0 +endsnippet + +# == Subscript Operation == + +snippet td "subscript" iAm +_{${1}}$0 +endsnippet + +snippet sb "subscript" iAm +_{${0}} +endsnippet + +snippet `(})(\d)\2` "auto subscript" iAm +`` rv = m[1] + "_" + m[2]`` +endsnippet + +snippet `([A-Za-z])(\d)` "auto subscript" iAm +`` rv = m[1] + "_" + m[2]`` +endsnippet + +priority 100 +snippet `([A-Za-z])_(\d{2})` "auto subscript" iAm +`` rv = m[1] + "_{" + m[2] + "}$0" `` +endsnippet + +priority 100 +snippet `([A-Za-z])S(\d)` "auto subscript" iAm +`` rv = m[1] + "_{" + m[2] + "$1}$2"`` +endsnippet + +snippet `\b(? "${1:_}" + d + "${2:, }").join('');``\cdots${3:${2:, }${1:_}n} +endsnippet + +snippet `(\d\d+),` "0, 1, 2" iAm +``rv = m[1].split('').map((d) => "${1:_}" + d).join("${2:, }");`` +endsnippet + +snippet <> "hokje" iA +\diamond +endsnippet + +# +... -> , \cdots +# - ... -> , \cdots +# add a space if there already is one. +priority 101 +snippet `(?<=[-+])\s*\.\.\.` "smart cdots" imA + \cdots +endsnippet + +# It seems that \ldots is only used when , ..., +# ,... -> , \ldots +# , ... -> , \ldots +priority 101 +snippet `(?<=,)(\s*)\.\.\.` "smart ldots" imA + \ldots +endsnippet + +snippet ** "dot multiply" iAm +\cdot +endsnippet + +snippet +- "pm" iAm +\pm +endsnippet + +snippet -+ "mp" iAm +\mp +endsnippet + +snippet odot "odot" iAm +\odot +endsnippet + +priority 101 +snippet xx "cross" iAm +\times +endsnippet + +snippet eps "epsilon" iAm +\epsilon +endsnippet + +priority 100 +snippet veps "varepsilon" iAm +\varepsilon +endsnippet + +priority 100 +snippet ell "ell" iAm +\ell +endsnippet + +priority 100 +snippet log "log" iAm +\log +endsnippet + +snippet bin "binom" iAm +\binom{$1}{$2} +endsnippet + +snippet oth "otherwise" iAm +\text{otherwise} +endsnippet + +snippet star "star" iAm +^{*} +endsnippet + +snippet `(? "to" iAm +\to +endsnippet + +snippet !> "mapsto" iAm +\mapsto +endsnippet + +snippet => "implies" iAm +\implies +endsnippet + +snippet =< "implied by" iAm +\impliedby +endsnippet + +priority 200 +snippet iff "if and only if" iAm +\iff +endsnippet + +snippet EE "exist" iAm +\exists +endsnippet + +snippet AA "forall" iAm +\forall +endsnippet + +snippet bec "because" iAm +\because +endsnippet + +snippet thr "therefore" iAm +\therefore +endsnippet + + +# ==== Possibility Symbol ==== + +snippet Pr "Pr" iAm +\operatorname{Pr} +endsnippet + +snippet Var "Var" iAm +\operatorname{Var} +endsnippet + +snippet Cov "Cov" iAm +\operatorname{Cov} +endsnippet + +snippet Exp "Expected" iAm +\mathbb{E} +endsnippet + + +# ==== Compare Symbol ==== + +snippet -- "setminus" iAm +\setminus +endsnippet + +snippet >= "greater than" iAm +\ge $0 +endsnippet + +snippet dis "displaystyle" iAm +\displaystyle +endsnippet + +snippet <= "less than" iAm +\le $0 +endsnippet + +snippet != "no equals" iAm +\neq +endsnippet + +snippet == " constan equals" iAm +\equiv +endsnippet + +snippet sim "sim" iAm +\sim +endsnippet + +snippet `\\sim eq` "simeq" iAm +\simeq +endsnippet + +snippet ~~ " Amppro equals" iAm +\approx +endsnippet + +snippet ~= " Amppro equals2" iAm +\cong +endsnippet + +snippet >> ">>" iAm +\gg +endsnippet + + +snippet << "<<" iAm +\ll +endsnippet + + +# == Auto Environment == + +# ==== Auto Math Mode ==== + +snippet mk "inline Math" wA +\(${1}\)$0 +endsnippet + +snippet dm "display Math" w +\[ +${1} +\] +endsnippet + +snippet dmi "display Math" wA +\[$1\]$0 +endsnippet + +snippet eqt "equation" wA +\begin{equation} + ${1} +\end{equation} +endsnippet + +snippet eqs "equation*" wA +\begin{equation*} + ${1} +\end{equation*} +endsnippet + +# ==== Common Environment ==== + +# snippet case "cases" iAm +# \begin{cases} $1, & $2 \\\\ $3, & $4 \end{cases} +# endsnippet + +snippet ali "aligned" iAm +\begin{aligned} +$1 \\\\ +\end{aligned} +endsnippet + +# == Auto Adaptive Close == + +snippet ceil "ceil" iAm +\left\lceil $1 \right\rceil $0 +endsnippet + +snippet floor "floor" iAm +\left\lfloor $1 \right\rfloor$0 +endsnippet + +priority 100 +snippet @) "left( right)" Aim +\left( ${1} \right) $0 +endsnippet + +priority 100 +snippet @| "left| right|" Aim +\left| ${1} \right| $0 +endsnippet + +priority 100 +snippet @\ "left. right|" Aim +\left. ${1} \right|_{${2}}$0 +endsnippet + +priority 100 +snippet @} "left\{ right\}" Aim +\left\\{ ${1} \right\\} $0 +endsnippet + +priority 100 +snippet set "\{ \}" Aim +\\{ ${1} \\}$0 +endsnippet + +priority 100 +snippet @] "left[ right]" Aim +\left[ ${1} \right] $0 +endsnippet + +priority 100 +snippet @> "leftangle rightangle" iAm +\left<${1} \right>$0 +endsnippet + +priority 200 + +# == Snippet == + +# ==== General Snippet ==== + +# ====== Lite Snippet ====== + +snippet tag "tag" iAm +\tag{$1} +endsnippet + +snippet xyb "Auto (x, y)" iAm +(x, y) +endsnippet + +snippet xyzb "Auto (x, y ,z)" iAm +(x, y, z) +endsnippet + +priority 100 +snippet `\b([a-zA-Z])n(\d)` "x[n+1]" iAm +``rv = m[1]``_{${1:n}+``rv = m[2]``}$0 +endsnippet + +# Unkown +snippet rij "mrij" iAm +(${1:x}_${2:n})_{${3:$2} \\in ${4:N}}$0 +endsnippet + +priority 200 +snippet abs "absolute value" iAm +\left\vert ${1} \right\vert $0 +endsnippet + +snippet beg "begin{} / end{}" bA +\\begin{$1} + $0 +\\end{$1} +endsnippet + +# ======== N Series ======== + +priority 100 +snippet comma "comma" iAm +${1:\\alpha}_1,${1:\\alpha}_2,\\cdots,${1:\\alpha}_${2:n} +endsnippet + +priority 100 +snippet plus "plus" iAm +${1:k}_1${2:\\alpha}_1+${1:k}_2${2:\\alpha}_2+\\cdots+${1:k}_${3:n}${2:\\alpha}_${3:n} +endsnippet + +snippet `\b([ijk])=n` "i=1,2,\cdots,n" iAm +``rv = m[1]``=1,2,\cdots,n +endsnippet + +# ======== Common Operator Snippet ======== + +snippet taylor "taylor" iAm +\sum_{${1:k}=${2:0}}^{${3:\infty}} ${4:c_$1} (x-a)^$1 $0 +endsnippet + +snippet `(?= 2) || (b != 1 && !isO && isL)) ? "\\limits" : ""; +let r = (b == 3) ? "E" : (b == 1 && (isL || isO)) ? "C" : "R"; +final += ((b >= 2) || isO || (b == 1 && isL)) ? "_{${1:" + r + "}}" : "_{${1:-\\infty}}^{${2:\\infty}}"; +let x = (b == 2) ? "A" : (b == 3) ? "V" : (b == 1 && isL) ? "s" : "x"; +final += " ${3} \\mathrm{d}${4:" + x + "}$0"; +rv = final; +`` +endsnippet + +# Custom: Can add more defined operator +priority 100 +snippet `(? 0} \\\\ +\end{aligned} +endsnippet + +priority 300 +snippet Argmax "Optimization problem" iAm +\begin{aligned} +\argmax_{${1:\beta}} +&\quad ${2:f(x)} \\\\ +\text{s.t.} +&\quad ${3:g(x) > 0} \\\\ +\end{aligned} +endsnippet + +snippet deff "Definition of function" iAm +$1\colon ${2:\\mathbb{R\}} \to ${3:\\mathbb{R\}}, ${4:x} \mapsto $0 +endsnippet + + +snippet iid "independent and identical distribution" iAm +\overset{\text{i.i.d.}}{\sim} +endsnippet + +snippet defe "define equal" iAm +\overset{\underset{\mathrm{def}}{}}{=} +endsnippet + +snippet deft "define triangleq" iAm +\triangleq +endsnippet + + +# == Matrix == + +# ==== Static Matrix ==== + +snippet pmat "pmat" wm +\begin{pmatrix} + ${1: } +\end{pmatrix} $0 +endsnippet + +snippet bmat "pmat" wm +\begin{bmatrix} + $1 +\end{bmatrix} $0 +endsnippet + +snippet vecC "column vector" iAm +\begin{bmatrix} ${1:x}_1 \\\\ ${1:x}_2 \\\\ \vdots \\\\ ${1:x}_${2:n} \end{bmatrix} +endsnippet + +snippet vecR "row vector" iAm +\begin{bmatrix} ${1:x}_1, ${1:x}_2, \cdots, ${1:x}_${2:n} \end{bmatrix}$0 +endsnippet + +priority 300 +snippet omis "omission" iAm +\\begin{bmatrix}${1:1}&${2:1}&\\cdots&${4:1}\\\\${5:1}&${6:1}&\\cdots&${8:1}\\\\\\vdots&\\vdots&\\ddots&\\vdots\\\\${13:1}&${14:1}&\\cdots&${16:1}\\end{bmatrix} +endsnippet + +priority 300 +snippet submat "omission" iAm +\\begin{bmatrix} + ${1:a}_{11} & ${1:a}_{12} & \\cdots & ${1:a}_{1n} \\\\ + ${1:a}_{21} & ${1:a}_{22} & \\cdots & ${1:a}_{2n} \\\\ + \\vdots & \\vdots & \\ddots & \\vdots \\\\ + ${1:a}_{n1} & ${1:a}_{n2} & \\cdots & ${1:a}_{nn} +\\end{bmatrix} +endsnippet + +priority 300 +snippet subplusmat "omission" iAm +\\begin{bmatrix} + ${1:a}_{11}+${2:b}_{11} & ${1:a}_{12}+${2:b}_{12} & \\cdots & ${1:a}_{1n}+${2:b}_{1n} \\\\ + ${1:a}_{21}+${2:b}_{21} & ${1:a}_{22}+${2:b}_{22} & \\cdots & ${1:a}_{2n}+${2:b}_{2n} \\\\ + \\vdots & \\vdots & \\ddots & \\vdots \\\\ + ${1:a}_{n1}+${2:b}_{n1} & ${1:a}_{n2}+${2:b}_{n2} & \\cdots & ${1:a}_{nn}+${2:b}_{nn} +\\end{bmatrix} +endsnippet + +snippet jacobi "jacobi" iAm +\\begin{bmatrix}\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_${3:n}}\\\\\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_${3:n}}\\\\\\vdots&\\vdots&\\ddots&\\vdots\\\\\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_${3:n}}\\end{bmatrix} +endsnippet + +# ==== Dynamic Matrix ==== + +priority 300 +snippet `(b|p|v)mata([1-9])` "bmatrix" iiAm +\\begin{``rv = m[1]``matrix}`` + let len = m[2]; + let results = ""; + for (var i=0; i 1 ){ - results += "${" +(order ).toString() + ":" + t[order-2] + "}\t & "; - } - else{ - results += "$" +(order ).toString() + " & "; - } - order ++; - } - results += "$"+(order).toString() +" \\\\" + "\\ "; - order ++; - } - return results; -} - -// 输出一个表格 -function createTable(rows, cols) { - let ret = ""; - let order = 1; - for (let i = 0; i < parseInt(rows) + 2; i++) { - for (let j = 0; j < parseInt(cols); j++) { - if (i === 1) { - ret += "|---"; - } else { - ret += "| $" + (order).toString() + " "; - order++; - } - } - ret += "|\n" - } - return ret; -} - -endglobal - - -# == Fraction Match == - -snippet // "Fraction" iAm -\\frac{${1:${VISUAL}}}{$2}$0 -endsnippet - -snippet `((\d+)|(\d*)(\\)?([A-Za-z!]+)((\^|_)(\{\d+\}|\d))*)/` "Fraction no ()" iAm -\frac{``rv = m[1]``}{$1}$0 -endsnippet - -priority 200 -snippet `(?<=\s)(\\mu|\\alpha|\\sigma|\\rho|\\beta|\\gamma|\\delta|\\zeta|\\eta|\\varepsilon|\\theta|\\iota|\\kappa|\\vartheta|\\lambda|\\nu|\\pi|\\rho|\\tau|\\upsilon|\\phi|\\chi|\\psi|\\omega|\\Gamma|\\Delta|\\Theta|\\Lambda|\\Xi|\\Pi|\\Sigma|\\Upsilon|\\Phi|\\Psi|\\Omega|[A-Za-z]{1,2})?(_[A-Za-z0-9]|_\{[^}]+\})?(\^[A-Za-z0-9]|\^\{[^}]+\})?(_[A-Za-z0-9]|_\{[^}]+\})?(\([^)]+\))(_[A-Za-z0-9]|_\{[^}]+\})?(\^[A-Za-z0-9]|\^\{[^}]+\})?(_[A-Za-z0-9]|_\{[^}]+\})?\/` "Fraction with ()" iAm -``rv = "\\frac{" + m.slice(1, m.length).join('') + "}{$1}$2"`` -endsnippet - -# == Hat Operation == - -# ==== Auto Capture Hat Operation ==== -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hbar|BAR)` "Bar" iAm -\overline{``rv = m[1] + m[2] + m[3]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(htd|TD)` "tilde" iAm -\tilde{``rv = m[1]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)bar` "bar" iAm -\bar{``rv = m[1]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hat|HAT)` "hat" iAm -\hat{``rv = m[1]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hvec)` "Vector postfix" iAm -\vec{``rv = m[1]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(rta)` "Vector postfix" iAm -\overrightarrow{``rv = m[1]``} -endsnippet - -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(dot)` "dot" iAm -\dot{``rv = m[1]``} -endsnippet - -priority 1000 -snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hdd)` "ddot" iAm -\ddot{``rv = m[1]``} -endsnippet - -# ===== Static Hat Operation ==== - -snippet hbar "bar" iAm -\overline{$1}$0 -endsnippet - -snippet hat "hat" iAm -\hat{$1}$0 -endsnippet - -snippet hsq "\sqrt{}" iAm -\sqrt{${1}}$0 -endsnippet - -# == Superscript Operation == - -snippet invs "inverse" iAm -^{-1} -endsnippet - -snippet dig "digree" iAm -^{\circ} -endsnippet - -priority 10000 -snippet TR "inverse" iAm -^{\mathsf{T}} -endsnippet - -snippet CL "complement" iAm -\complement -endsnippet - -snippet R+ "R0+" iAm -R_0^+ -endsnippet - -snippet pow "power" iAm -^{${1:2}}$0 -endsnippet - -snippet tp "to the ... power" iAm -^{${1:2}}$0 -endsnippet - -snippet sr "square" iAm -^{2}$0 -endsnippet - -# == Subscript Operation == - -snippet td "subscript" iAm -_{${1}}$0 -endsnippet - -snippet sb "subscript" iAm -_{${1:2}}$0 -endsnippet - -snippet `(})(\d)\2` "auto subscript" iAm -`` rv = m[1] + "_" + m[2]`` -endsnippet - -snippet `([A-Za-z])(\d)` "auto subscript" iAm -`` rv = m[1] + "_" + m[2]`` -endsnippet - -priority 100 -snippet `([A-Za-z])_(\d{2})` "auto subscript" iAm -`` rv = m[1] + "_{" + m[2] + "}$0" `` -endsnippet - -priority 100 -snippet `([A-Za-z])S(\d)` "auto subscript" iAm -`` rv = m[1] + "_{" + m[2] + "$1}$2"`` -endsnippet - -snippet `\b(? "${1:_}" + d + "${2:, }").join('');``\cdots${3:${2:, }${1:_}n} -endsnippet - -snippet `(\d\d+),` "0, 1, 2" iAm -``rv = m[1].split('').map((d) => "${1:_}" + d).join("${2:, }");`` -endsnippet - -snippet <> "hokje" imA -\diamond -endsnippet - -# +... -> , \cdots -# - ... -> , \cdots -# add a space if there already is one. -priority 101 -snippet `(?<=[-+])\s*\.\.\.` "smart cdots" imA - \cdots -endsnippet - -# It seems that \ldots is only used when , ..., -# ,... -> , \ldots -# , ... -> , \ldots -priority 101 -snippet `(?<=,)(\s*)\.\.\.` "smart ldots" imA - \ldots -endsnippet - -snippet ** "dot multiply" iAm -\cdot -endsnippet - -snippet +- "pm" iAm -\pm -endsnippet - -snippet -+ "mp" iAm -\mp -endsnippet - -snippet odot "odot" iAm -\odot -endsnippet - -priority 101 -snippet xx "cross" iAm -\times -endsnippet - -snippet eps "epsilon" iAm -\epsilon -endsnippet - -priority 100 -snippet veps "varepsilon" iAm -\varepsilon -endsnippet - -priority 100 -snippet ell "ell" iAm -\ell -endsnippet - -priority 100 -snippet log "log" iAm -\log -endsnippet - -snippet bin "binom" iAm -\binom{$1}{$2} -endsnippet - -snippet oth "otherwise" iAm -\text{otherwise} -endsnippet - -snippet star "star" iAm -\star -endsnippet - -priority 100 -snippet pstar "star" iAm -^{*}$1 -endsnippet - -priority 100 -snippet `(? "to" iAm -\to -endsnippet - -snippet !> "mapsto" iAm -\mapsto -endsnippet - -snippet => "implies" iAm -\implies -endsnippet - -snippet =< "implied by" iAm -\impliedby -endsnippet - -priority 200 -snippet iff "if and only if" iAm -\iff -endsnippet - -snippet EE "exist" iAm -\exists -endsnippet - -snippet AA "forall" iAm -\forall -endsnippet - -snippet bec "because" iAm -\because -endsnippet - -snippet thr "therefore" iAm -\therefore -endsnippet - - -# ==== Possibility Symbol ==== - -snippet Pr "Pr" iAm -\operatorname{Pr} -endsnippet - -snippet Var "Var" iAm -\operatorname{Var} -endsnippet - -snippet Cov "Cov" iAm -\operatorname{Cov} -endsnippet - -snippet Exp "Expected" iAm -\mathbb{E} -endsnippet - - -# ==== Compare Symbol ==== - -snippet -- "setminus" iAm -\setminus -endsnippet - -snippet >= "greater than" iAm -\ge $0 -endsnippet - -snippet dis "displaystyle" iAm -\displaystyle -endsnippet - -snippet <= "less than" iAm -\le $0 -endsnippet - -snippet != "no equals" iAm -\neq -endsnippet - -snippet == " constan equals" iAm -\equiv -endsnippet - -snippet sim "sim" iAm -\sim -endsnippet - -snippet `\\sim eq` "simeq" iAm -\simeq -endsnippet - -snippet ~~ " Amppro equals" iAm -\approx -endsnippet - -snippet ~= " Amppro equals2" iAm -\cong -endsnippet - -snippet >> ">>" iAm -\gg -endsnippet - - -snippet << "<<" iAm -\ll -endsnippet - - -# == Auto Environment == - -# ==== Auto Math Mode ==== - -snippet mk "inline Math" wA -$${1}$$0 -endsnippet - -snippet dm "display Math" wA -$$ -${1} -$$$0 -endsnippet - -snippet eqt "equation" wA -\begin{equation} - ${1} -\end{equation} -endsnippet - -snippet eqs "equation*" wA -\begin{equation*} - ${1} -\end{equation*} -endsnippet - -# ==== Common Environment ==== - -snippet case "cases" iAm -\begin{cases} $1, & $2 \\\\ $3, & $4 \end{cases} -endsnippet - -snippet ali "aligned" iAm -\begin{aligned} -$1 \\\\ -\end{aligned} -endsnippet - -# == Auto Adaptive Close == - -snippet ceil "ceil" iAm -\left\lceil $1 \right\rceil $0 -endsnippet - -snippet floor "floor" iAm -\left\lfloor $1 \right\rfloor$0 -endsnippet - -priority 100 -snippet @) "left( right)" Aim -\left( ${1} \right) $0 -endsnippet - -priority 100 -snippet @| "left| right|" Aim -\left| ${1} \right| $0 -endsnippet - -priority 100 -snippet @\ "left. right|" Aim -\left. ${1} \right|_{${2}}$0 -endsnippet - -priority 100 -snippet @} "left\{ right\}" Aim -\left\\{ ${1} \right\\} $0 -endsnippet - -priority 100 -snippet set "\{ \}" Aim -\\{ ${1} \\}$0 -endsnippet - -priority 100 -snippet @] "left[ right]" Aim -\left[ ${1} \right] $0 -endsnippet - -priority 100 -snippet @> "leftangle rightangle" iAm -\left<${1} \right>$0 -endsnippet - -priority 200 -snippet norm iAm -\left\| ${1} \right\|$2 -endsnippet - -# == Snippet == - -# ==== General Snippet ==== - -# ====== Lite Snippet ====== - -snippet tag "tag" iAm -\tag{$1} -endsnippet - -snippet xyb "Auto (x, y)" iAm -(x, y) -endsnippet - -snippet xyzb "Auto (x, y ,z)" iAm -(x, y, z) -endsnippet - -priority 100 -snippet `\b([a-zA-Z])n(\d)` "x[n+1]" iAm -``rv = m[1]``_{${1:n}+``rv = m[2]``}$0 -endsnippet - -# Unkown -snippet rij "mrij" iAm -(${1:x}_${2:n})_{${3:$2} \\in ${4:N}}$0 -endsnippet - -priority 200 -snippet abs "absolute value" iAm -\left\vert ${1} \right\vert $0 -endsnippet - -snippet beg "begin{} / end{}" bA -\\begin{$1} - $0 -\\end{$1} -endsnippet - -# ======== N Series ======== - -priority 100 -snippet comma "comma" iAm -${1:\\alpha}_1,${1:\\alpha}_2,\\cdots,${1:\\alpha}_${2:n} -endsnippet - -priority 100 -snippet plus "plus" iAm -${1:k}_1${2:\\alpha}_1+${1:k}_2${2:\\alpha}_2+\\cdots+${1:k}_${3:n}${2:\\alpha}_${3:n} -endsnippet - -snippet `\b([ijk])=n` "i=1,2,\cdots,n" iAm -``rv = m[1]``=1,2,\cdots,n -endsnippet - -# ======== Common Operator Snippet ======== - -snippet taylor "taylor" iAm -\sum_{${1:k}=${2:0}}^{${3:\infty}} ${4:c_$1} (x-a)^$1 $0 -endsnippet - -snippet `(?= 2) || (b != 1 && !isO && isL)) ? "\\limits" : ""; -let r = (b == 3) ? "E" : (b == 1 && (isL || isO)) ? "C" : "R"; -final += ((b >= 2) || isO || (b == 1 && isL)) ? "_{${1:" + r + "}}" : "_{${1:-\\infty}}^{${2:\\infty}}"; -let x = (b == 2) ? "A" : (b == 3) ? "V" : (b == 1 && isL) ? "s" : "x"; -final += " ${3} \\mathrm{d}${4:" + x + "}$0"; -rv = final; -`` -endsnippet - -# Custom: Can add more defined operator -priority 100 -snippet `(? 0} \\\\ -\end{aligned} -endsnippet - -priority 300 -snippet Argmax "Optimization problem" iAm -\begin{aligned} -\argmax_{${1:\beta}} -&\quad ${2:f(x)} \\\\ -\text{s.t.} -&\quad ${3:g(x) > 0} \\\\ -\end{aligned} -endsnippet - -snippet deff "Definition of function" iAm -$1\colon ${2:\\mathbb{R\}} \to ${3:\\mathbb{R\}}, ${4:x} \mapsto $0 -endsnippet - - -snippet iid "independent and identical distribution" iAm -\overset{\text{i.i.d.}}{\sim} -endsnippet - -snippet defe "define equal" iAm -\overset{\underset{\mathrm{def}}{}}{=} -endsnippet - -snippet deft "define triangleq" iAm -\triangleq -endsnippet - - -# == Matrix == - -# ==== Static Matrix ==== - -snippet pmat "pmat" wm -\begin{pmatrix} - ${1: } -\end{pmatrix} $0 -endsnippet - -snippet bmat "pmat" wm -\begin{bmatrix} - $1 -\end{bmatrix} $0 -endsnippet - -snippet vecC "column vector" iAm -\begin{bmatrix} ${1:x}_1 \\\\ ${1:x}_2 \\\\ \vdots \\\\ ${1:x}_${2:n} \end{bmatrix} -endsnippet - -snippet vecR "row vector" iAm -\begin{bmatrix} ${1:x}_1, ${1:x}_2, \cdots, ${1:x}_${2:n} \end{bmatrix}$0 -endsnippet - -priority 300 -snippet omis "omission" iAm -\\begin{bmatrix}${1:1}&${2:1}&\\cdots&${4:1}\\\\${5:1}&${6:1}&\\cdots&${8:1}\\\\\\vdots&\\vdots&\\ddots&\\vdots\\\\${13:1}&${14:1}&\\cdots&${16:1}\\end{bmatrix} -endsnippet - -priority 300 -snippet submat "omission" iAm -\\begin{bmatrix} - ${1:a}_{11} & ${1:a}_{12} & \\cdots & ${1:a}_{1n} \\\\ - ${1:a}_{21} & ${1:a}_{22} & \\cdots & ${1:a}_{2n} \\\\ - \\vdots & \\vdots & \\ddots & \\vdots \\\\ - ${1:a}_{n1} & ${1:a}_{n2} & \\cdots & ${1:a}_{nn} -\\end{bmatrix} -endsnippet - -priority 300 -snippet subplusmat "omission" iAm -\\begin{bmatrix} - ${1:a}_{11}+${2:b}_{11} & ${1:a}_{12}+${2:b}_{12} & \\cdots & ${1:a}_{1n}+${2:b}_{1n} \\\\ - ${1:a}_{21}+${2:b}_{21} & ${1:a}_{22}+${2:b}_{22} & \\cdots & ${1:a}_{2n}+${2:b}_{2n} \\\\ - \\vdots & \\vdots & \\ddots & \\vdots \\\\ - ${1:a}_{n1}+${2:b}_{n1} & ${1:a}_{n2}+${2:b}_{n2} & \\cdots & ${1:a}_{nn}+${2:b}_{nn} -\\end{bmatrix} -endsnippet - -snippet jacobi "jacobi" iAm -\\begin{bmatrix}\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_${3:n}}\\\\\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_${3:n}}\\\\\\vdots&\\vdots&\\ddots&\\vdots\\\\\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_${3:n}}\\end{bmatrix} -endsnippet - -# ==== Dynamic Matrix ==== - -priority 300 -snippet `(b|p|v)mata([1-9])` "bmatrix" iiAm -\\begin{``rv = m[1]``matrix}`` - let len = m[2]; - let results = ""; - for (var i=0; i 1 ){ + results += "${" +(order ).toString() + ":" + t[order-2] + "}\t & "; + } + else{ + results += "$" +(order ).toString() + " & "; + } + order ++; + } + results += "$"+(order).toString() +" \\\\" + "\\ "; + order ++; + } + return results; +} + +// 输出一个表格 +function createTable(rows, cols) { + let ret = ""; + let order = 1; + for (let i = 0; i < parseInt(rows) + 2; i++) { + for (let j = 0; j < parseInt(cols); j++) { + if (i === 1) { + ret += "|---"; + } else { + ret += "| $" + (order).toString() + " "; + order++; + } + } + ret += "|\n" + } + return ret; +} + +endglobal + + +# == Fraction Match == + +snippet // "Fraction" iAm +\\frac{${1:${VISUAL}}}{$2}$0 +endsnippet + +snippet `((\d+)|(\d*)(\\)?([A-Za-z!]+)((\^|_)(\{\d+\}|\d))*)/` "Fraction no ()" iAm +\frac{``rv = m[1]``}{$1}$0 +endsnippet + +priority 200 +snippet `(?<=\s)(\\mu|\\alpha|\\sigma|\\rho|\\beta|\\gamma|\\delta|\\zeta|\\eta|\\varepsilon|\\theta|\\iota|\\kappa|\\vartheta|\\lambda|\\nu|\\pi|\\rho|\\tau|\\upsilon|\\phi|\\chi|\\psi|\\omega|\\Gamma|\\Delta|\\Theta|\\Lambda|\\Xi|\\Pi|\\Sigma|\\Upsilon|\\Phi|\\Psi|\\Omega|[A-Za-z]{1,2})?(_[A-Za-z0-9]|_\{[^}]+\})?(\^[A-Za-z0-9]|\^\{[^}]+\})?(_[A-Za-z0-9]|_\{[^}]+\})?(\([^)]+\))(_[A-Za-z0-9]|_\{[^}]+\})?(\^[A-Za-z0-9]|\^\{[^}]+\})?(_[A-Za-z0-9]|_\{[^}]+\})?\/` "Fraction with ()" iAm +``rv = "\\frac{" + m.slice(1, m.length).join('') + "}{$1}$2"`` +endsnippet + +# == Hat Operation == + +# ==== Auto Capture Hat Operation ==== +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hbar|BAR)` "Bar" iAm +\overline{``rv = m[1] + m[2] + m[3]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(htd|TD)` "tilde" iAm +\tilde{``rv = m[1]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)bar` "bar" iAm +\bar{``rv = m[1]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hat|HAT)` "hat" iAm +\hat{``rv = m[1]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hvec)` "Vector postfix" iAm +\vec{``rv = m[1]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(rta)` "Vector postfix" iAm +\overrightarrow{``rv = m[1]``} +endsnippet + +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(dot)` "dot" iAm +\dot{``rv = m[1]``} +endsnippet + +priority 1000 +snippet `(\\?[a-zA-Z]\w*({?\w*})?)(hdd)` "ddot" iAm +\ddot{``rv = m[1]``} +endsnippet + +# ===== Static Hat Operation ==== + +snippet hbar "bar" iAm +\overline{$1}$0 +endsnippet + +snippet hat "hat" iAm +\hat{$1}$0 +endsnippet + +snippet hsq "\sqrt{}" iAm +\sqrt{${1}}$0 +endsnippet + +# == Superscript Operation == + +snippet invs "inverse" iAm +^{-1} +endsnippet + +snippet dig "digree" iAm +^{\circ} +endsnippet + +priority 10000 +snippet TR "inverse" iAm +^{\mathsf{T}} +endsnippet + +snippet CL "complement" iAm +\complement +endsnippet + +snippet R+ "R0+" iAm +R_0^+ +endsnippet + +snippet pow "power" iAm +^{${1:2}}$0 +endsnippet + +snippet tp "to the ... power" iAm +^{${1:2}}$0 +endsnippet + +snippet sr "square" iAm +^{2}$0 +endsnippet + +# == Subscript Operation == + +snippet td "subscript" iAm +_{${1}}$0 +endsnippet + +snippet sb "subscript" iAm +_{${1:2}}$0 +endsnippet + +snippet `(})(\d)\2` "auto subscript" iAm +`` rv = m[1] + "_" + m[2]`` +endsnippet + +snippet `([A-Za-z])(\d)` "auto subscript" iAm +`` rv = m[1] + "_" + m[2]`` +endsnippet + +priority 100 +snippet `([A-Za-z])_(\d{2})` "auto subscript" iAm +`` rv = m[1] + "_{" + m[2] + "}$0" `` +endsnippet + +priority 100 +snippet `([A-Za-z])S(\d)` "auto subscript" iAm +`` rv = m[1] + "_{" + m[2] + "$1}$2"`` +endsnippet + +snippet `\b(? "${1:_}" + d + "${2:, }").join('');``\cdots${3:${2:, }${1:_}n} +endsnippet + +snippet `(\d\d+),` "0, 1, 2" iAm +``rv = m[1].split('').map((d) => "${1:_}" + d).join("${2:, }");`` +endsnippet + +snippet <> "hokje" imA +\diamond +endsnippet + +# +... -> , \cdots +# - ... -> , \cdots +# add a space if there already is one. +priority 101 +snippet `(?<=[-+])\s*\.\.\.` "smart cdots" imA + \cdots +endsnippet + +# It seems that \ldots is only used when , ..., +# ,... -> , \ldots +# , ... -> , \ldots +priority 101 +snippet `(?<=,)(\s*)\.\.\.` "smart ldots" imA + \ldots +endsnippet + +snippet ** "dot multiply" iAm +\cdot +endsnippet + +snippet +- "pm" iAm +\pm +endsnippet + +snippet -+ "mp" iAm +\mp +endsnippet + +snippet odot "odot" iAm +\odot +endsnippet + +priority 101 +snippet xx "cross" iAm +\times +endsnippet + +snippet eps "epsilon" iAm +\epsilon +endsnippet + +priority 100 +snippet veps "varepsilon" iAm +\varepsilon +endsnippet + +priority 100 +snippet ell "ell" iAm +\ell +endsnippet + +priority 100 +snippet log "log" iAm +\log +endsnippet + +snippet bin "binom" iAm +\binom{$1}{$2} +endsnippet + +snippet oth "otherwise" iAm +\text{otherwise} +endsnippet + +snippet star "star" iAm +\star +endsnippet + +priority 100 +snippet pstar "star" iAm +^{*}$1 +endsnippet + +priority 100 +snippet `(? "to" iAm +\to +endsnippet + +snippet !> "mapsto" iAm +\mapsto +endsnippet + +snippet => "implies" iAm +\implies +endsnippet + +snippet =< "implied by" iAm +\impliedby +endsnippet + +priority 200 +snippet iff "if and only if" iAm +\iff +endsnippet + +snippet EE "exist" iAm +\exists +endsnippet + +snippet AA "forall" iAm +\forall +endsnippet + +snippet bec "because" iAm +\because +endsnippet + +snippet thr "therefore" iAm +\therefore +endsnippet + + +# ==== Possibility Symbol ==== + +snippet Pr "Pr" iAm +\operatorname{Pr} +endsnippet + +snippet Var "Var" iAm +\operatorname{Var} +endsnippet + +snippet Cov "Cov" iAm +\operatorname{Cov} +endsnippet + +snippet Exp "Expected" iAm +\mathbb{E} +endsnippet + + +# ==== Compare Symbol ==== + +snippet -- "setminus" iAm +\setminus +endsnippet + +snippet >= "greater than" iAm +\ge $0 +endsnippet + +snippet dis "displaystyle" iAm +\displaystyle +endsnippet + +snippet <= "less than" iAm +\le $0 +endsnippet + +snippet != "no equals" iAm +\neq +endsnippet + +snippet == " constan equals" iAm +\equiv +endsnippet + +snippet sim "sim" iAm +\sim +endsnippet + +snippet `\\sim eq` "simeq" iAm +\simeq +endsnippet + +snippet ~~ " Amppro equals" iAm +\approx +endsnippet + +snippet ~= " Amppro equals2" iAm +\cong +endsnippet + +snippet >> ">>" iAm +\gg +endsnippet + + +snippet << "<<" iAm +\ll +endsnippet + + +# == Auto Environment == + +# ==== Auto Math Mode ==== + +snippet mk "inline Math" wA +$${1}$$0 +endsnippet + +snippet dm "display Math" wA +$$ +${1} +$$$0 +endsnippet + +snippet eqt "equation" wA +\begin{equation} + ${1} +\end{equation} +endsnippet + +snippet eqs "equation*" wA +\begin{equation*} + ${1} +\end{equation*} +endsnippet + +# ==== Common Environment ==== + +snippet case "cases" iAm +\begin{cases} $1, & $2 \\\\ $3, & $4 \end{cases} +endsnippet + +snippet ali "aligned" iAm +\begin{aligned} +$1 \\\\ +\end{aligned} +endsnippet + +# == Auto Adaptive Close == + +snippet ceil "ceil" iAm +\left\lceil $1 \right\rceil $0 +endsnippet + +snippet floor "floor" iAm +\left\lfloor $1 \right\rfloor$0 +endsnippet + +priority 100 +snippet @) "left( right)" Aim +\left( ${1} \right) $0 +endsnippet + +priority 100 +snippet @| "left| right|" Aim +\left| ${1} \right| $0 +endsnippet + +priority 100 +snippet @\ "left. right|" Aim +\left. ${1} \right|_{${2}}$0 +endsnippet + +priority 100 +snippet @} "left\{ right\}" Aim +\left\\{ ${1} \right\\} $0 +endsnippet + +priority 100 +snippet set "\{ \}" Aim +\\{ ${1} \\}$0 +endsnippet + +priority 100 +snippet @] "left[ right]" Aim +\left[ ${1} \right] $0 +endsnippet + +priority 100 +snippet @> "leftangle rightangle" iAm +\left<${1} \right>$0 +endsnippet + +priority 200 +snippet norm iAm +\left\| ${1} \right\|$2 +endsnippet + +# == Snippet == + +# ==== General Snippet ==== + +# ====== Lite Snippet ====== + +snippet tag "tag" iAm +\tag{$1} +endsnippet + +snippet xyb "Auto (x, y)" iAm +(x, y) +endsnippet + +snippet xyzb "Auto (x, y ,z)" iAm +(x, y, z) +endsnippet + +priority 100 +snippet `\b([a-zA-Z])n(\d)` "x[n+1]" iAm +``rv = m[1]``_{${1:n}+``rv = m[2]``}$0 +endsnippet + +# Unkown +snippet rij "mrij" iAm +(${1:x}_${2:n})_{${3:$2} \\in ${4:N}}$0 +endsnippet + +priority 200 +snippet abs "absolute value" iAm +\left\vert ${1} \right\vert $0 +endsnippet + +snippet beg "begin{} / end{}" bA +\\begin{$1} + $0 +\\end{$1} +endsnippet + +# ======== N Series ======== + +priority 100 +snippet comma "comma" iAm +${1:\\alpha}_1,${1:\\alpha}_2,\\cdots,${1:\\alpha}_${2:n} +endsnippet + +priority 100 +snippet plus "plus" iAm +${1:k}_1${2:\\alpha}_1+${1:k}_2${2:\\alpha}_2+\\cdots+${1:k}_${3:n}${2:\\alpha}_${3:n} +endsnippet + +snippet `\b([ijk])=n` "i=1,2,\cdots,n" iAm +``rv = m[1]``=1,2,\cdots,n +endsnippet + +# ======== Common Operator Snippet ======== + +snippet taylor "taylor" iAm +\sum_{${1:k}=${2:0}}^{${3:\infty}} ${4:c_$1} (x-a)^$1 $0 +endsnippet + +snippet `(?= 2) || (b != 1 && !isO && isL)) ? "\\limits" : ""; +let r = (b == 3) ? "E" : (b == 1 && (isL || isO)) ? "C" : "R"; +final += ((b >= 2) || isO || (b == 1 && isL)) ? "_{${1:" + r + "}}" : "_{${1:-\\infty}}^{${2:\\infty}}"; +let x = (b == 2) ? "A" : (b == 3) ? "V" : (b == 1 && isL) ? "s" : "x"; +final += " ${3} \\mathrm{d}${4:" + x + "}$0"; +rv = final; +`` +endsnippet + +# Custom: Can add more defined operator +priority 100 +snippet `(? 0} \\\\ +\end{aligned} +endsnippet + +priority 300 +snippet Argmax "Optimization problem" iAm +\begin{aligned} +\argmax_{${1:\beta}} +&\quad ${2:f(x)} \\\\ +\text{s.t.} +&\quad ${3:g(x) > 0} \\\\ +\end{aligned} +endsnippet + +snippet deff "Definition of function" iAm +$1\colon ${2:\\mathbb{R\}} \to ${3:\\mathbb{R\}}, ${4:x} \mapsto $0 +endsnippet + + +snippet iid "independent and identical distribution" iAm +\overset{\text{i.i.d.}}{\sim} +endsnippet + +snippet defe "define equal" iAm +\overset{\underset{\mathrm{def}}{}}{=} +endsnippet + +snippet deft "define triangleq" iAm +\triangleq +endsnippet + + +# == Matrix == + +# ==== Static Matrix ==== + +snippet pmat "pmat" wm +\begin{pmatrix} + ${1: } +\end{pmatrix} $0 +endsnippet + +snippet bmat "pmat" wm +\begin{bmatrix} + $1 +\end{bmatrix} $0 +endsnippet + +snippet vecC "column vector" iAm +\begin{bmatrix} ${1:x}_1 \\\\ ${1:x}_2 \\\\ \vdots \\\\ ${1:x}_${2:n} \end{bmatrix} +endsnippet + +snippet vecR "row vector" iAm +\begin{bmatrix} ${1:x}_1, ${1:x}_2, \cdots, ${1:x}_${2:n} \end{bmatrix}$0 +endsnippet + +priority 300 +snippet omis "omission" iAm +\\begin{bmatrix}${1:1}&${2:1}&\\cdots&${4:1}\\\\${5:1}&${6:1}&\\cdots&${8:1}\\\\\\vdots&\\vdots&\\ddots&\\vdots\\\\${13:1}&${14:1}&\\cdots&${16:1}\\end{bmatrix} +endsnippet + +priority 300 +snippet submat "omission" iAm +\\begin{bmatrix} + ${1:a}_{11} & ${1:a}_{12} & \\cdots & ${1:a}_{1n} \\\\ + ${1:a}_{21} & ${1:a}_{22} & \\cdots & ${1:a}_{2n} \\\\ + \\vdots & \\vdots & \\ddots & \\vdots \\\\ + ${1:a}_{n1} & ${1:a}_{n2} & \\cdots & ${1:a}_{nn} +\\end{bmatrix} +endsnippet + +priority 300 +snippet subplusmat "omission" iAm +\\begin{bmatrix} + ${1:a}_{11}+${2:b}_{11} & ${1:a}_{12}+${2:b}_{12} & \\cdots & ${1:a}_{1n}+${2:b}_{1n} \\\\ + ${1:a}_{21}+${2:b}_{21} & ${1:a}_{22}+${2:b}_{22} & \\cdots & ${1:a}_{2n}+${2:b}_{2n} \\\\ + \\vdots & \\vdots & \\ddots & \\vdots \\\\ + ${1:a}_{n1}+${2:b}_{n1} & ${1:a}_{n2}+${2:b}_{n2} & \\cdots & ${1:a}_{nn}+${2:b}_{nn} +\\end{bmatrix} +endsnippet + +snippet jacobi "jacobi" iAm +\\begin{bmatrix}\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_1}{\\partial ${2:x}_${3:n}}\\\\\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_2}{\\partial ${2:x}_${3:n}}\\\\\\vdots&\\vdots&\\ddots&\\vdots\\\\\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_1}&\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_2}&\\cdots&\\frac{\\partial ${1:f}_${3:m}}{\\partial ${2:x}_${3:n}}\\end{bmatrix} +endsnippet + +# ==== Dynamic Matrix ==== + +priority 300 +snippet `(b|p|v)mata([1-9])` "bmatrix" iiAm +\\begin{``rv = m[1]``matrix}`` + let len = m[2]; + let results = ""; + for (var i=0; i ${2:oo}) -endsnippet - -snippet derive "derive" iAm -derive(${1:f}, ${2:x}) -endsnippet - -snippet part "partial" iAm -(diff ${1:f})/(diff ${3:x}) -endsnippet - -snippet sb "subscript" iAm -_(${1:2}) -endsnippet - -snippet sr "square" iAm -^2 -endsnippet - -snippet pow "to the ... power" iAm -^(${1:3}) -endsnippet - -snippet veps "epsilon.alt" iAm -epsilon.alt -endsnippet - -snippet ;; "\;" iAm -\; -endsnippet - -snippet ,, "\," iAm -\, -endsnippet - -snippet `([A-Za-z\)])(\d)` "auto subscript" iAm -`` rv = m[1] + "_" + m[2]`` -endsnippet - -snippet `([A-Za-z\)])_(\d{2})` "auto subscript" iAm -`` rv = m[1] + "_(" + m[2] + ")" `` -endsnippet - -snippet `(? ${2:oo}) +endsnippet + +snippet derive "derive" iAm +derive(${1:f}, ${2:x}) +endsnippet + +snippet part "partial" iAm +(diff ${1:f})/(diff ${3:x}) +endsnippet + +snippet sb "subscript" iAm +_(${1:2}) +endsnippet + +snippet sr "square" iAm +^2 +endsnippet + +snippet pow "to the ... power" iAm +^(${1:3}) +endsnippet + +snippet veps "epsilon.alt" iAm +epsilon.alt +endsnippet + +snippet ;; "\;" iAm +\; +endsnippet + +snippet ,, "\," iAm +\, +endsnippet + +snippet `([A-Za-z\)])(\d)` "auto subscript" iAm +`` rv = m[1] + "_" + m[2]`` +endsnippet + +snippet `([A-Za-z\)])_(\d{2})` "auto subscript" iAm +`` rv = m[1] + "_(" + m[2] + ")" `` +endsnippet + +snippet `(? -noremap vspacecode.space - - -" Switch between tabs -nnoremap H :bprevious -nnoremap L :bnext -vnoremap H ^ -xnoremap H ^ -onoremap H ^ -vnoremap L $ -xnoremap L $ -onoremap L $ - - -noremap J 5j -noremap K 5k - -" Similar position to i -" The `noremap` implements text-object-like behavior in VSCodeVim - -" Y to yank to end of line -noremap Y y$ - -nnoremap removeSecondaryCursors - - -" lsp -noremap gi editor.action.goToImplementation -noremap gpi editor.action.peekImplementation -noremap gd editor.action.goToDefinition -noremap gpd editor.action.peekDefinition -noremap gt editor.action.goToTypeDefinition -noremap gpt editor.action.peekTypeDefinition -noremap gh editor.action.showDefinitionPreviewHover -noremap gr editor.action.goToReferences -noremap gpr editor.action.referenceSearch.trigger -noremap ga editor.action.quickFix - -" Rename, or [c]hange [d]efinition -nnoremap cd editor.action.rename - -" Requires matchit by redguardtoo -" nnoremap % extension.matchitJumpItems - -noremap zR editor.foldAll - -" keep selection after indent -vnoremap < editor.action.outdentLines -vnoremap > editor.action.indentLines - -nnoremap [g editor.action.editor.previousChange -nnoremap ]g editor.action.editor.nextChange - -" 分词版本的w和b,支持中文,需要插件 -" 为了保证递归解析,而不是打断,使用 `nmap` 而不是 `nnoremap` -" Comment if you don't use cjk or the plugin -" This is buggy -"nmap w cjkWordHandler.cursorWordEndRight -"nmap b cjkWordHandler.cursorWordStartLeft - -" will be parsed by VSCode itself. -" noremap n j -" noremap e k -" noremap i l -" noremap x workbench.action.toggleEditorGroupLayout -" " Use C-w C-w as original C-w -" noremap workbench.action.closeActiveEditor -" noremap workbench.action.togglePanel +" ~/.config/vscode/vscode.vimrc +" New-Item -ItemType SymbolicLink -Path ~\.config\vscode\vscode.vimrc -Target ~\.dotfiles\vscode\vscode.vimrc +" ln -sf $DOTFILES/vscode/vscode.vimrc $XDG_CONFIG_HOME/vscode/vscode.vimrc +" And go to vscode vim setting: +"vim.vimrc.path": "$HOME/.config/vscode/vscode.vimrc", + +" For all available options see +" https://github.com/VSCodeVim/Vim/blob/d41e286e9238b004f02b425d082d3b4181d83368/src/configuration/vimrc.ts#L120-L407 + + +" Use VSpaceCode instead of +noremap vspacecode.space + + +" Switch between tabs +nnoremap H :bprevious +nnoremap L :bnext +vnoremap H ^ +xnoremap H ^ +onoremap H ^ +vnoremap L $ +xnoremap L $ +onoremap L $ + + +noremap J 5j +noremap K 5k + +" Similar position to i +" The `noremap` implements text-object-like behavior in VSCodeVim + +" Y to yank to end of line +noremap Y y$ + +nnoremap removeSecondaryCursors + + +" lsp +noremap gi editor.action.goToImplementation +noremap gpi editor.action.peekImplementation +noremap gd editor.action.goToDefinition +noremap gpd editor.action.peekDefinition +noremap gt editor.action.goToTypeDefinition +noremap gpt editor.action.peekTypeDefinition +noremap gh editor.action.showDefinitionPreviewHover +noremap gr editor.action.goToReferences +noremap gpr editor.action.referenceSearch.trigger +noremap ga editor.action.quickFix + +" Rename, or [c]hange [d]efinition +nnoremap cd editor.action.rename + +" Requires matchit by redguardtoo +" nnoremap % extension.matchitJumpItems + +noremap zR editor.foldAll + +" keep selection after indent +vnoremap < editor.action.outdentLines +vnoremap > editor.action.indentLines + +nnoremap [g editor.action.editor.previousChange +nnoremap ]g editor.action.editor.nextChange + +" 分词版本的w和b,支持中文,需要插件 +" 为了保证递归解析,而不是打断,使用 `nmap` 而不是 `nnoremap` +" Comment if you don't use cjk or the plugin +" This is buggy +"nmap w cjkWordHandler.cursorWordEndRight +"nmap b cjkWordHandler.cursorWordStartLeft + +" will be parsed by VSCode itself. +" noremap n j +" noremap e k +" noremap i l +" noremap x workbench.action.toggleEditorGroupLayout +" " Use C-w C-w as original C-w +" noremap workbench.action.closeActiveEditor +" noremap workbench.action.togglePanel diff --git a/platforms/win/Microsoft.PowerShell_profile.ps1 b/misc/windows/Microsoft.PowerShell_profile.ps1 similarity index 100% rename from platforms/win/Microsoft.PowerShell_profile.ps1 rename to misc/windows/Microsoft.PowerShell_profile.ps1 diff --git a/platforms/win/SumatraPDF-shortcuts.txt b/misc/windows/SumatraPDF-shortcuts.txt similarity index 100% rename from platforms/win/SumatraPDF-shortcuts.txt rename to misc/windows/SumatraPDF-shortcuts.txt diff --git a/platforms/win/fastfetch.jsonc b/misc/windows/fastfetch.jsonc similarity index 100% rename from platforms/win/fastfetch.jsonc rename to misc/windows/fastfetch.jsonc diff --git a/platforms/win/neovide.toml b/misc/windows/neovide.toml similarity index 94% rename from platforms/win/neovide.toml rename to misc/windows/neovide.toml index 1ffc2d5..755028c 100644 --- a/platforms/win/neovide.toml +++ b/misc/windows/neovide.toml @@ -1,18 +1,18 @@ -fork = false -frame = "full" -idle = true -maximized = false -no-multigrid = false -srgb = false -tabs = true -theme = "auto" -title-hidden = true -vsync = false -wsl = true - -[font] -normal = [ - "Iosevka Nerd Font", - "霞鹜文楷等宽", -] # Will use the bundled Fira Code Nerd Font by default -size = 14.0 +fork = false +frame = "full" +idle = true +maximized = false +no-multigrid = false +srgb = false +tabs = true +theme = "auto" +title-hidden = true +vsync = false +wsl = true + +[font] +normal = [ + "Iosevka Nerd Font", + "霞鹜文楷等宽", +] # Will use the bundled Fira Code Nerd Font by default +size = 14.0 diff --git a/platforms/win/readme.md b/misc/windows/readme.md similarity index 97% rename from platforms/win/readme.md rename to misc/windows/readme.md index 5280122..c7a46f3 100644 --- a/platforms/win/readme.md +++ b/misc/windows/readme.md @@ -1,82 +1,82 @@ -# Windows dotfiles - -![Windows](../../_assets/windows-1.png) - -- Terminal Emulator: [WezTerm](../../tools/wezterm/) -- Tiling Window Manager: [GlazeWM](./glzr/glazewm/config.yaml) -- Status Bar: [Zebar](./glzr/zebar/settings.json) -- Quake Terminal: [Windows Terminal](./WindowsTerminal.json) -- Shell: [PowerShell Core](../../tools/powershell/readme.md) - - WSL1: [Arch Linux](https://github.com/yuk7/ArchWSL) - - WSL2: kali-linux - -By following the Windows Directory Standard, assign the following directories corresponding to `$XDG_CONFIG` in Unix, some of the software(like `wezterm`) will use these directories as the default configuration path: - -| Windows Path | XDG-Equivalent | Default | -|------------|----------|----------| -| `%APPDATA%` | `$XDG_CONFIG_HOME` | `%USERPROFILE%\AppData\Roaming` | -| `%LOCALAPPDATA%` | `$XDG_DATA_HOME` | `%USERPROFILE%\AppData\Local` | -| `%LOCALAPPDATA%\Cache` | `$XDG_CACHE_HOME` | `%USERPROFILE%\AppData\Local\Cache` | -| `%LOCALAPPDATA%\State` | `$XDG_STATE_HOME` | `%USERPROFILE%\AppData\Local\State` | - -An example bootstrap script is provided in [bootstrap/Windows.ps1](../../bootstrap/Windows.ps1), which will create necessary directories and link the files. - -## PowerShell Profile - -This is the *[PowerShell Core](https://github.com/PowerShell/PowerShell)* profile, not the legacy *Windows PowerShell* profile, which is faster(`powershell` vs `pwsh`, `pwsh` types 6 letters less lol), cross-platform and compatible with Unix. - -By default, PowerShell profile is stored in `%UserProfile%\Documents\PowerShell\Microsoft.PowerShell_profile.ps1`. - -It is convenient to use `$PROFILE` to locate the profile file. - -```powershell -Test-Path $PROFILE -``` - -Just like Unix Shell, there are configs work for different sessions. To locate them, use `select *` followed by `$PROFILE`. - -If you want to change the `AllUsers` scoped profile, do not install `pwsh` via `winget`, use `scoop` instead, since `winget` will install `pwsh` to `%ProgramFiles%\PowerShell\7\pwsh.exe`, which is read-only even with Administrator privileges. - -```powershell -PS > $PROFILE | Select * -AllUsersAllHosts : C:\Users\jsony\scoop\apps\pwsh\current\profile.ps1 -AllUsersCurrentHost : C:\Users\jsony\scoop\apps\pwsh\current\Microsoft.PowerShell_profile.ps1 -CurrentUserAllHosts : C:\Users\jsony\Documents\PowerShell\profile.ps1 -CurrentUserCurrentHost : C:\Users\jsony\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 -Length : 68 -``` - -Note that the variable `$PROFILE.*` are constants, the only way to change it is to compile your own `pwsh` - -To link the profile file: - -```powershell -New-Item -ItemType SymbolicLink -Path $PROFILE -Target "$DOTFILES\win\Microsoft.PowerShell_profile.ps1" -Force -``` - -I use [starship](https://starship.rs/) to customize the prompt, which is located in [`tools/starship/starship_pwsh.toml`](../../tools/starship/starship_pwsh.toml). This prompt config is cross-platform for powershell core, since I use the prompt to identify the shell. - -## `.wslconfig` - WSL2 Configuration - -`.wslconfig` only supports `%UserProfile%\.wslconfig` as the configuration path - -```powershell -New-Item -ItemType SymbolicLink -Path "$Env:UserProfile\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force -``` - - -## Neovide - -Neovide configuration is (only) stored in `%APPDATA%\neovide\config.toml` - -```powershell -New-Item -ItemType SymbolicLink -Path "$Env:AppData\neovide\config.toml" -Target "$DOTFILES\win\neovide.toml" -Force +# Windows dotfiles + +![Windows](../../_assets/windows-1.png) + +- Terminal Emulator: [WezTerm](../../tools/wezterm/) +- Tiling Window Manager: [GlazeWM](./glzr/glazewm/config.yaml) +- Status Bar: [Zebar](./glzr/zebar/settings.json) +- Quake Terminal: [Windows Terminal](./WindowsTerminal.json) +- Shell: [PowerShell Core](../../tools/powershell/readme.md) + - WSL1: [Arch Linux](https://github.com/yuk7/ArchWSL) + - WSL2: kali-linux + +By following the Windows Directory Standard, assign the following directories corresponding to `$XDG_CONFIG` in Unix, some of the software(like `wezterm`) will use these directories as the default configuration path: + +| Windows Path | XDG-Equivalent | Default | +|------------|----------|----------| +| `%APPDATA%` | `$XDG_CONFIG_HOME` | `%USERPROFILE%\AppData\Roaming` | +| `%LOCALAPPDATA%` | `$XDG_DATA_HOME` | `%USERPROFILE%\AppData\Local` | +| `%LOCALAPPDATA%\Cache` | `$XDG_CACHE_HOME` | `%USERPROFILE%\AppData\Local\Cache` | +| `%LOCALAPPDATA%\State` | `$XDG_STATE_HOME` | `%USERPROFILE%\AppData\Local\State` | + +An example bootstrap script is provided in [bootstrap/Windows.ps1](../../bootstrap/Windows.ps1), which will create necessary directories and link the files. + +## PowerShell Profile + +This is the *[PowerShell Core](https://github.com/PowerShell/PowerShell)* profile, not the legacy *Windows PowerShell* profile, which is faster(`powershell` vs `pwsh`, `pwsh` types 6 letters less lol), cross-platform and compatible with Unix. + +By default, PowerShell profile is stored in `%UserProfile%\Documents\PowerShell\Microsoft.PowerShell_profile.ps1`. + +It is convenient to use `$PROFILE` to locate the profile file. + +```powershell +Test-Path $PROFILE +``` + +Just like Unix Shell, there are configs work for different sessions. To locate them, use `select *` followed by `$PROFILE`. + +If you want to change the `AllUsers` scoped profile, do not install `pwsh` via `winget`, use `scoop` instead, since `winget` will install `pwsh` to `%ProgramFiles%\PowerShell\7\pwsh.exe`, which is read-only even with Administrator privileges. + +```powershell +PS > $PROFILE | Select * +AllUsersAllHosts : C:\Users\jsony\scoop\apps\pwsh\current\profile.ps1 +AllUsersCurrentHost : C:\Users\jsony\scoop\apps\pwsh\current\Microsoft.PowerShell_profile.ps1 +CurrentUserAllHosts : C:\Users\jsony\Documents\PowerShell\profile.ps1 +CurrentUserCurrentHost : C:\Users\jsony\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 +Length : 68 +``` + +Note that the variable `$PROFILE.*` are constants, the only way to change it is to compile your own `pwsh` + +To link the profile file: + +```powershell +New-Item -ItemType SymbolicLink -Path $PROFILE -Target "$DOTFILES\win\Microsoft.PowerShell_profile.ps1" -Force +``` + +I use [starship](https://starship.rs/) to customize the prompt, which is located in [`tools/starship/starship_pwsh.toml`](../../tools/starship/starship_pwsh.toml). This prompt config is cross-platform for powershell core, since I use the prompt to identify the shell. + +## `.wslconfig` - WSL2 Configuration + +`.wslconfig` only supports `%UserProfile%\.wslconfig` as the configuration path + +```powershell +New-Item -ItemType SymbolicLink -Path "$Env:UserProfile\.wslconfig" -Target "$DOTFILES\win\.wslconfig" -Force +``` + + +## Neovide + +Neovide configuration is (only) stored in `%APPDATA%\neovide\config.toml` + +```powershell +New-Item -ItemType SymbolicLink -Path "$Env:AppData\neovide\config.toml" -Target "$DOTFILES\win\neovide.toml" -Force ``` \ No newline at end of file diff --git a/platforms/win/start/KMonad.ps1 b/misc/windows/start/KMonad.ps1 similarity index 100% rename from platforms/win/start/KMonad.ps1 rename to misc/windows/start/KMonad.ps1 diff --git a/platforms/win/vsvimrc b/misc/windows/vsvimrc similarity index 100% rename from platforms/win/vsvimrc rename to misc/windows/vsvimrc diff --git a/nixcfgs/.gitignore b/nixcfgs/.gitignore new file mode 100644 index 0000000..89b3a77 --- /dev/null +++ b/nixcfgs/.gitignore @@ -0,0 +1 @@ +secrets.nix diff --git a/nixcfgs/flake.lock b/nixcfgs/flake.lock new file mode 100644 index 0000000..2a621bf --- /dev/null +++ b/nixcfgs/flake.lock @@ -0,0 +1,304 @@ +{ + "nodes": { + "caelestia-cli": { + "inputs": { + "caelestia-shell": [ + "caelestia-shell" + ], + "nixpkgs": [ + "caelestia-shell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1760637553, + "narHash": "sha256-I3fN6TsYfOtKFc1iVy/vXYR7Ck3JRTPncnQaZC6eLJ8=", + "owner": "caelestia-dots", + "repo": "cli", + "rev": "4593b823d730f46168d2eccd061467adb1754a57", + "type": "github" + }, + "original": { + "owner": "caelestia-dots", + "repo": "cli", + "type": "github" + } + }, + "caelestia-shell": { + "inputs": { + "caelestia-cli": "caelestia-cli", + "nixpkgs": [ + "nixpkgs" + ], + "quickshell": "quickshell" + }, + "locked": { + "lastModified": 1760837100, + "narHash": "sha256-B4iL67pRKARIPnZGnlV19axKjjW+UfNP1wnlPbxUM6M=", + "owner": "caelestia-dots", + "repo": "shell", + "rev": "84343dde62f99590cd9e21694065cf70d96d9869", + "type": "github" + }, + "original": { + "owner": "caelestia-dots", + "repo": "shell", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nur", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1760887455, + "narHash": "sha256-/xU8iYZjolWbMUNBQF6af5zgGs73Qw21WMgz1tLs3Yw=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "aeabc1ac63e6ebb8ba4714c4abdfe0556f2de765", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1760721282, + "narHash": "sha256-aAHphQbU9t/b2RRy2Eb8oMv+I08isXv2KUGFAFn7nCo=", + "owner": "nix-darwin", + "repo": "nix-darwin", + "rev": "c3211fcd0c56c11ff110d346d4487b18f7365168", + "type": "github" + }, + "original": { + "owner": "nix-darwin", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "nix-flatpak": { + "locked": { + "lastModified": 1754777568, + "narHash": "sha256-0bBqT+3XncgF8F03RFAamw9vdf0VmaDoIJLTGkjfQZs=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "62f636b87ef6050760a8cb325cadb90674d1e23e", + "type": "github" + }, + "original": { + "owner": "gmodena", + "repo": "nix-flatpak", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1760872779, + "narHash": "sha256-c5C907Raf9eY8f1NUXYeju9aUDlm227s/V0OptEbypA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "63bdb5d90fa2fa11c42f9716ad1e23565613b07c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1760878510, + "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1758690382, + "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e643668fd71b949c53f8626614b21ff71a07379d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nur": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1760925195, + "narHash": "sha256-IXpoYD3wXa4oOjf/01e8GT0NZa4wCZnh1GpgfByyCvY=", + "owner": "nix-community", + "repo": "NUR", + "rev": "107b1714e76f67a3ae65a966c2e9937eacad5467", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, + "plasma-manager": { + "inputs": { + "home-manager": [ + "home-manager" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1759321049, + "narHash": "sha256-8XkU4gIrLT2DJZWQyvsP5woXGZF5eE/7AnKfwQkiwYU=", + "owner": "nix-community", + "repo": "plasma-manager", + "rev": "205dcfd4a30d4a5d1b4f28defee69daa7c7252cd", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "plasma-manager", + "type": "github" + } + }, + "quickshell": { + "inputs": { + "nixpkgs": [ + "caelestia-shell", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1760822546, + "narHash": "sha256-cy3wJQQzQbZ/EYUfTDuMiP/haPOjkqGgWOPPl7K9oiM=", + "ref": "refs/heads/master", + "rev": "3e2ce40b18af943f9ba370ed73565e9f487663ef", + "revCount": 697, + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + }, + "original": { + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + } + }, + "root": { + "inputs": { + "caelestia-shell": "caelestia-shell", + "flake-utils": "flake-utils", + "home-manager": "home-manager", + "nix-darwin": "nix-darwin", + "nix-flatpak": "nix-flatpak", + "nixpkgs": "nixpkgs", + "nur": "nur", + "plasma-manager": "plasma-manager", + "winboat": "winboat" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "winboat": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1760827883, + "narHash": "sha256-6Cvg9YE8wqpkdjnw0HwJH+HOWY9inO/slXf48w+84RM=", + "owner": "TibixDev", + "repo": "winboat", + "rev": "a1b1105a30b1f5210ce29077e19f21b53083469a", + "type": "github" + }, + "original": { + "owner": "TibixDev", + "repo": "winboat", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nixcfgs/flake.nix b/nixcfgs/flake.nix new file mode 100644 index 0000000..8be3e55 --- /dev/null +++ b/nixcfgs/flake.nix @@ -0,0 +1,110 @@ +# ~/.dotfiles/nixcfgs/flake.nix +{ + description = "A simple NixOS flake"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nix-flatpak.url = "github:gmodena/nix-flatpak"; + flake-utils.url = "github:numtide/flake-utils"; + nix-darwin = { + url = "github:nix-darwin/nix-darwin/master"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + plasma-manager = { + url = "github:nix-community/plasma-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager"; + }; + nur.url = "github:nix-community/NUR"; + winboat.url = "github:TibixDev/winboat"; + caelestia-shell = { + url = "github:caelestia-dots/shell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = + { + self, + nixpkgs, + nix-flatpak, + nix-darwin, + home-manager, + plasma-manager, + nur, + winboat, + caelestia-shell, + ... + }@inputs: + let + overlays = [ + nur.overlays.default + (final: prev: { + winboat = winboat.packages.x86_64-linux.winboat; + }) + ]; + forSystem = + system: + import nixpkgs { + inherit system overlays; + config.allowUnfree = true; + }; + specialArgs = { inherit inputs; }; + nixosHosts = [ + "zp" + "zephyrus" + "nixvirt" + ]; + + mkNixosSystem = + hostname: + nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + inherit specialArgs; + modules = [ ./hosts/${hostname} ]; + }; + in + { + # This will automatically generate nixOS config for `nixosHosts' + # Include the module ./hosts/${hostname} by default. + nixosConfigurations = nixpkgs.lib.genAttrs nixosHosts mkNixosSystem; + + darwinConfigurations."zen" = nix-darwin.lib.darwinSystem { + system = "aarch64-darwin"; + inherit specialArgs; + modules = [ + ./hosts/zen + ]; + }; + + homeConfigurations = { + js0ny = home-manager.lib.homeManagerConfiguration { + pkgs = forSystem "x86_64-linux"; + extraSpecialArgs = specialArgs; + modules = [ + ./users/js0ny + ]; + }; + "js0ny@zephyrus" = home-manager.lib.homeManagerConfiguration { + pkgs = forSystem "x86_64-linux"; + extraSpecialArgs = specialArgs; + modules = [ + ./users/js0ny/zephyrus.nix + plasma-manager.homeModules.plasma-manager + nix-flatpak.homeManagerModules.nix-flatpak + ]; + }; + "js0ny@nixvirt" = home-manager.lib.homeManagerConfiguration { + pkgs = forSystem "x86_64-linux"; + extraSpecialArgs = specialArgs; + modules = [ + ./users/js0ny/nixvirt.nix + ]; + }; + }; + }; +} diff --git a/nixcfgs/hosts/nixvirt/default.nix b/nixcfgs/hosts/nixvirt/default.nix new file mode 100644 index 0000000..5fceb21 --- /dev/null +++ b/nixcfgs/hosts/nixvirt/default.nix @@ -0,0 +1,32 @@ +# ~/.config/nixcfgs/hosts/nixvirt/default.nix +{ + config, + lib, + pkgs, + nix-flatpak, + ... +}: +{ + imports = [ + # impure build + /etc/nixos/hardware-configuration.nix + ../../modules/nixos + # ../../modules/nixos/users/js0ny.nix + # ../../modules/nixos/guest.nix + ../../modules/nixos/firefox.nix + ../../modules/nixos/desktop/gnome.nix + # ../../modules/nixos/desktop/niri.nix + ../../modules/nixos/desktop/gnome.nix + ../../modules/nixos/display-manager/gdm.nix + ]; + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/vda"; + boot.loader.grub.useOSProber = true; + services.qemuGuest.enable = true; + services.spice-vdagentd.enable = true; + + nixpkgs.config.allowUnfree = true; + networking.hostName = "nixvirt"; + hardware.enableRedistributableFirmware = true; + system.stateVersion = "25.05"; +} diff --git a/nixcfgs/hosts/zen/default.nix b/nixcfgs/hosts/zen/default.nix new file mode 100644 index 0000000..506b2e8 --- /dev/null +++ b/nixcfgs/hosts/zen/default.nix @@ -0,0 +1,10 @@ +{pkgs, ...}: +{ + imports = [ + ./packages.nix + ../../modules/darwin/js0ny/brew.nix + ../../modules/darwin/js0ny/dock.nix + ../../modules/darwin/js0ny/system.nix + ]; + time.timeZone = "Europe/London"; +} diff --git a/nix/hosts/macbook/default.nix b/nixcfgs/hosts/zen/packages.nix similarity index 98% rename from nix/hosts/macbook/default.nix rename to nixcfgs/hosts/zen/packages.nix index c5855ff..795bc1c 100644 --- a/nix/hosts/macbook/default.nix +++ b/nixcfgs/hosts/zen/packages.nix @@ -46,6 +46,7 @@ tlrc tmux uv + yazi zoxide ]; diff --git a/nixcfgs/hosts/zephyrus/configuration.nix b/nixcfgs/hosts/zephyrus/configuration.nix new file mode 100644 index 0000000..9ff3b0e --- /dev/null +++ b/nixcfgs/hosts/zephyrus/configuration.nix @@ -0,0 +1,126 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +{ config, lib, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Use latest kernel. + boot.kernelPackages = pkgs.linuxPackages_latest; + + # networking.hostName = "nixos"; # Define your hostname. + # Pick only one of the below networking options. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + # Set your time zone. + time.timeZone = "Europe/London"; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + # console = { + # font = "Lat2-Terminus16"; + # keyMap = "us"; + # useXkbConfig = true; # use xkb.options in tty. + # }; + + # Enable the X11 windowing system. + # services.xserver.enable = true; + + + + + # Configure keymap in X11 + # services.xserver.xkb.layout = "us"; + # services.xserver.xkb.options = "eurosign:e,caps:escape"; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable sound. + # services.pulseaudio.enable = true; + # OR + # services.pipewire = { + # enable = true; + # pulse.enable = true; + # }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.js0ny = { + isNormalUser = true; + extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + tree + ]; + }; + + # programs.firefox.enable = true; + + # List packages installed in system profile. + # You can use https://search.nixos.org/ to find more packages (and options). + environment.systemPackages = with pkgs; [ + vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + wget + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + # system.copySystemConfiguration = true; + + # This option defines the first version of NixOS you have installed on this particular machine, + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. + # + # Most users should NEVER change this value after the initial install, for any reason, + # even if you've upgraded your system to a new NixOS release. + # + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, + # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how + # to actually do that. + # + # This value being lower than the current NixOS release does NOT mean your system is + # out of date, out of support, or vulnerable. + # + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, + # and migrated your data accordingly. + # + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . + system.stateVersion = "25.05"; # Did you read the comment? + +} + diff --git a/nixcfgs/hosts/zephyrus/default.nix b/nixcfgs/hosts/zephyrus/default.nix new file mode 100644 index 0000000..98b750b --- /dev/null +++ b/nixcfgs/hosts/zephyrus/default.nix @@ -0,0 +1,37 @@ +# ~/.config/nixcfgs/hosts/zephyrus/default.nix +{config, ...}: { + imports = [ + ../../modules/nixos + ../../modules/nixos/host-machine.nix + ../../modules/nixos/waydroid.nix + ../../modules/nixos/laptop.nix + ../../modules/nixos/disable-nvidia.nix + ../../modules/nixos/additional-packages.nix + ../../modules/nixos/libvirt.nix + ../../modules/nixos/docker.nix + ../../modules/nixos/firefox.nix + ../../modules/nixos/steam.nix + ../../modules/nixos/chromium.nix + ../../modules/nixos/obs-studio.nix + ../../modules/nixos/wine.nix + ../../modules/nixos/desktop/kde.nix + ../../modules/nixos/desktop/hyprland.nix + ../../modules/nixos/display-manager/sddm.nix + ./hardware-configuration.nix + ./keyd.nix + ./packages.nix + ]; + + nixpkgs.config.allowUnfree = true; + networking.hostName = "zephyrus"; + hardware.enableRedistributableFirmware = true; + boot.extraModulePackages = with config.boot.kernelPackages; [ + v4l2loopback + ]; + networking.modemmanager.enable = false; + # Xilinx Artix-7 Basys 3 + services.udev.extraRules = '' + ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6010", MODE="0660", GROUP="dialout", SYMLINK+="basys3" + ''; + system.stateVersion = "25.05"; +} diff --git a/nixcfgs/hosts/zephyrus/hardware-configuration.nix b/nixcfgs/hosts/zephyrus/hardware-configuration.nix new file mode 100644 index 0000000..d944f05 --- /dev/null +++ b/nixcfgs/hosts/zephyrus/hardware-configuration.nix @@ -0,0 +1,58 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + + fileSystems."/swap" = + { device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74"; + fsType = "btrfs"; + options = [ "subvol=@swap" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/ed71c463-1cf6-449d-9aa8-ed715fe7ad74"; + fsType = "btrfs"; + options = [ "subvol=@nix" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/0BDA-B0A4"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/nixcfgs/hosts/zephyrus/keyd.nix b/nixcfgs/hosts/zephyrus/keyd.nix new file mode 100644 index 0000000..30c321c --- /dev/null +++ b/nixcfgs/hosts/zephyrus/keyd.nix @@ -0,0 +1,21 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ + keyd + ]; + + services.keyd = { + enable = true; + keyboards = { + externalKeyboard = { + ids = [ "0b05:19b6:d167885d" ]; # ASUS Keyboard + settings = { + main = { + capslock = "overload(control, esc)"; + }; + }; + }; + }; + }; +} diff --git a/nixcfgs/hosts/zephyrus/packages.nix b/nixcfgs/hosts/zephyrus/packages.nix new file mode 100644 index 0000000..9cc9b5d --- /dev/null +++ b/nixcfgs/hosts/zephyrus/packages.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + asusctl + supergfxctl + ]; + + services.asusd.enable = true; + services.supergfxd.enable = true; +} diff --git a/nixcfgs/hosts/zp/default.nix b/nixcfgs/hosts/zp/default.nix new file mode 100644 index 0000000..cbc54aa --- /dev/null +++ b/nixcfgs/hosts/zp/default.nix @@ -0,0 +1,47 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +{ config, lib, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ../common/nixos.nix + ../common/desktop-linux.nix + ../common/packages-fonts.nix + ../common/packages-desktop.nix + ../common/packages-headless.nix + ../common/nvidia.nix + ../common/flatpak.nix + ../common/wine.nix + ../common/firefox.nix + ../common/gnome.nix + ../common/docker.nix + ]; + + + networking.hostName = "zp"; # Define your hostname. + + + # This option defines the first version of NixOS you have installed on this particular machine, + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. + # + # Most users should NEVER change this value after the initial install, for any reason, + # even if you've upgraded your system to a new NixOS release. + # + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, + # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how + # to actually do that. + # + # This value being lower than the current NixOS release does NOT mean your system is + # out of date, out of support, or vulnerable. + # + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, + # and migrated your data accordingly. + # + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . + system.stateVersion = "25.05"; # Did you read the comment? + +} + diff --git a/nixcfgs/modules/common/default.nix b/nixcfgs/modules/common/default.nix new file mode 100644 index 0000000..e69de29 diff --git a/nixcfgs/modules/darwin/default.nix b/nixcfgs/modules/darwin/default.nix new file mode 100644 index 0000000..a8c2b51 --- /dev/null +++ b/nixcfgs/modules/darwin/default.nix @@ -0,0 +1,5 @@ +{ config, pkgs, ... }: + +{ + time.timeZone = "Europe/London"; +} diff --git a/nix/hosts/macbook/brew.nix b/nixcfgs/modules/darwin/js0ny/brew.nix similarity index 93% rename from nix/hosts/macbook/brew.nix rename to nixcfgs/modules/darwin/js0ny/brew.nix index 2c7063c..1e9dd7b 100644 --- a/nix/hosts/macbook/brew.nix +++ b/nixcfgs/modules/darwin/js0ny/brew.nix @@ -25,7 +25,6 @@ "neovide" "clash-verge-rev" "obsidian" - "mullvad-vpn" "alacritty" "alt-tab" "apparency" @@ -40,7 +39,7 @@ "ltspice" "orbstack" "qlcolorcode" - # "qlimagesize" discontinued. + # "qlimagesize" discontinued. "qlmarkdown" "qlstephen" "qlvideo" @@ -60,7 +59,7 @@ "TickTick" "cherry-studio" "firefox" - "Wireshark" + "wireshark-app" "LibreWolf" "brave-browser" "font-maple-mono-nf-cn" diff --git a/nixcfgs/modules/darwin/js0ny/dock.nix b/nixcfgs/modules/darwin/js0ny/dock.nix new file mode 100644 index 0000000..e5f70ea --- /dev/null +++ b/nixcfgs/modules/darwin/js0ny/dock.nix @@ -0,0 +1,47 @@ +{ config, pkgs, ... }: +{ + system.defaults.dock = { + appswitcher-all-displays = true; + autohide = true; + # Launch Animation + launchanim = false; + # Minimize Animation + mineffect = "suck"; + minimize-to-application = true; + persistent-apps = [ + { app = "/Applications/Vivaldi.app"; } + { app = "/Applications/kitty.app"; } + { app = "/Applications/Obsidian.app"; } + { app = "Applications/Visual Studio Code.app"; } + # { app = "/Applications/LibreWolf.app"; } + # { spacer = { small = false; }; } + # { spacer = { small = true; }; } + # { folder = "/System/Applications/Utilities"; } + # { folder = "/Users/js0ny/Downloads/"; } + ]; + persistent-others = [ + "/Users/js0ny/Downloads" + # "/Users/js0ny/Source" + ]; + show-recents = false; + orientation = "bottom"; + # tr - Top Right + # tl - Top Left (disable this) + # br - Bottom Right + # bl - Bottom Left + # `1`: Disabled + # `2`: Mission Control + # `3`: Application Windows + # `4`: Desktop + # `5`: Start Screen Saver + # `6`: Disable Screen Saver + # `7`: Dashboard + # `10`: Put Display to Sleep + # `11`: Launchpad + # `12`: Notification Center + # `13`: Lock Screen + # `14`: Quick Note + wvous-tr-corner = 2; + wvous-bl-corner = 11; # Simulate Windows button on Windows + wvous-br-corner = 4; + };} diff --git a/nix/hosts/macbook/system.nix b/nixcfgs/modules/darwin/js0ny/system.nix similarity index 57% rename from nix/hosts/macbook/system.nix rename to nixcfgs/modules/darwin/js0ny/system.nix index d489269..0e71b57 100644 --- a/nix/hosts/macbook/system.nix +++ b/nixcfgs/modules/darwin/js0ny/system.nix @@ -1,53 +1,6 @@ { config, pkgs, ... }: - -{ - time.timeZone = "Asia/Shanghai"; + { system.defaults = { - dock = { - appswitcher-all-displays = true; - autohide = true; - # Launch Animation - launchanim = false; - # Minimize Animation - mineffect = "suck"; - minimize-to-application = true; - persistent-apps = [ - { app = "/Applications/Vivaldi.app"; } - { app = "/Applications/kitty.app"; } - { app = "/Applications/Obsidian.app"; } - { app = "Applications/Visual Studio Code.app"; } - { app = "/Applications/LibreWolf.app"; } - # { spacer = { small = false; }; } - # { spacer = { small = true; }; } - # { folder = "/System/Applications/Utilities"; } - # { folder = "/Users/js0ny/Downloads/"; } - ]; - persistent-others = [ - "/Users/js0ny/Downloads" - "/Users/js0ny/Source" - ]; - show-recents = false; - orientation = "bottom"; - # tr - Top Right - # tl - Top Left (disable this) - # br - Bottom Right - # bl - Bottom Left - # `1`: Disabled - # `2`: Mission Control - # `3`: Application Windows - # `4`: Desktop - # `5`: Start Screen Saver - # `6`: Disable Screen Saver - # `7`: Dashboard - # `10`: Put Display to Sleep - # `11`: Launchpad - # `12`: Notification Center - # `13`: Lock Screen - # `14`: Quick Note - wvous-tr-corner = 2; - wvous-bl-corner = 11; # Simulate Windows button on Windows - wvous-br-corner = 4; - }; finder = { AppleShowAllFiles = true; ShowStatusBar = true; @@ -111,4 +64,5 @@ ShowSeconds = true; }; }; -} \ No newline at end of file + + } diff --git a/nixcfgs/modules/home/dev/c.nix b/nixcfgs/modules/home/dev/c.nix new file mode 100644 index 0000000..2deac84 --- /dev/null +++ b/nixcfgs/modules/home/dev/c.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + gcc + llvmPackages_21.clang-tools # clangd + ]; +} diff --git a/nixcfgs/modules/home/dev/go.nix b/nixcfgs/modules/home/dev/go.nix new file mode 100644 index 0000000..df36afa --- /dev/null +++ b/nixcfgs/modules/home/dev/go.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + go + gopls + ]; + programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [ + golang.go + ]; +} diff --git a/nixcfgs/modules/home/dev/java.nix b/nixcfgs/modules/home/dev/java.nix new file mode 100644 index 0000000..052d2a1 --- /dev/null +++ b/nixcfgs/modules/home/dev/java.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + jdt-language-server + jdk21 + ]; + programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [ + redhat.java + vscjava.vscode-spring-initializr + vscjava.vscode-java-pack + ]; + programs.zed-editor.extensions = [ "java" ]; +} diff --git a/nixcfgs/modules/home/dev/lua.nix b/nixcfgs/modules/home/dev/lua.nix new file mode 100644 index 0000000..87d587b --- /dev/null +++ b/nixcfgs/modules/home/dev/lua.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + luajit + lua-language-server + stylua + ]; + programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [ + sumneko.lua + ]; + programs.zed-editor.extensions = [ "lua" ]; +} diff --git a/nixcfgs/modules/home/dev/nix.nix b/nixcfgs/modules/home/dev/nix.nix new file mode 100644 index 0000000..579d455 --- /dev/null +++ b/nixcfgs/modules/home/dev/nix.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + alejandra + nil + nixd + ]; + programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [ + kamadorueda.alejandra + jnoortheen.nix-ide + ]; + + programs.zed-editor.extensions = [ "nix" ]; +} diff --git a/nixcfgs/modules/home/dev/python.nix b/nixcfgs/modules/home/dev/python.nix new file mode 100644 index 0000000..4bccaa7 --- /dev/null +++ b/nixcfgs/modules/home/dev/python.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + uv + ruff + ]; + programs.vscode.profiles.default.extensions = with pkgs.vscode-extensions; [ + ms-python.python + ms-python.debugpy + ms-python.vscode-pylance + charliermarsh.ruff + njpwerner.autodocstring + ]; +} diff --git a/nixcfgs/modules/home/gnome-keyrings.nix b/nixcfgs/modules/home/gnome-keyrings.nix new file mode 100644 index 0000000..4b27102 --- /dev/null +++ b/nixcfgs/modules/home/gnome-keyrings.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + gcr + ]; + + services.gnome-keyring.enable = true; +} diff --git a/nixcfgs/modules/home/gnome.nix b/nixcfgs/modules/home/gnome.nix new file mode 100644 index 0000000..e69de29 diff --git a/nixcfgs/modules/home/programs/eza.nix b/nixcfgs/modules/home/programs/eza.nix new file mode 100644 index 0000000..688be0a --- /dev/null +++ b/nixcfgs/modules/home/programs/eza.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: { + programs.eza = { + enable = true; + colors = "always"; + icons = "always"; + }; +} diff --git a/nixcfgs/modules/home/programs/fzf.nix b/nixcfgs/modules/home/programs/fzf.nix new file mode 100644 index 0000000..352e28c --- /dev/null +++ b/nixcfgs/modules/home/programs/fzf.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + programs.fzf = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + enableFishIntegration = true; + }; +} diff --git a/nixcfgs/modules/home/programs/lsd.nix b/nixcfgs/modules/home/programs/lsd.nix new file mode 100644 index 0000000..3837132 --- /dev/null +++ b/nixcfgs/modules/home/programs/lsd.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + programs.lsd = { + enable = true; + colors = "always"; + icons = "always"; + enableBashIntegration = true; + enableFishIntegration = true; + enableZshIntegration = true; + }; +} + diff --git a/nixcfgs/modules/home/programs/nvim.nix b/nixcfgs/modules/home/programs/nvim.nix new file mode 100644 index 0000000..043a17d --- /dev/null +++ b/nixcfgs/modules/home/programs/nvim.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + programs.neovim = { + enable = true; + defaultEditor = true; + }; +} diff --git a/nixcfgs/modules/home/programs/starship.nix b/nixcfgs/modules/home/programs/starship.nix new file mode 100644 index 0000000..1fdda19 --- /dev/null +++ b/nixcfgs/modules/home/programs/starship.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + programs.starship = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + enableFishIntegration = true; + }; +} diff --git a/nixcfgs/modules/home/programs/vscode.nix b/nixcfgs/modules/home/programs/vscode.nix new file mode 100644 index 0000000..68ed43b --- /dev/null +++ b/nixcfgs/modules/home/programs/vscode.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: { + programs.vscode = { + package = pkgs.vscodium; + enable = true; + }; +} diff --git a/nixcfgs/modules/home/programs/winboat.nix b/nixcfgs/modules/home/programs/winboat.nix new file mode 100644 index 0000000..8903db6 --- /dev/null +++ b/nixcfgs/modules/home/programs/winboat.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: +{ + + home.packages = with pkgs; [ + freerdp + winboat + ]; +} diff --git a/nixcfgs/modules/home/programs/zed-editor.nix b/nixcfgs/modules/home/programs/zed-editor.nix new file mode 100644 index 0000000..b74fe9a --- /dev/null +++ b/nixcfgs/modules/home/programs/zed-editor.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + programs.zed-editor = { + enable = true; + }; +} diff --git a/nixcfgs/modules/home/programs/zoxide.nix b/nixcfgs/modules/home/programs/zoxide.nix new file mode 100644 index 0000000..053ac16 --- /dev/null +++ b/nixcfgs/modules/home/programs/zoxide.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + programs.zoxide = { + enable = true; + enableBashIntegration = true; + enableZshIntegration = true; + enableFishIntegration = true; + }; +} diff --git a/nixcfgs/modules/nixos/additional-packages.nix b/nixcfgs/modules/nixos/additional-packages.nix new file mode 100644 index 0000000..53bbb3e --- /dev/null +++ b/nixcfgs/modules/nixos/additional-packages.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + chromium + nil + nixd + libnotify + imagemagick + ]; +} diff --git a/nixcfgs/modules/nixos/chromium.nix b/nixcfgs/modules/nixos/chromium.nix new file mode 100644 index 0000000..d5f3b82 --- /dev/null +++ b/nixcfgs/modules/nixos/chromium.nix @@ -0,0 +1,15 @@ +{...}: { + programs.chromium = { + enable = true; + homepageLocation = "https://duckduckgo.com"; + defaultSearchProviderSearchURL = "https://duckduckgo.com?q={searchTerms}"; + extraOpts = { + "BrowserSignin" = 1; + "PasswordManagerEnabled" = false; + "ExtensionManifestV2Availability" = 2; + }; + extensions = [ + "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin + ]; + }; +} diff --git a/nixcfgs/modules/nixos/configuration.nix b/nixcfgs/modules/nixos/configuration.nix new file mode 100644 index 0000000..044460a --- /dev/null +++ b/nixcfgs/modules/nixos/configuration.nix @@ -0,0 +1,110 @@ +{ + config, + pkgs, + ... +}: +{ + security.pam.services.login.enableGnomeKeyring = true; + + # Use latest kernel. + boot.kernelPackages = pkgs.linuxPackages_latest; + + # Pick only one of the below networking options. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + # Set your time zone. + time.timeZone = "Europe/London"; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Select internationalisation properties. + i18n = { + defaultLocale = "en_GB.UTF-8"; + # extraLocales = [ + # "en_GB.UTF-8/UTF-8" + # ]; + extraLocaleSettings = { + # LC_CTYPE = "en_GB.UTF-8"; + LC_ALL = "en_GB.UTF-8"; + }; + }; + # console = { + # font = "Lat2-Terminus16"; + # keyMap = "us"; + # useXkbConfig = true; # use xkb.options in tty. + # }; + + # Configure keymap in X11 + services.xserver.xkb.layout = "us"; + # services.xserver.xkb.options = "eurosign:e,caps:escape"; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable sound. + # services.pulseaudio.enable = true; + # OR + services.pipewire = { + enable = true; + pulse.enable = true; + }; + + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + }; + + environment.shellAliases = { + nrs = "sudo nixos-rebuild switch --flake ~/.dotfiles/nixcfgs"; + }; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + # system.copySystemConfiguration = true; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + # Enable touchpad support (enabled default in most desktopManager). + services.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.js0ny = { + isNormalUser = true; + extraGroups = [ + "wheel" + "docker" + "libvirtd" + "dialout" + ]; # Enable ‘sudo’ for the user. + packages = with pkgs; [ + tree + ]; + }; + + services.flatpak.enable = true; +} diff --git a/nixcfgs/modules/nixos/default.nix b/nixcfgs/modules/nixos/default.nix new file mode 100644 index 0000000..8914833 --- /dev/null +++ b/nixcfgs/modules/nixos/default.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + imports = [ + ./configuration.nix + ./packages.nix + ./fonts.nix + ./rime.nix + ]; +} diff --git a/nixcfgs/modules/nixos/desktop/cosmic.nix b/nixcfgs/modules/nixos/desktop/cosmic.nix new file mode 100644 index 0000000..ca3d945 --- /dev/null +++ b/nixcfgs/modules/nixos/desktop/cosmic.nix @@ -0,0 +1,4 @@ +{...}: { + services.displayManager.cosmic-greeter.enable = true; + services.desktopManager.cosmic.enable = true; +} diff --git a/nixcfgs/modules/nixos/desktop/gnome.nix b/nixcfgs/modules/nixos/desktop/gnome.nix new file mode 100644 index 0000000..12eb750 --- /dev/null +++ b/nixcfgs/modules/nixos/desktop/gnome.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: + +{ + services.desktopManager.gnome.enable = true; +} diff --git a/nixcfgs/modules/nixos/desktop/hyprland.nix b/nixcfgs/modules/nixos/desktop/hyprland.nix new file mode 100644 index 0000000..85c0f9e --- /dev/null +++ b/nixcfgs/modules/nixos/desktop/hyprland.nix @@ -0,0 +1,22 @@ +{ + pkgs, + inputs, + ... +}: { + programs.hyprland = { + enable = true; + withUWSM = false; + xwayland.enable = true; + }; + + environment.systemPackages = [ + inputs.caelestia-shell.packages.x86_64-linux.default + pkgs.mako + pkgs.rofi-wayland + pkgs.xdg-desktop-portal-wlr + pkgs.xdg-desktop-portal-hyprland + pkgs.hyprpolkitagent + pkgs.cliphist + pkgs.grimblast + ]; +} diff --git a/nixcfgs/modules/nixos/desktop/kde.nix b/nixcfgs/modules/nixos/desktop/kde.nix new file mode 100644 index 0000000..2fdeb09 --- /dev/null +++ b/nixcfgs/modules/nixos/desktop/kde.nix @@ -0,0 +1,6 @@ +{ config, pkgs, ... }: + +{ + services.desktopManager.plasma6.enable = true; +} + diff --git a/nixcfgs/modules/nixos/desktop/niri.nix b/nixcfgs/modules/nixos/desktop/niri.nix new file mode 100644 index 0000000..5916b1c --- /dev/null +++ b/nixcfgs/modules/nixos/desktop/niri.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: { + programs.niri.enable = true; + environment.systemPackages = with pkgs; [ + waybar + mako + rofi + ]; +} diff --git a/nixcfgs/modules/nixos/disable-nvidia.nix b/nixcfgs/modules/nixos/disable-nvidia.nix new file mode 100644 index 0000000..f8e6120 --- /dev/null +++ b/nixcfgs/modules/nixos/disable-nvidia.nix @@ -0,0 +1,26 @@ +{ pkgs, ... }: + +{ + boot.extraModprobeConfig = '' + blacklist nouveau + options nouveau modeset=0 + ''; + + services.udev.extraRules = '' + # Remove NVIDIA USB xHCI Host Controller devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1" + # Remove NVIDIA USB Type-C UCSI devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1" + # Remove NVIDIA Audio devices, if present + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1" + # Remove NVIDIA VGA/3D controller devices + ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1" + ''; + services.xserver.videoDrivers = [ "modesetting" ]; + boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_drm" "nvidia_modeset" ]; + hardware.nvidia = { + # enable = false; + modesetting.enable = false; + powerManagement.enable = false; + }; +} diff --git a/nixcfgs/modules/nixos/display-manager/gdm.nix b/nixcfgs/modules/nixos/display-manager/gdm.nix new file mode 100644 index 0000000..a046d4b --- /dev/null +++ b/nixcfgs/modules/nixos/display-manager/gdm.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + services.displayManager.gdm = { + enable = true; + wayland = true; + }; +} diff --git a/nixcfgs/modules/nixos/display-manager/ly.nix b/nixcfgs/modules/nixos/display-manager/ly.nix new file mode 100644 index 0000000..8a715e7 --- /dev/null +++ b/nixcfgs/modules/nixos/display-manager/ly.nix @@ -0,0 +1,3 @@ +{...}: { + services.displayManager.ly.enable = true; +} diff --git a/nixcfgs/modules/nixos/display-manager/sddm.nix b/nixcfgs/modules/nixos/display-manager/sddm.nix new file mode 100644 index 0000000..b654af2 --- /dev/null +++ b/nixcfgs/modules/nixos/display-manager/sddm.nix @@ -0,0 +1,34 @@ +{pkgs, ...}: + +# See https://www.reddit.com/r/NixOS/comments/1kcj34p/how_to_apply_this_sddm_theme_on_nixos/ +let + custom-sddm-astronaut = pkgs.sddm-astronaut.override { + embeddedTheme = "astronaut"; + #themeConfig = { + # Background = "path/to/background.jpg"; + # Font = "M+1 Nerd Font"; + #}; + }; + +in { + # Enable the KDE Plasma Desktop Environment. + services.displayManager.sddm = { + enable = true; + extraPackages = with pkgs; [ + custom-sddm-astronaut + ]; + + theme = "sddm-astronaut-theme"; + settings = { + Theme = { + Current = "sddm-astronaut-theme"; + }; + }; + }; + + environment.systemPackages = with pkgs; [ + custom-sddm-astronaut + kdePackages.qtmultimedia + ]; + +} diff --git a/nixcfgs/modules/nixos/docker.nix b/nixcfgs/modules/nixos/docker.nix new file mode 100644 index 0000000..38adcb4 --- /dev/null +++ b/nixcfgs/modules/nixos/docker.nix @@ -0,0 +1,16 @@ +{pkgs, ...}: { + virtualisation = { + docker.enable = true; + podman.enable = true; + }; + + # systemd.services.docker = { + # serviceConfig = { + # Environment = [ + # "HTTP_PROXY=127.0.0.1:7897" + # "HTTPS_PROXY=127.0.0.1:7897" + # "NO_PROXY=localhost,127.0.0.1,.example.com" + # ]; + # }; + # }; +} diff --git a/nixcfgs/modules/nixos/firefox.nix b/nixcfgs/modules/nixos/firefox.nix new file mode 100644 index 0000000..ee55d3c --- /dev/null +++ b/nixcfgs/modules/nixos/firefox.nix @@ -0,0 +1,76 @@ +{...}: { + programs.firefox = { + enable = true; + + languagePacks = ["zh-CN"]; + + preferences = { + "widget.use-xdg-desktop-portal.file-picker" = 1; + "widget.use-xdg-desktop-portal.mime-handler" = 1; + "screenshots.browser.component.enabled" = false; + "toolkit.telemetry.enabled" = false; + "toolkit.telemetry.archive.enabled" = false; + "browser.shell.checkDefaultBrowser" = false; + "browser.contentblocking.category" = "strict"; + "browser.formfill.enable" = false; + "extensions.formautofill.creditCards.enabled" = false; + "dom.forms.autocomplete.formautofill" = false; + "browser.urlbar.update2.engineAliasRefresh" = true; + "browser.newtabpage.activity-stream.showSponsored" = false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = false; + }; + + policies = { + DisableTelemetry = true; + BlockAboutConfig = false; + DisableFirefoxScreenshots = true; + DontCheckDefaultBrowser = true; + + ExtensionSettings = with builtins; let + extension = short: uuid: { + name = uuid; + value = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/${short}/latest.xpi"; + installation_mode = "force_installed"; + }; + }; + in + listToAttrs [ + (extension "ublock-origin" "uBlock0@raymondhill.net") + (extension "multi-account-containers" "@testpilot-containers") + (extension "side-view" "@webcompat@mozilla.org") + (extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}") + ]; + + SearchEngines = { + Default = "DuckDuckGo"; + Add = [ + { + Alias = "@np"; + Description = "Search in NixOS Packages"; + IconURL = "https://nixos.org/favicon.ico"; + Method = "GET"; + Name = "NixOS Packages"; + URLTemplate = "https://search.nixos.org/packages?from=0&size=200&sort=relevance&type=packages&query={searchTerms}"; + } + { + Alias = "@no"; + Description = "Search in NixOS Options"; + IconURL = "https://nixos.org/favicon.ico"; + Method = "GET"; + Name = "NixOS Options"; + URLTemplate = "https://search.nixos.org/options?from=0&size=200&sort=relevance&type=packages&query={searchTerms}"; + } + { + Alias = "@hm"; + Description = "Search in Home Manager Options"; + IconURL = "https://nixos.org/favicon.ico"; + Method = "GET"; + Name = "Home Manager options"; + URLTemplate = "https://home-manager-options.extranix.com/?query={searchTerms}"; + } + ]; + }; + }; + }; +} diff --git a/nixcfgs/modules/nixos/fonts.nix b/nixcfgs/modules/nixos/fonts.nix new file mode 100644 index 0000000..c272d0b --- /dev/null +++ b/nixcfgs/modules/nixos/fonts.nix @@ -0,0 +1,72 @@ +{ + pkgs, + config, + ... +}: let + fontPkgs = [ + pkgs.maple-mono.NF + pkgs.sarasa-gothic + pkgs.lxgw-wenkai + pkgs.lxgw-neoxihei + pkgs.noto-fonts-cjk-sans + pkgs.noto-fonts + pkgs.noto-fonts-emoji + pkgs.nerd-fonts.jetbrains-mono + ]; +in { + environment.systemPackages = fontPkgs; + + fonts = { + enableDefaultPackages = true; + packages = fontPkgs; + + fontconfig = { + enable = true; + defaultFonts = { + monospace = [ + "Maple Mono NF" + "JetBrainsMono Nerd Font" + ]; + serif = ["LXGW WenKai"]; + sansSerif = ["LXGW Neo XiHei"]; + }; + }; + fontDir.enable = true; + }; + + system.fsPackages = [pkgs.bindfs]; + fileSystems = let + mkRoSymBind = path: { + device = path; + fsType = "fuse.bindfs"; + options = [ + "ro" + "resolve-symlinks" + "x-gvfs-hide" + ]; + }; + aggregated = pkgs.buildEnv { + name = "system-fonts-and-icons"; + paths = + fontPkgs + ++ [ + # Add cursor supports + pkgs.libsForQt5.breeze-qt5 + ]; # with pkgs; [ + # libsForQt5.breeze-qt5 + + # noto-fonts + # noto-fonts-emoji + # noto-fonts-cjk-sans + # noto-fonts-cjk-serif + # ]; + pathsToLink = [ + "/share/fonts" + "/share/icons" + ]; + }; + in { + "/usr/share/icons" = mkRoSymBind "${aggregated}/share/icons"; + "/usr/share/fonts" = mkRoSymBind "${aggregated}/share/fonts"; + }; +} diff --git a/nixcfgs/modules/nixos/guest.nix b/nixcfgs/modules/nixos/guest.nix new file mode 100644 index 0000000..9a95f1a --- /dev/null +++ b/nixcfgs/modules/nixos/guest.nix @@ -0,0 +1,25 @@ +{pkgs, ...}: { + users.users.guest = { + isNormalUser = true; + description = "Guest user"; + home = "/home/guest"; + extraGroups = [""]; # 可选,是否允许 sudo + shell = pkgs.bash; + # hashedPassword = ""; # 空密码,意味着需要手动设置或禁用登录 + # 或者直接禁止密码登录: + hashedPassword = null; + }; + + systemd.services."guest-reset-home" = { + description = "Reset guest home directory on boot"; + wantedBy = ["multi-user.target"]; + serviceConfig = { + Type = "oneshot"; + ExecStart = '' + rm -rf /home/guest/* + cp -r /etc/skel/. /home/guest/ + chown -R guest:guest /home/guest + ''; + }; + }; +} diff --git a/nixcfgs/modules/nixos/host-machine.nix b/nixcfgs/modules/nixos/host-machine.nix new file mode 100644 index 0000000..efa604b --- /dev/null +++ b/nixcfgs/modules/nixos/host-machine.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: +{ + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + environment.systemPackages = with pkgs; [ + pciutils + usbutils + smartmontools + v4l-utils + ]; +} diff --git a/nixcfgs/modules/nixos/laptop.nix b/nixcfgs/modules/nixos/laptop.nix new file mode 100644 index 0000000..6ffca65 --- /dev/null +++ b/nixcfgs/modules/nixos/laptop.nix @@ -0,0 +1,11 @@ +# ~/.config/nix-config/common/packages-headless.nix +{ pkgs, ... }: + +{ +# nixpkgs.config.allowUnfree = true; + environment.systemPackages = with pkgs; [ + powertop + ]; +} + + diff --git a/nixcfgs/modules/nixos/libvirt.nix b/nixcfgs/modules/nixos/libvirt.nix new file mode 100644 index 0000000..a2bd438 --- /dev/null +++ b/nixcfgs/modules/nixos/libvirt.nix @@ -0,0 +1,30 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + virt-manager + dnsmasq + virtiofsd + ]; + programs.virt-manager.enable = true; + virtualisation.libvirtd = { + enable = true; + qemu = { + package = pkgs.qemu_kvm; + runAsRoot = true; + swtpm.enable = true; + ovmf = { + enable = true; + packages = [ + (pkgs.OVMF.override { + secureBoot = true; + tpmSupport = true; + }).fd + ]; + }; + }; + }; + users.users.js0ny = { + extraGroups = ["libvirtd"]; + }; + networking.firewall.trustedInterfaces = ["virbr0"]; + virtualisation.spiceUSBRedirection.enable = true; +} diff --git a/nixcfgs/modules/nixos/nvidia.nix b/nixcfgs/modules/nixos/nvidia.nix new file mode 100644 index 0000000..107192d --- /dev/null +++ b/nixcfgs/modules/nixos/nvidia.nix @@ -0,0 +1,11 @@ +{ + hardware.nvidia = { + open = false; + }; + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.graphics = { + enable = true; + enable32Bit = true; + }; +} + diff --git a/nixcfgs/modules/nixos/obs-studio.nix b/nixcfgs/modules/nixos/obs-studio.nix new file mode 100644 index 0000000..07821dd --- /dev/null +++ b/nixcfgs/modules/nixos/obs-studio.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: +{ + programs.obs-studio = { + enable = true; + enableVirtualCamera = true; + }; + boot.extraModprobeConfig = '' + options v4l2loopback devices=1 video_nr=2 card_label="OBS Virtual Camera" exclusive_caps=1 + ''; +} diff --git a/nixcfgs/modules/nixos/packages.nix b/nixcfgs/modules/nixos/packages.nix new file mode 100644 index 0000000..43605f0 --- /dev/null +++ b/nixcfgs/modules/nixos/packages.nix @@ -0,0 +1,17 @@ +# ~/.config/nix-config/common/packages-headless.nix +{pkgs, ...}: { + # nixpkgs.config.allowUnfree = true; + environment.systemPackages = with pkgs; [ + vim + wget + curl + git + tmux + wl-clipboard + nix-index + file + unzip + zip + pkg-config + ]; +} diff --git a/nixcfgs/modules/nixos/rime.nix b/nixcfgs/modules/nixos/rime.nix new file mode 100644 index 0000000..2576f55 --- /dev/null +++ b/nixcfgs/modules/nixos/rime.nix @@ -0,0 +1,26 @@ +{pkgs, ...}: { + # environment.variables = { + # GTK_IM_MODULE = "fcitx"; + # QT_IM_MODULE = "fcitx"; + # XMODIFIERS = "@im=fcitx"; + # INPUT_METHOD = "fcitx"; + # }; + i18n.inputMethod = { + enable = true; + # enabled = "fcitx5"; dep. + enableGtk2 = true; + enableGtk3 = true; + type = "fcitx5"; + fcitx5 = { + waylandFrontend = true; + plasma6Support = true; + addons = with pkgs; [ + fcitx5-rime + kdePackages.fcitx5-configtool + kdePackages.fcitx5-qt + fcitx5-gtk + fcitx5-lua + ]; + }; + }; +} diff --git a/nixcfgs/modules/nixos/steam.nix b/nixcfgs/modules/nixos/steam.nix new file mode 100644 index 0000000..38bb1dc --- /dev/null +++ b/nixcfgs/modules/nixos/steam.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + nixpkgs.config.allowUnfree = true; + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + fontPackages = with pkgs; [ + lxgw-neoxihei + ]; + }; +} diff --git a/nixcfgs/modules/nixos/waydroid.nix b/nixcfgs/modules/nixos/waydroid.nix new file mode 100644 index 0000000..cc42c6b --- /dev/null +++ b/nixcfgs/modules/nixos/waydroid.nix @@ -0,0 +1,22 @@ +{ pkgs, inputs, ... }: +{ + virtualisation.waydroid.enable = true; + nixpkgs.overlays = [ + inputs.nur.overlays.default + ]; + # waydroid-script: Tool to install libhoudini (arm support), magisk, ... + # usage: sudo waydroid-script + environment.systemPackages = with pkgs; [ + nur.repos.ataraxiasjel.waydroid-script + waydroid-helper + ]; + systemd = { + packages = [ pkgs.waydroid-helper ]; + services.waydroid-mount = { + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + ExecStart = "${pkgs.waydroid-helper}/bin/waydroid-helper --start-mount"; + }; + }; + }; +} diff --git a/nixcfgs/modules/nixos/winboat.nix b/nixcfgs/modules/nixos/winboat.nix new file mode 100644 index 0000000..d82779f --- /dev/null +++ b/nixcfgs/modules/nixos/winboat.nix @@ -0,0 +1,5 @@ +{inputs, ...}: { + environment.systemPackages = [ + inputs.winboat + ]; +} diff --git a/nixcfgs/modules/nixos/wine.nix b/nixcfgs/modules/nixos/wine.nix new file mode 100644 index 0000000..5771693 --- /dev/null +++ b/nixcfgs/modules/nixos/wine.nix @@ -0,0 +1,8 @@ +# https://nixos.wiki/wiki/Wine +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + wineWowPackages.stable + winetricks + wineWowPackages.waylandFull + ]; +} diff --git a/nixcfgs/users/js0ny/default.nix b/nixcfgs/users/js0ny/default.nix new file mode 100644 index 0000000..8ff6193 --- /dev/null +++ b/nixcfgs/users/js0ny/default.nix @@ -0,0 +1,23 @@ +# ~/.config/nixcfgs/users/js0ny/default.nix +{ + pkgs, + nix-flatpak, + plasma-manager, + ... +}: +{ + imports = [ + ../../modules/home/programs/fzf.nix + ../../modules/home/programs/lsd.nix + ../../modules/home/programs/zoxide.nix + ]; + nixpkgs.config.allowUnfree = true; + home.username = "js0ny"; + home.homeDirectory = "/home/js0ny"; + + home.packages = with pkgs; [ + home-manager + ]; + + home.stateVersion = "25.05"; +} diff --git a/nixcfgs/users/js0ny/nixvirt.nix b/nixcfgs/users/js0ny/nixvirt.nix new file mode 100644 index 0000000..d1cf93c --- /dev/null +++ b/nixcfgs/users/js0ny/nixvirt.nix @@ -0,0 +1,27 @@ +# ~/.config/nixcfgs/users/js0ny/default.nix +{ + pkgs, + nix-flatpak, + plasma-manager, + ... +}: { + imports = [ + ./default.nix + ./programs/gnome.nix + ./programs/shell.nix + ./programs/firefox.nix + # ./programs/floorp.nix + ../../modules/home/gnome-keyrings.nix + ../../modules/home/dev/nix.nix + ../../modules/home/dev/python.nix + ../../modules/home/programs/eza.nix + ../../modules/home/programs/fzf.nix + ../../modules/home/programs/lsd.nix + ../../modules/home/programs/nvim.nix + ../../modules/home/programs/starship.nix + ../../modules/home/programs/zoxide.nix + # ./flatpak.nix + ]; + + home.stateVersion = "25.05"; +} diff --git a/nixcfgs/users/js0ny/packages/catppuccin.nix b/nixcfgs/users/js0ny/packages/catppuccin.nix new file mode 100644 index 0000000..67bee4e --- /dev/null +++ b/nixcfgs/users/js0ny/packages/catppuccin.nix @@ -0,0 +1,24 @@ +{ pkgs, ... }: +let + my-catppuccin-kde = pkgs.catppuccin-kde.override { + flavour = [ + "mocha" + "latte" + ]; + accents = [ "pink" ]; + winDecStyles = [ "classic" ]; + }; + my-catppuccin-gtk = pkgs.catppuccin-gtk.override { + accents = [ "pink" ]; + variant = "mocha"; + }; +in +{ + + home.packages = with pkgs; [ + catppuccin + my-catppuccin-gtk + my-catppuccin-kde + catppuccin-fcitx5 + ]; +} diff --git a/nixcfgs/users/js0ny/packages/cli.nix b/nixcfgs/users/js0ny/packages/cli.nix new file mode 100644 index 0000000..df68a1c --- /dev/null +++ b/nixcfgs/users/js0ny/packages/cli.nix @@ -0,0 +1,55 @@ +# ~/.config/nix-config/common/packages-headless.nix +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + rclone + age + aichat + beancount + bat + btop + gnumake + chezmoi + cmake + curlie + duf + dust + fd + ffmpeg + delta + glow + hyperfine + just + lazygit + lsd + pandoc + dos2unix + nushell + procs + ripgrep + ripgrep-all + tlrc + zoxide + vim + wget + git + fastfetch + fzf + kitty + zsh + fish + zoxide + wakatime-cli + sdcv + # Langs + # lua luajit + lua51Packages.luarocks + ghostscript + # Misc ta-lib ddgr protonvpn-cli + markdown-oxide + nushell + powershell + powershell-editor-services + package-version-server + ]; +} diff --git a/nixcfgs/users/js0ny/packages/flatpak.nix b/nixcfgs/users/js0ny/packages/flatpak.nix new file mode 100644 index 0000000..ca857b1 --- /dev/null +++ b/nixcfgs/users/js0ny/packages/flatpak.nix @@ -0,0 +1,52 @@ +# https://github.com/gmodena/nix-flatpak +{home, ...}: { + services.flatpak.enable = true; + services.flatpak.remotes = [ + { + name = "flathub"; + location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + } + ]; + services.flatpak.packages = [ + # { appId = "com.google.Chrome"; origin = "flathub" } + # "com.google.Chrome" + # "com.valvesoftware.Steam" + "com.qq.QQ" + "com.tencent.WeChat" + # "eu.betterbird.Betterbird" + # "com.baidu.NetDisk" + "com.discordapp.Discord" + "com.spotify.Client" + "com.google.EarthPro" + "com.wps.Office" + "md.obsidian.Obsidian" + # "app.zen_browser.zen" + # "com.vivaldi.Vivaldi" + "com.getpostman.Postman" + ]; + services.flatpak.overrides = { + global = { + Context = { + # Force wayland by default + filesystems = [ + "/run/current-system/sw/share/fonts:ro" + "xdg-config/fontconfig:ro" + # If user font is set, it is required to access /nix/store + # since flatpak apps cannot read ~/.config/fontconfig/conf.d/* + # TODO: This is a bad practice, trying to look for a better solution + "/nix/store:ro" + "xdg-data/fonts:ro" + ]; + }; + }; + "com.qq.QQ".Context.sockets = ["x11"]; + "com.tencent.WeChat" = { + Context.sockets = ["x11"]; + Environment = { + # WeChat does not support wayland & wayland-ime + QT_IM_MODULE = "fcitx"; + }; + }; + "md.obsidian.Obsidian".Context.sockets = ["wayland"]; + }; +} diff --git a/nixcfgs/users/js0ny/packages/fonts.nix b/nixcfgs/users/js0ny/packages/fonts.nix new file mode 100644 index 0000000..b2f2bc1 --- /dev/null +++ b/nixcfgs/users/js0ny/packages/fonts.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + fonts.fontconfig.enable = true; + fonts.fontconfig = { + defaultFonts = { + monospace = [ + "Maple Mono NF" + "JetBrainsMono Nerd Font" + ]; + serif = ["LXGW WenKai"]; + sansSerif = ["LXGW Neo XiHei"]; + }; + }; +} diff --git a/nixcfgs/users/js0ny/packages/gui.nix b/nixcfgs/users/js0ny/packages/gui.nix new file mode 100644 index 0000000..ddf883d --- /dev/null +++ b/nixcfgs/users/js0ny/packages/gui.nix @@ -0,0 +1,74 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + kitty + ghostty + alacritty + kdePackages.dolphin + kdePackages.okular + kdePackages.elisa + papirus-icon-theme + firefox + pcloud + telegram-desktop + steam + # Use Wayland for Jetbrains + (jetbrains.idea-ultimate.override { + vmopts = ''-Dawt.toolkit.name=WLToolkit''; + }) + (jetbrains.rider.override { + vmopts = ''-Dawt.toolkit.name=WLToolkit''; + }) + warp-terminal + # clash-verge-rev + haruna + sioyek + vimiv-qt + imv + localsend + neovide + cherry-studio + vivaldi + kdePackages.kdeconnect-kde + picard + qutebrowser + ryubing + qbittorrent + protonvpn-gui + proton-pass + protonmail-bridge-gui + mpv + neovim-qt + goldendict-ng + ]; + + xdg.desktopEntries = { + # Force wayland when running goldendict-ng + "io.github.xiaoyifang.goldendict_ng" = { + name = "GoldenDict-ng"; + genericName = "Multiformat Dictionary"; + comment = "A feature-rich dictionary lookup program"; + icon = "goldendict"; + type = "Application"; + terminal = false; + categories = [ + "Office" + "Dictionary" + "Education" + "Qt" + ]; + mimeType = [ + "x-scheme-handler/goldendict" + "x-scheme-handler/dict" + ]; + exec = "env GOLDENDICT_FORCE_WAYLAND=1 ${pkgs.goldendict-ng}/bin/goldendict %u"; + settings = { + "GenericName[zh_CN]" = "多格式字典"; + "Comment[zh_CN]" = "多功能字典查询软件"; + "Keywords" = "dict;dictionary"; + "Keywords[zh_CN]" = "dict;dictionary;字典;"; + "StartupWMClass" = "GoldenDict-ng"; + }; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/chromium.nix b/nixcfgs/users/js0ny/programs/chromium.nix new file mode 100644 index 0000000..b406b83 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/chromium.nix @@ -0,0 +1,19 @@ +{pkgs, ...}: { + programs.chromium = { + enable = true; + commandLineArgs = [ + "--enable-wayland-ime" + "--enable-features=WaylandWindowDecorations" + "--enable-features=UseOzonePlatform" + "--ozone-platform-hint=auto" + ]; + extensions = [ + {id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";} # ublock origin + {id = "ghmbeldphafepmbegfdlkpapadhbakde";} # proton pass + {id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";} # dark reader + {id = "gfbliohnnapiefjpjlpjnehglfpaknnc";} # surfingkeys + {id = "bpoadfkcbjbfhfodiogcnhhhpibjhbnh";} # immersive translate + {id = "dhdgffkkebhmkfjojejmpbldmpobfkfo";} # tampermonkey + ]; + }; +} diff --git a/nixcfgs/users/js0ny/programs/distrobox.nix b/nixcfgs/users/js0ny/programs/distrobox.nix new file mode 100644 index 0000000..a12dea2 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/distrobox.nix @@ -0,0 +1,18 @@ +{ config, ... }: +{ + programs.distrobox = { + enable = true; + containers = { + Xilinx = { + # Container to run Xilinx Vivado Toolchain 2022.2 + image = "ubuntu:22.04"; + additional_packages = "libncurses5-dev libtinfo5 ncurses-compat-libs lsb-release graphviz openssl xscreensaver gcc c++ xvfb xorg-dev libwebkit2gtk-4.0-37 libgtk-3-dev libgtk-4-dev libgvfsdbus gvfs libwayland-client0 libwayland-cursor0"; + home = "${config.home.homeDirectory}/.local/distrobox/Xilinx"; + init_hooks = [ + "sudo chown $USER:$USER /opt" + "sudo mkdir -p /opt/Xilinx" + ]; + }; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/firefox.nix b/nixcfgs/users/js0ny/programs/firefox.nix new file mode 100644 index 0000000..25e0b4a --- /dev/null +++ b/nixcfgs/users/js0ny/programs/firefox.nix @@ -0,0 +1,87 @@ +{ pkgs, ... }: +{ + programs.firefox = { + enable = true; + profiles.default = { + search.engines = { + archwiki = { + name = "ArchWiki"; + urls = [ + { + template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; + } + ]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = [ "@aw" ]; + }; + aur = { + name = "Arch User Repository"; + urls = [ + { + template = "https://aur.archlinux.org/?K={searchTerms}"; + } + ]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = [ "@aur" ]; + }; + arch-packages = { + name = "ArchLinux Packages"; + urls = [ { template = "https://archlinux.org/?q={searchTerms}"; } ]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = [ "@pac" ]; + }; + chatgpt = { + name = "ChatGPT"; + urls = [ { template = "https://chatgpt.com/?q={searchTerms}"; } ]; + icon = "https://chatgpt.com/favicon.ico"; + definedAliases = [ "@gpt" ]; + }; + scoop = { + name = "scoop"; + urls = [ { template = "https://scoop.sh/#/apps?q={searchTerms}"; } ]; + icon = "https://scoop.sh/favicon.ico"; + definedAliases = [ "@sc" ]; + }; + perplexity = { + name = "Perplexity"; + urls = [ { template = "https://www.perplexity.ai/?q={searchTerms}"; } ]; + icon = "https://perplexity.ai/favicon.ico"; + definedAliases = [ "@pplx" ]; + }; + winget = { + name = "Windows Package Manager"; + urls = [ { template = "https://winget.ragerworks.com/search/all/{searchTerms}"; } ]; + icon = "https://microsoft.com/favicon.ico"; + definedAliases = [ "@win" ]; + }; + github = { + name = "GitHub Repository"; + urls = [ { template = "https://github.com/search?type=repositories&q={searchTerms}"; } ]; + icon = "https://github.com/favicon.ico"; + definedAliases = [ "@gh" ]; + }; + }; + extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ + darkreader + rsshub-radar + proton-pass + surfingkeys + web-archives + # immersive-translate + tampermonkey + stylus + foxy-gestures + google-container + refined-github + downthemall + material-icons-for-github + single-file + return-youtube-dislikes + steam-database + bilisponsorblock + sponsorblock + buster-captcha-solver + ]; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/floorp.nix b/nixcfgs/users/js0ny/programs/floorp.nix new file mode 100644 index 0000000..1d884aa --- /dev/null +++ b/nixcfgs/users/js0ny/programs/floorp.nix @@ -0,0 +1,139 @@ +{pkgs, ...}: { + programs.floorp = { + enable = true; + package = pkgs.floorp; + policies = { + DisableTelemetry = true; + BlockAboutConfig = false; + DisableFirefoxScreenshots = true; + DontCheckDefaultBrowser = true; + + ExtensionSettings = with builtins; let + extension = short: uuid: { + name = uuid; + value = { + install_url = "https://addons.mozilla.org/firefox/downloads/latest/${short}/latest.xpi"; + installation_mode = "force_installed"; + }; + }; + in + listToAttrs [ + (extension "ublock-origin" "uBlock0@raymondhill.net") + (extension "multi-account-containers" "@testpilot-containers") + (extension "side-view" "@webcompat@mozilla.org") + (extension "clearurls" "{74145f27-f039-47ce-a470-a662b129930a}") + ]; + + SearchEngines = { + Default = "DuckDuckGo"; + Add = [ + { + Alias = "@np"; + Description = "Search in NixOS Packages"; + IconURL = "https://nixos.org/favicon.ico"; + Method = "GET"; + Name = "NixOS Packages"; + URLTemplate = "https://search.nixos.org/packages?from=0&size=200&sort=relevance&type=packages&query={searchTerms}"; + } + { + Alias = "@no"; + Description = "Search in NixOS Options"; + IconURL = "https://nixos.org/favicon.ico"; + Method = "GET"; + Name = "NixOS Options"; + URLTemplate = "https://search.nixos.org/options?from=0&size=200&sort=relevance&type=packages&query={searchTerms}"; + } + { + Alias = "@hm"; + Description = "Search in Home Manager Options"; + IconURL = "https://nixos.org/favicon.ico"; + Method = "GET"; + Name = "Home Manager options"; + URLTemplate = "https://home-manager-options.extranix.com/?query={searchTerms}"; + } + ]; + }; + }; + profiles.default = { + search.engines = { + archwiki = { + name = "ArchWiki"; + urls = [ + { + template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; + } + ]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = ["@aw"]; + }; + aur = { + name = "Arch User Repository"; + urls = [ + { + template = "https://aur.archlinux.org/?K={searchTerms}"; + } + ]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = ["@aur"]; + }; + arch-packages = { + name = "ArchLinux Packages"; + urls = [{template = "https://archlinux.org/?q={searchTerms}";}]; + icon = "https://archlinux.org/favicon.ico"; + definedAliases = ["@pac"]; + }; + chatgpt = { + name = "ChatGPT"; + urls = [{template = "https://chatgpt.com/?q={searchTerms}";}]; + icon = "https://chatgpt.com/favicon.ico"; + definedAliases = ["@gpt"]; + }; + scoop = { + name = "scoop"; + urls = [{template = "https://scoop.sh/#/apps?q={searchTerms}";}]; + icon = "https://scoop.sh/favicon.ico"; + definedAliases = ["@sc"]; + }; + perplexity = { + name = "Perplexity"; + urls = [{template = "https://www.perplexity.ai/?q={searchTerms}";}]; + icon = "https://perplexity.ai/favicon.ico"; + definedAliases = ["@pplx"]; + }; + winget = { + name = "Windows Package Manager"; + urls = [{template = "https://winget.ragerworks.com/search/all/{searchTerms}";}]; + icon = "https://microsoft.com/favicon.ico"; + definedAliases = ["@win"]; + }; + github = { + name = "GitHub Repository"; + urls = [{template = "https://github.com/search?type=repositories&q={searchTerms}";}]; + icon = "https://github.com/favicon.ico"; + definedAliases = ["@gh"]; + }; + }; + extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [ + darkreader + rsshub-radar + proton-pass + surfingkeys + web-archives + # immersive-translate + tampermonkey + stylus + foxy-gestures + google-container + refined-github + downthemall + material-icons-for-github + single-file + return-youtube-dislikes + steam-database + bilisponsorblock + sponsorblock + buster-captcha-solver + ]; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/gnome.nix b/nixcfgs/users/js0ny/programs/gnome.nix new file mode 100644 index 0000000..76160d3 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/gnome.nix @@ -0,0 +1,94 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + gnome-tweaks + sushi + dconf-editor + gnomeExtensions.dash-to-dock + gnomeExtensions.caffeine + gnomeExtensions.logo-menu + gnomeExtensions.kimpanel + gnomeExtensions.clipboard-indicator + gnomeExtensions.advanced-alttab-window-switcher + gnomeExtensions.paperwm + gnomeExtensions.blur-my-shell + gnomeExtensions.appindicator + gnomeExtensions.gsconnect + ]; + programs.gnome-shell.enable = true; + programs.gnome-shell.extensions = [ + { package = pkgs.gnomeExtensions.dash-to-dock; } + { package = pkgs.gnomeExtensions.caffeine; } + { package = pkgs.gnomeExtensions.logo-menu; } + { package = pkgs.gnomeExtensions.kimpanel; } + { package = pkgs.gnomeExtensions.appindicator; } + { package = pkgs.gnomeExtensions.gsconnect; } + { package = pkgs.gnomeExtensions.clipboard-indicator; } + { package = pkgs.gnomeExtensions.advanced-alttab-window-switcher; } + { package = pkgs.gnomeExtensions.blur-my-shell; } + ]; + + dconf.settings = { + "org/gnome/desktop/interface" = { + clock-show-seconds = true; + clock-show-weekday = true; + icon-theme = "Papirus"; + accent-color = "pink"; + show-battery-percentage = true; + cursor-theme = "Adwaita"; + }; + "org/gnome/epiphany" = { + ask-for-default = false; + }; + "org/gnome/epiphany/web" = { + remember-passwords = false; + enable-mouse-gestures = true; + }; + "org/gnome/shell/extensions/Logo-menu" = { + menu-button-icon-image = 23; + symbolic-icon = true; + use-custom-icon = false; + }; + "org/gnome/shell" = { + favorite-apps = [ + "com.mitchellh.ghostty.desktop" + "firefox.desktop" + "code.desktop" + ]; + }; + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-0" = { + name = "Open File Explorer"; + command = "dolphin"; + binding = "e"; + }; + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-1" = { + name = "Open Terminal via Win-R"; + command = "ghostty"; + binding = "r"; + }; + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-2" = { + name = "Open Terminal via Ctrl-Alt-T"; + command = "ghostty"; + binding = "t"; + }; + "org/gnome/settings-daemon/plugins/media-keys" = { + custom-keybindings = [ + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-0/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-1/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom-2/" + ]; + }; + "org/freedesktop/tracker/miner/files" = { + "index-recursive-directories" = [ + "&DESKTOP" + "&DOCUMENTS" + "&MUSIC" + "&PICTURES" + "&VIDEOS" + "/home/js0ny/Obsidian" + ]; + }; + }; + + # qt.style.name = "adwaita"; +} diff --git a/nixcfgs/users/js0ny/programs/mime.nix b/nixcfgs/users/js0ny/programs/mime.nix new file mode 100644 index 0000000..29dae43 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/mime.nix @@ -0,0 +1,13 @@ +{ + xdg.mime.enable = true; + xdg.mimeApps = { + enable = true; + defaultApplications = { + "application/pdf" = "org.kde.okular.desktop"; + "text/plain" = "nvim-qt.desktop"; + "text/x-csrc" = "nvim-qt.desktop"; + "text/x-chdr" = "nvim-qt.desktop"; + "inode/directory" = "org.kde.dolphin.desktop"; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/plasma.nix b/nixcfgs/users/js0ny/programs/plasma.nix new file mode 100644 index 0000000..134e719 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/plasma.nix @@ -0,0 +1,142 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + kdePackages.yakuake + krunner-vscodeprojects + jetbrains-runner + ]; + programs.plasma = { + enable = true; + session.sessionRestore.restoreOpenApplicationsOnLogin = "startWithEmptySession"; + fonts = { + fixedWidth.family = "Maple Mono NF"; + fixedWidth.pointSize = 10; + general.family = "LXGW Neo XiHei"; + general.pointSize = 10; + }; + krunner = { + position = "center"; + }; + workspace = { + iconTheme = "Papirus"; + colorScheme = "BreezeDark"; + }; + kwin = { + virtualDesktops.number = 8; + titlebarButtons = { + left = [ + "more-window-actions" + "on-all-desktops" + "keep-above-windows" + ]; + }; + }; + shortcuts = { + yakuake = { + "toggle-window-state" = "Meta+`"; + }; + }; + input.touchpads = [ + { + disableWhileTyping = true; + enable = true; + leftHanded = true; + middleButtonEmulation = true; + name = "ASUP1208:00 093A:3011 Touchpad"; + productId = "3011"; + vendorId = "093A"; + naturalScroll = true; + pointerSpeed = 0; + tapToClick = true; + accelerationProfile = "none"; + scrollSpeed = 0.15; + } + ]; + + panels = [ + # Windows-like panel at the bottom + { + location = "bottom"; + widgets = [ + # "org.kde.plasma.kickoff" + { + name = "org.kde.plasma.kickoff"; + config = { + General = { + icon = "distributor-logo-nixos"; + alphaSort = true; + }; + }; + } + { + name = "org.kde.plasma.icontasks"; + config = { + General = { + launchers = [ + # "applications:org.kde.dolphin.desktop" + "applications:firefox.desktop" + "applications:com.mitchellh.ghostty.desktop" + ]; + }; + }; + } + "org.kde.plasma.marginsseparator" + "org.kde.plasma.systemtray" + { + name = "org.kde.plasma.digitalclock"; + config = { + Appearance = { + dateFormat = "isoDate"; + enabledCalendarPlugins = "alternatecalendar,holidaysevents"; + firstDayOfWeek = 1; + selectedTimeZones = "Local,Asia/Shanghai,Europe/London"; + showSeconds = "Always"; + showWeekNumbers = true; + use24hFormat = 2; + }; + }; + } + "org.kde.plasma.showdesktop" + ]; + } + # Global menu at the top + { + location = "top"; + height = 20; + widgets = [ + "org.kde.plasma.pager" + "org.kde.plasma.windowlist" + "org.kde.plasma.marginsseparator" + ]; + opacity = "translucent"; + hiding = "none"; + } + ]; + }; + programs.okular = { + enable = true; + accessibility.changeColors.mode = "InvertLightness"; + general.mouseMode = "TextSelect"; + }; + programs.kate.enable = true; + programs.kate.editor = { + font = { + family = "Maple Mono NF"; + pointSize = 10; + }; + inputMode = "vi"; + }; + programs.konsole = { + enable = true; + defaultProfile = "Default"; + profiles = { + Default = { + command = "${pkgs.fish}/bin/fish"; + colorScheme = "catppuccin-mocha"; + font = { + name = "Maple Mono NF"; + size = 12; + }; + }; + }; + }; +} diff --git a/nixcfgs/users/js0ny/programs/rime.nix b/nixcfgs/users/js0ny/programs/rime.nix new file mode 100644 index 0000000..ad8d66a --- /dev/null +++ b/nixcfgs/users/js0ny/programs/rime.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: + +let + version = "v13.1.3"; + rimeConfig = pkgs.fetchzip { + url = "https://github.com/amzxyz/rime_wanxiang/releases/download/${version}/rime-wanxiang-zrm-fuzhu.zip"; + sha256 = "sha256-UokSOfGCt7C8/F13BEyy02+rJCqyZcYBWrP/m/Me4D4="; + stripRoot = false; + }; + rimePath = if pkgs.stdenv.isDarwin then "Library/Rime" else ".local/share/fcitx5/rime"; +in +{ + i18n.inputMethod = { + enable = true; + type = "fcitx5"; + fcitx5 = { + waylandFrontend = true; + addons = with pkgs; [ + fcitx5-rime + kdePackages.fcitx5-configtool + kdePackages.fcitx5-qt + fcitx5-gtk + fcitx5-chinese-addons + ]; + }; + }; + home.file.${rimePath} = { + source = rimeConfig; + recursive = true; + }; +} diff --git a/nixcfgs/users/js0ny/programs/shell.nix b/nixcfgs/users/js0ny/programs/shell.nix new file mode 100644 index 0000000..ad5a33f --- /dev/null +++ b/nixcfgs/users/js0ny/programs/shell.nix @@ -0,0 +1,33 @@ +{...}: let + commonAliases = { + v = "nvim"; + g = "lazygit"; + ni = "touch"; + cls = "clear"; + ii = "open"; + c = "code"; + aic = "aichat -s"; + aicc = "aichat -c"; + nrs = "sudo nixos-rebuild switch --flake ~/.dotfiles/nixcfgs"; + }; +in { + programs.fish = { + enable = true; + interactiveShellInit = "set fish_greeting"; + # preferAbbrs = true; + shellAbbrs = commonAliases; + }; + programs.zsh = { + enable = true; + autocd = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + dotDir = "/home/js0ny/.config/zsh"; + shellAliases = commonAliases; + }; + programs.bash = { + enable = true; + shellAliases = commonAliases; + }; + programs.zed-editor.extensions = ["fish"]; +} diff --git a/nixcfgs/users/js0ny/programs/vscode.nix b/nixcfgs/users/js0ny/programs/vscode.nix new file mode 100644 index 0000000..6e319c9 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/vscode.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + programs.vscode = { + package = pkgs.vscode; + enable = true; + }; + + programs.vscode.profiles.default = { + extensions = with pkgs.vscode-extensions; [ + golang.go + vscodevim.vim + pkief.material-icon-theme + catppuccin.catppuccin-vsc + vspacecode.vspacecode + vspacecode.whichkey + ]; + }; +} diff --git a/nixcfgs/users/js0ny/programs/zed-editor.nix b/nixcfgs/users/js0ny/programs/zed-editor.nix new file mode 100644 index 0000000..acf8427 --- /dev/null +++ b/nixcfgs/users/js0ny/programs/zed-editor.nix @@ -0,0 +1,14 @@ +{ pkgs, ... }: +{ + programs.zed-editor = { + enable = true; + extensions = [ + "dockerfile" + "catppuccin" + "toml" + "material-icon-theme" + "git-firefly" + "make" + ]; + }; +} diff --git a/nixcfgs/users/js0ny/zephyrus.nix b/nixcfgs/users/js0ny/zephyrus.nix new file mode 100644 index 0000000..fabb2c4 --- /dev/null +++ b/nixcfgs/users/js0ny/zephyrus.nix @@ -0,0 +1,37 @@ +# ~/.config/nixcfgs/users/js0ny/default.nix +{...}: { + imports = [ + ./default.nix + ./packages/cli.nix + ./packages/gui.nix + ./packages/flatpak.nix + ./packages/fonts.nix + ./packages/catppuccin.nix + ./programs/chromium.nix + ./programs/gnome.nix + ./programs/plasma.nix + ./programs/shell.nix + ./programs/vscode.nix + ./programs/firefox.nix + ./programs/distrobox.nix + ./programs/mime.nix + ./programs/zed-editor.nix + ./programs/rime.nix + ../../modules/home/gnome-keyrings.nix + ../../modules/home/dev/c.nix + ../../modules/home/dev/go.nix + ../../modules/home/dev/java.nix + ../../modules/home/dev/lua.nix + ../../modules/home/dev/nix.nix + ../../modules/home/dev/python.nix + ../../modules/home/programs/eza.nix + ../../modules/home/programs/winboat.nix + ../../modules/home/programs/fzf.nix + ../../modules/home/programs/lsd.nix + ../../modules/home/programs/nvim.nix + ../../modules/home/programs/starship.nix + ../../modules/home/programs/zoxide.nix + ]; + + home.stateVersion = "25.05"; +} diff --git a/platforms/linux/chromium-flags.hypr.conf b/platforms/linux/chromium-flags.hypr.conf deleted file mode 100644 index 60a9ab2..0000000 --- a/platforms/linux/chromium-flags.hypr.conf +++ /dev/null @@ -1,5 +0,0 @@ ---UseOzonePlatform=wayland ---ozone-platform=wayland ---password-store=kwallet6 ---enable-wayland-ime ---force-device-scale-factor=1.75 diff --git a/platforms/linux/electron-flags.hypr.conf b/platforms/linux/electron-flags.hypr.conf deleted file mode 100644 index 312f3e6..0000000 --- a/platforms/linux/electron-flags.hypr.conf +++ /dev/null @@ -1,5 +0,0 @@ ---enable-features=WaylandWindowDecorations ---enable-features=UseOzonePlatform ---ozone-platform-hint=auto ---enable-wayland-ime ---force-device-scale-factor=1.75 diff --git a/platforms/linux/etc/environment b/platforms/linux/etc/environment deleted file mode 100644 index 2649112..0000000 --- a/platforms/linux/etc/environment +++ /dev/null @@ -1,30 +0,0 @@ -# $DOTFILES/platforms/linux/etc/environment -# Date: 2025-01-25 -# Author: js0ny -# Description: Environment variables that defines the applications and IME -# -# Location: -# /etc/environment -# Linking: -# cp $DOTFILES/platforms/linux/etc/environment /etc/environment -# -# This file is parsed by pam_env module -# -# Syntax: simple "KEY=VAL" pairs on separate lines -# -#QT_QPA_PLATFORMTHEME=qt5ct -#QT_STYLE_OVERRIDE=kvantum -# Software -BROWSER="com.vivaldi.Vivaldi" -EDITOR=nvim -# IME -GTK_IM_MODULE=fcitx -QT_IM_MODULE=fcitx -SDL_IM_MODULE=fcitx -XMODIFIFERS="@im=fcitx" -GLFW_IM_MODULE=fcitx -# Scaling - Buggy on Plasma -# QT_SCALE_FACTOR=1.75 -# # 2 * 0.875 = 1.75 -# GDK_SCALE=2 -# GDK_DPI_SCALE=0.875 diff --git a/platforms/linux/fcitx5/conf/cached_layouts b/platforms/linux/fcitx5/conf/cached_layouts deleted file mode 100644 index f8e46d0..0000000 --- a/platforms/linux/fcitx5/conf/cached_layouts +++ /dev/null @@ -1,3710 +0,0 @@ -[keyboard-bqn] -Description="键盘 - BQN" -Language=en -Label=bqn - -[keyboard-apl] -Description="键盘 - APL" -Language=en -Label=apl - -[keyboard-apl-dyalog] -Description="键盘 - APL - APL 符号(Dyalog APL)" -Language=en -Label="dlg (dyalog)" - -[keyboard-apl-sax] -Description="键盘 - APL - APL 符号(SAX,Sharp APL for Unix)" -Language=en -Label=sax - -[keyboard-apl-unified] -Description="键盘 - APL - APL 符号(统一)" -Language=en -Label="ufd (unified)" - -[keyboard-apl-apl2] -Description="键盘 - APL - APL 符号(IBM APL2)" -Language=en -Label=apl2 - -[keyboard-apl-aplplusII] -Description="键盘 - APL - APL 符号(Manugistics APL*PLUS II)" -Language=en -Label="aplII (aplplusII)" - -[keyboard-apl-aplx] -Description="键盘 - APL - APL 符号(APLX 统一)" -Language=en -Label=aplx - -[keyboard-ua] -Description="键盘 - 乌克兰语" -Language=uk -Label=uk - -[keyboard-ua-phonetic] -Description="键盘 - 乌克兰语 - 乌克兰语(语音助记)" -Language=uk -Label="ua (phonetic)" - -[keyboard-ua-typewriter] -Description="键盘 - 乌克兰语 - 乌克兰语(打字机)" -Language=uk -Label="ua (typewriter)" - -[keyboard-ua-winkeys] -Description="键盘 - 乌克兰语 - 乌克兰语(Windows)" -Language=uk -Label="ua (winkeys)" - -[keyboard-ua-macOS] -Description="键盘 - 乌克兰语 - 乌克兰语(macOS)" -Language=uk -Label="ua (macOS)" - -[keyboard-ua-legacy] -Description="键盘 - 乌克兰语 - 乌克兰语(传统)" -Language=uk -Label="ua (legacy)" - -[keyboard-ua-homophonic] -Description="键盘 - 乌克兰语 - 乌克兰语(同音)" -Language=uk -Label="ua (homophonic)" - -[keyboard-ua-crh] -Description="键盘 - 乌克兰语 - 克里米亚鞑靼语(土耳其 Q)" -Language=crh -Label=crh - -[keyboard-ua-crh_f] -Description="键盘 - 乌克兰语 - 克里米亚鞑靼语(土耳其 F)" -Language=crh -Label="crh (crh_f)" - -[keyboard-ua-crh_alt] -Description="键盘 - 乌克兰语 - 克里米亚鞑靼语(土耳其 Alt-Q)" -Language=crh -Label="crh (crh_alt)" - -[keyboard-ua-sun_type6] -Description="键盘 - 乌克兰语 - 乌克兰语(Sun Type 6/7)" -Language=uk -Label="ua (sun_type6)" - -[keyboard-th] -Description="键盘 - 泰语" -Language=th -Label=th - -[keyboard-th-tis] -Description="键盘 - 泰语 - 泰语(TIS-820.2538)" -Language=th -Label="th (tis)" - -[keyboard-th-pat] -Description="键盘 - 泰语 - 泰语(Pattachote)" -Language=th -Label="th (pat)" - -[keyboard-tz] -Description="键盘 - 斯瓦希里语(坦桑尼亚)" -Language=sw -Label=sw - -[keyboard-latam] -Description="键盘 - 西班牙语(拉丁美洲)" -Language=es -Label=es - -[keyboard-latam-nodeadkeys] -Description="键盘 - 西班牙语(拉丁美洲) - 西班牙语(拉丁美洲,无死键)" -Language=es -Label="latam (nodeadkeys)" - -[keyboard-latam-deadtilde] -Description="键盘 - 西班牙语(拉丁美洲) - 西班牙语(拉丁美洲,波浪号为死键)" -Language=es -Label="latam (deadtilde)" - -[keyboard-latam-dvorak] -Description="键盘 - 西班牙语(拉丁美洲) - 西班牙语(拉丁美洲,Dvorak)" -Language=es -Label="latam (dvorak)" - -[keyboard-latam-colemak] -Description="键盘 - 西班牙语(拉丁美洲) - 西班牙语(拉丁美洲,Colemak)" -Language=es -Label="latam (colemak)" - -[keyboard-sk] -Description="键盘 - 斯洛伐克语" -Language=sk -Label=sk - -[keyboard-sk-bksl] -Description="键盘 - 斯洛伐克语 - 斯洛伐克语(额外的反斜杠)" -Language=sk -Label="sk (bksl)" - -[keyboard-sk-qwerty] -Description="键盘 - 斯洛伐克语 - 斯洛伐克语(QWERTY)" -Language=sk -Label="sk (qwerty)" - -[keyboard-sk-qwerty_bksl] -Description="键盘 - 斯洛伐克语 - 斯洛伐克语(QWERTY,额外的反斜杠)" -Language=sk -Label="sk (qwerty_bksl)" - -[keyboard-sk-acc] -Description="键盘 - 斯洛伐克语 - 斯洛伐克语(ACC 布局,只有重音字母)" -Language=sk -Label="sk (acc)" - -[keyboard-sk-sun_type6] -Description="键盘 - 斯洛伐克语 - 斯洛伐克语(Sun Type 6/7)" -Language=sk -Label="sk (sun_type6)" - -[keyboard-ru] -Description="键盘 - 俄语" -Language=ru -Label=ru - -[keyboard-ru-phonetic] -Description="键盘 - 俄语 - 俄语(语音助记)" -Language=ru -Label="ru (phonetic)" - -[keyboard-ru-phonetic_winkeys] -Description="键盘 - 俄语 - 俄语(语音助记,Windows)" -Language=ru -Label="ru (phonetic_winkeys)" - -[keyboard-ru-phonetic_YAZHERTY] -Description="键盘 - 俄语 - 俄语(语音助记,YAZHERTY)" -Language=ru -Label="ru (phonetic_YAZHERTY)" - -[keyboard-ru-phonetic_azerty] -Description="键盘 - 俄语 - 俄语(语音助记,AZERTY)" -Language=ru -Label="ru (phonetic_azerty)" - -[keyboard-ru-phonetic_dvorak] -Description="键盘 - 俄语 - 俄语(语音助记,Dvorak)" -Language=ru -Label="ru (phonetic_dvorak)" - -[keyboard-ru-typewriter] -Description="键盘 - 俄语 - 俄语(打字机)" -Language=ru -Label="ru (typewriter)" - -[keyboard-ru-ruchey_ru] -Description="键盘 - 俄语 - 俄语(工程,RU)" -Language=ru -Label="ru (ruchey_ru)" - -[keyboard-ru-ruchey_en] -Description="键盘 - 俄语 - 俄语(工程,EN)" -Language=ru -Label="en (ruchey_en)" - -[keyboard-ru-legacy] -Description="键盘 - 俄语 - 俄语(传统)" -Language=ru -Label="ru (legacy)" - -[keyboard-ru-typewriter-legacy] -Description="键盘 - 俄语 - 俄语(打字机,传统)" -Language=ru -Label="ru (typewriter-legacy)" - -[keyboard-ru-dos] -Description="键盘 - 俄语 - 俄语(DOS)" -Language=ru -Label="ru (dos)" - -[keyboard-ru-mac] -Description="键盘 - 俄语 - 俄语(Macintosh)" -Language=ru -Label="ru (mac)" - -[keyboard-ru-ab] -Description="键盘 - 俄语 - 阿布哈兹语(俄罗斯)" -Language=ab -Label="ru (ab)" - -[keyboard-ru-bak] -Description="键盘 - 俄语 - 巴什基尔语" -Language=ba -Label="ru (bak)" - -[keyboard-ru-cv] -Description="键盘 - 俄语 - 楚瓦什语" -Language=cv -Label="ru (cv)" - -[keyboard-ru-cv_latin] -Description="键盘 - 俄语 - 楚瓦什语(拉丁)" -Language=cv -Label="ru (cv_latin)" - -[keyboard-ru-xal] -Description="键盘 - 俄语 - 卡尔梅克卫拉特语" -Language=xal -Label="ru (xal)" - -[keyboard-ru-kom] -Description="键盘 - 俄语 - 科米语" -Language=kv -Label="ru (kom)" - -[keyboard-ru-chm] -Description="键盘 - 俄语 - Mari" -Language=chm -Label="ru (chm)" - -[keyboard-ru-os_legacy] -Description="键盘 - 俄语 - 奥塞梯语(传统)" -Language=os -Label="ru (os_legacy)" - -[keyboard-ru-os_winkeys] -Description="键盘 - 俄语 - 奥塞梯语(Windows)" -Language=os -Label="ru (os_winkeys)" - -[keyboard-ru-srp] -Description="键盘 - 俄语 - 塞尔维亚语(俄罗斯)" -Language=ru -Label="ru (srp)" - -[keyboard-ru-tt] -Description="键盘 - 俄语 - 鞑靼语" -Language=tt -Label="ru (tt)" - -[keyboard-ru-udm] -Description="键盘 - 俄语 - 乌德穆尔特语" -Language=udm -Label="ru (udm)" - -[keyboard-ru-sah] -Description="键盘 - 俄语 - 雅库特语" -Language=sah -Label="ru (sah)" - -[keyboard-ru-chu] -Description="键盘 - 俄语 - 教会斯拉夫语" -Language=cu -Label="ru (chu)" - -[keyboard-ru-ruu] -Description="键盘 - 俄语 - 俄语(带乌克兰语和白俄罗斯语字母)" -Language=ru -Label="ru (ruu)" - -[keyboard-ru-rulemak] -Description="键盘 - 俄语 - 俄语(Rulemak,语音助记 Colemak)" -Language=ru -Label="ru (rulemak)" - -[keyboard-ru-phonetic_mac] -Description="键盘 - 俄语 - 俄语(语音助记,Macintosh)" -Language=ru -Label="ru (phonetic_mac)" - -[keyboard-ru-sun_type6] -Description="键盘 - 俄语 - 俄语(Sun Type 6/7)" -Language=ru -Label="ru (sun_type6)" - -[keyboard-ru-unipunct] -Description="键盘 - 俄语 - 俄语(带美式标点)" -Language=ru -Label="ru (unipunct)" - -[keyboard-ru-gost-6431-75-48] -Description="键盘 - 俄语 - 俄语(GOST 6431-75)" -Language=ru -Label="ru (gost-6431-75-48)" - -[keyboard-ru-gost-14289-88] -Description="键盘 - 俄语 - 俄语(GOST 14289-88)" -Language=ru -Label="ru (gost-14289-88)" - -[keyboard-ru-prxn] -Description="键盘 - 俄语 - 俄语(Polyglot and Reactionary)" -Language=ru -Label="ru (prxn)" - -[keyboard-ru-winkeys-p] -Description="键盘 - 俄语 - 俄语(适合程序员的)" -Language=ru -Label=winkeys-p - -[keyboard-ru-typo] -Description="键盘 - 俄语 - 俄语(带印刷符号)" -Language=ru -Label="ru (typo)" - -[keyboard-ru-rtu] -Description="键盘 - 俄语 - 俄语(带鞑靼字母)" -Language=ru -Label="ru (rtu)" - -[keyboard-ru-diktor] -Description="键盘 - 俄语 - 俄语(Diktor)" -Language=ru -Label=diktor - -[keyboard-ru-ruintl_ru] -Description="键盘 - 俄语 - 俄语(国际,RU)" -Language=ru -Label="ru (ruintl_ru)" - -[keyboard-ru-ruintl_en] -Description="键盘 - 俄语 - 俄语(国际,EN)" -Language=en -Label="en (ruintl_en)" - -[keyboard-br] -Description="键盘 - 葡萄牙语(巴西)" -Language=pt -Label=pt - -[keyboard-br-nodeadkeys] -Description="键盘 - 葡萄牙语(巴西) - 葡萄牙语(巴西,无死键)" -Language=pt -Label="br (nodeadkeys)" - -[keyboard-br-dvorak] -Description="键盘 - 葡萄牙语(巴西) - 葡萄牙语(巴西,Dvorak)" -Language=pt -Label="br (dvorak)" - -[keyboard-br-nativo] -Description="键盘 - 葡萄牙语(巴西) - 葡萄牙语(巴西,Nativo)" -Language=pt -Label="br (nativo)" - -[keyboard-br-nativo-us] -Description="键盘 - 葡萄牙语(巴西) - 葡萄牙语(巴西,用于美式键盘的 Nativo)" -Language=pt -Label="br (nativo-us)" - -[keyboard-br-thinkpad] -Description="键盘 - 葡萄牙语(巴西) - 葡萄牙语(巴西,IBM/联想 ThinkPad)" -Language=pt -Label="br (thinkpad)" - -[keyboard-br-nativo-epo] -Description="键盘 - 葡萄牙语(巴西) - 世界语(巴西,Nativo)" -Language=eo -Label="br (nativo-epo)" - -[keyboard-br-rus] -Description="键盘 - 葡萄牙语(巴西) - 俄语(巴西,语音助记)" -Language=ru -Label="ru (rus)" - -[keyboard-br-sun_type6] -Description="键盘 - 葡萄牙语(巴西) - 葡萄牙语(巴西,Sun Type 6/7)" -Language=pt -Label="br (sun_type6)" - -[keyboard-ro] -Description="键盘 - 罗马尼亚语" -Language=ro -Label=ro - -[keyboard-ro-std] -Description="键盘 - 罗马尼亚语 - 罗马尼亚语(标准)" -Language=ro -Label="ro (std)" - -[keyboard-ro-winkeys] -Description="键盘 - 罗马尼亚语 - 罗马尼亚语(Windows)" -Language=ro -Label="ro (winkeys)" - -[keyboard-ro-crh_dobruja] -Description="键盘 - 罗马尼亚语 - 克里米亚鞑靼语(Dobruja Q)" -Language=crh -Label="crh (crh_dobruja)" - -[keyboard-ro-ergonomic] -Description="键盘 - 罗马尼亚语 - 罗马尼亚语(人体工学盲打)" -Language=ro -Label="ro (ergonomic)" - -[keyboard-ro-sun_type6] -Description="键盘 - 罗马尼亚语 - 罗马尼亚语(Sun Type 6/7)" -Language=ro -Label="ro (sun_type6)" - -[keyboard-pl] -Description="键盘 - 波兰语" -Language=pl -Label=pl - -[keyboard-pl-legacy] -Description="键盘 - 波兰语 - 瑞士语(传统)" -Language=pl -Label="pl (legacy)" - -[keyboard-pl-qwertz] -Description="键盘 - 波兰语 - 波兰语(QWERTZ)" -Language=pl -Label="pl (qwertz)" - -[keyboard-pl-dvorak] -Description="键盘 - 波兰语 - 波兰语(Dvorak)" -Language=pl -Label="pl (dvorak)" - -[keyboard-pl-dvorak_quotes] -Description="键盘 - 波兰语 - 波兰语(Dvorak,波兰语引号在引号键上)" -Language=pl -Label="pl (dvorak_quotes)" - -[keyboard-pl-dvorak_altquotes] -Description="键盘 - 波兰语 - 波兰语(Dvorak,波兰语引号在 1 键上)" -Language=pl -Label="pl (dvorak_altquotes)" - -[keyboard-pl-dvp] -Description="键盘 - 波兰语 - 波兰语(适合程序员的 Dvorak)" -Language=pl -Label="pl (dvp)" - -[keyboard-pl-csb] -Description="键盘 - 波兰语 - 卡舒比语" -Language=csb -Label="pl (csb)" - -[keyboard-pl-szl] -Description="键盘 - 波兰语 - 西里西亚语" -Language=szl -Label="pl (szl)" - -[keyboard-pl-ru_phonetic_dvorak] -Description="键盘 - 波兰语 - 俄语(波兰,语音助记 Dvorak)" -Language=ru -Label="ru (ru_phonetic_dvorak)" - -[keyboard-pl-intl] -Description="键盘 - 波兰语 - 波兰语(国际,带死键)" -Language=pl -Label="pl (intl)" - -[keyboard-pl-colemak] -Description="键盘 - 波兰语 - 波兰语(Colemak)" -Language=pl -Label="pl (colemak)" - -[keyboard-pl-colemak_dh_ansi] -Description="键盘 - 波兰语 - 波兰语(Colemak-DH)" -Language=pl -Label="pl (colemak_dh_ansi)" - -[keyboard-pl-colemak_dh] -Description="键盘 - 波兰语 - 波兰语(Colemak-DH ISO)" -Language=pl -Label="pl (colemak_dh)" - -[keyboard-pl-sun_type6] -Description="键盘 - 波兰语 - 波兰语(Sun Type 6/7)" -Language=pl -Label="pl (sun_type6)" - -[keyboard-pl-glagolica] -Description="键盘 - 波兰语 - 波兰语(Glagolica)" -Language=pl -Label="pl (glagolica)" - -[keyboard-pl-lefty] -Description="键盘 - 波兰语 - 波兰语(Lefty)" -Language=pl -Label="pl (lefty)" - -[keyboard-trans] -Description="键盘 - 国际音标" -Language= -Label=ipa - -[keyboard-trans-qwerty] -Description="键盘 - 国际音标 - 国际音标(QWERTY)" -Language= -Label="trans (qwerty)" - -[keyboard-ir] -Description="键盘 - 波斯语" -Language=fa -Label=fa - -[keyboard-ir-pes_keypad] -Description="键盘 - 波斯语 - 波斯语(带波斯语小键盘)" -Language=fa -Label="ir (pes_keypad)" - -[keyboard-ir-winkeys] -Description="键盘 - 波斯语 - 波斯语(Windows)" -Language=fa -Label="ir (winkeys)" - -[keyboard-ir-azb] -Description="键盘 - 波斯语 - 阿塞拜疆语(伊朗)" -Language=azb -Label=azb - -[keyboard-ir-ku] -Description="键盘 - 波斯语 - 库尔德语(伊朗,拉丁 Q)" -Language=ku -Label=ku - -[keyboard-ir-ku_alt] -Description="键盘 - 波斯语 - 库尔德语(伊朗,拉丁 Alt-Q)" -Language=ku -Label="ku (ku_alt)" - -[keyboard-ir-ku_f] -Description="键盘 - 波斯语 - 库尔德语(伊朗,F)" -Language=ku -Label="ku (ku_f)" - -[keyboard-ir-ku_ara] -Description="键盘 - 波斯语 - 库尔德语(伊朗,阿拉伯-拉丁)" -Language=ku -Label="ku (ku_ara)" - -[keyboard-custom] -Description="键盘 - 用户自定义布局" -Language=und -Label=custom - -[keyboard-no] -Description="键盘 - 挪威语" -Language=no -Label=no - -[keyboard-no-nodeadkeys] -Description="键盘 - 挪威语 - 挪威语(无死键)" -Language=no -Label="no (nodeadkeys)" - -[keyboard-no-winkeys] -Description="键盘 - 挪威语 - 挪威语(Windows)" -Language=no -Label="no (winkeys)" - -[keyboard-no-mac] -Description="键盘 - 挪威语 - 挪威语(Macintosh)" -Language=no -Label="no (mac)" - -[keyboard-no-mac_nodeadkeys] -Description="键盘 - 挪威语 - 挪威语(Macintosh,无死键)" -Language=no -Label="no (mac_nodeadkeys)" - -[keyboard-no-colemak] -Description="键盘 - 挪威语 - 挪威语(Colemak)" -Language=no -Label="no (colemak)" - -[keyboard-no-colemak_dh] -Description="键盘 - 挪威语 - 挪威语(Colemak-DH)" -Language=no -Label="no (colemak_dh)" - -[keyboard-no-colemak_dh_wide] -Description="键盘 - 挪威语 - 挪威语(Colemak-DH 宽版)" -Language=no -Label="no (colemak_dh_wide)" - -[keyboard-no-dvorak] -Description="键盘 - 挪威语 - 挪威语(Dvorak)" -Language=no -Label="no (dvorak)" - -[keyboard-no-smi] -Description="键盘 - 挪威语 - 北萨米语(挪威)" -Language=se -Label="no (smi)" - -[keyboard-no-smi_nodeadkeys] -Description="键盘 - 挪威语 - 北萨米语(挪威,无死键)" -Language=se -Label="no (smi_nodeadkeys)" - -[keyboard-no-sun_type6] -Description="键盘 - 挪威语 - 挪威语(Sun Type 6/7)" -Language=no -Label="no (sun_type6)" - -[keyboard-gn] -Description="键盘 - 西非书面字母(AZERTY)" -Language=nqo -Label=nqo - -[keyboard-tm] -Description="键盘 - 土库曼语" -Language=tk -Label=tk - -[keyboard-tm-alt] -Description="键盘 - 土库曼语 - 土库曼语(Alt-Q)" -Language=tk -Label="tm (alt)" - -[keyboard-np] -Description="键盘 - 尼泊尔语" -Language=ne -Label=ne - -[keyboard-ancient] -Description="键盘 - 古代语言" -Language=got -Label=xx - -[keyboard-ancient-got] -Description="键盘 - 古代语言 - 哥特语" -Language=got -Label="ancient (got)" - -[keyboard-ancient-uga] -Description="键盘 - 古代语言 - 乌加里特语" -Language=uga -Label="ancient (uga)" - -[keyboard-ancient-ave] -Description="键盘 - 古代语言 - 阿维斯陀语" -Language=ae -Label="ancient (ave)" - -[keyboard-mt] -Description="键盘 - 马耳他语" -Language=mt -Label=mt - -[keyboard-mt-us] -Description="键盘 - 马耳他语 - 马耳他语(美国)" -Language=mt -Label="mt (us)" - -[keyboard-mt-alt-us] -Description="键盘 - 马耳他语 - 马耳他语(美国,带 AltGr 覆盖)" -Language=mt -Label="mt (alt-us)" - -[keyboard-mt-alt-gb] -Description="键盘 - 马耳他语 - 马耳他语(英国,带 AltGr 覆盖)" -Language=mt -Label="mt (alt-gb)" - -[keyboard-pt] -Description="键盘 - 葡萄牙语" -Language=pt -Label=pt - -[keyboard-pt-nodeadkeys] -Description="键盘 - 葡萄牙语 - 葡萄牙语(无死键)" -Language=pt -Label="pt (nodeadkeys)" - -[keyboard-pt-mac] -Description="键盘 - 葡萄牙语 - 葡萄牙语(Macintosh)" -Language=pt -Label="pt (mac)" - -[keyboard-pt-mac_nodeadkeys] -Description="键盘 - 葡萄牙语 - 葡萄牙语(Macintosh,无死键)" -Language=pt -Label="pt (mac_nodeadkeys)" - -[keyboard-pt-nativo] -Description="键盘 - 葡萄牙语 - 葡萄牙语(Nativo)" -Language=pt -Label="pt (nativo)" - -[keyboard-pt-nativo-us] -Description="键盘 - 葡萄牙语 - 葡萄牙语(用于美式键盘的 Nativo)" -Language=pt -Label="pt (nativo-us)" - -[keyboard-pt-nativo-epo] -Description="键盘 - 葡萄牙语 - 世界语(葡萄牙,Nativo)" -Language=eo -Label="pt (nativo-epo)" - -[keyboard-pt-sun_type6] -Description="键盘 - 葡萄牙语 - 葡萄牙语(Sun Type 6/7)" -Language=pt -Label="pt (sun_type6)" - -[keyboard-pt-colemak] -Description="键盘 - 葡萄牙语 - 葡萄牙语(Colemak)" -Language=pt -Label="pt (colemak)" - -[keyboard-my] -Description="键盘 - 马来语(爪夷,阿拉伯键盘)" -Language=id -Label=ms - -[keyboard-my-phonetic] -Description="键盘 - 马来语(爪夷,阿拉伯键盘) - 马来语(爪夷,语音助记)" -Language=id -Label="my (phonetic)" - -[keyboard-mk] -Description="键盘 - 马其顿语" -Language=mk -Label=mk - -[keyboard-mk-nodeadkeys] -Description="键盘 - 马其顿语 - 马其顿语(无死键)" -Language=mk -Label="mk (nodeadkeys)" - -[keyboard-kg] -Description="键盘 - 柯尔克孜语(吉尔吉斯语)" -Language=ky -Label=ki - -[keyboard-kg-phonetic] -Description="键盘 - 柯尔克孜语(吉尔吉斯语) - 柯尔克孜语(吉尔吉斯语,语音助记)" -Language=ky -Label="kg (phonetic)" - -[keyboard-tj] -Description="键盘 - 塔吉克语" -Language=tg -Label=tg - -[keyboard-tj-legacy] -Description="键盘 - 塔吉克语 - 塔吉克语(传统)" -Language=tg -Label="tj (legacy)" - -[keyboard-mv] -Description="键盘 - 迪维希语" -Language=dv -Label=dv - -[keyboard-lk] -Description="键盘 - 僧伽罗语(语音助记)" -Language=si -Label=si - -[keyboard-lk-us] -Description="键盘 - 僧伽罗语(语音助记) - 僧伽罗语(美国)" -Language=si -Label="si (us)" - -[keyboard-lk-tam_unicode] -Description="键盘 - 僧伽罗语(语音助记) - 泰米尔语(斯里兰卡,TamilNet '99)" -Language=ta -Label="ta (tam_unicode)" - -[keyboard-lk-tam_TAB] -Description="键盘 - 僧伽罗语(语音助记) - 泰米尔语(斯里兰卡,TamilNet '99,TAB 编码)" -Language=ta -Label="lk (tam_TAB)" - -[keyboard-al] -Description="键盘 - 阿尔巴尼亚语" -Language=sq -Label=sq - -[keyboard-al-plisi] -Description="键盘 - 阿尔巴尼亚语 - 阿尔巴尼亚语(Plisi)" -Language=sq -Label="al (plisi)" - -[keyboard-al-veqilharxhi] -Description="键盘 - 阿尔巴尼亚语 - 阿尔巴尼亚语(Veqilharxhi)" -Language=sq -Label="al (veqilharxhi)" - -[keyboard-cz] -Description="键盘 - 捷克语" -Language=cs -Label=cs - -[keyboard-cz-bksl] -Description="键盘 - 捷克语 - 捷克语(额外的反斜杠)" -Language=cs -Label="cz (bksl)" - -[keyboard-cz-qwerty] -Description="键盘 - 捷克语 - 捷克语(QWERTY)" -Language=cs -Label="cz (qwerty)" - -[keyboard-cz-qwerty_bksl] -Description="键盘 - 捷克语 - 捷克语(QWERTY,额外的反斜杠)" -Language=cs -Label="cz (qwerty_bksl)" - -[keyboard-cz-winkeys] -Description="键盘 - 捷克语 - 捷克语(QWERTZ,Windows)" -Language=cs -Label="cz (winkeys)" - -[keyboard-cz-winkeys-qwerty] -Description="键盘 - 捷克语 - 捷克语(QWERTY,Windows)" -Language=cs -Label="cz (winkeys-qwerty)" - -[keyboard-cz-qwerty-mac] -Description="键盘 - 捷克语 - 捷克语(QWERTY,Macintosh)" -Language=cs -Label="cz (qwerty-mac)" - -[keyboard-cz-ucw] -Description="键盘 - 捷克语 - 捷克语(UCW,只有重音字母)" -Language=cs -Label="cz (ucw)" - -[keyboard-cz-dvorak-ucw] -Description="键盘 - 捷克语 - 捷克语(美国,Dvorak,支持 UCW)" -Language=cs -Label="cz (dvorak-ucw)" - -[keyboard-cz-rus] -Description="键盘 - 捷克语 - 俄语(捷克语,语音助记)" -Language=ru -Label="ru (rus)" - -[keyboard-cz-sun_type6] -Description="键盘 - 捷克语 - 捷克语(Sun Type 6/7)" -Language=cs -Label="cz (sun_type6)" - -[keyboard-cz-prog] -Description="键盘 - 捷克语 - 捷克语(programming)" -Language=cs -Label="cz (prog)" - -[keyboard-cz-prog_typo] -Description="键盘 - 捷克语 - 捷克语(programming,typographic)" -Language=cs -Label="cz (prog_typo)" - -[keyboard-cz-coder] -Description="键盘 - 捷克语 - 捷克语(coder)" -Language=cs -Label="cz (coder)" - -[keyboard-cz-colemak-ucw] -Description="键盘 - 捷克语 - 捷克语(美国,Colemak,支持 UCW)" -Language=cs -Label="cz (colemak-ucw)" - -[keyboard-brai] -Description="键盘 - 盲文" -Language= -Label=brl - -[keyboard-brai-left_hand] -Description="键盘 - 盲文 - 盲文(单手,左手)" -Language= -Label="brai (left_hand)" - -[keyboard-brai-left_hand_invert] -Description="键盘 - 盲文 - 盲文(单手,左手,大拇指反转)" -Language= -Label="brai (left_hand_invert)" - -[keyboard-brai-right_hand] -Description="键盘 - 盲文 - 盲文(单手,右手)" -Language= -Label="brai (right_hand)" - -[keyboard-brai-right_hand_invert] -Description="键盘 - 盲文 - 盲文(单手,右手,大拇指反转)" -Language= -Label="brai (right_hand_invert)" - -[keyboard-se] -Description="键盘 - 瑞典语" -Language=sv -Label=sv - -[keyboard-se-nodeadkeys] -Description="键盘 - 瑞典语 - 瑞典语(无死键)" -Language=sv -Label="se (nodeadkeys)" - -[keyboard-se-dvorak] -Description="键盘 - 瑞典语 - 瑞典语(Dvorak)" -Language=sv -Label="se (dvorak)" - -[keyboard-se-us_dvorak] -Description="键盘 - 瑞典语 - 瑞典语(Dvorak,国际)" -Language=sv -Label="se (us_dvorak)" - -[keyboard-se-svdvorak] -Description="键盘 - 瑞典语 - 瑞典语(Svdvorak)" -Language=sv -Label="se (svdvorak)" - -[keyboard-se-mac] -Description="键盘 - 瑞典语 - 瑞典语(Macintosh)" -Language=sv -Label="se (mac)" - -[keyboard-se-us] -Description="键盘 - 瑞典语 - 瑞典语(美国)" -Language=sv -Label="se (us)" - -[keyboard-se-swl] -Description="键盘 - 瑞典语 - 瑞典手语" -Language=swl -Label="se (swl)" - -[keyboard-se-smi] -Description="键盘 - 瑞典语 - 北萨米语(瑞典)" -Language=se -Label="se (smi)" - -[keyboard-se-rus] -Description="键盘 - 瑞典语 - 俄语(瑞典,语音助记)" -Language=ru -Label="ru (rus)" - -[keyboard-se-dvorak_a5] -Description="键盘 - 瑞典语 - 瑞典语(Dvorak A5)" -Language=sv -Label="se (dvorak_a5)" - -[keyboard-se-sun_type6] -Description="键盘 - 瑞典语 - 瑞典语(Sun Type 6/7)" -Language=sv -Label="se (sun_type6)" - -[keyboard-se-ovd] -Description="键盘 - 瑞典语 - Elfdalian 语(瑞典,带组合 ogonek)" -Language=ovd -Label="se (ovd)" - -[keyboard-bg] -Description="键盘 - 保加利亚语" -Language=bg -Label=bg - -[keyboard-bg-phonetic] -Description="键盘 - 保加利亚语 - 保加利亚语(语音助记,传统)" -Language=bg -Label="bg (phonetic)" - -[keyboard-bg-bas_phonetic] -Description="键盘 - 保加利亚语 - 保加利亚语(语音助记,新)" -Language=bg -Label="bg (bas_phonetic)" - -[keyboard-bg-bekl] -Description="键盘 - 保加利亚语 - 保加利亚语(改进)" -Language=bg -Label="bg (bekl)" - -[keyboard-pk] -Description="键盘 - 乌尔都语(巴基斯坦)" -Language=ur -Label=ur - -[keyboard-pk-urd-crulp] -Description="键盘 - 乌尔都语(巴基斯坦) - 乌尔都语(巴基斯坦,CRULP)" -Language=ur -Label="pk (urd-crulp)" - -[keyboard-pk-urd-nla] -Description="键盘 - 乌尔都语(巴基斯坦) - 乌尔都语(巴基斯坦,NLA)" -Language=ur -Label="pk (urd-nla)" - -[keyboard-pk-ara] -Description="键盘 - 乌尔都语(巴基斯坦) - 阿拉伯语(巴基斯坦)" -Language=ar -Label="ar (ara)" - -[keyboard-pk-snd] -Description="键盘 - 乌尔都语(巴基斯坦) - 信德语" -Language=sd -Label="sd (snd)" - -[keyboard-pk-urd-navees] -Description="键盘 - 乌尔都语(巴基斯坦) - 乌尔都语(巴基斯坦,Navees)" -Language=ur -Label="pk (urd-navees)" - -[keyboard-au] -Description="键盘 - 英语(澳大利亚)" -Language=en -Label=en - -[keyboard-mn] -Description="键盘 - 蒙古语" -Language=mn -Label=mn - -[keyboard-dz] -Description="键盘 - 柏柏尔语(阿尔及利亚,拉丁)" -Language=tzm -Label=kab - -[keyboard-dz-ber] -Description="键盘 - 柏柏尔语(阿尔及利亚,拉丁) - 柏柏尔语(阿尔及利亚,提非纳)" -Language=kab -Label="kab (ber)" - -[keyboard-dz-azerty-deadkeys] -Description="键盘 - 柏柏尔语(阿尔及利亚,拉丁) - 卡拜尔语(AZERTY,带死键)" -Language=kab -Label="kab (azerty-deadkeys)" - -[keyboard-dz-qwerty-gb-deadkeys] -Description="键盘 - 柏柏尔语(阿尔及利亚,拉丁) - 卡拜尔语(QWERTY,英国,带死键)" -Language=kab -Label="kab (qwerty-gb-deadkeys)" - -[keyboard-dz-qwerty-us-deadkeys] -Description="键盘 - 柏柏尔语(阿尔及利亚,拉丁) - 卡拜尔语(QWERTY,美国,带死键)" -Language=kab -Label="kab (qwerty-us-deadkeys)" - -[keyboard-dz-ar] -Description="键盘 - 柏柏尔语(阿尔及利亚,拉丁) - 阿拉伯语(阿尔及利亚)" -Language=ar -Label=ar - -[keyboard-me] -Description="键盘 - 黑山语" -Language=sr -Label=sr - -[keyboard-me-cyrillic] -Description="键盘 - 黑山语 - 黑山语(西里尔)" -Language=sr -Label="me (cyrillic)" - -[keyboard-me-cyrillicyz] -Description="键盘 - 黑山语 - 黑山语(西里尔,交换 ZE 和 ZHE)" -Language=sr -Label="me (cyrillicyz)" - -[keyboard-me-cyrillicalternatequotes] -Description="键盘 - 黑山语 - 黑山语(西里尔,带书名号引号)" -Language=sr -Label="me (cyrillicalternatequotes)" - -[keyboard-me-latinunicode] -Description="键盘 - 黑山语 - 黑山语(拉丁,Unicode)" -Language=sr -Label="me (latinunicode)" - -[keyboard-me-latinyz] -Description="键盘 - 黑山语 - 黑山语(拉丁,QWERTY)" -Language=sr -Label="me (latinyz)" - -[keyboard-me-latinunicodeyz] -Description="键盘 - 黑山语 - 黑山语(拉丁,Unicode,QWERTY)" -Language=sr -Label="me (latinunicodeyz)" - -[keyboard-me-latinalternatequotes] -Description="键盘 - 黑山语 - 黑山语(拉丁,带书名号引号)" -Language=sr -Label="me (latinalternatequotes)" - -[keyboard-lv] -Description="键盘 - 拉脱维亚语" -Language=lv -Label=lv - -[keyboard-lv-apostrophe] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(撇号)" -Language=lv -Label="lv (apostrophe)" - -[keyboard-lv-tilde] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(波浪号)" -Language=lv -Label="lv (tilde)" - -[keyboard-lv-fkey] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(F)" -Language=lv -Label="lv (fkey)" - -[keyboard-lv-modern] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(现代拉丁)" -Language=lv -Label="lv (modern)" - -[keyboard-lv-modern-cyr] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(现代西里尔)" -Language=lv -Label="lv (modern-cyr)" - -[keyboard-lv-ergonomic] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(人体工学,ŪGJRMV)" -Language=lv -Label="lv (ergonomic)" - -[keyboard-lv-adapted] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(改良)" -Language=lv -Label="lv (adapted)" - -[keyboard-lv-dvorak] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(Dvorak)" -Language=lv -Label="lv (dvorak)" - -[keyboard-lv-ykeydvorak] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(Dvorak,带 Y)" -Language=lv -Label="lv (ykeydvorak)" - -[keyboard-lv-minuskeydvorak] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(Dvorak,带减号)" -Language=lv -Label="lv (minuskeydvorak)" - -[keyboard-lv-dvorakprogr] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(适合程序员的 Dvorak)" -Language=lv -Label="lv (dvorakprogr)" - -[keyboard-lv-ykeydvorakprogr] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(适合程序员的 Dvorak,带 Y)" -Language=lv -Label="lv (ykeydvorakprogr)" - -[keyboard-lv-minuskeydvorakprogr] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(适合程序员的 Dvorak,带减号)" -Language=lv -Label="lv (minuskeydvorakprogr)" - -[keyboard-lv-colemak] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(Colemak)" -Language=lv -Label="lv (colemak)" - -[keyboard-lv-apostrophecolemak] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(Colemak,带撇号)" -Language=lv -Label="lv (apostrophecolemak)" - -[keyboard-lv-sun_type6] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(Sun Type 6/7)" -Language=lv -Label="lv (sun_type6)" - -[keyboard-lv-apostrophe-deadquotes] -Description="键盘 - 拉脱维亚语 - 拉脱维亚语(带撇号,引号为死键)" -Language=lv -Label="lv (apostrophe-deadquotes)" - -[keyboard-ba] -Description="键盘 - 波斯尼亚语" -Language=bs -Label=bs - -[keyboard-ba-alternatequotes] -Description="键盘 - 波斯尼亚语 - 波斯尼亚语(带书名号引号)" -Language=bs -Label="ba (alternatequotes)" - -[keyboard-ba-unicode] -Description="键盘 - 波斯尼亚语 - 波斯尼亚语(带波斯尼亚二重字)" -Language=bs -Label="ba (unicode)" - -[keyboard-ba-unicodeus] -Description="键盘 - 波斯尼亚语 - 波斯尼亚语(美国,带罗马尼亚二重字)" -Language=bs -Label="ba (unicodeus)" - -[keyboard-ba-us] -Description="键盘 - 波斯尼亚语 - 波斯尼亚语(美国)" -Language=bs -Label="ba (us)" - -[keyboard-tw] -Description="键盘 - 台语" -Language= -Label=zh - -[keyboard-tw-indigenous] -Description="键盘 - 台语 - 台语(原住民)" -Language=tay -Label="tw (indigenous)" - -[keyboard-tw-saisiyat] -Description="键盘 - 台语 - 赛夏语(台湾)" -Language=xsy -Label="xsy (saisiyat)" - -[keyboard-rs] -Description="键盘 - 塞尔维亚语" -Language=sr -Label=sr - -[keyboard-rs-alternatequotes] -Description="键盘 - 塞尔维亚语 - 塞尔维亚语(西里尔,带书名号引号)" -Language=sr -Label="rs (alternatequotes)" - -[keyboard-rs-yz] -Description="键盘 - 塞尔维亚语 - 塞尔维亚语(西里尔,交换 ZE 和 ZHE)" -Language=sr -Label="rs (yz)" - -[keyboard-rs-latin] -Description="键盘 - 塞尔维亚语 - 塞尔维亚语(拉丁)" -Language=sr -Label="rs (latin)" - -[keyboard-rs-latinalternatequotes] -Description="键盘 - 塞尔维亚语 - 塞尔维亚语(拉丁,带书名号引号)" -Language=sr -Label="rs (latinalternatequotes)" - -[keyboard-rs-latinunicode] -Description="键盘 - 塞尔维亚语 - 塞尔维亚语(拉丁,Unicode)" -Language=sr -Label="rs (latinunicode)" - -[keyboard-rs-latinyz] -Description="键盘 - 塞尔维亚语 - 塞尔维亚(拉丁,QWERTY)" -Language=sr -Label="rs (latinyz)" - -[keyboard-rs-latinunicodeyz] -Description="键盘 - 塞尔维亚语 - 塞尔维亚(拉丁,Unicode,QWERTY)" -Language=sr -Label="rs (latinunicodeyz)" - -[keyboard-rs-rue] -Description="键盘 - 塞尔维亚语 - 潘诺尼亚卢森尼亚语" -Language=rue -Label="rs (rue)" - -[keyboard-rs-combiningkeys] -Description="键盘 - 塞尔维亚语 - 塞尔维亚语(组合重音而不使用死键)" -Language=sr -Label="rs (combiningkeys)" - -[keyboard-dk] -Description="键盘 - 丹麦语" -Language=da -Label=da - -[keyboard-dk-nodeadkeys] -Description="键盘 - 丹麦语 - 丹麦语(无死键)" -Language=da -Label="dk (nodeadkeys)" - -[keyboard-dk-winkeys] -Description="键盘 - 丹麦语 - 丹麦语(Windows)" -Language=da -Label="dk (winkeys)" - -[keyboard-dk-mac] -Description="键盘 - 丹麦语 - 丹麦语(Macintosh)" -Language=da -Label="dk (mac)" - -[keyboard-dk-mac_nodeadkeys] -Description="键盘 - 丹麦语 - 丹麦语(Macintosh,无死键)" -Language=da -Label="dk (mac_nodeadkeys)" - -[keyboard-dk-dvorak] -Description="键盘 - 丹麦语 - 丹麦语(Dvorak)" -Language=da -Label="dk (dvorak)" - -[keyboard-dk-sun_type6] -Description="键盘 - 丹麦语 - 丹麦语(Sun Type 6/7)" -Language=da -Label="dk (sun_type6)" - -[keyboard-bw] -Description="键盘 - 茨瓦纳语" -Language=tn -Label=tn - -[keyboard-kr] -Description="键盘 - 朝鲜语" -Language=ko -Label=ko - -[keyboard-kr-kr104] -Description="键盘 - 朝鲜语 - 朝鲜语(兼容 101/104 键)" -Language=ko -Label="kr (kr104)" - -[keyboard-kr-sun_type6] -Description="键盘 - 朝鲜语 - 朝鲜语(Sun Type 6/7)" -Language=ko -Label="kr (sun_type6)" - -[keyboard-nl] -Description="键盘 - 荷兰语" -Language=nl -Label=nl - -[keyboard-nl-us] -Description="键盘 - 荷兰语 - 荷兰语(美国)" -Language=nl -Label="nl (us)" - -[keyboard-nl-mac] -Description="键盘 - 荷兰语 - 荷兰语(Macintosh)" -Language=nl -Label="nl (mac)" - -[keyboard-nl-std] -Description="键盘 - 荷兰语 - 荷兰语(标准)" -Language=nl -Label="nl (std)" - -[keyboard-nl-sun_type6] -Description="键盘 - 荷兰语 - 荷兰语(Sun Type 6/7)" -Language=nl -Label="nl (sun_type6)" - -[keyboard-et] -Description="键盘 - 阿姆哈拉语" -Language=am -Label=am - -[keyboard-be] -Description="键盘 - 比利时语" -Language=de -Label=be - -[keyboard-be-oss] -Description="键盘 - 比利时语 - 比利时语(替代)" -Language=de -Label="be (oss)" - -[keyboard-be-oss_latin9] -Description="键盘 - 比利时语 - 比利时语(只包含拉丁-9 字符,替代)" -Language=de -Label="be (oss_latin9)" - -[keyboard-be-iso-alternate] -Description="键盘 - 比利时语 - 比利时语(ISO,替代)" -Language=de -Label="be (iso-alternate)" - -[keyboard-be-nodeadkeys] -Description="键盘 - 比利时语 - 比利时语(无死键)" -Language=de -Label="be (nodeadkeys)" - -[keyboard-be-wang] -Description="键盘 - 比利时语 - 比利时语(王安 724 型 AZERTY)" -Language=de -Label="be (wang)" - -[keyboard-be-sun_type6] -Description="键盘 - 比利时语 - 比利时语(Sun Type 6/7)" -Language=de -Label="be (sun_type6)" - -[keyboard-la] -Description="键盘 - 老挝语" -Language=lo -Label=lo - -[keyboard-la-stea] -Description="键盘 - 老挝语 - 老挝语(STEA)" -Language=lo -Label="la (stea)" - -[keyboard-bt] -Description="键盘 - 不丹语" -Language=dz -Label=dz - -[keyboard-mm] -Description="键盘 - 缅甸语" -Language=my -Label=my - -[keyboard-mm-zawgyi] -Description="键盘 - 缅甸语 - 缅甸语(Zawgyi)" -Language=my -Label="my-zwg (zawgyi)" - -[keyboard-mm-mnw] -Description="键盘 - 缅甸语 - 孟语" -Language=mnw -Label=mnw - -[keyboard-mm-mnw-a1] -Description="键盘 - 缅甸语 - 孟语(A1)" -Language=mnw -Label="mnw (mnw-a1)" - -[keyboard-mm-shn] -Description="键盘 - 缅甸语 - 掸语" -Language=shn -Label=shn - -[keyboard-mm-zgt] -Description="键盘 - 缅甸语 - 掸语(Zawgyi)" -Language=shn -Label="shn-zwg (zgt)" - -[keyboard-si] -Description="键盘 - 斯洛文尼亚语" -Language=sl -Label=sl - -[keyboard-si-alternatequotes] -Description="键盘 - 斯洛文尼亚语 - 斯洛文尼亚语(带书名号引号)" -Language=sl -Label="si (alternatequotes)" - -[keyboard-si-us] -Description="键盘 - 斯洛文尼亚语 - 斯洛文尼亚语(美国)" -Language=sl -Label="si (us)" - -[keyboard-am] -Description="键盘 - 亚美尼亚语" -Language=hy -Label=hy - -[keyboard-am-phonetic] -Description="键盘 - 亚美尼亚语 - 亚美尼亚语(语音助记)" -Language=hy -Label="am (phonetic)" - -[keyboard-am-phonetic-alt] -Description="键盘 - 亚美尼亚语 - 亚美尼亚语(替代,语音助记)" -Language=hy -Label="am (phonetic-alt)" - -[keyboard-am-eastern] -Description="键盘 - 亚美尼亚语 - 亚美尼亚语(东部)" -Language=hy -Label="am (eastern)" - -[keyboard-am-eastern-alt] -Description="键盘 - 亚美尼亚语 - 亚美尼亚语(替代,东部)" -Language=hy -Label="am (eastern-alt)" - -[keyboard-am-western] -Description="键盘 - 亚美尼亚语 - 亚美尼亚语(西部)" -Language=hy -Label="am (western)" - -[keyboard-am-olpc-phonetic] -Description="键盘 - 亚美尼亚语 - 亚美尼亚语(OLPC,语音助记)" -Language=hy -Label="am (olpc-phonetic)" - -[keyboard-by] -Description="键盘 - 白俄罗斯语" -Language=be -Label=by - -[keyboard-by-legacy] -Description="键盘 - 白俄罗斯语 - 白俄罗斯语(传统)" -Language=be -Label="by (legacy)" - -[keyboard-by-latin] -Description="键盘 - 白俄罗斯语 - 白俄罗斯语(拉丁)" -Language=be -Label="by (latin)" - -[keyboard-by-intl] -Description="键盘 - 白俄罗斯语 - 白俄罗斯语(国际)" -Language=be -Label="by (intl)" - -[keyboard-by-phonetic] -Description="键盘 - 白俄罗斯语 - 白俄罗斯语(语音助记)" -Language=be -Label="by (phonetic)" - -[keyboard-by-ru] -Description="键盘 - 白俄罗斯语 - 俄语(白俄罗斯)" -Language=ru -Label="by (ru)" - -[keyboard-vn] -Description="键盘 - 越南语" -Language=vi -Label=vi - -[keyboard-vn-us] -Description="键盘 - 越南语 - 越南语(美国)" -Language=vi -Label="vn (us)" - -[keyboard-vn-fr] -Description="键盘 - 越南语 - 越南语(法国)" -Language=vi -Label="vn (fr)" - -[keyboard-vn-aderty] -Description="键盘 - 越南语 - 越南语(AÐERTY)" -Language=vi -Label="vn (aderty)" - -[keyboard-vn-qderty] -Description="键盘 - 越南语 - 越南语(QĐERTY)" -Language=vi -Label="vn (qderty)" - -[keyboard-ml] -Description="键盘 - 班巴拉语" -Language=bm -Label=bm - -[keyboard-ml-fr-oss] -Description="键盘 - 班巴拉语 - 法语(马里,替代)" -Language=fr -Label="fr (fr-oss)" - -[keyboard-ml-us-mac] -Description="键盘 - 班巴拉语 - 英语(马里,美国,Macintosh)" -Language=en -Label="en (us-mac)" - -[keyboard-ml-us-intl] -Description="键盘 - 班巴拉语 - 英语(马里,美国,国际)" -Language=en -Label="en (us-intl)" - -[keyboard-ara] -Description="键盘 - 阿拉伯语" -Language=ar -Label=ar - -[keyboard-ara-digits] -Description="键盘 - 阿拉伯语 - 阿拉伯语(东阿拉伯语数字)" -Language=ar -Label="ara (digits)" - -[keyboard-ara-azerty] -Description="键盘 - 阿拉伯语 - 阿拉伯语(AZERTY)" -Language=ar -Label="ara (azerty)" - -[keyboard-ara-azerty_digits] -Description="键盘 - 阿拉伯语 - 阿拉伯语(AZERTY,东阿拉伯语数字)" -Language=ar -Label="ara (azerty_digits)" - -[keyboard-ara-buckwalter] -Description="键盘 - 阿拉伯语 - 阿拉伯语(Buckwalter)" -Language=ar -Label="ara (buckwalter)" - -[keyboard-ara-mac] -Description="键盘 - 阿拉伯语 - 阿拉伯语(Macintosh)" -Language=ar -Label="ara (mac)" - -[keyboard-ara-mac-phonetic] -Description="键盘 - 阿拉伯语 - 阿拉伯语(Macintosh,语音助记)" -Language=ar -Label="ara (mac-phonetic)" - -[keyboard-ara-olpc] -Description="键盘 - 阿拉伯语 - 阿拉伯语(OLPC)" -Language=ar -Label="ara (olpc)" - -[keyboard-ara-sun_type6] -Description="键盘 - 阿拉伯语 - 阿拉伯语(Sun Type 6/7)" -Language=ar -Label="ara (sun_type6)" - -[keyboard-ara-basic_ext] -Description="键盘 - 阿拉伯语 - 阿拉伯语(阿拉伯数字,第 4 层带扩展)" -Language=ar -Label="ara (basic_ext)" - -[keyboard-ara-basic_ext_digits] -Description="键盘 - 阿拉伯语 - 阿拉伯语(东阿拉伯数字,第 4 层带扩展)" -Language=ar -Label="ara (basic_ext_digits)" - -[keyboard-ara-ergoarabic] -Description="键盘 - 阿拉伯语 - 阿拉伯语(ErgoArabic)" -Language=ar -Label="ara (ergoarabic)" - -[keyboard-ie] -Description="键盘 - 爱尔兰语" -Language=en -Label=ie - -[keyboard-ie-UnicodeExpert] -Description="键盘 - 爱尔兰语 - 爱尔兰语(UnicodeExpert)" -Language=en -Label="ie (UnicodeExpert)" - -[keyboard-ie-CloGaelach] -Description="键盘 - 爱尔兰语 - CloGaelach" -Language=ga -Label="ie (CloGaelach)" - -[keyboard-ie-ogam] -Description="键盘 - 爱尔兰语 - 欧甘语" -Language=sga -Label="ie (ogam)" - -[keyboard-ie-ogam_is434] -Description="键盘 - 爱尔兰语 - 欧甘语(IS434)" -Language=sga -Label="ie (ogam_is434)" - -[keyboard-cm] -Description="键盘 - 英语(喀麦隆)" -Language=en -Label=cm - -[keyboard-cm-french] -Description="键盘 - 英语(喀麦隆) - 法语(喀麦隆)" -Language=fr -Label="fr (french)" - -[keyboard-cm-qwerty] -Description="键盘 - 英语(喀麦隆) - 喀麦隆多语言(QWERTY,国际)" -Language=en -Label="cm (qwerty)" - -[keyboard-cm-azerty] -Description="键盘 - 英语(喀麦隆) - 喀麦隆(AZERTY,国际)" -Language=fr -Label="cm (azerty)" - -[keyboard-cm-dvorak] -Description="键盘 - 英语(喀麦隆) - 喀麦隆(Dvorak,国际)" -Language=en -Label="cm (dvorak)" - -[keyboard-cm-mmuock] -Description="键盘 - 英语(喀麦隆) - 喀麦隆(Mmuock)" -Language=en -Label="cm (mmuock)" - -[keyboard-iq] -Description="键盘 - 阿拉伯语(伊拉克)" -Language=ar -Label=ar - -[keyboard-iq-ku] -Description="键盘 - 阿拉伯语(伊拉克) - 库尔德语(伊拉克,拉丁 Q)" -Language=ku -Label=ku - -[keyboard-iq-ku_alt] -Description="键盘 - 阿拉伯语(伊拉克) - 库尔德语(伊拉克,拉丁 Alt-Q)" -Language=ku -Label="ku (ku_alt)" - -[keyboard-iq-ku_f] -Description="键盘 - 阿拉伯语(伊拉克) - 库尔德语(伊拉克,F)" -Language=ku -Label="ku (ku_f)" - -[keyboard-iq-ku_ara] -Description="键盘 - 阿拉伯语(伊拉克) - 库尔德语(伊拉克,阿拉伯-拉丁)" -Language=ku -Label="ku (ku_ara)" - -[keyboard-af] -Description="键盘 - 达里语" -Language=prs -Label=fa - -[keyboard-af-ps] -Description="键盘 - 达里语 - 普什图语" -Language=ps -Label=ps - -[keyboard-af-uz] -Description="键盘 - 达里语 - 乌兹别克语(阿富汗)" -Language=uz -Label=uz - -[keyboard-af-fa-olpc] -Description="键盘 - 达里语 - 达里语(阿富汗,OLPC)" -Language=prs -Label="fa (fa-olpc)" - -[keyboard-af-ps-olpc] -Description="键盘 - 达里语 - 普什图语(阿富汗,OLPC)" -Language=ps -Label="ps (ps-olpc)" - -[keyboard-af-uz-olpc] -Description="键盘 - 达里语 - 乌兹别克语(阿富汗,OLPC)" -Language=uz -Label="uz (uz-olpc)" - -[keyboard-hr] -Description="键盘 - 克罗地亚语" -Language=hr -Label=hr - -[keyboard-hr-alternatequotes] -Description="键盘 - 克罗地亚语 - 克罗地亚语(带书名号引号)" -Language=hr -Label="hr (alternatequotes)" - -[keyboard-hr-unicode] -Description="键盘 - 克罗地亚语 - 克罗地亚语(带克罗地亚语二重字)" -Language=hr -Label="hr (unicode)" - -[keyboard-hr-unicodeus] -Description="键盘 - 克罗地亚语 - 克罗地亚语(美国,带克罗地亚语二重字)" -Language=hr -Label="hr (unicodeus)" - -[keyboard-hr-us] -Description="键盘 - 克罗地亚语 - 克罗地亚语(美国)" -Language=hr -Label="hr (us)" - -[keyboard-ma] -Description="键盘 - 阿拉伯语(摩洛哥)" -Language=ary -Label=ar - -[keyboard-ma-tifinagh] -Description="键盘 - 阿拉伯语(摩洛哥) - 柏柏尔语(摩洛哥,提非纳)" -Language= -Label="ber (tifinagh)" - -[keyboard-ma-tifinagh-alt] -Description="键盘 - 阿拉伯语(摩洛哥) - 柏柏尔语(摩洛哥,提非纳,替代)" -Language= -Label="ber (tifinagh-alt)" - -[keyboard-ma-tifinagh-alt-phonetic] -Description="键盘 - 阿拉伯语(摩洛哥) - 柏柏尔语(摩洛哥,提非纳语音助记,替代)" -Language= -Label="ber (tifinagh-alt-phonetic)" - -[keyboard-ma-tifinagh-extended] -Description="键盘 - 阿拉伯语(摩洛哥) - 柏柏尔语(摩洛哥,提非纳扩展)" -Language= -Label="ber (tifinagh-extended)" - -[keyboard-ma-tifinagh-phonetic] -Description="键盘 - 阿拉伯语(摩洛哥) - 柏柏尔语(摩洛哥,提非纳语音助记)" -Language= -Label="ber (tifinagh-phonetic)" - -[keyboard-ma-tifinagh-extended-phonetic] -Description="键盘 - 阿拉伯语(摩洛哥) - 柏柏尔语(摩洛哥,提非纳扩展语音助记)" -Language= -Label="ber (tifinagh-extended-phonetic)" - -[keyboard-ma-french] -Description="键盘 - 阿拉伯语(摩洛哥) - 法语(摩洛哥)" -Language=fr -Label="fr (french)" - -[keyboard-ma-rif] -Description="键盘 - 阿拉伯语(摩洛哥) - 里夫语" -Language=rif -Label=rif - -[keyboard-sy] -Description="键盘 - 阿拉伯语(叙利亚)" -Language=syr -Label=ar - -[keyboard-sy-syc] -Description="键盘 - 阿拉伯语(叙利亚) - 叙利亚语" -Language=syr -Label=syc - -[keyboard-sy-syc_phonetic] -Description="键盘 - 阿拉伯语(叙利亚) - 叙利亚语(语音助记)" -Language=syr -Label="syc (syc_phonetic)" - -[keyboard-sy-ku] -Description="键盘 - 阿拉伯语(叙利亚) - 库尔德语(叙利亚,拉丁 Q)" -Language=ku -Label=ku - -[keyboard-sy-ku_alt] -Description="键盘 - 阿拉伯语(叙利亚) - 库尔德语(叙利亚,拉丁 Alt-Q)" -Language=ku -Label="ku (ku_alt)" - -[keyboard-sy-ku_f] -Description="键盘 - 阿拉伯语(叙利亚) - 库尔德语(叙利亚,F)" -Language=ku -Label="ku (ku_f)" - -[keyboard-at] -Description="键盘 - 德语(奥地利)" -Language=de -Label=de - -[keyboard-at-nodeadkeys] -Description="键盘 - 德语(奥地利) - 德语(奥地利,无死键)" -Language=de -Label="at (nodeadkeys)" - -[keyboard-at-mac] -Description="键盘 - 德语(奥地利) - 德语(奥地利,Macintosh)" -Language=de -Label="at (mac)" - -[keyboard-nz] -Description="键盘 - 英语(新西兰)" -Language=en -Label=en - -[keyboard-nz-mao] -Description="键盘 - 英语(新西兰) - 毛利语" -Language=mi -Label="mi (mao)" - -[keyboard-epo] -Description="键盘 - 世界语" -Language=eo -Label=eo - -[keyboard-epo-legacy] -Description="键盘 - 世界语 - 世界语(传统)" -Language=eo -Label="epo (legacy)" - -[keyboard-eu] -Description="键盘 - EurKEY(美国)" -Language=ca -Label=eu - -[keyboard-za] -Description="键盘 - 英语(南非)" -Language=en -Label=en - -[keyboard-fo] -Description="键盘 - 法罗语" -Language=fo -Label=fo - -[keyboard-fo-nodeadkeys] -Description="键盘 - 法罗语 - 法罗语(无死键)" -Language=fo -Label="fo (nodeadkeys)" - -[keyboard-gb] -Description="键盘 - 英语(英国)" -Language=en -Label=en - -[keyboard-gb-extd] -Description="键盘 - 英语(英国) - 英语(英国,扩展,Windows)" -Language=en -Label="gb (extd)" - -[keyboard-gb-intl] -Description="键盘 - 英语(英国) - 英语(英国,国际,带死键)" -Language=en -Label="gb (intl)" - -[keyboard-gb-dvorak] -Description="键盘 - 英语(英国) - 英语(英国,Dvorak)" -Language=en -Label="gb (dvorak)" - -[keyboard-gb-dvorakukp] -Description="键盘 - 英语(英国) - 英语(英国,Dvorak,带英国标点)" -Language=en -Label="gb (dvorakukp)" - -[keyboard-gb-mac] -Description="键盘 - 英语(英国) - 英语(英国,Macintosh)" -Language=en -Label="gb (mac)" - -[keyboard-gb-mac_intl] -Description="键盘 - 英语(英国) - 英语(英国,Macintosh,国际)" -Language=en -Label="gb (mac_intl)" - -[keyboard-gb-colemak] -Description="键盘 - 英语(英国) - 英语(英国,Colemak)" -Language=en -Label="gb (colemak)" - -[keyboard-gb-colemak_dh] -Description="键盘 - 英语(英国) - 英语(英国,Colemak-DH)" -Language=en -Label="gb (colemak_dh)" - -[keyboard-gb-gla] -Description="键盘 - 英语(英国) - 苏格兰盖尔语" -Language=en -Label="gd (gla)" - -[keyboard-gb-pl] -Description="键盘 - 英语(英国) - 波兰语(英式键盘)" -Language=pl -Label=pl - -[keyboard-gb-sun_type6] -Description="键盘 - 英语(英国) - 英语(英国,Sun Type 6/7)" -Language=en -Label="gb (sun_type6)" - -[keyboard-ke] -Description="键盘 - 斯瓦希里语(肯尼亚)" -Language=sw -Label=sw - -[keyboard-ke-kik] -Description="键盘 - 斯瓦希里语(肯尼亚) - 基库尤语" -Language=ki -Label="ki (kik)" - -[keyboard-md] -Description="键盘 - 摩尔多瓦语" -Language=ro -Label=ro - -[keyboard-md-gag] -Description="键盘 - 摩尔多瓦语 - 加告兹语(摩尔多瓦)" -Language=gag -Label=gag - -[keyboard-us] -Description="键盘 - 英语(美国)" -Language=en -Label=en - -[keyboard-us-euro] -Description="键盘 - 英语(美国) - 英语(美国,5 键上是欧元符号)" -Language=en -Label="us (euro)" - -[keyboard-us-intl] -Description="键盘 - 英语(美国) - 英语(美国,国际,带死键)" -Language=en -Label="us (intl)" - -[keyboard-us-alt-intl] -Description="键盘 - 英语(美国) - 英语(美国,替代,国际)" -Language=en -Label="us (alt-intl)" - -[keyboard-us-altgr-intl] -Description="键盘 - 英语(美国) - 英语(国际,带 AltGr 死键)" -Language=en -Label="us (altgr-intl)" - -[keyboard-us-mac] -Description="键盘 - 英语(美国) - 英语(Macintosh)" -Language=en -Label="us (mac)" - -[keyboard-us-colemak] -Description="键盘 - 英语(美国) - 英语(Colemak)" -Language=en -Label="us (colemak)" - -[keyboard-us-colemak_dh] -Description="键盘 - 英语(美国) - 英语(Colemak-DH)" -Language=en -Label="us (colemak_dh)" - -[keyboard-us-colemak_dh_wide] -Description="键盘 - 英语(美国) - 英语(Colemak-DH 宽版)" -Language=en -Label="us (colemak_dh_wide)" - -[keyboard-us-colemak_dh_ortho] -Description="键盘 - 英语(美国) - 英语(Colemak-DH 正交)" -Language=en -Label="us (colemak_dh_ortho)" - -[keyboard-us-colemak_dh_iso] -Description="键盘 - 英语(美国) - 英语(Colemak-DH ISO)" -Language=en -Label="us (colemak_dh_iso)" - -[keyboard-us-colemak_dh_wide_iso] -Description="键盘 - 英语(美国) - 英语(Colemak-DH 宽版 ISO)" -Language=en -Label="us (colemak_dh_wide_iso)" - -[keyboard-us-dvorak] -Description="键盘 - 英语(美国) - 英语(Dvorak)" -Language=en -Label="us (dvorak)" - -[keyboard-us-dvorak-intl] -Description="键盘 - 英语(美国) - 英语(Dvorak,国际,带死键)" -Language=en -Label="us (dvorak-intl)" - -[keyboard-us-dvorak-alt-intl] -Description="键盘 - 英语(美国) - 英语(Dvorak,替代,国际)" -Language=en -Label="us (dvorak-alt-intl)" - -[keyboard-us-dvorak-l] -Description="键盘 - 英语(美国) - 英语(Dvorak,单手,左手)" -Language=en -Label="us (dvorak-l)" - -[keyboard-us-dvorak-r] -Description="键盘 - 英语(美国) - 英语(Dvorak,单手,右手)" -Language=en -Label="us (dvorak-r)" - -[keyboard-us-dvorak-classic] -Description="键盘 - 英语(美国) - 英语(经典 Dvorak)" -Language=en -Label="us (dvorak-classic)" - -[keyboard-us-dvp] -Description="键盘 - 英语(美国) - 英语(适合程序员的 Dvorak)" -Language=en -Label="us (dvp)" - -[keyboard-us-dvorak-mac] -Description="键盘 - 英语(美国) - 英语(Dvorak,Macintosh)" -Language=en -Label="us (dvorak-mac)" - -[keyboard-us-norman] -Description="键盘 - 英语(美国) - 英语(Norman)" -Language=en -Label="us (norman)" - -[keyboard-us-symbolic] -Description="键盘 - 英语(美国) - 英语(美国,符号)" -Language=en -Label="us (symbolic)" - -[keyboard-us-workman] -Description="键盘 - 英语(美国) - 英语(Workman)" -Language=en -Label="us (workman)" - -[keyboard-us-workman-intl] -Description="键盘 - 英语(美国) - 英语(Workman,国际,带死键)" -Language=en -Label="us (workman-intl)" - -[keyboard-us-olpc2] -Description="键盘 - 英语(美国) - 英语(除/乘键切换布局)" -Language=en -Label="us (olpc2)" - -[keyboard-us-chr] -Description="键盘 - 英语(美国) - 切罗基语" -Language=chr -Label=chr - -[keyboard-us-haw] -Description="键盘 - 英语(美国) - 夏威夷语" -Language=haw -Label=haw - -[keyboard-us-rus] -Description="键盘 - 英语(美国) - 俄语(美国,语音助记)" -Language=ru -Label="ru (rus)" - -[keyboard-us-hbs] -Description="键盘 - 英语(美国) - 塞尔维亚-克罗地亚语(美国)" -Language=en -Label="us (hbs)" - -[keyboard-us-intl-unicode] -Description="键盘 - 英语(美国) - 英语(美国,国际,AltGr Unicode 组合字符)" -Language=en -Label="us (intl-unicode)" - -[keyboard-us-alt-intl-unicode] -Description="键盘 - 英语(美国) - 英语(美国,国际,AltGr Unicode 组合字符,替代)" -Language=en -Label="us (alt-intl-unicode)" - -[keyboard-us-ats] -Description="键盘 - 英语(美国) - 阿特塞纳语" -Language=en -Label="us (ats)" - -[keyboard-us-crd] -Description="键盘 - 英语(美国) - 科达莲萨利希语" -Language=crd -Label="us (crd)" - -[keyboard-us-cz_sk_de] -Description="键盘 - 英语(美国) - 捷克语、斯洛伐克语和德语(美国)" -Language=en -Label="us (cz_sk_de)" - -[keyboard-us-cz_sk_pl_de_es_fi_sv] -Description="键盘 - 英语(美国) - 捷克语、斯洛伐克语、波兰语、西班牙语、芬兰语、瑞典语和德语(美国)" -Language=en -Label="us (cz_sk_pl_de_es_fi_sv)" - -[keyboard-us-drix] -Description="键盘 - 英语(美国) - 英语(Drix)" -Language=en -Label="us (drix)" - -[keyboard-us-de_se_fi] -Description="键盘 - 英语(美国) - 德语,瑞典语和芬兰语(美国)" -Language=en -Label="us (de_se_fi)" - -[keyboard-us-ibm238l] -Description="键盘 - 英语(美国) - 英语(美国,IBM Arabic 238_L)" -Language=en -Label="us (ibm238l)" - -[keyboard-us-sun_type6] -Description="键盘 - 英语(美国) - 英语(美国,Sun Type 6/7)" -Language=en -Label="us (sun_type6)" - -[keyboard-us-carpalx] -Description="键盘 - 英语(美国) - 英语(Carpalx)" -Language=en -Label="us (carpalx)" - -[keyboard-us-carpalx-intl] -Description="键盘 - 英语(美国) - 英语(Carpalx,国际,带死键)" -Language=en -Label="us (carpalx-intl)" - -[keyboard-us-carpalx-altgr-intl] -Description="键盘 - 英语(美国) - 英语(Carpalx,国际,带 AltGr 死键)" -Language=en -Label="us (carpalx-altgr-intl)" - -[keyboard-us-carpalx-full] -Description="键盘 - 英语(美国) - 英语(Carpalx,完全优化)" -Language=en -Label="us (carpalx-full)" - -[keyboard-us-carpalx-full-intl] -Description="键盘 - 英语(美国) - 英语(Carpalx,完全优化,国际,带死键)" -Language=en -Label="us (carpalx-full-intl)" - -[keyboard-us-carpalx-full-altgr-intl] -Description="键盘 - 英语(美国) - 英语(Carpalx,完全优化,国际,带 AltGr 死键)" -Language=en -Label="us (carpalx-full-altgr-intl)" - -[keyboard-us-3l] -Description="键盘 - 英语(美国) - 英语(3l)" -Language=en -Label="us (3l)" - -[keyboard-us-3l-cros] -Description="键盘 - 英语(美国) - 英语(3l,Chromebook)" -Language=en -Label="us (3l-cros)" - -[keyboard-us-3l-emacs] -Description="键盘 - 英语(美国) - 英语(3l,emacs)" -Language=en -Label="us (3l-emacs)" - -[keyboard-us-workman-p] -Description="键盘 - 英语(美国) - 英语(Workman-P)" -Language=en -Label=workman-p - -[keyboard-us-scn] -Description="键盘 - 英语(美国) - 西西里语(美式键盘)" -Language=en -Label="us (scn)" - -[keyboard-us-altgr-weur] -Description="键盘 - 英语(美国) - 英语(西欧 AltGr 死键)" -Language=en -Label="us (altgr-weur)" - -[keyboard-ge] -Description="键盘 - 格鲁吉亚语" -Language=ka -Label=ka - -[keyboard-ge-ergonomic] -Description="键盘 - 格鲁吉亚语 - 格鲁吉亚语(人体工学)" -Language=ka -Label="ge (ergonomic)" - -[keyboard-ge-mess] -Description="键盘 - 格鲁吉亚语 - 格鲁吉亚语(MESS)" -Language=ka -Label="ge (mess)" - -[keyboard-ge-os] -Description="键盘 - 格鲁吉亚语 - 奥塞梯语(格鲁吉亚)" -Language=os -Label="ge (os)" - -[keyboard-ge-ru] -Description="键盘 - 格鲁吉亚语 - 俄语(格鲁吉亚)" -Language=ru -Label=ru - -[keyboard-es] -Description="键盘 - 西班牙语" -Language=es -Label=es - -[keyboard-es-nodeadkeys] -Description="键盘 - 西班牙语 - 西班牙语(无死键)" -Language=es -Label="es (nodeadkeys)" - -[keyboard-es-deadtilde] -Description="键盘 - 西班牙语 - 西班牙语(波浪号为死键)" -Language=es -Label="es (deadtilde)" - -[keyboard-es-winkeys] -Description="键盘 - 西班牙语 - 西班牙语(Windows)" -Language=es -Label="es (winkeys)" - -[keyboard-es-dvorak] -Description="键盘 - 西班牙语 - 西班牙语(Dvorak)" -Language=es -Label="es (dvorak)" - -[keyboard-es-ast] -Description="键盘 - 西班牙语 - 阿斯图里亚斯语(西班牙,带底部加点的 H 和 L)" -Language=ast -Label=ast - -[keyboard-es-cat] -Description="键盘 - 西班牙语 - 加泰罗尼亚语(西班牙,带中间加点的 L)" -Language=ca -Label="ca (cat)" - -[keyboard-es-sun_type6] -Description="键盘 - 西班牙语 - 西班牙语(Sun Type 6/7)" -Language=es -Label="es (sun_type6)" - -[keyboard-ee] -Description="键盘 - 爱沙尼亚语" -Language=et -Label=et - -[keyboard-ee-nodeadkeys] -Description="键盘 - 爱沙尼亚语 - 爱沙尼亚语(无死键)" -Language=et -Label="ee (nodeadkeys)" - -[keyboard-ee-dvorak] -Description="键盘 - 爱沙尼亚语 - 爱沙尼亚语(Dvorak)" -Language=et -Label="ee (dvorak)" - -[keyboard-ee-us] -Description="键盘 - 爱沙尼亚语 - 爱沙尼亚语(美国)" -Language=et -Label="ee (us)" - -[keyboard-ee-sun_type6] -Description="键盘 - 爱沙尼亚语 - 爱沙尼亚语(Sun Type 6/7)" -Language=et -Label="ee (sun_type6)" - -[keyboard-bd] -Description="键盘 - 孟加拉语" -Language=bn -Label=bn - -[keyboard-bd-probhat] -Description="键盘 - 孟加拉语 - 孟加拉语(Probhat)" -Language=bn -Label="bd (probhat)" - -[keyboard-ph] -Description="键盘 - 菲律宾语" -Language=fil -Label=ph - -[keyboard-ph-qwerty-bay] -Description="键盘 - 菲律宾语 - 菲律宾语(QWERTY,Baybayin)" -Language=fil -Label="ph (qwerty-bay)" - -[keyboard-ph-capewell-dvorak] -Description="键盘 - 菲律宾语 - 菲律宾语(Capewell-Dvorak,拉丁)" -Language=fil -Label="ph (capewell-dvorak)" - -[keyboard-ph-capewell-dvorak-bay] -Description="键盘 - 菲律宾语 - 菲律宾语(Capewell-Dvorak,Baybayin)" -Language=fil -Label="ph (capewell-dvorak-bay)" - -[keyboard-ph-capewell-qwerf2k6] -Description="键盘 - 菲律宾语 - 菲律宾语(Capewell-QWERF 2006,拉丁)" -Language=fil -Label="ph (capewell-qwerf2k6)" - -[keyboard-ph-capewell-qwerf2k6-bay] -Description="键盘 - 菲律宾语 - 菲律宾语(Capewell-QWERF 2006,Baybayin)" -Language=fil -Label="ph (capewell-qwerf2k6-bay)" - -[keyboard-ph-colemak] -Description="键盘 - 菲律宾语 - 菲律宾语(Colemak,拉丁)" -Language=fil -Label="ph (colemak)" - -[keyboard-ph-colemak-bay] -Description="键盘 - 菲律宾语 - 菲律宾语(Colemak,Baybayin)" -Language=fil -Label="ph (colemak-bay)" - -[keyboard-ph-dvorak] -Description="键盘 - 菲律宾语 - 菲律宾语(Dvorak,拉丁)" -Language=fil -Label="ph (dvorak)" - -[keyboard-ph-dvorak-bay] -Description="键盘 - 菲律宾语 - 菲律宾语(Dvorak,Baybayin)" -Language=fil -Label="ph (dvorak-bay)" - -[keyboard-uz] -Description="键盘 - 乌兹别克语" -Language=uz -Label=uz - -[keyboard-uz-latin] -Description="键盘 - 乌兹别克语 - 乌兹别克语(拉丁)" -Language=uz -Label="uz (latin)" - -[keyboard-lt] -Description="键盘 - 立陶宛语" -Language=lt -Label=lt - -[keyboard-lt-std] -Description="键盘 - 立陶宛语 - 立陶宛语(标准)" -Language=lt -Label="lt (std)" - -[keyboard-lt-us] -Description="键盘 - 立陶宛语 - 立陶宛语(美国)" -Language=lt -Label="lt (us)" - -[keyboard-lt-ibm] -Description="键盘 - 立陶宛语 - 立陶宛语(IBM)" -Language=lt -Label="lt (ibm)" - -[keyboard-lt-lekp] -Description="键盘 - 立陶宛语 - 立陶宛语(LEKP)" -Language=lt -Label="lt (lekp)" - -[keyboard-lt-lekpa] -Description="键盘 - 立陶宛语 - 立陶宛语(LEKPa)" -Language=lt -Label="lt (lekpa)" - -[keyboard-lt-ratise] -Description="键盘 - 立陶宛语 - 立陶宛语(Ratise)" -Language=lt -Label="lt (ratise)" - -[keyboard-lt-sgs] -Description="键盘 - 立陶宛语 - 萨莫吉提亚语" -Language=sgs -Label="lt (sgs)" - -[keyboard-lt-us_dvorak] -Description="键盘 - 立陶宛语 - 立陶宛语(Dvorak)" -Language=lt -Label="lt (us_dvorak)" - -[keyboard-lt-sun_type6] -Description="键盘 - 立陶宛语 - 立陶宛语(Sun Type 6/7)" -Language=lt -Label="lt (sun_type6)" - -[keyboard-fi] -Description="键盘 - 芬兰语" -Language=fi -Label=fi - -[keyboard-fi-winkeys] -Description="键盘 - 芬兰语 - 芬兰语(Windows)" -Language=fi -Label="fi (winkeys)" - -[keyboard-fi-classic] -Description="键盘 - 芬兰语 - 芬兰语(经典)" -Language=fi -Label="fi (classic)" - -[keyboard-fi-nodeadkeys] -Description="键盘 - 芬兰语 - 芬兰语(经典,无死键)" -Language=fi -Label="fi (nodeadkeys)" - -[keyboard-fi-mac] -Description="键盘 - 芬兰语 - 芬兰语(Macintosh)" -Language=fi -Label="fi (mac)" - -[keyboard-fi-smi] -Description="键盘 - 芬兰语 - 北萨米语(芬兰)" -Language=se -Label="fi (smi)" - -[keyboard-fi-sun_type6] -Description="键盘 - 芬兰语 - 芬兰语(Sun Type 6/7)" -Language=fi -Label="fi (sun_type6)" - -[keyboard-fi-das] -Description="键盘 - 芬兰语 - 芬兰语(DAS)" -Language=fi -Label="fi (das)" - -[keyboard-fi-fidvorak] -Description="键盘 - 芬兰语 - 芬兰语(Dvorak)" -Language=fi -Label="fi (fidvorak)" - -[keyboard-cn] -Description="键盘 - 汉语" -Language=zh -Label=zh - -[keyboard-cn-altgr-pinyin] -Description="键盘 - 汉语 - 汉语拼音字母(带 AltGr 死键)" -Language=zh -Label="cn (altgr-pinyin)" - -[keyboard-cn-mon_trad] -Description="键盘 - 汉语 - 蒙古语(Bichig)" -Language=mvf -Label="cn (mon_trad)" - -[keyboard-cn-mon_trad_todo] -Description="键盘 - 汉语 - 蒙古语(Todo)" -Language=mvf -Label="cn (mon_trad_todo)" - -[keyboard-cn-mon_trad_xibe] -Description="键盘 - 汉语 - 蒙古语(Xibe)" -Language=sjo -Label="cn (mon_trad_xibe)" - -[keyboard-cn-mon_trad_manchu] -Description="键盘 - 汉语 - 蒙古语(Manchu)" -Language=mnc -Label="cn (mon_trad_manchu)" - -[keyboard-cn-mon_trad_galik] -Description="键盘 - 汉语 - 蒙古语(Galik)" -Language=mvf -Label="cn (mon_trad_galik)" - -[keyboard-cn-mon_todo_galik] -Description="键盘 - 汉语 - 蒙古语(Todo Galik)" -Language=mvf -Label="cn (mon_todo_galik)" - -[keyboard-cn-mon_manchu_galik] -Description="键盘 - 汉语 - 蒙古语(Manchu Galik)" -Language=mnc -Label="cn (mon_manchu_galik)" - -[keyboard-cn-tib] -Description="键盘 - 汉语 - 藏语" -Language=bo -Label="cn (tib)" - -[keyboard-cn-tib_asciinum] -Description="键盘 - 汉语 - 藏语(带 ASCII 数字)" -Language=bo -Label="cn (tib_asciinum)" - -[keyboard-cn-ug] -Description="键盘 - 汉语 - 维吾尔语" -Language=ug -Label=ug - -[keyboard-ca] -Description="键盘 - 法语(加拿大)" -Language=fr -Label=fr - -[keyboard-ca-fr-dvorak] -Description="键盘 - 法语(加拿大) - 法语(加拿大,Dvorak)" -Language=fr -Label="fr (fr-dvorak)" - -[keyboard-ca-fr-legacy] -Description="键盘 - 法语(加拿大) - 法语(加拿大,传统)" -Language=fr -Label="fr (fr-legacy)" - -[keyboard-ca-multix] -Description="键盘 - 法语(加拿大) - 加拿大(CSA)" -Language=fr -Label="ca (multix)" - -[keyboard-ca-eng] -Description="键盘 - 法语(加拿大) - 英语(加拿大)" -Language=en -Label="en (eng)" - -[keyboard-ca-ike] -Description="键盘 - 法语(加拿大) - 因纽特语" -Language=iu -Label=ike - -[keyboard-ca-kut] -Description="键盘 - 法语(加拿大) - Kutenai 语" -Language=fr -Label=kut - -[keyboard-ca-shs] -Description="键盘 - 法语(加拿大) - 苏斯瓦语" -Language=fr -Label=shs - -[keyboard-ca-sun_type6] -Description="键盘 - 法语(加拿大) - 多语言(加拿大,Sun Type 6/7)" -Language=fr -Label="ca (sun_type6)" - -[keyboard-gh] -Description="键盘 - 英语(加纳)" -Language=en -Label=en - -[keyboard-gh-generic] -Description="键盘 - 英语(加纳) - 英语(加纳,多语言)" -Language=en -Label="gh (generic)" - -[keyboard-gh-gillbt] -Description="键盘 - 英语(加纳) - 英语(加纳,GILLBT)" -Language=en -Label="gh (gillbt)" - -[keyboard-gh-akan] -Description="键盘 - 英语(加纳) - 阿肯语" -Language=ak -Label="ak (akan)" - -[keyboard-gh-avn] -Description="键盘 - 英语(加纳) - Avatime" -Language=avn -Label=avn - -[keyboard-gh-ewe] -Description="键盘 - 英语(加纳) - 埃维语" -Language=ee -Label="ee (ewe)" - -[keyboard-gh-fula] -Description="键盘 - 英语(加纳) - 富拉语" -Language=ff -Label="ff (fula)" - -[keyboard-gh-ga] -Description="键盘 - 英语(加纳) - Ga 语" -Language=gaa -Label="gaa (ga)" - -[keyboard-gh-hausa] -Description="键盘 - 英语(加纳) - 豪萨语(加纳)" -Language=ha -Label="ha (hausa)" - -[keyboard-fr] -Description="键盘 - 法语" -Language=fr -Label=fr - -[keyboard-fr-nodeadkeys] -Description="键盘 - 法语 - 法语(无死键)" -Language=fr -Label="fr (nodeadkeys)" - -[keyboard-fr-oss] -Description="键盘 - 法语 - 法语(替代)" -Language=fr -Label="fr (oss)" - -[keyboard-fr-oss_nodeadkeys] -Description="键盘 - 法语 - 法语(替代,无死键)" -Language=fr -Label="fr (oss_nodeadkeys)" - -[keyboard-fr-oss_latin9] -Description="键盘 - 法语 - 法语(替代,只包含拉丁-9 字符)" -Language=fr -Label="fr (oss_latin9)" - -[keyboard-fr-latin9] -Description="键盘 - 法语 - 法语(传统,替代)" -Language=fr -Label="fr (latin9)" - -[keyboard-fr-latin9_nodeadkeys] -Description="键盘 - 法语 - 法语(传统,替代,无死键)" -Language=fr -Label="fr (latin9_nodeadkeys)" - -[keyboard-fr-azerty] -Description="键盘 - 法语 - 法语(AZERTY)" -Language=fr -Label="fr (azerty)" - -[keyboard-fr-afnor] -Description="键盘 - 法语 - 法语(AZERTY,AFNOR)" -Language=fr -Label="fr (afnor)" - -[keyboard-fr-bepo] -Description="键盘 - 法语 - 法语(BEPO)" -Language=fr -Label="fr (bepo)" - -[keyboard-fr-bepo_latin9] -Description="键盘 - 法语 - 法语(BEPO,只包含拉丁-9 字符)" -Language=fr -Label="fr (bepo_latin9)" - -[keyboard-fr-bepo_afnor] -Description="键盘 - 法语 - 法语(BEPO,AFNOR)" -Language=fr -Label="fr (bepo_afnor)" - -[keyboard-fr-dvorak] -Description="键盘 - 法语 - 法语(Dvorak)" -Language=fr -Label="fr (dvorak)" - -[keyboard-fr-ergol] -Description="键盘 - 法语 - 法语(Ergo-L)" -Language=fr -Label="fr (ergol)" - -[keyboard-fr-ergol_iso] -Description="键盘 - 法语 - 法语(Ergo-L,ISO 变种)" -Language=fr -Label="fr (ergol_iso)" - -[keyboard-fr-mac] -Description="键盘 - 法语 - 法语(Macintosh)" -Language=fr -Label="fr (mac)" - -[keyboard-fr-us] -Description="键盘 - 法语 - 法语(美国)" -Language=fr -Label="fr (us)" - -[keyboard-fr-bre] -Description="键盘 - 法语 - 布列塔尼语(法国)" -Language=br -Label="fr (bre)" - -[keyboard-fr-oci] -Description="键盘 - 法语 - 奥克语" -Language=oc -Label="fr (oci)" - -[keyboard-fr-geo] -Description="键盘 - 法语 - 格鲁吉亚语(法国,AZERTY Tskapo)" -Language=ka -Label="fr (geo)" - -[keyboard-fr-sun_type6] -Description="键盘 - 法语 - 法语(Sun Type 6/7)" -Language=fr -Label="fr (sun_type6)" - -[keyboard-fr-us-alt] -Description="键盘 - 法语 - 法语(美国,带死键,替代)" -Language=fr -Label="fr (us-alt)" - -[keyboard-fr-us-azerty] -Description="键盘 - 法语 - 法语(美国,AZERTY)" -Language=fr -Label="fr (us-azerty)" - -[keyboard-eg] -Description="键盘 - 阿拉伯语(埃及)" -Language=ar -Label=ar - -[keyboard-eg-cop] -Description="键盘 - 阿拉伯语(埃及) - 科普特语" -Language=cop -Label=cop - -[keyboard-cd] -Description="键盘 - 法语(刚果民主共和国)" -Language=fr -Label=fr - -[keyboard-tg] -Description="键盘 - 法语(多哥)" -Language=fr -Label=fr - -[keyboard-kz] -Description="键盘 - 哈萨克语" -Language=kk -Label=kk - -[keyboard-kz-kazrus] -Description="键盘 - 哈萨克语 - 哈萨克语(带俄语)" -Language=kk -Label="kz (kazrus)" - -[keyboard-kz-ext] -Description="键盘 - 哈萨克语 - 哈萨克语(扩展)" -Language=kk -Label="kz (ext)" - -[keyboard-kz-latin] -Description="键盘 - 哈萨克语 - 哈萨克语(拉丁)" -Language=kk -Label="kz (latin)" - -[keyboard-kz-ruskaz] -Description="键盘 - 哈萨克语 - 俄语(哈萨克斯坦,带哈萨克语)" -Language=ru -Label="ru (ruskaz)" - -[keyboard-ch] -Description="键盘 - 德语(瑞士)" -Language=de -Label=de - -[keyboard-ch-de_nodeadkeys] -Description="键盘 - 德语(瑞士) - 德语(瑞士,无死键)" -Language=de -Label="de (de_nodeadkeys)" - -[keyboard-ch-de_mac] -Description="键盘 - 德语(瑞士) - 德语(瑞士,Macintosh)" -Language=de -Label="de (de_mac)" - -[keyboard-ch-legacy] -Description="键盘 - 德语(瑞士) - 德语(瑞士,传统)" -Language=de -Label="ch (legacy)" - -[keyboard-ch-fr] -Description="键盘 - 德语(瑞士) - 法语(瑞士)" -Language=fr -Label=fr - -[keyboard-ch-fr_nodeadkeys] -Description="键盘 - 德语(瑞士) - 法语(瑞士,无死键)" -Language=fr -Label="fr (fr_nodeadkeys)" - -[keyboard-ch-fr_mac] -Description="键盘 - 德语(瑞士) - 法语(瑞士,Macintosh)" -Language=fr -Label="fr (fr_mac)" - -[keyboard-ch-sun_type6_de] -Description="键盘 - 德语(瑞士) - 德语(瑞士,Sun Type 6/7)" -Language=de -Label="ch (sun_type6_de)" - -[keyboard-ch-sun_type6_fr] -Description="键盘 - 德语(瑞士) - 法语(瑞士,Sun Type 6/7)" -Language=de -Label="ch (sun_type6_fr)" - -[keyboard-gr] -Description="键盘 - 希腊语" -Language=el -Label=gr - -[keyboard-gr-simple] -Description="键盘 - 希腊语 - 希腊语(简易)" -Language=el -Label="gr (simple)" - -[keyboard-gr-nodeadkeys] -Description="键盘 - 希腊语 - 希腊语(无死键)" -Language=el -Label="gr (nodeadkeys)" - -[keyboard-gr-polytonic] -Description="键盘 - 希腊语 - 希腊语(变音符号)" -Language=el -Label="gr (polytonic)" - -[keyboard-gr-sun_type6] -Description="键盘 - 希腊语 - 希腊语(Sun Type 6/7)" -Language=el -Label="gr (sun_type6)" - -[keyboard-gr-colemak] -Description="键盘 - 希腊语 - 希腊语(Colemak)" -Language=el -Label="gr (colemak)" - -[keyboard-tr] -Description="键盘 - 土耳其语" -Language=tr -Label=tr - -[keyboard-tr-f] -Description="键盘 - 土耳其语 - 土耳其语(F)" -Language=tr -Label="tr (f)" - -[keyboard-tr-e] -Description="键盘 - 土耳其语 - 土耳其语(E)" -Language=tr -Label="tr (e)" - -[keyboard-tr-alt] -Description="键盘 - 土耳其语 - 土耳其语(Alt-Q)" -Language=tr -Label="tr (alt)" - -[keyboard-tr-intl] -Description="键盘 - 土耳其语 - 土耳其语(国际,带死键)" -Language=tr -Label="tr (intl)" - -[keyboard-tr-ku] -Description="键盘 - 土耳其语 - 库尔德语(土耳其,拉丁 Q)" -Language=ku -Label=ku - -[keyboard-tr-ku_f] -Description="键盘 - 土耳其语 - 库尔德语(土耳其,F)" -Language=ku -Label="ku (ku_f)" - -[keyboard-tr-ku_alt] -Description="键盘 - 土耳其语 - 库尔德语(土耳其,拉丁 Alt-Q)" -Language=ku -Label="ku (ku_alt)" - -[keyboard-tr-sun_type6] -Description="键盘 - 土耳其语 - 土耳其语(Sun Type 6/7)" -Language=tr -Label="tr (sun_type6)" - -[keyboard-tr-us] -Description="键盘 - 土耳其语 - 土耳其语(交换 i 和 ı)" -Language=tr -Label="tr (us)" - -[keyboard-tr-otk] -Description="键盘 - 土耳其语 - 古代突厥语" -Language=tr -Label="tr (otk)" - -[keyboard-tr-otkf] -Description="键盘 - 土耳其语 - 古代突厥语(F)" -Language=tr -Label="tr (otkf)" - -[keyboard-tr-ot] -Description="键盘 - 土耳其语 - 奥斯曼土耳其语(Q)" -Language=tr -Label="tr (ot)" - -[keyboard-tr-otf] -Description="键盘 - 土耳其语 - 奥斯曼土耳其语(F)" -Language=tr -Label="tr (otf)" - -[keyboard-il] -Description="键盘 - 希伯来语" -Language=he -Label=he - -[keyboard-il-si2] -Description="键盘 - 希伯来语 - 希伯来语(SI-1452-2)" -Language=he -Label="il (si2)" - -[keyboard-il-lyx] -Description="键盘 - 希伯来语 - 希伯来语(lyx)" -Language=he -Label="il (lyx)" - -[keyboard-il-phonetic] -Description="键盘 - 希伯来语 - 希伯来语(语音助记)" -Language=he -Label="il (phonetic)" - -[keyboard-il-biblical] -Description="键盘 - 希伯来语 - 希伯来语(圣经,Tiro)" -Language=he -Label="il (biblical)" - -[keyboard-il-biblicalSIL] -Description="键盘 - 希伯来语 - 希伯来语(Biblical,SIL 语音助记)" -Language=he -Label="il (biblicalSIL)" - -[keyboard-de] -Description="键盘 - 德语" -Language=de -Label=de - -[keyboard-de-deadacute] -Description="键盘 - 德语 - 德语(尖音符号为死键)" -Language=de -Label="de (deadacute)" - -[keyboard-de-deadgraveacute] -Description="键盘 - 德语 - 德语(重音符号和尖音符号为死键)" -Language=de -Label="de (deadgraveacute)" - -[keyboard-de-deadtilde] -Description="键盘 - 德语 - 德语(波浪号为死键)" -Language=de -Label="de (deadtilde)" - -[keyboard-de-nodeadkeys] -Description="键盘 - 德语 - 德语(无死键)" -Language=de -Label="de (nodeadkeys)" - -[keyboard-de-e1] -Description="键盘 - 德语 - 德语(E1)" -Language=de -Label="de (e1)" - -[keyboard-de-e2] -Description="键盘 - 德语 - 德语(E2)" -Language=de -Label="de (e2)" - -[keyboard-de-T3] -Description="键盘 - 德语 - 德语(T3)" -Language=de -Label="de (T3)" - -[keyboard-de-us] -Description="键盘 - 德语 - 德语(美国)" -Language=de -Label="de (us)" - -[keyboard-de-dvorak] -Description="键盘 - 德语 - 德语(Dvorak)" -Language=de -Label="de (dvorak)" - -[keyboard-de-mac] -Description="键盘 - 德语 - 德语(Macintosh)" -Language=de -Label="de (mac)" - -[keyboard-de-mac_nodeadkeys] -Description="键盘 - 德语 - 德语(Macintosh,无死键)" -Language=de -Label="de (mac_nodeadkeys)" - -[keyboard-de-neo] -Description="键盘 - 德语 - 德语(Neo 2)" -Language=de -Label="de (neo)" - -[keyboard-de-qwerty] -Description="键盘 - 德语 - 德语(QWERTY)" -Language=de -Label="de (qwerty)" - -[keyboard-de-dsb] -Description="键盘 - 德语 - 下索布语" -Language=dsb -Label="de (dsb)" - -[keyboard-de-dsb_qwertz] -Description="键盘 - 德语 - 下索布语(QWERTZ)" -Language=dsb -Label="de (dsb_qwertz)" - -[keyboard-de-ro] -Description="键盘 - 德语 - 罗马尼亚语(德国)" -Language=ro -Label="de (ro)" - -[keyboard-de-ro_nodeadkeys] -Description="键盘 - 德语 - 罗马尼亚语(德国,无死键)" -Language=ro -Label="de (ro_nodeadkeys)" - -[keyboard-de-ru] -Description="键盘 - 德语 - 俄语(德国,语音助记)" -Language=ru -Label=ru - -[keyboard-de-tr] -Description="键盘 - 德语 - 土耳其语(德国)" -Language=tr -Label="de (tr)" - -[keyboard-de-hu] -Description="键盘 - 德语 - 德语(带匈牙利字母,无死键)" -Language=de -Label="de (hu)" - -[keyboard-de-pl] -Description="键盘 - 德语 - 波兰语(德国,无死键)" -Language=de -Label="de (pl)" - -[keyboard-de-sun_type6] -Description="键盘 - 德语 - 德语(Sun Type 6/7)" -Language=de -Label="de (sun_type6)" - -[keyboard-de-adnw] -Description="键盘 - 德语 - 德语(Aus der Neo-Welt)" -Language=de -Label="de (adnw)" - -[keyboard-de-koy] -Description="键盘 - 德语 - 德语(KOY)" -Language=de -Label="de (koy)" - -[keyboard-de-bone] -Description="键盘 - 德语 - 德语(Bone)" -Language=de -Label="de (bone)" - -[keyboard-de-bone_eszett_home] -Description="键盘 - 德语 - 德语(Bone,eszett 在中间行)" -Language=de -Label="de (bone_eszett_home)" - -[keyboard-de-neo_qwertz] -Description="键盘 - 德语 - 德语(Neo,QWERTZ)" -Language=de -Label="de (neo_qwertz)" - -[keyboard-de-neo_qwerty] -Description="键盘 - 德语 - 德语(Neo,QWERTY)" -Language=de -Label="de (neo_qwerty)" - -[keyboard-de-noted] -Description="键盘 - 德语 - 德语(Noted)" -Language=de -Label="de (noted)" - -[keyboard-de-ru-recom] -Description="键盘 - 德语 - 俄语(德国,推荐)" -Language=ru -Label="ru (ru-recom)" - -[keyboard-de-ru-translit] -Description="键盘 - 德语 - 俄语(德国,转写)" -Language=ru -Label="ru (ru-translit)" - -[keyboard-id] -Description="键盘 - 印尼语(拉丁)" -Language=id -Label=id - -[keyboard-id-melayu-phonetic] -Description="键盘 - 印尼语(拉丁) - 印尼语(Arab Melayu,语音助记)" -Language=id -Label="id (melayu-phonetic)" - -[keyboard-id-melayu-phoneticx] -Description="键盘 - 印尼语(拉丁) - 印尼语(Arab Melayu,扩展语音助记)" -Language=id -Label="id (melayu-phoneticx)" - -[keyboard-id-pegon-phonetic] -Description="键盘 - 印尼语(拉丁) - 印尼语(Arab Pegon,语音助记)" -Language=id -Label="id (pegon-phonetic)" - -[keyboard-id-javanese] -Description="键盘 - 印尼语(拉丁) - 爪哇语" -Language=jax -Label="id (javanese)" - -[keyboard-sn] -Description="键盘 - 沃洛夫语" -Language=wo -Label=wo - -[keyboard-az] -Description="键盘 - 阿塞拜疆语" -Language=az -Label=az - -[keyboard-az-cyrillic] -Description="键盘 - 阿塞拜疆语 - 阿塞拜疆语(西里尔)" -Language=az -Label="az (cyrillic)" - -[keyboard-kh] -Description="键盘 - 高棉语(柬埔寨)" -Language=km -Label=km - -[keyboard-hu] -Description="键盘 - 匈牙利语" -Language=hu -Label=hu - -[keyboard-hu-standard] -Description="键盘 - 匈牙利语 - 匈牙利语(标准)" -Language=hu -Label="hu (standard)" - -[keyboard-hu-nodeadkeys] -Description="键盘 - 匈牙利语 - 匈牙利语(无死键)" -Language=hu -Label="hu (nodeadkeys)" - -[keyboard-hu-qwerty] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTY)" -Language=hu -Label="hu (qwerty)" - -[keyboard-hu-101_qwertz_comma_dead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTZ,101 键,逗号,死键)" -Language=hu -Label="hu (101_qwertz_comma_dead)" - -[keyboard-hu-101_qwertz_comma_nodead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTZ,101 键,逗号,无死键)" -Language=hu -Label="hu (101_qwertz_comma_nodead)" - -[keyboard-hu-101_qwertz_dot_dead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTZ,101 键,点,死键)" -Language=hu -Label="hu (101_qwertz_dot_dead)" - -[keyboard-hu-101_qwertz_dot_nodead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTZ,101 键,点,无死键)" -Language=hu -Label="hu (101_qwertz_dot_nodead)" - -[keyboard-hu-101_qwerty_comma_dead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTY,101 键,逗号,死键)" -Language=hu -Label="hu (101_qwerty_comma_dead)" - -[keyboard-hu-101_qwerty_comma_nodead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTY,101 键,逗号,无死键)" -Language=hu -Label="hu (101_qwerty_comma_nodead)" - -[keyboard-hu-101_qwerty_dot_dead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTY,101 键,点,死键)" -Language=hu -Label="hu (101_qwerty_dot_dead)" - -[keyboard-hu-101_qwerty_dot_nodead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTY,101 键,点,无死键)" -Language=hu -Label="hu (101_qwerty_dot_nodead)" - -[keyboard-hu-102_qwertz_comma_dead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTZ,102 键,逗号,死键)" -Language=hu -Label="hu (102_qwertz_comma_dead)" - -[keyboard-hu-102_qwertz_comma_nodead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTZ,102 键,逗号,无死键)" -Language=hu -Label="hu (102_qwertz_comma_nodead)" - -[keyboard-hu-102_qwertz_dot_dead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTZ,102 键,点,死键)" -Language=hu -Label="hu (102_qwertz_dot_dead)" - -[keyboard-hu-102_qwertz_dot_nodead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTZ,102 键,点,无死键)" -Language=hu -Label="hu (102_qwertz_dot_nodead)" - -[keyboard-hu-102_qwerty_comma_dead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTY,102 键,逗号,死键)" -Language=hu -Label="hu (102_qwerty_comma_dead)" - -[keyboard-hu-102_qwerty_comma_nodead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTY,102 键,逗号,无死键)" -Language=hu -Label="hu (102_qwerty_comma_nodead)" - -[keyboard-hu-102_qwerty_dot_dead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTY,102 键,点,死键)" -Language=hu -Label="hu (102_qwerty_dot_dead)" - -[keyboard-hu-102_qwerty_dot_nodead] -Description="键盘 - 匈牙利语 - 匈牙利语(QWERTY,102 键,点,无死键)" -Language=hu -Label="hu (102_qwerty_dot_nodead)" - -[keyboard-hu-oldhunlig] -Description="键盘 - 匈牙利语 - 古匈牙利语(含连字)" -Language=hu -Label="oldhun(lig) (oldhunlig)" - -[keyboard-hu-oldhun_sk_sh] -Description="键盘 - 匈牙利语 - 古匈牙利语(喀尔巴阡高地,S 作为 Sh)" -Language=hu -Label="oldhun(SK,Sh) (oldhun_sk_sh)" - -[keyboard-hu-oldhun_sk_sz] -Description="键盘 - 匈牙利语 - 古匈牙利语(喀尔巴阡高地,S 作为 Sz)" -Language=hu -Label="oldhun(SK,Sz) (oldhun_sk_sz)" - -[keyboard-hu-us] -Description="键盘 - 匈牙利语 - 匈牙利语(美国)" -Language=hu -Label=us - -[keyboard-ng] -Description="键盘 - 英语(尼日利亚)" -Language=en -Label=en - -[keyboard-ng-hausa] -Description="键盘 - 英语(尼日利亚) - 豪萨语(尼日利亚)" -Language=ha -Label="ha (hausa)" - -[keyboard-ng-igbo] -Description="键盘 - 英语(尼日利亚) - 伊博语" -Language=ig -Label="ig (igbo)" - -[keyboard-ng-yoruba] -Description="键盘 - 英语(尼日利亚) - 约鲁巴语" -Language=yo -Label="yo (yoruba)" - -[keyboard-is] -Description="键盘 - 冰岛语" -Language=is -Label=is - -[keyboard-is-mac_legacy] -Description="键盘 - 冰岛语 - 冰岛语(Macintosh,传统)" -Language=is -Label="is (mac_legacy)" - -[keyboard-is-mac] -Description="键盘 - 冰岛语 - 冰岛语(Macintosh)" -Language=is -Label="is (mac)" - -[keyboard-is-dvorak] -Description="键盘 - 冰岛语 - 冰岛语(Dvorak)" -Language=is -Label="is (dvorak)" - -[keyboard-in] -Description="键盘 - 印度语言" -Language=hi -Label=in - -[keyboard-in-asm-kagapa] -Description="键盘 - 印度语言 - 阿萨姆语(KaGaPa,语音助记)" -Language=as -Label="as (asm-kagapa)" - -[keyboard-in-ben] -Description="键盘 - 印度语言 - 孟加拉语(印度)" -Language=bn -Label="bn (ben)" - -[keyboard-in-ben_probhat] -Description="键盘 - 印度语言 - 孟加拉语(印度,Probhat)" -Language=bn -Label="bn (ben_probhat)" - -[keyboard-in-ben_baishakhi] -Description="键盘 - 印度语言 - 孟加拉语(印度,Baishakhi)" -Language=bn -Label="in (ben_baishakhi)" - -[keyboard-in-ben_bornona] -Description="键盘 - 印度语言 - 孟加拉语(印度,Bornona)" -Language=bn -Label="in (ben_bornona)" - -[keyboard-in-ben-kagapa] -Description="键盘 - 印度语言 - 孟加拉语(印度,KaGaPa,语音助记)" -Language=bn -Label="in (ben-kagapa)" - -[keyboard-in-ben_gitanjali] -Description="键盘 - 印度语言 - 孟加拉语(印度,Gitanjali)" -Language=bn -Label="in (ben_gitanjali)" - -[keyboard-in-ben_inscript] -Description="键盘 - 印度语言 - 孟加拉语(印度,Baishakhi InScript)" -Language=bn -Label="in (ben_inscript)" - -[keyboard-in-eng] -Description="键盘 - 印度语言 - 英语(印度,带卢比符号)" -Language=en -Label="en (eng)" - -[keyboard-in-guj] -Description="键盘 - 印度语言 - 古吉拉特语" -Language=gu -Label="gu (guj)" - -[keyboard-in-guj-kagapa] -Description="键盘 - 印度语言 - 古吉拉特语(KaGaPa,语音助记)" -Language=gu -Label="gu (guj-kagapa)" - -[keyboard-in-bolnagri] -Description="键盘 - 印度语言 - 印地语(Bolnagri)" -Language=hi -Label="hi (bolnagri)" - -[keyboard-in-hin-wx] -Description="键盘 - 印度语言 - 印地语(Wx)" -Language=hi -Label="hi (hin-wx)" - -[keyboard-in-hin-kagapa] -Description="键盘 - 印度语言 - 印地语(KaGaPa,语音助记)" -Language=hi -Label="hi (hin-kagapa)" - -[keyboard-in-kan] -Description="键盘 - 印度语言 - 卡纳达语" -Language=kn -Label="kn (kan)" - -[keyboard-in-kan-kagapa] -Description="键盘 - 印度语言 - 卡纳达语(KaGaPa,语音助记)" -Language=kn -Label="kn (kan-kagapa)" - -[keyboard-in-mal] -Description="键盘 - 印度语言 - 马拉雅拉姆语" -Language=ml -Label="ml (mal)" - -[keyboard-in-mal_lalitha] -Description="键盘 - 印度语言 - 马拉雅拉姆语(Lalitha)" -Language=ml -Label="ml (mal_lalitha)" - -[keyboard-in-mal_enhanced] -Description="键盘 - 印度语言 - 马拉雅拉姆语(改进的 InScript,带卢比符号)" -Language=ml -Label="ml (mal_enhanced)" - -[keyboard-in-mal_poorna] -Description="键盘 - 印度语言 - 马拉雅拉姆语(Poorna,扩展 InScript)" -Language=ml -Label="ml (mal_poorna)" - -[keyboard-in-mni] -Description="键盘 - 印度语言 - 曼尼普尔语(梅泰)" -Language=mni -Label="in (mni)" - -[keyboard-in-mar-kagapa] -Description="键盘 - 印度语言 - 马拉地语(KaGaPa,语音助记)" -Language=mr -Label="mr (mar-kagapa)" - -[keyboard-in-marathi] -Description="键盘 - 印度语言 - 马拉地语(改进的 InScript)" -Language=mr -Label="in (marathi)" - -[keyboard-in-ori] -Description="键盘 - 印度语言 - 奥里亚语" -Language=or -Label="or (ori)" - -[keyboard-in-ori-bolnagri] -Description="键盘 - 印度语言 - 奥里亚语(Bolnagri)" -Language=or -Label="or (ori-bolnagri)" - -[keyboard-in-ori-wx] -Description="键盘 - 印度语言 - 奥里亚语(Wx)" -Language=or -Label="or (ori-wx)" - -[keyboard-in-guru] -Description="键盘 - 印度语言 - 旁遮普语(Gurmukhi)" -Language=pa -Label="pa (guru)" - -[keyboard-in-jhelum] -Description="键盘 - 印度语言 - 旁遮普语(Gurmukhi Jhelum)" -Language=pa -Label="pa (jhelum)" - -[keyboard-in-san-kagapa] -Description="键盘 - 印度语言 - 梵语(KaGaPa,语音助记)" -Language=sa -Label="sa (san-kagapa)" - -[keyboard-in-sat] -Description="键盘 - 印度语言 - 桑塔利语(桑塔利文)" -Language=sat -Label=sat - -[keyboard-in-tamilnet] -Description="键盘 - 印度语言 - 泰米尔语(TamilNet '99)" -Language=ta -Label="ta (tamilnet)" - -[keyboard-in-tamilnet_tamilnumbers] -Description="键盘 - 印度语言 - 泰米尔语(TamilNet '99,带泰米尔数字)" -Language=ta -Label="ta (tamilnet_tamilnumbers)" - -[keyboard-in-tamilnet_TAB] -Description="键盘 - 印度语言 - 泰米尔语(TamilNet '99,TAB 编码)" -Language=ta -Label="ta (tamilnet_TAB)" - -[keyboard-in-tamilnet_TSCII] -Description="键盘 - 印度语言 - 泰米尔语(TamilNet '99,TSCII 编码)" -Language=ta -Label="ta (tamilnet_TSCII)" - -[keyboard-in-tam] -Description="键盘 - 印度语言 - 泰米尔语(InScript,带阿拉伯数字)" -Language=ta -Label="ta (tam)" - -[keyboard-in-tam_tamilnumbers] -Description="键盘 - 印度语言 - 泰米尔语(InScript,带泰米尔数字)" -Language=ta -Label="ta (tam_tamilnumbers)" - -[keyboard-in-tel] -Description="键盘 - 印度语言 - 泰卢固语" -Language=te -Label="te (tel)" - -[keyboard-in-tel-kagapa] -Description="键盘 - 印度语言 - 泰卢固语(KaGaPa,语音助记)" -Language=te -Label="te (tel-kagapa)" - -[keyboard-in-tel-sarala] -Description="键盘 - 印度语言 - 泰卢固语(Sarala)" -Language=te -Label="te (tel-sarala)" - -[keyboard-in-urd-phonetic] -Description="键盘 - 印度语言 - 乌尔都语(语音助记)" -Language=ur -Label="ur (urd-phonetic)" - -[keyboard-in-urd-phonetic3] -Description="键盘 - 印度语言 - 乌尔都语(替代,语音助记)" -Language=ur -Label="ur (urd-phonetic3)" - -[keyboard-in-urd-winkeys] -Description="键盘 - 印度语言 - 乌尔都语(Windows)" -Language=ur -Label="ur (urd-winkeys)" - -[keyboard-in-iipa] -Description="键盘 - 印度语言 - 印度语支 IPA" -Language=en -Label="in (iipa)" - -[keyboard-in-modi-kagapa] -Description="键盘 - 印度语言 - Modi(KaGaPa,语音助记)" -Language=mr -Label="mr (modi-kagapa)" - -[keyboard-in-san-misc] -Description="键盘 - 印度语言 - 梵文符号" -Language=sa -Label="sas (san-misc)" - -[keyboard-in-urd-navees] -Description="键盘 - 印度语言 - 乌尔都语(Navees)" -Language=ur -Label="ur (urd-navees)" - -[keyboard-it] -Description="键盘 - 意大利语" -Language=it -Label=it - -[keyboard-it-nodeadkeys] -Description="键盘 - 意大利语 - 意大利语(无死键)" -Language=it -Label="it (nodeadkeys)" - -[keyboard-it-winkeys] -Description="键盘 - 意大利语 - 意大利语(Windows)" -Language=it -Label="it (winkeys)" - -[keyboard-it-mac] -Description="键盘 - 意大利语 - 意大利语(Macintosh)" -Language=it -Label="it (mac)" - -[keyboard-it-us] -Description="键盘 - 意大利语 - 意大利语(美国)" -Language=it -Label="it (us)" - -[keyboard-it-ibm] -Description="键盘 - 意大利语 - 意大利语(IBM 142)" -Language=it -Label="it (ibm)" - -[keyboard-it-fur] -Description="键盘 - 意大利语 - 弗留利语(意大利)" -Language=fur -Label="it (fur)" - -[keyboard-it-scn] -Description="键盘 - 意大利语 - 西西里语" -Language=it -Label="it (scn)" - -[keyboard-it-geo] -Description="键盘 - 意大利语 - 格鲁吉亚语(意大利)" -Language=ka -Label="it (geo)" - -[keyboard-it-sun_type6] -Description="键盘 - 意大利语 - 意大利语(Sun Type 6/7)" -Language=it -Label="it (sun_type6)" - -[keyboard-it-lld] -Description="键盘 - 意大利语 - 拉丁语(意大利语键盘)" -Language=it -Label="it_lld (lld)" - -[keyboard-it-lldde] -Description="键盘 - 意大利语 - 拉丁语(德语键盘)" -Language=de -Label="de_lld (lldde)" - -[keyboard-it-dvorak] -Description="键盘 - 意大利语 - 意大利语(Dvorak)" -Language=it -Label="it (dvorak)" - -[keyboard-jp] -Description="键盘 - 日语" -Language=ja -Label=ja - -[keyboard-jp-kana] -Description="键盘 - 日语 - 日语(Kana)" -Language=ja -Label="jp (kana)" - -[keyboard-jp-kana86] -Description="键盘 - 日语 - 日语(Kana 86)" -Language=ja -Label="jp (kana86)" - -[keyboard-jp-OADG109A] -Description="键盘 - 日语 - 日语(OADG 109A)" -Language=ja -Label="jp (OADG109A)" - -[keyboard-jp-mac] -Description="键盘 - 日语 - 日语(Macintosh)" -Language=ja -Label="jp (mac)" - -[keyboard-jp-dvorak] -Description="键盘 - 日语 - 日语(Dvorak)" -Language=ja -Label="jp (dvorak)" - -[keyboard-jp-sun_type6] -Description="键盘 - 日语 - 日语(Sun Type 6)" -Language=ja -Label="jp (sun_type6)" - -[keyboard-jp-sun_type7] -Description="键盘 - 日语 - 日语(Sun Type 7,PC 兼容)" -Language=ja -Label="jp (sun_type7)" - -[keyboard-jp-sun_type7_suncompat] -Description="键盘 - 日语 - 日语(Sun Type 7,Sun 兼容)" -Language=ja -Label="jp (sun_type7_suncompat)" - diff --git a/platforms/linux/fcitx5/conf/notifications.conf b/platforms/linux/fcitx5/conf/notifications.conf deleted file mode 100644 index 04957ce..0000000 --- a/platforms/linux/fcitx5/conf/notifications.conf +++ /dev/null @@ -1,3 +0,0 @@ -# 隐藏通知 -HiddenNotifications= - diff --git a/platforms/linux/kde/dolphinrc b/platforms/linux/kde/dolphinrc deleted file mode 100644 index 549922b..0000000 --- a/platforms/linux/kde/dolphinrc +++ /dev/null @@ -1,17 +0,0 @@ -[General] -UseTabForSwitchingSplitView=true -Version=202 -ViewPropsTimestamp=2024,12,10,0,19,35.931 - -[IconsMode] -PreviewSize=96 - -[KFileDialog Settings] -Places Icons Auto-resize=false -Places Icons Static Size=22 - -[MainWindow] -MenuBar=Disabled - -[PreviewSettings] -Plugins=appimagethumbnail,audiothumbnail,avif,blenderthumbnail,comicbookthumbnail,cursorthumbnail,djvuthumbnail,ebookthumbnail,exrthumbnail,directorythumbnail,fontthumbnail,heif,imagethumbnail,jpegthumbnail,jxl,kraorathumbnail,windowsexethumbnail,windowsimagethumbnail,mobithumbnail,opendocumentthumbnail,gsthumbnail,rawthumbnail,svgthumbnail,textthumbnail,ffmpegthumbs,gdk-pixbuf-thumbnailer diff --git a/platforms/linux/kde/kglobalshortcutsrc b/platforms/linux/kde/kglobalshortcutsrc deleted file mode 100644 index 5b71dd4..0000000 --- a/platforms/linux/kde/kglobalshortcutsrc +++ /dev/null @@ -1,370 +0,0 @@ -[ActivityManager] -_k_friendly_name=活动管理器 -switch-to-activity-32e1f2d2-08d1-4a8b-886a-0a062f999068=none,none,Switch to activity "Default" -switch-to-activity-aaa04f56-3c39-49fa-9501-5c8259703f5d=none,none,切换到活动“Default” -switch-to-activity-e1ebfdac-0f52-47a5-9e7a-d9eb5cc26845=none,none,切换到活动“默认” - -[Clementine] -_k_friendly_name=Clementine -next_album=Shift+Media Next,none,Next album -next_track=none,none,下一个曲目 -play_pause=none,none,播放/暂停 -prev_track=none,none,上一个曲目 -stop=none,none,停止 - -[KDE Keyboard Layout Switcher] -Switch keyboard layout to English (Colemak)=none,none,Switch keyboard layout to English (Colemak) -Switch keyboard layout to English (US)=none,none,Switch keyboard layout to English (US) -Switch keyboard layout to 英语(美国)=none,none,切换键盘布局为 英语(美国) -Switch to Last-Used Keyboard Layout=none,Meta+Alt+L,切换到上次使用过的键盘布局 -Switch to Next Keyboard Layout=none,Meta+Alt+K,切换到下一个键盘布局 -_k_friendly_name=键盘布局切换器 - -[Strawberry] -_k_friendly_name=Strawberry -next_track=none,none,Next track -play_pause=none,none,Play/Pause -prev_track=none,none,Previous track -stop=none,none,Stop - -[com.cherry_ai.CherryStudio] -250B4E85839469FB2F043223FDE723A6-=none,none,Electron shortcut\s -34632A7E4E36B0F89F4896EF7E497371-Ctrl+0=none,none,Electron shortcut Ctrl+0 -F463CBEE0FC54C087663DA86F622941A-Alt+Shift+J=none,none,Electron shortcut Alt+Shift+J -_k_friendly_name=Cherry Studio - -[com.google.Chrome] -0EA0B820623139BF0D767EA8C956347E-addSite=none,none,切换当前网站 -0EA0B820623139BF0D767EA8C956347E-switchEngine=none,none,主题生成模式 -0EA0B820623139BF0D767EA8C956347E-toggle=none,none,切换扩展 -_k_friendly_name=Google Chrome - -[kaccess] -Toggle Screen Reader On and Off=Meta+Alt+S,Meta+Alt+S,切换屏幕阅读器开关 -_k_friendly_name=无障碍辅助 - -[kmix] -_k_friendly_name=音量 -decrease_microphone_volume=Microphone Volume Down,Microphone Volume Down,降低麦克风音量 -decrease_volume=Volume Down,Volume Down,降低音量 -decrease_volume_small=Shift+Volume Down,Shift+Volume Down,音量降低 1% -increase_microphone_volume=Microphone Volume Up,Microphone Volume Up,提高麦克风音量 -increase_volume=Volume Up,Volume Up,提高音量 -increase_volume_small=Shift+Volume Up,Shift+Volume Up,音量提高 1% -mic_mute=Microphone Mute\tMeta+Volume Mute,Microphone Mute\tMeta+Volume Mute,麦克风静音 -mute=Volume Mute,Volume Mute,静音 - -[krusader] -_k_friendly_name=Krusader -bring_main_window_to_top=none,Meta+K,Bring Main Window to Top - -[ksmserver] -Halt Without Confirmation=none,,关机 (无需确认) -Lock Session=Screensaver,Meta+L\tScreensaver,锁定会话 -Log Out=Ctrl+Alt+Del,Ctrl+Alt+Del,显示注销屏幕 -Log Out Without Confirmation=none,,注销 (无需确认) -LogOut=none,,注销 -Reboot=none,,重启 -Reboot Without Confirmation=none,,重启 (无需确认) -Shut Down=none,,关机 -_k_friendly_name=会话管理 - -[ktorrent] -_k_friendly_name=KTorrent -queue_suspend=Alt+Shift+P,Alt+Shift+P,暂停种子 -show_kt=Alt+Shift+T,Alt+Shift+T,显示/隐藏 KTorrent - -[kwin] -Activate Window Demanding Attention=Meta+Ctrl+A,Meta+Ctrl+A,激活请求注意的窗口 -Cycle Overview=none,none,循环显示桌面概览和网格视图 -Cycle Overview Opposite=none,none,循环显示网格视图和桌面概览 -Decrease Opacity=none,,降低活动窗口不透明度 5% -Edit Tiles=Meta+T,Meta+T,磁贴编辑器开关 -Expose=Ctrl+F9,Ctrl+F9,显示/隐藏窗口平铺 (当前桌面) -ExposeAll=Ctrl+F10\tLaunch (C),Ctrl+F10\tLaunch (C),显示/隐藏窗口平铺 (全部桌面) -ExposeClass=Ctrl+F7,Ctrl+F7,显示/隐藏窗口平铺 (窗口类) -ExposeClassCurrentDesktop=none,none,显示/隐藏窗口平铺 (当前桌面的窗口类) -Grid View=Meta+G,Meta+G,切换网格视图 -Increase Opacity=none,,提高活动窗口不透明度 5% -Kill Window=Meta+Ctrl+Esc,Meta+Ctrl+Esc,强制终止窗口 -KrohnkiteBTreeLayout=Meta+X,none,Krohnkite: BTree Layout -KrohnkiteColumnsLayout=none,none,Krohnkite: Columns Layout -KrohnkiteDecrease=none,none,Krohnkite: Decrease -KrohnkiteFloatAll=none,none,Krohnkite: Toggle Float All -KrohnkiteFloatingLayout=none,none,Krohnkite: Floating Layout -KrohnkiteFocusDown=Meta+J,none,Krohnkite: Focus Down -KrohnkiteFocusLeft=Meta+H,none,Krohnkite: Focus Left -KrohnkiteFocusNext=none,none,Krohnkite: Focus Next -KrohnkiteFocusPrev=Meta+\\,,none,Krohnkite: Focus Previous -KrohnkiteFocusRight=none,none,Krohnkite: Focus Right -KrohnkiteFocusUp=none,none,Krohnkite: Focus Up -KrohnkiteGrowHeight=none,none,Krohnkite: Grow Height -KrohnkiteIncrease=none,none,Krohnkite: Increase -KrohnkiteMonocleLayout=none,none,Krohnkite: Monocle Layout -KrohnkiteNextLayout=Meta+\\\\,none,Krohnkite: Next Layout -KrohnkitePreviousLayout=Meta+|,none,Krohnkite: Previous Layout -KrohnkiteQuarterLayout=none,none,Krohnkite: Quarter Layout -KrohnkiteRotate=Meta+Y,none,Krohnkite: Rotate -KrohnkiteRotatePart=none,none,Krohnkite: Rotate Part -KrohnkiteSetMaster=Meta+Return,none,Krohnkite: Set master -KrohnkiteShiftDown=none,none,Krohnkite: Move Down/Next -KrohnkiteShiftLeft=Meta+Shift+H,none,Krohnkite: Move Left -KrohnkiteShiftRight=Meta+Shift+L,none,Krohnkite: Move Right -KrohnkiteShiftUp=none,none,Krohnkite: Move Up/Prev -KrohnkiteShrinkHeight=Meta+Ctrl+K,none,Krohnkite: Shrink Height -KrohnkiteShrinkWidth=Meta+Ctrl+H,none,Krohnkite: Shrink Width -KrohnkiteSpiralLayout=none,none,Krohnkite: Spiral Layout -KrohnkiteSpreadLayout=none,none,Krohnkite: Spread Layout -KrohnkiteStackedLayout=none,none,Krohnkite: Stacked Layout -KrohnkiteStairLayout=none,none,Krohnkite: Stair Layout -KrohnkiteTileLayout=none,none,Krohnkite: Tile Layout -KrohnkiteToggleFloat=Meta+Shift+F,none,Krohnkite: Toggle Float -KrohnkiteTreeColumnLayout=none,none,Krohnkite: Three Column Layout -KrohnkitegrowWidth=Meta+Ctrl+J,none,Krohnkite: Grow Width -KrohnkitetoggleDock=none,none,Krohnkite: Toggle Dock -Move Tablet to Next Output=none,none,移动数位板到下一个输出设备 -MoveMouseToCenter=Meta+F6,Meta+F6,移动鼠标到中央 -MoveMouseToFocus=Meta+F5,Meta+F5,移动鼠标到焦点 -MoveZoomDown=none,none,将缩放区域向下移动 -MoveZoomLeft=none,none,将缩放区域向左移动 -MoveZoomRight=none,none,将缩放区域向右移动 -MoveZoomUp=none,none,将缩放区域向上移动 -Overview=Meta+Tab\tMeta+W,Meta+W,显示/隐藏桌面总览 -Setup Window Shortcut=none,,设置窗口快捷键 -Show Desktop=Meta+D,Meta+D,暂时显示桌面 -Switch One Desktop Down=Meta+Ctrl+Down,Meta+Ctrl+Down,切换到下方桌面 -Switch One Desktop Up=Meta+Ctrl+Up,Meta+Ctrl+Up,切换到上方桌面 -Switch One Desktop to the Left=Meta+Ctrl+Left,Meta+Ctrl+Left,切换到左侧桌面 -Switch One Desktop to the Right=Meta+Ctrl+Right,Meta+Ctrl+Right,切换到右侧桌面 -Switch Window Down=Meta+Alt+Down,Meta+Alt+Down,切换到下面的窗口 -Switch Window Left=Meta+Alt+Left,Meta+Alt+Left,切换到左侧的窗口 -Switch Window Right=Meta+Alt+Right,Meta+Alt+Right,切换到右侧的窗口 -Switch Window Up=Meta+Alt+Up,Meta+Alt+Up,切换到上面的窗口 -Switch to Desktop 1=Meta+1,Ctrl+F1,切换到桌面 1 -Switch to Desktop 10=none,,切换到桌面 10 -Switch to Desktop 11=none,,切换到桌面 11 -Switch to Desktop 12=none,,切换到桌面 12 -Switch to Desktop 13=none,,切换到桌面 13 -Switch to Desktop 14=none,,切换到桌面 14 -Switch to Desktop 15=none,,切换到桌面 15 -Switch to Desktop 16=none,,切换到桌面 16 -Switch to Desktop 17=none,,切换到桌面 17 -Switch to Desktop 18=none,,切换到桌面 18 -Switch to Desktop 19=none,,切换到桌面 19 -Switch to Desktop 2=Meta+2,Ctrl+F2,切换到桌面 2 -Switch to Desktop 20=none,,切换到桌面 20 -Switch to Desktop 3=Meta+3,Ctrl+F3,切换到桌面 3 -Switch to Desktop 4=Meta+4,Ctrl+F4,切换到桌面 4 -Switch to Desktop 5=Meta+5,,切换到桌面 5 -Switch to Desktop 6=Meta+6,,切换到桌面 6 -Switch to Desktop 7=Meta+7,,切换到桌面 7 -Switch to Desktop 8=Meta+8,,切换到桌面 8 -Switch to Desktop 9=Meta+9,,切换到桌面 9 -Switch to Next Desktop=none,,切换到下一桌面 -Switch to Next Screen=none,,切换到下一屏幕 -Switch to Previous Desktop=none,,切换到上一桌面 -Switch to Previous Screen=none,,切换到上一屏幕 -Switch to Screen 0=none,,切换到屏幕 0 -Switch to Screen 1=none,,切换到屏幕 1 -Switch to Screen 2=none,,切换到屏幕 2 -Switch to Screen 3=none,,切换到屏幕 3 -Switch to Screen 4=none,,切换到屏幕 4 -Switch to Screen 5=none,,切换到屏幕 5 -Switch to Screen 6=none,,切换到屏幕 6 -Switch to Screen 7=none,,切换到屏幕 7 -Switch to Screen Above=none,,切换到上方屏幕 -Switch to Screen Below=none,,切换到下方屏幕 -Switch to Screen to the Left=none,,切换到左侧屏幕 -Switch to Screen to the Right=none,,切换到右侧屏幕 -Toggle Night Color=none,none,暂停/继续夜间色温 -Toggle Window Raise/Lower=none,,提升/降低窗口 -Walk Through Windows=Alt+Tab,Meta+Tab\tAlt+Tab,遍历窗口 -Walk Through Windows (Reverse)=Alt+Shift+Tab,Meta+Shift+Tab\tAlt+Shift+Tab,遍历窗口 (反向) -Walk Through Windows Alternative=none,none,遍历窗口交替 -Walk Through Windows Alternative (Reverse)=none,none,遍历窗口交替 (反向) -Walk Through Windows of Current Application=Alt+`,Meta+`\tAlt+`,遍历当前应用程序窗口 -Walk Through Windows of Current Application (Reverse)=Alt+~,Meta+~\tAlt+~,遍历当前应用程序窗口 (反向) -Walk Through Windows of Current Application Alternative=none,none,遍历当前应用程序窗口交替 -Walk Through Windows of Current Application Alternative (Reverse)=none,none,遍历当前应用程序窗口交替 (反向) -Window Above Other Windows=none,,窗口置顶 -Window Below Other Windows=none,,窗口置底 -Window Close=Alt+F4\tMeta+Q,Alt+F4,关闭窗口 -Window Custom Quick Tile Bottom=none,,自定义快速铺放窗口到下方 -Window Custom Quick Tile Left=none,,自定义快速铺放窗口到左侧 -Window Custom Quick Tile Right=none,,自定义快速铺放窗口到右侧 -Window Custom Quick Tile Top=none,,自定义快速铺放窗口到上方 -Window Fullscreen=none,,全屏显示窗口 -Window Grow Horizontal=none,,水平扩展窗口 -Window Grow Vertical=none,,垂直扩展窗口 -Window Lower=none,,降低窗口 -Window Maximize=Meta+PgUp,Meta+PgUp,最大化窗口 -Window Maximize Horizontal=none,,水平最大化窗口 -Window Maximize Vertical=none,,垂直最大化窗口 -Window Minimize=Meta+PgDown,Meta+PgDown,最小化窗口 -Window Move=none,,移动窗口 -Window Move Center=none,,移动窗口到中央 -Window No Border=none,,显示/隐藏窗口标题栏和框架 -Window On All Desktops=none,,在所有桌面上显示窗口 -Window One Desktop Down=Meta+Ctrl+Shift+Down,Meta+Ctrl+Shift+Down,窗口下移一个桌面 -Window One Desktop Up=Meta+Ctrl+Shift+Up,Meta+Ctrl+Shift+Up,窗口上移一个桌面 -Window One Desktop to the Left=Meta+Ctrl+Shift+Left,Meta+Ctrl+Shift+Left,窗口左移一个桌面 -Window One Desktop to the Right=Meta+Ctrl+Shift+Right,Meta+Ctrl+Shift+Right,窗口右移一个桌面 -Window One Screen Down=none,,移动窗口到下方屏幕 -Window One Screen Up=none,,移动窗口到上方屏幕 -Window One Screen to the Left=none,,移动窗口到左侧屏幕 -Window One Screen to the Right=none,,移动窗口到右侧屏幕 -Window Operations Menu=Alt+F3,Alt+F3,窗口操作菜单 -Window Pack Down=none,,下移窗口 -Window Pack Left=none,,左移窗口 -Window Pack Right=none,,右移窗口 -Window Pack Up=none,,上移窗口 -Window Quick Tile Bottom=Meta+Down,Meta+Down,快速铺放窗口到下方 -Window Quick Tile Bottom Left=none,,快速铺放窗口到左下方 -Window Quick Tile Bottom Right=none,,快速铺放窗口到右下方 -Window Quick Tile Left=Meta+Left,Meta+Left,快速铺放窗口到左侧 -Window Quick Tile Right=Meta+Right,Meta+Right,快速铺放窗口到右侧 -Window Quick Tile Top=Meta+Up,Meta+Up,快速铺放窗口到上方 -Window Quick Tile Top Left=none,,快速铺放窗口到左上方 -Window Quick Tile Top Right=none,,快速铺放窗口到右上方 -Window Raise=none,,提升窗口 -Window Resize=none,,调整窗口大小 -Window Shade=none,,折叠窗口 -Window Shrink Horizontal=none,,水平缩小窗口 -Window Shrink Vertical=none,,垂直缩小窗口 -Window to Desktop 1=none,,窗口移动到桌面 1 -Window to Desktop 10=Meta+),,窗口移动到桌面 10 -Window to Desktop 11=none,,窗口移动到桌面 11 -Window to Desktop 12=none,,窗口移动到桌面 12 -Window to Desktop 13=none,,窗口移动到桌面 13 -Window to Desktop 14=none,,窗口移动到桌面 14 -Window to Desktop 15=none,,窗口移动到桌面 15 -Window to Desktop 16=none,,窗口移动到桌面 16 -Window to Desktop 17=none,,窗口移动到桌面 17 -Window to Desktop 18=none,,窗口移动到桌面 18 -Window to Desktop 19=none,,窗口移动到桌面 19 -Window to Desktop 2=none,,窗口移动到桌面 2 -Window to Desktop 20=none,,窗口移动到桌面 20 -Window to Desktop 3=none,,窗口移动到桌面 3 -Window to Desktop 4=none,,窗口移动到桌面 4 -Window to Desktop 5=Meta+%,,窗口移动到桌面 5 -Window to Desktop 6=Meta+^,,窗口移动到桌面 6 -Window to Desktop 7=Meta+&,,窗口移动到桌面 7 -Window to Desktop 8=Meta+*,,窗口移动到桌面 8 -Window to Desktop 9=Meta+(,,窗口移动到桌面 9 -Window to Next Desktop=none,,窗口移动到下一桌面 -Window to Next Screen=Meta+Shift+Right,Meta+Shift+Right,移动窗口到下一屏幕 -Window to Previous Desktop=none,,窗口移动到上一桌面 -Window to Previous Screen=Meta+Shift+Left,Meta+Shift+Left,移动窗口到上一屏幕 -Window to Screen 0=none,,移动窗口到屏幕 0 -Window to Screen 1=none,,移动窗口到屏幕 1 -Window to Screen 2=none,,移动窗口到屏幕 2 -Window to Screen 3=none,,移动窗口到屏幕 3 -Window to Screen 4=none,,移动窗口到屏幕 4 -Window to Screen 5=none,,移动窗口到屏幕 5 -Window to Screen 6=none,,移动窗口到屏幕 6 -Window to Screen 7=none,,移动窗口到屏幕 7 -_k_friendly_name=KWin -disableInputCapture=Meta+Shift+Esc,Meta+Shift+Esc,禁用活动输入捕获 -view_actual_size=none,Meta+0,缩放为实际大小(A) -view_zoom_in=Meta++\tMeta+=,Meta++\tMeta+=,放大(I) -view_zoom_out=Meta+-,Meta+-,缩小(O) - -[mediacontrol] -_k_friendly_name=媒体控制器 -mediavolumedown=none,,媒体音量降低 -mediavolumeup=none,,媒体音量提高 -nextmedia=Media Next,Media Next,播放下一首媒体 -pausemedia=Media Pause,Media Pause,暂停媒体播放 -playmedia=none,,播放媒体 -playpausemedia=Media Play,Media Play,播放/暂停媒体播放 -previousmedia=Media Previous,Media Previous,播放上一首媒体 -stopmedia=Media Stop,Media Stop,停止媒体播放 - -[org_kde_powerdevil] -Decrease Keyboard Brightness=Keyboard Brightness Down,Keyboard Brightness Down,降低键盘亮度 -Decrease Screen Brightness=Monitor Brightness Down,Monitor Brightness Down,降低屏幕亮度 -Decrease Screen Brightness Small=Shift+Monitor Brightness Down,Shift+Monitor Brightness Down,降低屏幕亮度 1% -Hibernate=Hibernate,Hibernate,休眠 -Increase Keyboard Brightness=Keyboard Brightness Up,Keyboard Brightness Up,提高键盘亮度 -Increase Screen Brightness=Monitor Brightness Up,Monitor Brightness Up,提高屏幕亮度 -Increase Screen Brightness Small=Shift+Monitor Brightness Up,Shift+Monitor Brightness Up,提高屏幕亮度 1% -PowerDown=Power Down,Power Down,断电 -PowerOff=Power Off,Power Off,关机 -Sleep=Sleep,Sleep,挂起 -Toggle Keyboard Backlight=Keyboard Light On/Off,Keyboard Light On/Off,开关键盘背光 -Turn Off Screen=none,none,关闭屏幕 -_k_friendly_name=电源管理 -powerProfile=Battery\tMeta+B,Battery\tMeta+B,切换电源管理方案 - -[plasmashell] -_k_friendly_name=plasmashell -activate application launcher=Meta\tAlt+F1,Meta\tAlt+F1,激活应用程序启动器 -activate task manager entry 1=none,Meta+1,激活任务管理器条目 1 -activate task manager entry 10=none,,激活任务管理器条目 10 -activate task manager entry 2=none,Meta+2,激活任务管理器条目 2 -activate task manager entry 3=none,Meta+3,激活任务管理器条目 3 -activate task manager entry 4=none,Meta+4,激活任务管理器条目 4 -activate task manager entry 5=none,Meta+5,激活任务管理器条目 5 -activate task manager entry 6=none,Meta+6,激活任务管理器条目 6 -activate task manager entry 7=none,Meta+7,激活任务管理器条目 7 -activate task manager entry 8=none,Meta+8,激活任务管理器条目 8 -activate task manager entry 9=none,Meta+9,激活任务管理器条目 9 -activate widget 115=none,none,激活 应用程序启动器 挂件 -activate widget 120=none,none,激活 数字时钟 挂件 -activate widget 3=none,none,Activate Application Launcher Widget -activate widget 31=none,none,激活 应用程序启动器 挂件 -activate widget 42=none,none,激活 图标任务管理器 挂件 -clear-history=none,,清除剪贴板历史(L) -clipboard_action=Meta+Ctrl+X,Meta+Ctrl+X,自动弹出操作菜单 -cycle-panels=Meta+Alt+P,Meta+Alt+P,在面板之间移动键盘焦点 -cycleNextAction=none,,下一条历史记录 -cyclePrevAction=none,,上一条历史记录 -edit_clipboard=none,,编辑内容(E)… -manage activities=none,Meta+Q,显示活动切换器 -next activity=Meta+A,none,遍历活动 -previous activity=Meta+Shift+A,none,遍历活动 (反向) -repeat_action=none,,在当前剪贴板上手动执行操作 -show dashboard=Ctrl+F12,Ctrl+F12,显示桌面 -show-barcode=none,,显示条形码(S)… -show-on-mouse-pos=Meta+V,Meta+V,在鼠标位置显示剪贴板项目 -stop current activity=Meta+S,Meta+S,停止当前活动 -switch to next activity=none,,切换到下一个活动 -switch to previous activity=none,,切换到上一个活动 -toggle do not disturb=none,,切换勿扰模式 - -[services][kitty.desktop] -_launch=Meta+R - -[services][org.kde.konsole.desktop] -_launch=none - -[services][org.kde.krunner.desktop] -_launch=Alt+F2\tSearch\tAlt+Space - -[services][org.kde.kscreen.desktop] -ShowOSD=Display - -[services][org.kde.plasma.emojier.desktop] -_launch=Meta+. - -[services][org.kde.spectacle.desktop] -RecordRegion=Meta+Shift+R -RectangularRegionScreenShot=Meta+C - -[services][org.kde.touchpadshortcuts.desktop] -ToggleTouchpad=Touchpad Toggle\tMeta+Ctrl+Zenkaku Hankaku - -[wacomtablet] -Map to fullscreen=Meta+Ctrl+F,Meta+Ctrl+F,Map to fullscreen -Map to screen 1=Meta+Ctrl+1,Meta+Ctrl+1,Map to screen 1 -Map to screen 2=Meta+Ctrl+2,Meta+Ctrl+2,Map to screen 2 -Next Profile=none,Meta+Ctrl+N,Next profile -Previous Profile=Meta+Ctrl+P,Meta+Ctrl+P,Previous Profile -Toggle screen map selection=Meta+Ctrl+M,Meta+Ctrl+M,Toggle between all screens -Toggle stylus mode=Meta+Ctrl+S,Meta+Ctrl+S,Toggle the Stylus Tool Relative/Absolute -Toggle touch tool=Meta+Ctrl+T,Meta+Ctrl+T,Enable/Disable the Touch Tool -_k_friendly_name=Wacom Tablet - -[yakuake] -_k_friendly_name=Yakuake 下拉式终端 -toggle-window-state=Meta+`,F12,展开/折叠 Yakuake 窗口 diff --git a/platforms/linux/keyd/app.conf b/platforms/linux/keyd/app.conf deleted file mode 100644 index 71baef2..0000000 --- a/platforms/linux/keyd/app.conf +++ /dev/null @@ -1,19 +0,0 @@ -[org-telegram-desktop] - -alt.n = macro(C-tab) -alt.e = C-S-tab - -[wechat] - -alt.n = A-down -alt.e = A-up - -[qq] -alt.n = C-down -alt.e = C-up -alt.h = C-left -alt.i = enter - -[zotero] -alt.n = pagedown -alt.e = pageup diff --git a/platforms/linux/keyd/default.conf b/platforms/linux/keyd/default.conf deleted file mode 100644 index 4a3be16..0000000 --- a/platforms/linux/keyd/default.conf +++ /dev/null @@ -1,49 +0,0 @@ -[ids] - -* - -[main] - -# Maps capslock to escape when pressed and control when held. tab=overload(lt1, tab) # backspace=\ -# \=backspace -# backspace=\ -# capslock=overload(ctrl,esc) -capslock = overload(control, esc) -tab = overload(lt2, tab) -space = overload(lt1, space) -insert = S-insert - -[lt1] -h = left -n = down -e = up -i = right -1 = f1 -2 = f2 -3 = f3 -4 = f4 -5 = f5 -6 = f6 -7 = f7 -8 = f8 -9 = f9 -0 = f10 -- = f11 -= = f12 -k = home -o = end -[ = pageup -] = pagedown -q = ~ -w = | -f = & -p = ^ -/ = ¿ - -[lt2] -space = playpause -h = previoussong -i = nextsong -n = volumedown -e = volumeup -k = mute diff --git a/platforms/linux/user-dirs.dirs b/platforms/linux/user-dirs.dirs deleted file mode 100644 index cc0dcf4..0000000 --- a/platforms/linux/user-dirs.dirs +++ /dev/null @@ -1,9 +0,0 @@ -# $DOTFILES/platforms/linux/user-dirs.dirs -XDG_DESKTOP_DIR="$HOME/Desktop" -XDG_DOWNLOAD_DIR="$HOME/Downloads" -XDG_TEMPLATES_DIR="$HOME/Templates" -XDG_PUBLICSHARE_DIR="$HOME/Public" -XDG_DOCUMENTS_DIR="$HOME/Documents" -XDG_MUSIC_DIR="$HOME/Music" -XDG_PICTURES_DIR="$HOME/Pictures" -XDG_VIDEOS_DIR="$HOME/Videos" diff --git a/platforms/linux/user-dirs.locale b/platforms/linux/user-dirs.locale deleted file mode 100644 index 2c28678..0000000 --- a/platforms/linux/user-dirs.locale +++ /dev/null @@ -1 +0,0 @@ -zh_CN \ No newline at end of file diff --git a/platforms/linux/zshrc b/platforms/linux/zshrc deleted file mode 100644 index 6578292..0000000 --- a/platforms/linux/zshrc +++ /dev/null @@ -1,12 +0,0 @@ -# $DOTFILES/platforms/linux/zshrc -# Date: 2024-12-22 -# Author: js0ny -# Sourced by user's zshrc if is Linux 在用户的 zshrc 中被引用 -# Entry point in $DOTFILES/tools/zsh/common.zshrc (入口点) - -if [ -n "$WAYLAND_DISPLAY" ]; then - alias clip="wl-copy" - alias paste="wl-paste" -elif [ -n "$DISPLAY" ]; then - alias clip="xclip" -fi diff --git a/platforms/mac/etc/nix-darwin/default-system.nix b/platforms/mac/etc/nix-darwin/default-system.nix deleted file mode 100644 index 9413df1..0000000 --- a/platforms/mac/etc/nix-darwin/default-system.nix +++ /dev/null @@ -1,113 +0,0 @@ -# vim:shiftwidth=2 -# https://github.com/LnL7/nix-darwin/tree/5d6e0851b60508cffd66b4a6982440a40720338d/modules/system/defaults -{ pkgs, ... }: { - system.defaults = { - dock = { - appswitcher-all-displays = true; - autohide = true; - # Launch Animation - launchanim = false; - # Minimize Animation - mineffect = "suck"; - minimize-to-application = true; - persistent-apps = [ - { app = "/Applications/Vivaldi.app"; } - { app = "/Applications/WezTerm.app"; } - { app = "/Applications/Obsidian.app"; } - { app = "/Applications/Visual Studio Code.app"; } - { app = "/Applications/Neovide.app"; } - # { spacer = { small = false; }; } - # { spacer = { small = true; }; } - # { folder = "/System/Applications/Utilities"; } - # { folder = "/Users/js0ny/Downloads/"; } - ]; - persistent-others = [ - "/Users/js0ny/Downloads" - "/Users/js0ny/Source" - ]; - show-recents = false; - orientation = "bottom"; - # tr - Top Right - # tl - Top Left (disable this) - # br - Bottom Right - # bl - Bottom Left - # `1`: Disabled - # `2`: Mission Control - # `3`: Application Windows - # `4`: Desktop - # `5`: Start Screen Saver - # `6`: Disable Screen Saver - # `7`: Dashboard - # `10`: Put Display to Sleep - # `11`: Launchpad - # `12`: Notification Center - # `13`: Lock Screen - # `14`: Quick Note - wvous-tr-corner = 2; - wvous-bl-corner = 11; # Simulate Windows button on Windows - wvous-br-corner = 4; - }; - finder = { - AppleShowAllFiles = true; - ShowStatusBar = true; - ShowPathbar = true; - FXRemoveOldTrashItems = true; - AppleShowAllExtensions = true; - QuitMenuItem = true; - ShowExternalHardDrivesOnDesktop = false; - ShowRemovableMediaOnDesktop = false; - # This will look show full path in title bar - # For example: /Users/username/Downloads - # instead of just Downloads - _FXShowPosixPathInTitle = false; - _FXSortFoldersFirst = true; - FXEnableExtensionChangeWarning = false; - # Use `Home` instead of `PfHm` - # nix-darwin won't parse `PfHm` - NewWindowTarget = "Home"; - }; - trackpad = { - TrackpadRightClick = true; - TrackpadThreeFingerDrag = true; - }; - screencapture = { - location = "~/Pictures/Screenshots"; - type = "png"; - include-date = true; - }; - SoftwareUpdate.AutomaticallyInstallMacOSUpdates = false; - ".GlobalPreferences" = { - "com.apple.sound.beep.sound" = "/System/Library/Sounds/Blow.aiff"; - }; - NSGlobalDomain = { - AppleInterfaceStyle = "Dark"; - AppleInterfaceStyleSwitchesAutomatically = true; - AppleShowAllExtensions = true; - # Use Fn key as standard function keys instead of media keys - "com.apple.keyboard.fnState" = true; - AppleMeasurementUnits = "Centimeters"; - AppleICUForce24HourTime = true; - }; - controlcenter.BatteryShowPercentage = true; - # Fn usage: - # 0: Show Emoji & Symbols - # 1: Change Input Source - # 2: Show Emoji & Symbols - # 3: Start Dictation - hitoolbox.AppleFnUsageType = "Change Input Source"; - WindowManager = { - EnableTilingByEdgeDrag = true; - EnableTopTilingByEdgeDrag = true; - EnableTilingOptionAccelerator = true; - EnableTiledWindowMargins = true; - }; - # universalaccess = { - # mouseDriverCursorSize = 1.5; - # reduceMotion = true; - # reduceTransparency = false; - # }; - menuExtraClock = { - ShowSeconds = true; - }; - }; -} diff --git a/platforms/mac/etc/nix-darwin/flake.nix b/platforms/mac/etc/nix-darwin/flake.nix deleted file mode 100644 index 99a0d64..0000000 --- a/platforms/mac/etc/nix-darwin/flake.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - description = "Example nix-darwin system flake"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - nix-darwin.url = "github:LnL7/nix-darwin/master"; - nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = inputs@{ self, nix-darwin, nixpkgs }: - let - configuration = { pkgs, ... }: { - # List packages installed in system profile. To search by name, run: - # $ nix-env -qaP | grep wget - environment.systemPackages = - [ pkgs.vim - ]; - - environment.etc."zshenv".text = '' - if [ -d $HOME/.config/zsh ]; then - export ZDOTDIR=$HOME/.config/zsh - fi - ''; - - # Necessary for using flakes on this system. - nix.settings.experimental-features = "nix-command flakes"; - - # Enable alternative shell support in nix-darwin. - # programs.fish.enable = true; - - # Set Git commit hash for darwin-version. - system.configurationRevision = self.rev or self.dirtyRev or null; - - # Used for backwards compatibility, please read the changelog before changing. - # $ darwin-rebuild changelog - system.stateVersion = 6; - - # The platform the configuration will be used on. - nixpkgs.hostPlatform = "aarch64-darwin"; - }; - in - { - # Build darwin flake using: - # $ darwin-rebuild build --flake .#Zen - darwinConfigurations."Zen" = nix-darwin.lib.darwinSystem { - modules = [ - configuration - ./default-system.nix - ]; - }; - }; -} diff --git a/platforms/mac/fastfetch.jsonc b/platforms/mac/fastfetch.jsonc deleted file mode 100644 index 45adeaa..0000000 --- a/platforms/mac/fastfetch.jsonc +++ /dev/null @@ -1,54 +0,0 @@ -// %UserProfile%\.config\fastfetch\config.jsonc -{ - "$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json", - "logo": { - "type": "auto", - // "source": "Windows 7", - "padding": { - "top": 2, - "left": 1, - "right": 2 - } - }, - "general": { - "multithreading": true - }, - "display": { - "separator": " ", - "key": { - "width": 10, - "paddingLeft": 2, - "type": "icon" - } - }, - "modules": [ - { - "type": "title", - "format": "{#1}───────────── {#}{user-name-colored}@{host-name-colored}" - }, - { - "type": "colors", - "symbol": "diamond", - "paddingLeft": 15 - }, - "os", - "host", - "kernel", - "uptime", - { - "type": "packages" - }, - "shell", - "display", - "cursor", - "terminal", - "terminalfont", - "cpu", - "memory", - "swap", - "disk", - "battery", - "poweradapter", - "locale" - ] -} \ No newline at end of file diff --git a/platforms/mac/neovide.toml b/platforms/mac/neovide.toml deleted file mode 100644 index 46afa64..0000000 --- a/platforms/mac/neovide.toml +++ /dev/null @@ -1,25 +0,0 @@ -# $XDG_CONFIG_HOME/neovide/config.toml -# ln -sf $DOTFILES/mac/neovide.toml $XDG_CONFIG_HOME/neovide/config.toml -# New-Item -ItemType SymbolicLink -Path $Env:XDG_CONFIG_HOME/neovide/config.toml -Value $DOTFILES\mac\neovide.toml (Mac) -# https://neovide.dev/config-file.html?highlight=toml#config-file -# 设置为 fork 默认后台运行,不会占用终端 -fork = true -# frame = "full" -idle = true -maximized = false -# neovim-bin = "/opt/homebrew/bin/nvim" -frame = "transparent" -no-multigrid = false -srgb = false -tabs = true -theme = "auto" -title-hidden = true -vsync = true -wsl = false - -[font] -normal = [ - "Iosevka Nerd Font", - "霞鹜文楷等宽", -] # Will use the bundled Fira Code Nerd Font by default -size = 14.0 diff --git a/platforms/mac/shortcuts/finder_open.applescript b/platforms/mac/shortcuts/finder_open.applescript deleted file mode 100644 index da3f806..0000000 --- a/platforms/mac/shortcuts/finder_open.applescript +++ /dev/null @@ -1,4 +0,0 @@ -tell application "Finder" - activate - make new Finder window -end tell diff --git a/platforms/mac/zshrc b/platforms/mac/zshrc deleted file mode 100644 index 5439ba3..0000000 --- a/platforms/mac/zshrc +++ /dev/null @@ -1,27 +0,0 @@ -# $DOTFILES/platforms/mac/zshrc -# Date: 2024-11-30 -# Author: js0ny -# Sourced by user's zshrc if is macOS 在用户的 zshrc 中被引用,macOS 特定配置 -# Entry point in $DOTFILES/tools/zsh/common.zshrc (入口点) - -# macOS # - -alias clip="pbcopy" -alias paste="pbpaste" - -# >>> conda initialize >>> -# !! Contents within this block are managed by 'conda init' !! -__conda_setup="$('/opt/homebrew/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2>/dev/null)" -if [ $? -eq 0 ]; then - eval "$__conda_setup" -else - if [ -f "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then - . "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" - else - export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH" - fi -fi -unset __conda_setup -# <<< conda initialize <<< - -alias start-twm="source $DOTFILES/scripts/__twm_osx_start.zsh" diff --git a/platforms/win/WindowsTerminal.json b/platforms/win/WindowsTerminal.json deleted file mode 100644 index 6d2f153..0000000 --- a/platforms/win/WindowsTerminal.json +++ /dev/null @@ -1,369 +0,0 @@ -{ - "$help": "https://aka.ms/terminal-documentation", - "$schema": "https://aka.ms/terminal-profiles-schema", - "actions": - [ - { - "command": - { - "action": "copy", - "singleLine": false - }, - "id": "User.copy.644BA8F2", - "keys": "ctrl+c" - }, - { - "command": "paste", - "id": "User.paste", - "keys": "ctrl+v" - }, - { - "command": "find", - "id": "User.find", - "keys": "ctrl+shift+f" - }, - { - "command": - { - "action": "splitPane", - "split": "auto", - "splitMode": "duplicate" - }, - "id": "User.splitPane.A6751878", - "keys": "alt+shift+d" - } - ], - "alwaysShowNotificationIcon": true, - "copyFormatting": "none", - "copyOnSelect": false, - "defaultInputScope": "alphanumericHalfWidth", - "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", - "focusFollowMouse": false, - "language": "zh-Hans", - "minimizeToNotificationArea": false, - "newTabMenu": - [ - { - "type": "remainingProfiles" - } - ], - "profiles": - { - "defaults": - { - "adjustIndistinguishableColors": "always", - "antialiasingMode": "cleartype", - "autoMarkPrompts": true, - "backgroundImageOpacity": 0.3, - "colorScheme": "Catppuccin Mocha", - "compatibility.reloadEnvironmentVariables": false, - "experimental.retroTerminalEffect": false, - "font": - { - "colorGlyphs": true, - "face": "CaskaydiaCove Nerd Font", - "features": - { - "rlig": 1 - } - }, - "opacity": 40, - "scrollbarState": "visible", - "showMarksOnScrollbar": true, - "useAcrylic": true - }, - "list": - [ - { - "colorScheme": "Catppuccin Frappe", - "commandline": "\"C:\\Program Files\\WindowsApps\\Microsoft.PowerShell_7.4.6.0_x64__8wekyb3d8bbwe\\pwsh.exe\"", - "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", - "hidden": false, - "name": "PowerShell", - "opacity": 50, - "source": "Windows.Terminal.PowershellCore", - "tabTitle": "PS" - }, - { - "colorScheme": "Tokyo Night", - "commandline": "C:\\WINDOWS\\system32\\wsl.exe -d Arch", - "guid": "{a5a97cb8-8961-5535-816d-772efe0c6a3f}", - "hidden": false, - "icon": "D:\\Assets\\Icons\\arch.png", - "name": "Arch", - "source": "Windows.Terminal.Wsl" - }, - { - "colorScheme": "Catppuccin Macchiato", - "commandline": "\"C:\\Program Files\\WindowsApps\\Microsoft.PowerShell_7.4.6.0_x64__8wekyb3d8bbwe\\pwsh.exe\"", - "elevate": true, - "guid": "{ed7f021f-014d-4ca8-b3f2-811f745950db}", - "hidden": false, - "icon": "ms-appx:///ProfileIcons/pwsh.png", - "name": "Admin", - "opacity": 100, - "startingDirectory": "%USERPROFILE%", - "tabTitle": "Root" - }, - { - "colorScheme": "Ubuntu-ColorScheme", - "commandline": "C:\\WINDOWS\\system32\\wsl.exe -d Ubuntu-22.04", - "font": - { - "face": "CaskaydiaCove Nerd Font" - }, - "guid": "{c1061641-0172-4aec-b52d-dfc2b991553a}", - "hidden": false, - "icon": "D:\\Assets\\Icons\\ubuntu.png", - "name": "Ubuntu", - "startingDirectory": "~" - }, - { - "colorScheme": "Catppuccin Frappe", - "commandline": "C:\\Users\\citoy\\AppData\\Local\\Programs\\nu\\bin\\nu.exe", - "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", - "hidden": false, - "name": "PowerShell", - "opacity": 50, - "source": "Windows.Terminal.PowershellCore", - "tabTitle": "PS" - }, - { - "guid": "{2ece5bfe-50ed-5f3a-ab87-5cd4baafed2b}", - "hidden": false, - "name": "Git Bash", - "source": "Git" - }, - { - "colorScheme": "Solarized Light", - "commandline": "\"C:\\Program Files\\WindowsApps\\Microsoft.PowerShell_7.4.6.0_x64__8wekyb3d8bbwe\\pwsh.exe\"", - "guid": "{39030c99-17fd-4feb-913f-c149a2826247}", - "hidden": false, - "icon": "ms-appx:///ProfileIcons/pwsh.png", - "name": "Light", - "opacity": 100, - "startingDirectory": "%USERPROFILE%", - "tabTitle": "PS", - "useAcrylic": true - } - ] - }, - "schemes": - [ - { - "background": "#303446", - "black": "#51576D", - "blue": "#8CAAEE", - "brightBlack": "#626880", - "brightBlue": "#8CAAEE", - "brightCyan": "#81C8BE", - "brightGreen": "#A6D189", - "brightPurple": "#F4B8E4", - "brightRed": "#E78284", - "brightWhite": "#A5ADCE", - "brightYellow": "#E5C890", - "cursorColor": "#F2D5CF", - "cyan": "#81C8BE", - "foreground": "#C6D0F5", - "green": "#A6D189", - "name": "Catppuccin Frappe", - "purple": "#F4B8E4", - "red": "#E78284", - "selectionBackground": "#626880", - "white": "#B5BFE2", - "yellow": "#E5C890" - }, - { - "background": "#EFF1F5", - "black": "#5C5F77", - "blue": "#1E66F5", - "brightBlack": "#ACB0BE", - "brightBlue": "#1E66F5", - "brightCyan": "#179299", - "brightGreen": "#40A02B", - "brightPurple": "#EA76CB", - "brightRed": "#D20F39", - "brightWhite": "#BCC0CC", - "brightYellow": "#DF8E1D", - "cursorColor": "#DC8A78", - "cyan": "#179299", - "foreground": "#4C4F69", - "green": "#40A02B", - "name": "Catppuccin Latte", - "purple": "#EA76CB", - "red": "#D20F39", - "selectionBackground": "#ACB0BE", - "white": "#ACB0BE", - "yellow": "#DF8E1D" - }, - { - "background": "#24273A", - "black": "#494D64", - "blue": "#8AADF4", - "brightBlack": "#5B6078", - "brightBlue": "#8AADF4", - "brightCyan": "#8BD5CA", - "brightGreen": "#A6DA95", - "brightPurple": "#F5BDE6", - "brightRed": "#ED8796", - "brightWhite": "#A5ADCB", - "brightYellow": "#EED49F", - "cursorColor": "#F4DBD6", - "cyan": "#8BD5CA", - "foreground": "#CAD3F5", - "green": "#A6DA95", - "name": "Catppuccin Macchiato", - "purple": "#F5BDE6", - "red": "#ED8796", - "selectionBackground": "#5B6078", - "white": "#B8C0E0", - "yellow": "#EED49F" - }, - { - "background": "#1E1E2E", - "black": "#45475A", - "blue": "#89B4FA", - "brightBlack": "#585B70", - "brightBlue": "#89B4FA", - "brightCyan": "#94E2D5", - "brightGreen": "#A6E3A1", - "brightPurple": "#F5C2E7", - "brightRed": "#F38BA8", - "brightWhite": "#A6ADC8", - "brightYellow": "#F9E2AF", - "cursorColor": "#F5E0DC", - "cyan": "#94E2D5", - "foreground": "#CDD6F4", - "green": "#A6E3A1", - "name": "Catppuccin Mocha", - "purple": "#F5C2E7", - "red": "#F38BA8", - "selectionBackground": "#585B70", - "white": "#BAC2DE", - "yellow": "#F9E2AF" - }, - { - "background": "#1A1B2C", - "black": "#414868", - "blue": "#7AA2F7", - "brightBlack": "#414868", - "brightBlue": "#7AA2F7", - "brightCyan": "#7DCFFF", - "brightGreen": "#73DACA", - "brightPurple": "#BB9AF7", - "brightRed": "#F7768E", - "brightWhite": "#C0CAF5", - "brightYellow": "#E0AF68", - "cursorColor": "#C0CAF5", - "cyan": "#7DCFFF", - "foreground": "#A9B1DC", - "green": "#73DACA", - "name": "Tokyo Night", - "purple": "#BB9AF7", - "red": "#F7768E", - "selectionBackground": "#28344A", - "white": "#C0CAF5", - "yellow": "#E0AF68" - } - ], - "showTabsInTitlebar": true, - "startOnUserLogin": true, - "tabWidthMode": "titleLength", - "theme": "Catppuccin Macchiato", - "themes": - [ - { - "name": "Catppuccin Frappe", - "tab": - { - "background": "#303446FF", - "iconStyle": "default", - "showCloseButton": "always", - "unfocusedBackground": null - }, - "tabRow": - { - "background": "#292C3CFF", - "unfocusedBackground": "#232634FF" - }, - "window": - { - "applicationTheme": "dark", - "experimental.rainbowFrame": false, - "frame": null, - "unfocusedFrame": null, - "useMica": false - } - }, - { - "name": "Catppuccin Latte", - "tab": - { - "background": "#EFF1F5FF", - "iconStyle": "default", - "showCloseButton": "always", - "unfocusedBackground": null - }, - "tabRow": - { - "background": "#E6E9EFFF", - "unfocusedBackground": "#DCE0E8FF" - }, - "window": - { - "applicationTheme": "light", - "experimental.rainbowFrame": false, - "frame": null, - "unfocusedFrame": null, - "useMica": false - } - }, - { - "name": "Catppuccin Macchiato", - "tab": - { - "background": "#24273AFF", - "iconStyle": "default", - "showCloseButton": "always", - "unfocusedBackground": null - }, - "tabRow": - { - "background": "#1E2030FF", - "unfocusedBackground": "#181926FF" - }, - "window": - { - "applicationTheme": "dark", - "experimental.rainbowFrame": false, - "frame": null, - "unfocusedFrame": null, - "useMica": false - } - }, - { - "name": "Catppuccin Mocha", - "tab": - { - "background": "#1E1E2EFF", - "iconStyle": "default", - "showCloseButton": "always", - "unfocusedBackground": null - }, - "tabRow": - { - "background": "#181825FF", - "unfocusedBackground": "#11111BFF" - }, - "window": - { - "applicationTheme": "dark", - "experimental.rainbowFrame": false, - "frame": null, - "unfocusedFrame": null, - "useMica": false - } - } - ], - "useAcrylicInTabRow": true -} diff --git a/platforms/wsl/.bashrc b/platforms/wsl/.bashrc deleted file mode 100644 index ce32ed5..0000000 --- a/platforms/wsl/.bashrc +++ /dev/null @@ -1,16 +0,0 @@ -# Append to original bashrc for minimal setup -# echo $DOTFILES/wsl/.bashrc >> ~/.bashrc -bind 'set show-mode-in-prompt on' -set -o vi - -bind -m vi-command '"n": next-history' -bind -m vi-command '"e": previous-history' -bind -m vi-command '"l": vi-insertion-mode' -bind -m vi-command '"L": vi-insert-beg' -bind -m vi-command '"i": forward-char' - -# bind -m vi-insert '"\C-r": reverse-search-history"' -# bind -m vi-insert '"\C-l": clear-screen' - -bind -m vi-command '"j": vi-end-word' -bind -m vi-command '"J": vi-end-word' diff --git a/platforms/wsl/zshrc b/platforms/wsl/zshrc deleted file mode 100644 index 107ca41..0000000 --- a/platforms/wsl/zshrc +++ /dev/null @@ -1,31 +0,0 @@ -# $DOTFILES/platforms/wsl/zshrc -# Date: 2024-12-01 -# Author: js0ny -# Sourced by user's zshrc if is WSL 在用户的 zshrc 中被引用,WSL 特定配置 -# Entry point in $DOTFILES/tools/zsh/common.zshrc (入口点) - -### Variables ### -export IS_WSL=true -export ARCHFLAGS="-arch x86_64" -source $DOTFILES/platforms/wsl/winterop.zsh - -### Misc ### - -export PATH=/opt/bin:$PATH - -# Conda # - -# >>> conda initialize >>> -# !! Contents within this block are managed by 'conda init' !! -__conda_setup="$('$HOME/miniconda3/bin/conda' 'shell.zsh' 'hook' 2>/dev/null)" -if [ $? -eq 0 ]; then - eval "$__conda_setup" -else - if [ -f "$HOME/miniconda3/etc/profile.d/conda.sh" ]; then - . "$HOME/miniconda3/etc/profile.d/conda.sh" - else - export PATH="$HOME/miniconda3/bin:$PATH" - fi -fi -unset __conda_setup -# <<< conda initialize <<< diff --git a/readme.org b/readme.org index 66c7dea..f6bf3b9 100644 --- a/readme.org +++ b/readme.org @@ -1,58 +1,3 @@ * dotfiles -This repository contains dotfiles for multiple platforms, with /colemak/ -as the default keyboard layout. -No rice, no Unixporn/NTporn, just a simple setup that works for me. - -Works for Windows, Linux and MacOS. - -** Setup - - -*** From Scratch (Linux/MacOS) - -#+begin_src shell -curl https://raw.githubusercontent.com/js0ny/dotfiles/refs/heads/master/bootstrap/setup.sh -o setup.sh && chmod u+x setup.sh && ./setup.sh -#+end_src - -*** Via =just= script - -Make sure you have =just= installed - -#+begin_src shell -which just -#+end_src - -Then run - -#+begin_src shell -just -#+end_src - -This will list all available tasks. - -All the just scripts are in =Justfile= and under =.just.d/= directory. - -** Structure - -#+begin_src shell - . -├──  .editorconfig # Editor configuration, for LF/CRLF correction -├──  .gitattributes # Git attributes, for LF/CRLF correction -├──  bootstrap # Setup scripts for new machines -├──  common # Single-file configurations (lesskey, vimrc etc) -├──  platforms # Platform-specific configurations -├──  readme.md # This file -├──  scripts # Scripts for various tasks -└──  tools # Multi-file configurations (shell, neovim etc) -#+end_src - -** Keybindings - -#+begin_example - ^ - e - < h i > - n - v -#+end_example +Migrating to ~chezmoi~. diff --git a/platforms/win/cmd/dark-mode.bat b/scripts/dark-mode.bat similarity index 100% rename from platforms/win/cmd/dark-mode.bat rename to scripts/dark-mode.bat diff --git a/tools/emacs.d/.gitignore b/tools/emacs.d/.gitignore deleted file mode 100644 index 62c7ec6..0000000 --- a/tools/emacs.d/.gitignore +++ /dev/null @@ -1,30 +0,0 @@ -# 自动生成的目录 -/auto-save-list/ -/elpa/ -/eshell/ -/server/ -/url/ -transient/ - -# 临时文件 -tutorial -*~ -\#*\# -.#* -*.elc - -# 自动保存的文件 -auto-save-list -tramp - -recentf -custom.el -.custom.el - -.org-id-locations -bookmarks -.cache -eln-cache -org-persist - -local.el diff --git a/tools/emacs.d/early-init.el b/tools/emacs.d/early-init.el deleted file mode 100644 index 512068a..0000000 --- a/tools/emacs.d/early-init.el +++ /dev/null @@ -1 +0,0 @@ -(setq package-enable-at-startup nil) diff --git a/tools/emacs.d/init.el b/tools/emacs.d/init.el deleted file mode 100644 index 14c0f56..0000000 --- a/tools/emacs.d/init.el +++ /dev/null @@ -1,65 +0,0 @@ -;;; init.el --- Entry point of GNU/Emacs configuration -;;; First edit date 2025/01/27 - -;;; Organised by such directory structure -;;; init.el -- This file, entry point -;;; lisp/ -;;; init-*.el -;;; custom.el -- Auto Generated -;;; local.el -- Local variables - -;; All elisp files under emacs.d/lisp will be loaded -(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)) - -;; Store the auto-generated custom config to `custom.el` -(setq custom-file (expand-file-name ".custom.el" user-emacs-directory)) - - -(defvar xdg-data-home - (or (getenv "XDG_DATA_HOME") - (expand-file-name "~/.local/share"))) - -(defvar xdg-cache-home - (or (getenv "XDG_CACHE_HOME") - (expand-file-name "~/.cache"))) - -(defvar xdg-state-home - (or (getenv "XDG_STATE_HOME") - (expand-file-name "~/.local/state/"))) - -(defvar user-emacs-data (expand-file-name "emacs" xdg-data-home)) -(defvar user-emacs-cache (expand-file-name "emacs" xdg-cache-home)) -(defvar user-emacs-state (expand-file-name "emacs" xdg-state-home)) - -;; Load each modules -(require 'init-package) ; package manager should be loaded first -(require 'init-basic) -(require 'init-appearance) -(require 'init-wayland) -(require 'init-keymaps) -(require 'init-evil) -(require 'init-counsel) -(require 'init-file) -(require 'init-edit) -(require 'init-calendar) -(require 'init-writer) -(require 'init-org) -(require 'init-markdown) -(require 'init-latex) -(require 'init-beancount) -(require 'init-treesitter) -(require 'init-scratch) -(require 'init-ai) - - -;; Load `custom` file -(when (file-exists-p custom-file) - (load custom-file)) - - -(when (file-exists-p (expand-file-name "local.el" user-emacs-directory)) - (load (expand-file-name "local.el" user-emacs-directory))) - - - -;;; init.el end diff --git a/tools/emacs.d/lisp/init-ai.el b/tools/emacs.d/lisp/init-ai.el deleted file mode 100644 index 2945fc6..0000000 --- a/tools/emacs.d/lisp/init-ai.el +++ /dev/null @@ -1,14 +0,0 @@ - -;; (use-package copilot -;; :vc (:url "https://github.com/copilot-emacs/copilot.el" -;; :rev :newest -;; :branch "main") -;; :hook (prog-mode . copilot-mode) -;; :config -;; (define-key copilot-completion-map (kbd "") 'copilot-accept-completion) -;; (define-key copilot-completion-map (kbd "TAB") 'copilot-accept-completion)) - - -(provide 'init-ai) - -;;; init-ai.el ends here diff --git a/tools/emacs.d/lisp/init-appearance.el b/tools/emacs.d/lisp/init-appearance.el deleted file mode 100644 index 85a620e..0000000 --- a/tools/emacs.d/lisp/init-appearance.el +++ /dev/null @@ -1,110 +0,0 @@ -;;; init-appearance.el - -;; Always set frame font -;; If don't set this, `emacs --daemon' will not set the font -;; for new graphical frames. -(add-to-list 'default-frame-alist '(font . "Maple Mono NF CN")) - -;; Set CJK Display Font -(dolist (charset '(kana han cjk-misc bopomofo)) - (set-fontset-font t charset (font-spec :family "Maple Mono NF CN"))) - - -;; Variable Pitch Font -;; Used in `variable-pitch-mode' -(set-face-attribute 'variable-pitch nil - :family "LXGW WenKai Screen" - :height 140 - :weight 'regular) - - -;; Icon Support -;; Once installed, Manually install the fonts required: -;; M-x all-the-icons-install-fonts -;; If under Microsoft Windows, the Installation Directory should be chosen -;; and right-click them to install the fonts -(use-package all-the-icons - :if (display-graphic-p)) - - -(defun js0ny/get-system-theme () - " Get the current system theme. Returns 'light' or 'dark'." - ;; Default - (let ((background 'dark)) - (if (string= system-type "darwin") - (progn - ;; Check if 'defaults' command is available - (when (executable-find "defaults") - ;; Check if the system is in dark mode - (let ((apple-interface-style - (shell-command-to-string "defaults read -g AppleInterfaceStyle"))) - (when (string-match-p "Light" apple-interface-style) - (setq background 'light))))) - ;; Using systemd to check the current theme - (when (executable-find "busctl") - (let ((result - (shell-command-to-string - (concat "busctl --user call org.freedesktop.portal.Desktop " - "/org/freedesktop/portal/desktop " - "org.freedesktop.portal.Settings ReadOne ss " - "org.freedesktop.appearance color-scheme")))) - ;; 结果格式为浅色模式是 "v u 0",暗色模式是 "v u 1" - ;; v u 0 -> light, v u 1 -> dark - (when (string-match "u\\s+\\([0-9]\\)" result) - (let ((color-scheme (match-string 1 result))) - (when (string= color-scheme "0") - (setq background 'light))))))) - background)) - -(use-package catppuccin-theme - :custom - (catppuccin-flavor 'mocha) - :config - (if (string-equal (js0ny/get-system-theme) "light") - (setq catppuccin-flavor 'latte) - (setq catppuccin-flavor 'mocha)) - (load-theme 'catppuccin t)) - - - -;; (use-package doom-themes -;; :ensure t -;; :config -;; ;; Global settings (defaults) -;; :custom -;; (doom-themes-enable-bold t) ; if nil, bold is universally disabled -;; (doom-themes-enable-italic t) ; if nil, italics is universally disabled -;; ; (doom-themes-treemacs-theme "doom-nord-aurora") ; use "doom-colors" for less minimal icon theme -;; :config -;; (load-theme 'doom-nord-aurora t) - -;; ;; Enable flashing mode-line on errors -;; (doom-themes-visual-bell-config) - -;; ;; Enable custom neotree theme (nerd-icons must be installed!) -;; ;; (doom-themes-neotree-config) - -;; ;; or for treemacs users -;; (doom-themes-treemacs-config) -;; ;; Corrects (and improves) org-mode's native fontification. -;; (doom-themes-org-config)) - - -;; Better mode line, see (L11) for Icon install -;; M-x nerd-icons-install-fonts -(use-package doom-modeline - :ensure t - :init (doom-modeline-mode 1)) - -(global-tab-line-mode) ; bufferline - -(use-package highlight-indent-guides - :hook ((prog-mode yaml-mode org-mode) . highlight-indent-guides-mode) - :init - (setq highlight-indent-guides-method 'column) - (setq highlight-indent-guides-responsive 'top) - (setq highlight-indent-guides-auto-character-face-perc 1)) - - - -(provide 'init-appearance) diff --git a/tools/emacs.d/lisp/init-basic.el b/tools/emacs.d/lisp/init-basic.el deleted file mode 100644 index ef4e93c..0000000 --- a/tools/emacs.d/lisp/init-basic.el +++ /dev/null @@ -1,81 +0,0 @@ -;;; init-basic.el - -;; Disable startup message -(setq inhibit-startup-message t) - -;; Use line number by default -(global-display-line-numbers-mode 1) -;; Vim-like relativenumber -;; fix: work for folded region (visual relative line instead of physical) -(use-package display-line-numbers - :custom - (display-line-numbers-type 'visual) - (display-line-numbers-current-absolute t) - :hook - (prog-mode . display-line-numbers-mode)) - -(when (eq system-type 'darwin) - (setq mac-option-modifier 'meta) - (setq mac-command-modifier 'super)) - - -;; https://book.emacs-china.org/#orgcfd105e Open with Emacs -;; (server-mode 1) - -(setq use-short-answers t) - -(require 'recentf) -(setq recentf-save-file (expand-file-name "recentf" user-emacs-data)) -(recentf-mode 1) - -;; Disable topbars -(tool-bar-mode -1) -(scroll-bar-mode -1) -(menu-bar-mode -1) - -(use-package alert - :commands (alert) - :config - (setq alert-default-style 'libnotify)) - -;; 设置 Emacs 备份和自动保存目录 -(defvar user-backup-directory (expand-file-name "backups" user-emacs-data)) -(defvar user-autosaves-directory (expand-file-name "autosaves" user-emacs-cache)) - -;; 创建目录(如果不存在) -(dolist (dir (list user-backup-directory user-autosaves-directory)) - (unless (file-exists-p dir) - (make-directory dir t) - (message "Creating directory: %s" dir))) - -;; 配置备份文件目录 -(setq backup-directory-alist `(("." . ,user-backup-directory))) - -(setq project-list-file (expand-file-name "projects-list" user-emacs-data)) - -;; 配置自动保存文件目录 -(setq auto-save-file-name-transforms - `((".*" ,user-autosaves-directory t))) - -;; 配置自动保存列表文件前缀 -(setq auto-save-list-file-prefix - (expand-file-name "auto-save-list/.saves-" user-autosaves-directory)) - -;; TRAMP 远程文件的备份设置 -(setq tramp-backup-directory-alist (copy-tree backup-directory-alist)) -(setq tramp-persistency-file-name (expand-file-name "tramp" user-emacs-state)) - - -;; 备份设置(可选) -(setq backup-by-copying t ; 使用复制而非重命名 - delete-old-versions t ; 自动删除旧版本 - kept-new-versions 6 ; 保留的新版本数量 - kept-old-versions 2 ; 保留的旧版本数量 - version-control t) ; 使用版本号 - -(setq transient-history-file (expand-file-name "transient/history.el" user-emacs-data)) -(setq transient-values-file (expand-file-name "transient/values.el" user-emacs-data)) -(setq transient-levels-file (expand-file-name "transient/levels.el" user-emacs-data)) - -;; Export module -(provide 'init-basic) diff --git a/tools/emacs.d/lisp/init-beancount.el b/tools/emacs.d/lisp/init-beancount.el deleted file mode 100644 index 33cee8a..0000000 --- a/tools/emacs.d/lisp/init-beancount.el +++ /dev/null @@ -1,39 +0,0 @@ -;; (straight-use-package -;; '(beancount -;; :host github -;; :repo "beancount/beancount-mode" -;; :files ("*.el"))) - -(use-package beancount - :mode (("\\.beancount\\'" . beancount-mode) - ("\\.bean\\'" . beancount-mode)) - :init - (add-hook 'beancount-mode-hook #'outline-minor-mode) - (define-key beancount-mode-map (kbd "C-c C-n") #'outline-next-visible-heading) - (define-key beancount-mode-map (kbd "C-c C-p") #'outline-previous-visible-heading) - - (defvar beancount-accounts-files nil "List of account files.") - (setq beancount-accounts-files - (directory-files "~/Dropbox/beancount/accounts/" 'full (rx ".beancount" eos))) - - (defun w/beancount--collect-accounts-from-files (oldfun regex n) - "Collect all accounts from files." - (let ((keys (funcall oldfun regex n)) - (hash (make-hash-table :test 'equal))) - (dolist (key keys) - (puthash key nil hash)) - ;; collect accounts from files - (save-excursion - (dolist (f beancount-accounts-files) - (with-current-buffer (find-file-noselect f) - (goto-char (point-min)) - (while (re-search-forward beancount-account-regexp nil t) - (puthash (match-string-no-properties n) nil hash))))) - (hash-table-keys hash))) - - (advice-add #'beancount-collect - :around #'w/beancount--collect-accounts-from-files - '((name . "collect accounts from files as well")))) - - -(provide 'init-beancount) diff --git a/tools/emacs.d/lisp/init-calendar.el b/tools/emacs.d/lisp/init-calendar.el deleted file mode 100644 index f3ac6bd..0000000 --- a/tools/emacs.d/lisp/init-calendar.el +++ /dev/null @@ -1,99 +0,0 @@ -;;; init-calendar.el - -(setq calendar-date-style 'iso) -(setq diary-date-forms '((year "年" month "月" day "日" " 星期[" "日一二三四五六" "]") ;; Chinese - (year "-" month "-" day) ;; ISO - (month "[-/]" day "[^-/0-9]") (year "[-/]" month "[-/]" day "[^0-9]") - (monthname " *" day "[^-0-9]") (year " *" monthname " *" day "[^0-9]") - (dayname "\\W"))) - -(setq calendar-mark-holidays-flag t - calendar-week-start-day 1) - - -(use-package cal-china-x - :ensure t - :custom - (cal-china-x-important-holidays '((holiday-chinese-new-year) - (holiday-lunar 12 23 "小年(北)" 1) - (holiday-lunar 12 24 "小年(南)" 1) - (holiday-lunar 12 30 "除夕" 1) - (holiday-lunar 1 1 "春节" 0) - (holiday-lunar 1 2 "春节" 0) - (holiday-lunar 1 3 "春节" 0) - (holiday-lunar 1 4 "春节" 0) - (holiday-lunar 1 5 "春节(破五)" 0) - (holiday-lunar 1 15 "元宵节" 0) - (holiday-lunar 2 2 "龙抬头" 0) - (holiday-solar-term "清明" "清明节") - (holiday-fixed 5 1 "劳动节") - (holiday-lunar 5 5 "端午节" 0) - (holiday-lunar 7 7 "七夕节" 0) - (holiday-lunar 7 15 "中元节" 0) - (holiday-lunar 8 15 "中秋节" 0) - (holiday-fixed 10 1 "国庆节") - (holiday-fixed 10 2 "国庆节") - (holiday-fixed 10 3 "国庆节") - (holiday-lunar 9 9 "重阳节" 0) - (holiday-lunar 10 1 "寒衣节" 0) - (holiday-lunar 12 8 "腊八" 1) - (holiday-solar-term "立春" "立春") - (holiday-solar-term "立夏" "立夏") - (holiday-solar-term "立秋" "立秋") - (holiday-solar-term "立冬" "立冬") - (holiday-solar-term "春分" "春分") - (holiday-solar-term "夏至" "夏至") - (holiday-solar-term "秋分" "秋分") - (holiday-solar-term "冬至" "冬至"))) - (cal-china-x-general-holidays '((holiday-fixed 1 1 "元旦") - (holiday-fixed 2 14 "情人节") - (holiday-fixed 3 8 "妇女节") - (holiday-fixed 4 1 "愚人节") - (holiday-fixed 5 4 "青年节") - (holiday-float 5 0 2 "母亲节") - (holiday-fixed 6 1 "儿童节") - (holiday-float 6 0 3 "父亲节") - (holiday-fixed 9 10 "教师节") - (holiday-float 11 4 4 "感恩节") - (holiday-fixed 12 25 "圣诞节"))) - :config - (setq calendar-holidays (append cal-china-x-important-holidays - cal-china-x-general-holidays))) - -;; https://github.com/AbstProcDo/Master-Emacs-From-Scratch-with-Solid-Procedures/blob/master/06.Emacs-as-Agenda-by-Org.org -;;Sunrise and Sunset -;;日出而作, 日落而息 -(defun js0ny/diary-sunrise () - (let ((dss (diary-sunrise-sunset))) - (with-temp-buffer - (insert dss) - (goto-char (point-min)) - (while (re-search-forward " ([^)]*)" nil t) - (replace-match "" nil nil)) - (goto-char (point-min)) - (search-forward ",") - (buffer-substring (point-min) (match-beginning 0))))) - -(defun js0ny/diary-sunset () - (let ((dss (diary-sunrise-sunset)) - start end) - (with-temp-buffer - (insert dss) - (goto-char (point-min)) - (while (re-search-forward " ([^)]*)" nil t) - (replace-match "" nil nil)) - (goto-char (point-min)) - (search-forward ", ") - (setq start (match-end 0)) - (search-forward " at") - (setq end (match-beginning 0)) - (goto-char start) - (capitalize-word 1) - (buffer-substring start end)))) - - - -(setq diary-file "~/.local/js0ny/diary") - - -(provide 'init-calendar) diff --git a/tools/emacs.d/lisp/init-counsel.el b/tools/emacs.d/lisp/init-counsel.el deleted file mode 100644 index cf0fe3e..0000000 --- a/tools/emacs.d/lisp/init-counsel.el +++ /dev/null @@ -1,31 +0,0 @@ -;;; init-counsel.el -(defun js0ny/open-config-directory () - "Open `user-emacs-directory` using `counsel-find-file`." - (interactive) - (let ((default-directory user-emacs-directory)) - (counsel-file-jump))) - - -(use-package counsel - :demand t - :init - (counsel-mode 1) - :config - (global-set-key (kbd "C-x C-f") #'counsel-find-file) - (global-set-key (kbd "M-x") #'counsel-M-x) - (evil-leader/set-key - "SPC" #'counsel-file-jump - "/" #'counsel-rg - ";" #'counsel-M-x - "fc" #'js0ny/open-config-directory - "fh" #'counsel-recentf)) - -;; Replace `cd' with `counsel-cd' -(defun cd () - "Change currend default directory" - (interactive) - (counsel-cd)) - -(provide 'init-counsel) - -;;; init-counsel.el ends diff --git a/tools/emacs.d/lisp/init-edit.el b/tools/emacs.d/lisp/init-edit.el deleted file mode 100644 index c5e8191..0000000 --- a/tools/emacs.d/lisp/init-edit.el +++ /dev/null @@ -1,102 +0,0 @@ -;;; init-edit.el - -;; Use UTF-8 & LF -(setq-default buffer-file-coding-system 'utf-8-unix) - -;; Auto input pairred brackets -(electric-pair-mode 1) - -;; Enable Folding -(add-hook 'prog-mode-hook #'hs-minor-mode) - -;; Company - Complete Anything -(use-package company - :ensure t - :hook (after-init . global-company-mode) ; 在启动后自动启用 global-company-mode - :bind (:map company-active-map - ("C-n" . company-select-next) - ("C-p" . company-select-previous)) - :custom - (company-minimum-prefix-length 1) ; 设置最短补全前缀 - (company-idle-delay 0.2)) ; 设置补全延迟(秒) - -;; minibuffer 补全增强 -(use-package vertico - :init - (vertico-mode)) - -;; 提供补全注解 -(use-package marginalia - :init - (marginalia-mode)) - - -;; (set-language-environment "UTF-8") -(set-default-coding-systems 'utf-8) -;; (prefer-coding-system 'utf-8) - -;;; 设置语言环境为 UTF-8 -; -;;; 强制使用 UTF-8 -;(set-terminal-coding-system 'utf-8) -;(set-keyboard-coding-system 'utf-8) -; -;;; Windows 系统特殊设置 -;(when (eq system-type 'windows-nt) -; (set-file-name-coding-system 'gbk) ;; 文件名使用 GBK -; (set-clipboard-coding-system 'utf-16le)) ;; 剪贴板使用 UTF-16LE -; -;(setq-default buffer-file-coding-system 'utf-8-unix) -; -;;; 设置行尾为 Unix 风格 -;(add-hook 'find-file-hook 'find-file-check-line-endings) -; -;(defun dos-file-endings-p () -; (string-match "dos" (symbol-name buffer-file-coding-system))) -; -;(defun find-file-check-line-endings () -; (when (dos-file-endings-p) -; (set-buffer-file-coding-system 'undecided-unix) -; (set-buffer-modified-p nil))) - -(setq-default buffer-file-coding-system 'utf-8-unix) - -;; Avy - act like Vim Easymotion -(use-package avy - :ensure t - :config - (evil-define-key '(normal) 'global (kbd "T") 'avy-goto-char) - (evil-define-key '(normal) 'global (kbd "s") 'avy-goto-char-2) - (evil-define-key '(normal) 'global (kbd "s") 'avy-goto-char-2-above)) - -(use-package yasnippet - :ensure t - :defer t - :commands yas-minor-mode - :hook ((prog-mode . yas-minor-mode) - (org-mode . yas-minor-mode)) - :config - (setq yas-indent-line 'fixed) ;; 让 snippet 展开时不影响缩进 - (setq yas-wrap-around-region nil) ;; 关闭自动包裹选中区域 - (advice-add 'yas-expand-snippet :around - (lambda (orig-fn &rest args) - (let ((inhibit-field-text-motion t)) ;; 禁止字段自动换行 - (apply orig-fn args)))) - ;; (setq yas-snippet-dirs '("~/.dotfiles/tools/doom/snippets/")) - (add-to-list 'yas-snippet-dirs "~/.dotfiles/tools/doom/snippets/" t) - - (yas-reload-all) - ) - -(use-package diff-hl - :straight t - :hook ((prog-mode . diff-hl-mode) - (vc-dir-mode . diff-hl-dir-mode) - (magit-post-refresh . diff-hl-magit-post-refresh)) - :config - (setq diff-hl-margin-mode nil) - (diff-hl-flydiff-mode)) - -(global-font-lock-mode t) - -(provide 'init-edit) diff --git a/tools/emacs.d/lisp/init-evil.el b/tools/emacs.d/lisp/init-evil.el deleted file mode 100644 index c4c239b..0000000 --- a/tools/emacs.d/lisp/init-evil.el +++ /dev/null @@ -1,93 +0,0 @@ -;;; init-evil.el - -;; Evil - Extensible VI Layer -;; (defvar evil-colemak-state-map (make-sparse-keymap)) - - - -(use-package evil - :ensure t - :config - (evil-mode 1) - ; Colemak Vim Arrow - ; Motion - Emacs built-in read-only mode - (evil-define-key '(normal visual operator motion) 'global - ;; To see the keybindings, use k then type the key - ; "n" 'evil-next-line - ; "e" 'evil-previous-line - ; "i" 'evil-forward-char - ; ;"l" 'evil-insert - ; ;"L" 'evil-insert-0-line - ; "k" 'evil-search-next - ; "K" 'evil-search-previous - ; "j" 'evil-forward-word-end - ; "J" 'evil-forward-WORD-end - "J" '(lambda () (interactive) (evil-next-line 5)) ; 5n - "K" '(lambda () (interactive) (evil-previous-line 5)) ; 5e - ; (kbd "C-w n") 'evil-window-down - ; (kbd "C-w e") 'evil-window-up - ; (kbd "C-w i") 'evil-window-right - ; (kbd "C-w C-n") 'evil-window-down - ; (kbd "C-w C-e") 'evil-window-up - ; (kbd "C-w C-i") 'evil-window-right) - ; (evil-define-key '(normal visual) 'global - ; "l" 'evil-insert - ; "L" 'evil-insert-0-line) - (evil-define-key '(normal motion) 'global - "H" #'tab-line-switch-to-prev-tab - "L" #'tab-line-switch-to-next-tab) - (evil-define-key '(visual operator) 'global - "H" #'evil-beginning-of-line - "L" #'evil-end-of-line) - (evil-ex-define-cmd "bn" #'tab-line-switch-to-next-tab) - (evil-ex-define-cmd "bp" #'tab-line-switch-to-prev-tab))) - -;; Text Objects Keymap - Use `l` for inner (swap i and l) -;; https://github.com/emacs-evil/evil/blob/master/evil-maps.el#L398-L421 -(define-key evil-visual-state-map "l" evil-inner-text-objects-map) -(define-key evil-operator-state-map "l" evil-inner-text-objects-map) - - -;; Provides Vim-like Leader key -(use-package evil-leader - :after evil - :config - (global-evil-leader-mode) - (evil-leader/set-leader "") - (evil-leader/set-key - "ft" #'treemacs - "bb" #'buffer-menu)) - -;; Evil Commentary: Use gc to toggle comments -(use-package evil-commentary - :after evil - :config - (evil-commentary-mode)) - -;; Evil Surround: Vim-surround Evil fork -(use-package evil-surround - :after evil - :config - (global-evil-surround-mode 1)) - -(use-package evil-mc - :config - (global-evil-mc-mode 1)) - - -;; Evil-goggles: Highlight-yank (and more) -(use-package evil-goggles - :ensure t - :config - (evil-goggles-mode) - - ;; optionally use diff-mode's faces; as a result, deleted text - ;; will be highlighed with `diff-removed` face which is typically - ;; some red color (as defined by the color theme) - ;; other faces such as `diff-added` will be used for other actions - (evil-goggles-use-diff-faces)) - -(with-eval-after-load 'evil - (evil-set-initial-state 'org-agenda-mode 'motion)) - -(provide 'init-evil) diff --git a/tools/emacs.d/lisp/init-file.el b/tools/emacs.d/lisp/init-file.el deleted file mode 100644 index b9f1de1..0000000 --- a/tools/emacs.d/lisp/init-file.el +++ /dev/null @@ -1,87 +0,0 @@ -;;; init-file.el -- File Management configuration -;;; First edit at 2025/01/29 - -;; Dired - -;; Dired Configuration -(with-eval-after-load 'dired - (setq dired-recursive-deletes 'top) ;; Ask Before Delete Dir - (setq dired-recursive-copies 'always) ;; Always Copy Dir - (setq dired-dwim-target t)) ;; dwim for Do What I Mean - 当分屏显示两个 Buffer 时,复制或移动文件会自动将另一个 dired buffer 作为目标目录 - -;; Dired Keybindings - Colemak -(evil-define-key 'normal dired-mode-map - "h" 'dired-up-directory - "i" 'dired-find-file - "n" 'dired-next-line - "e" 'dired-previous-line) - -;; This prevents Dired from opening more buffers -;; https://stackoverflow.com/q/1839313 -(setq dired-kill-when-opening-new-dired-buffer t) - -;; Treemacs - Sidebar File Tree -(use-package treemacs - :straight t - :defer t - :init - (with-eval-after-load 'winum - (define-key winum-keymap (kbd "M-0") #'treemacs-select-window)) - :bind - (:map global-map - ("M-0" . treemacs-select-window) - ("C-x t 1" . treemacs-delete-other-windows) - ;; ("C-x t t" . treemacs) - ("C-x t d" . treemacs-select-directory) - ("C-x t B" . treemacs-bookmark) - ("C-x t C-t" . treemacs-find-file) - ("C-x t M-t" . treemacs-find-tag) - ) - :config - (setq treemacs-persist-file (expand-file-name "treemacs-persist" user-emacs-data))) - - -(use-package treemacs-nerd-icons - :config - (treemacs-load-theme "nerd-icons")) - -(use-package treemacs-evil - :after (treemacs evil) - :ensure t - :config - ;; Evil treemacs state bindings - (evil-define-key '(normal motion) evil-treemacs-state-map - (kbd "n") #'treemacs-next-line - (kbd "e") #'treemacs-previous-line - (kbd "N") #'treemacs-next-neighbour - (kbd "E") #'treemacs-previous-neighbour - (kbd "H") #'treemacs-toggle-show-dotfiles - (kbd "I") #'treemacs-hide-gitignored-files-mode - (kbd "i") #'treemacs-RET-action - (kbd "a") #'treemacs-create-file - (kbd "A") #'treemacs-create-dir - (kbd "c") #'treemacs-copy-file - (kbd "x") #'treemacs-move-file - (kbd "d") #'treemacs-delete-file - (kbd "r") #'treemacs-rename-file - (kbd "q") #'treemacs-quit - (kbd "y") #'treemacs-copy-relative-path-at-point - (kbd "Y") #'treemacs-copy-absolute-path-at-point - (kbd "m") #'treemacs-mark-or-unmark-path-at-point) - - ;; Treemacs mode specific binding - (evil-define-key 'treemacs treemacs-mode-map (kbd "i") #'treemacs-RET-action)) - -(use-package dirvish) - - -;; magit - Git Client -(use-package magit - :ensure t - :after (evil-leader) - :config - (evil-leader/set-key - "g" 'magit-status) - ) - -(provide 'init-file) diff --git a/tools/emacs.d/lisp/init-keymaps.el b/tools/emacs.d/lisp/init-keymaps.el deleted file mode 100644 index ae4081f..0000000 --- a/tools/emacs.d/lisp/init-keymaps.el +++ /dev/null @@ -1,8 +0,0 @@ -;;; init-keymaps.el - -;; Once this is defined, `M-x open-init-file` will open this file -(defun open-org-config() - (interactive) ;; Mark function as `interactive` that allows user to access by M-x open-init-file RET - (find-file "~/.dotfiles/tools/emacs.d/lisp/init-org.el")) - -(provide 'init-keymaps) diff --git a/tools/emacs.d/lisp/init-latex.el b/tools/emacs.d/lisp/init-latex.el deleted file mode 100644 index 2ec40fe..0000000 --- a/tools/emacs.d/lisp/init-latex.el +++ /dev/null @@ -1,50 +0,0 @@ - -(use-package texfrag - ;; :init - ;; (texfrag-global-mode) - :config - (evil-define-key 'normal texfrag-mode-map - (kbd "zL") #'texfrag-document) - :hook (markdown-mode . texfrag-mode)) - -(use-package laas - :hook ( - (LaTeX-mode . laas-mode) - (org-mode . laas-mode)) - :config ; do whatever here - (aas-set-snippets 'laas-mode - ;; set condition! - :cond #'texmathp ; expand only while in math - "nabl" "\\nabla" - "lg" "\\lg" - "hat" "\\hat" - ;; "iint" "\\iint" - ;; "int" "\\int" - "cdot" "\\cdot" - "dif" "\\mathrm{d}" - "pm" "\\pm" - "mp" "\\mp" - "sq" "\\sqrt" - ;; bind to functions! - "mk" (lambda () (interactive) - (yas-expand-snippet "\\( $1 \\)$0")) - "ppart" (lambda () (interactive) - (yas-expand-snippet "\\frac{\\partial $2}{\\partial $1} $0")) - "rm" (lambda () (interactive) - (yas-expand-snippet "\\mathrm{$1} $0")) - "sb" (lambda () (interactive) - (yas-expand-snippet "_{$1} $0")) - "Sum" (lambda () (interactive) - (yas-expand-snippet "\\sum_{$1}^{$2} $0")) - "Span" (lambda () (interactive) - (yas-expand-snippet "\\Span($1)$0")) - ;; add accent snippets - :cond #'laas-object-on-left-condition - "qq" (lambda () (interactive) (laas-wrap-previous-object "sqrt")) - :cond #'(lambda () (and (not (texmathp)) - (looking-back "^" nil))) - "dm" '(yas "\\[\n$1\n\\]$0")) - ) - -(provide 'init-latex) -;;; init-latex.el ends diff --git a/tools/emacs.d/lisp/init-markdown.el b/tools/emacs.d/lisp/init-markdown.el deleted file mode 100644 index 81f0b0f..0000000 --- a/tools/emacs.d/lisp/init-markdown.el +++ /dev/null @@ -1,12 +0,0 @@ -(use-package yaml-mode :straight t) - -(use-package markdown-mode - :mode ("\\.md\\'" . markdown-mode) - :init - (setq markdown-fontify-code-blokcs-natively t) - :custom - (setq markdown-fontify-code-block-natively t) - :hook ((markdown-mode . visual-line-mode))) - -(provide 'init-markdown) -;;; init-markdown.el ends diff --git a/tools/emacs.d/lisp/init-org.el b/tools/emacs.d/lisp/init-org.el deleted file mode 100644 index c748133..0000000 --- a/tools/emacs.d/lisp/init-org.el +++ /dev/null @@ -1,315 +0,0 @@ -;;; init-org.el - -;; Use =M-x org-mode-restart= to take effects -;; After =M-x eval-buffer= - -;; Org General - -(use-package org - :straight (:type built-in) ;; Tell straight to not install org - :custom - (org-log-done 'time) - (org-startup-indented nil) - ;; Use inline image - (org-startup-with-inline-images t) - (org-display-remote-inline-images 'cache) ; 预览网络图片 - - ;; Use LaTeX rendering - ;; (org-startup-with-latex-preview nil) - (org-image-actual-width 600) - ;; Conceal on markup markers - (org-hide-emphasis-markers t) - (org-directory "~/OrgFiles/") - (org-agenda-files (list (concat org-directory "tasks/"))) - (org-persist-directory (expand-file-name "org-persist" user-emacs-data)) - (org-archive-location "~/OrgFiles/.archive/%s_archive::") - (org-default-notes-file "~/OrgFiles/tasks/inbox.org") - (org-id-locations-file (expand-file-name ".org-id-locations" org-directory)) - (org-startup-folded "show2levels") - (org-log-into-drawer "LOGBOOK") - (org-pretty-entities t) - (org-src-fontify-natively t) - (org-src-tab-acts-natively t) ; Use TAB to indent inside source block - (org-src-preserve-indentation t) ; Prevent from auto-indent - (org-startup-folded 'showall) - :config - (require 'org-habit) - (with-eval-after-load 'org - (define-key org-mode-map (kbd "C-j") 'org-return-indent) - (evil-define-key 'normal org-mode-map (kbd "TAB") 'org-cycle)) - (evil-define-key 'normal org-mode-map (kbd "SPC a") 'org-agenda-list) ; TODO: Here Simulates the leader - ;; (setq org-emphasis-alist - ;; '(("*" (bold :foreground "cyan" )) - ;; ("/" (italic :foreground "green")) - ;; ("_" underline) - ;; ("=" (org-verbatim verbatim :background "maroon" :foreground "white")) - ;; ("~" (org-code verbatim :background "maroon" :foreground "white")) - ;; ("+" (:strike-through t)))) - (custom-set-faces - '(org-bold ((t (:weight bold :foreground unspecified)))) - '(org-italic ((t (:slant italic :foreground unspecified)))) - '(org-underline ((t (:underline t :foreground unspecified)))) - '(org-code ((t (:inherit fixed-pitch :background unspecified :foreground unspecified)))) - '(org-verbatim ((t (:inherit fixed-pitch :background unspecified :foreground unspecified)))) - '(org-strike-through ((t (:strike-through t :foreground unspecified))))) - - - (dolist (face '((org-level-1 . 1.6) - (org-level-2 . 1.4) - (org-level-3 . 1.2) - (org-level-4 . 1.1) - (org-level-5 . 1.0) - (org-level-6 . 1.0) - (org-level-7 . 1.0) - (org-level-8 . 1.0))) - (set-face-attribute (car face) nil :height (cdr face)))) - - -;; Org Styling - -;; Set Org Styles - - -;; Org Preview - -;; Better LaTeX preview - -(setq org-latex-preview-ltxpng-directory (expand-file-name "emacs/org/latex" xdg-cache-home)) -(setq org-preview-latex-default-process 'dvisvgm) -(setq org-format-latex-options (plist-put org-format-latex-options :scale 0.8)) - -;; org-appear: Show hidden emphasis markers -;; Just like Obsidian -(use-package org-appear - :hook - (org-mode . org-appear-mode)) - - -(use-package org-latex-impatient - :defer t - :hook (org-mode . org-latex-impatient-mode) - :init - (setq org-latex-impatient-tex2svg-bin - ;; location of tex2svg executable - "~/.local/share/pnpm/tex2svg")) - -(use-package org-fragtog - :after org - :hook (org-mode . org-fragtog-mode)) - -;; Pasting Images -;; Use =M-x org-download-clipboard= to paste image -;; Additional program required: magick -;; Windows: scoop install imagemagick -;; org-download config -(use-package org-download - :ensure t - :after org - :config - ;; Hardcoding the image dir - (setq-default org-download-image-dir (expand-file-name ".attach" org-directory)) - - (setq org-download-heading-lvl nil ; don't use heading when creating files - org-download-timestamp "%Y%m%d-%H%M%S" - org-download-screenshot-method "screencapture -i %s" ; for macOS only - org-download-backend 'curl) ; use curl to `download` image - - (org-download-enable) - - :bind (:map org-mode-map - ("C-c d c" . org-download-clipboard) ; 粘贴剪贴板内容 - ("C-c d s" . org-download-screenshot))) ; 截图 - - -;; For CJK users -;; Insert zero width space around the emphasis symbols, this might be useful for -;; languages that does not rely on space -(defun js0ny/insert-emphasis-with-zws (char) - (interactive "c") - (insert ?\u200B char) - (save-excursion (insert char ?\u200B))) - -(global-set-key (kbd "C-c b") (lambda () (interactive) (js0ny/insert-emphasis-with-zws ?*))) -(global-set-key (kbd "C-c i") (lambda () (interactive) (js0ny/insert-emphasis-with-zws ?/))) - -;; Pomodoro for org clock -(use-package org-pomodoro - :straight t - :bind (:map org-mode-map - ("C-c p" . org-pomodoro))) - - -(defun js0ny/org-pomodoro-resume-last-task () - "Clock in to the last task and start Pomodoro on it." - (interactive) - (let ((marker (car org-clock-history))) - (if marker - (progn - (org-with-point-at marker - (org-clock-in)) - (org-pomodoro)) - (message "No previous clock task found.")))) - -(use-package org-modern - :ensure t - :config - ;; (setopt org-modern-star 'replace - ;; org-modern-replace-stars '("§") - ;; org-modern-hide-stars "§") - (setopt org-modern-list '((?- . "•"))) - (setopt org-modern-timestamp '(" %Y-%m-%d " . " %H:%M ")) - (setopt org-modern-block-fringe nil) - -;; https://github.com/neoheartbeats/.emacs.d/blob/main/lisp/init-org.el#L126C1-L159C47 - (defun sthenno/org-modern-spacing () - "Adjust line-spacing for `org-modern' to correct svg display." - - ;; FIXME: This may not set properly - (setq-local line-spacing (cond ((eq major-mode #'org-mode) 0.20) - (t nil)))) - (add-hook 'org-mode-hook #'sthenno/org-modern-spacing) - - - ;; Hooks - (add-hook 'org-mode-hook #'org-modern-mode)) - -;; WARNING: This package will cause infinite recursion when initialising org -;; Test on 2025-03-14 Emacs 30 and Arch Linux -;(use-package mixed-pitch -; :hook -; (text-mode . org-mode)) - -;; Org Agenda - -(with-eval-after-load 'org-agenda - (evil-define-key 'motion org-agenda-mode-map - (kbd "n") #'org-agenda-next-line - (kbd "e") #'org-agenda-previous-line - (kbd "gn") #'org-agenda-next-item - (kbd "ge") #'org-agenda-previous-item - (kbd "N") #'org-agenda-priority-up - (kbd "E") #'org-agenda-priority-down - (kbd "i") #'evil-forward-char - (kbd ",") #'org-agenda-priority - (kbd "x") #'org-agenda-todo - (kbd "t") #'org-agenda-set-tags - (kbd "w") #'org-save-all-org-buffers - (kbd "ds") #'org-agenda-schedule - (kbd "dd") #'org-agenda-deadline - (kbd "$") #'org-agenda-archive - (kbd "!") #'org-agenda-toggle-deadlines - (kbd "cp") #'org-pomodoro - (kbd "vd") #'org-agenda-day-view - (kbd "vw") #'org-agenda-week-view - (kbd "vm") #'org-agenda-month-view - (kbd "vy") #'org-agenda-year-view - (kbd "v.") #'org-agenda-reset-view)) - -(evil-leader/set-key "A" #'org-agenda) - -(setq org-agenda-prefix-format '((agenda . " %i %-12:c%?-12t% s") - (todo . " %i %-12:c %e") - (tags . " %i %-12:c %e ") - (search . " %i %-12:c %e "))) - - -;; Org Babel - -;; Run source block with C-c C-c -;; Add supports for non-elisp langs -(use-package ob-python - :straight (:type built-in) ; Part of Org Mode - :after org) - -(use-package ob-C ;; C++ support is integrated in ob-C - :straight (:type built-in) ; Part of Org Mode - :after org) - -(org-babel-do-load-languages - 'org-babel-load-languages - '( - (python . t) ; No need to declare C/C++/emacs-lisp since is integrated - (shell . t) - (dot . t) - (ditaa . t) - )) -;; Don't ask me again when running source block -;; Use clang as default C/C++ Compiler on macOS and Windows -(setq org-confirm-babel-evaluate nil) -(if (not (eq system-type 'gnu/linux)) - (setq org-babel-C-compiler "clang")) - -(setq org-babel-default-header-args:C - '((:includes . " "))) - -(setq org-babel-default-header-args:C++ - '((:includes . " "))) - -;; Org Export - -;; icalendar - -(defun my/org-icalendar-filter-out-habits (entry backend info) - "Filter out Org entries that are marked as habits when exporting to iCalendar." - (when (and (eq backend 'icalendar) - (string-match ":STYLE:.*habit" (or entry ""))) - nil)) - -(add-hook 'org-export-filter-entry-functions #'my/org-icalendar-filter-out-habits) - - -(setq org-icalendar-use-scheduled '(event-if-todo event-if-not-todo)) -(setq org-icalendar-use-deadline '(event-if-todo event-if-not-todo)) -(setq org-icalendar-combined-agenda-file "~/Dropbox/org.ics") - - -;; ;; Integrate Emacs Timer with System Notifications -;; ;; 定义通知函数 -;; (defun js0ny/org-clock-notification (title message &optional icon) -;; "发送一个系统通知" -;; (alert message -;; :title title -;; :icon icon -;; :category 'org-clock)) - -;; ;; 添加定时器检查函数 -;; (defun js0ny/org-clock-check-timer () -;; "检查当前正在运行的 clock 是否到期" -;; (when (org-clocking-p) -;; (let* ((clocked-time (org-clock-get-clocked-time)) -;; (effort (org-duration-to-minutes -;; (or (org-entry-get (org-clock-is-active) "Effort") -;; "0"))) -;; (remaining (- effort clocked-time))) -;; (when (and (> effort 0) (<= remaining 0)) -;; (js0ny/org-clock-notification -;; "Org Clock 提醒" -;; (format "任务 '%s' 的预计时间已到!" -;; (org-clock-get-clock-string))))))) - -;; ;; 设置定时器,每分钟检查一次 -;; (run-with-timer 0 60 #'js0ny/org-clock-check-timer) - -;; 在 org-clock-in-hook 中添加检查 -;; (add-hook 'org-clock-in-hook -;; (lambda () -;; (let ((effort (org-entry-get (point) "Effort"))) -;; (when effort -;; (js0ny/org-clock-notification -;; "开始计时" -;; (format "开始计时任务: %s\n预计用时: %s" -;; (org-get-heading t t t t) -;; effort)))))) -(use-package org-node - :after org - :config (org-node-cache-mode)) - - -;; ;; 执行最后一行,重新生成解析表达式 -;; (with-eval-after-load 'org -;; ;; 添加常见全角标点 -;; (setf (nth 1 org-emphasis-regexp-components) -;; " \t\r\n,.:!?:;。,!?、」』)〉》」』〕〗】})]") -;; (org-set-emph-re 'org-emphasis-regexp-components org-emphasis-regexp-components)) - -(provide 'init-org) diff --git a/tools/emacs.d/lisp/init-package.el b/tools/emacs.d/lisp/init-package.el deleted file mode 100644 index 9befe21..0000000 --- a/tools/emacs.d/lisp/init-package.el +++ /dev/null @@ -1,68 +0,0 @@ -;;; init-package.el --- Package management setup using straight.el -*- lexical-binding: t -*- - -(setq straight-base-dir user-emacs-data) - -;; Bootstrap straight.el -(defvar bootstrap-version) -(let ((bootstrap-file - (expand-file-name - "straight/repos/straight.el/bootstrap.el" - (or (bound-and-true-p straight-base-dir) - user-emacs-directory))) - (bootstrap-version 7)) - (unless (file-exists-p bootstrap-file) - (with-current-buffer - (url-retrieve-synchronously - "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el" - 'silent 'inhibit-cookies) - (goto-char (point-max)) - (eval-print-last-sexp))) - (load bootstrap-file nil 'nomessage)) - -;; Use straight.el with use-package -(straight-use-package 'use-package) -(setq straight-use-package-by-default t) ;; Automatically use straight for all packages - -;; Ensure gnu-elpa-keyring-update (equivalent to your previous keyring update logic) -(use-package gnu-elpa-keyring-update) - - -;; Which Key - Prompt available commands -(use-package which-key - :ensure t - :init - (which-key-mode) - :custom - (which-key-idle-delay 0.1)) - -;; Dashboard -(use-package dashboard - ;; Open with :dashboard-open - :after evil - :bind (:map dashboard-mode-map - ;; Navigation - ("n" . dashboard-next-line) - ("e" . dashboard-previous-line) - ;; Buffer switching - ("H" . previous-buffer) - ("I" . next-buffer)) - :custom - (dashboard-center-content t) - :config - (dashboard-setup-startup-hook) - ;; Use Emacs mode to use number to navigate dashboard - ) - - -(use-package wakatime-mode - :ensure t - :custom - ;; Use expand-file-name to prevent from error parsing on windows-nt - (wakatime-cli-path (expand-file-name "~/.local/bin/wakatime")) - :config - (global-wakatime-mode) - ) - - -(provide 'init-package) -;;; init-package.el ends here diff --git a/tools/emacs.d/lisp/init-scratch.el b/tools/emacs.d/lisp/init-scratch.el deleted file mode 100644 index ec9bf2b..0000000 --- a/tools/emacs.d/lisp/init-scratch.el +++ /dev/null @@ -1,5 +0,0 @@ - -(setq initial-major-mode 'org-mode) - - -(provide 'init-scratch) diff --git a/tools/emacs.d/lisp/init-treesitter.el b/tools/emacs.d/lisp/init-treesitter.el deleted file mode 100644 index 0268024..0000000 --- a/tools/emacs.d/lisp/init-treesitter.el +++ /dev/null @@ -1,28 +0,0 @@ -;;; init-treesitter.el tree-sitter integration for emacs -;;; Reference: https://emacs.liujiacai.net/post/038-hello-treesitter/ -;;; Download: https://github.com/emacs-tree-sitter/tree-sitter-langs/releases/tag/0.12.268 - - -(add-to-list 'treesit-extra-load-path (expand-file-name "tree-sitter" user-emacs-data)) - -(setq major-mode-remap-alist - '((yaml-mode . yaml-ts-mode) - (sh-mode . bash-ts-mode) - (js-mode . js-ts-mode) - (css-mode . css-ts-mode) - (c-mode . c-ts-mode) - (c++-mode . c++-ts-mode) - (c-or-c++-mode . c-or-c++-ts-mode) - (python-mode . python-ts-mode) - (js-json-mode . json-ts-mode))) - -(add-to-list 'treesit-language-source-alist - '(hyprlang "https://github.com/tree-sitter-grammars/tree-sitter-hyprlang")) - -(use-package hyprlang-ts-mode - :ensure t - :custom - (hyprlang-ts-mode-indent-offset 4)) - - -(provide 'init-treesitter) diff --git a/tools/emacs.d/lisp/init-wayland.el b/tools/emacs.d/lisp/init-wayland.el deleted file mode 100644 index 64c6ca7..0000000 --- a/tools/emacs.d/lisp/init-wayland.el +++ /dev/null @@ -1,11 +0,0 @@ - -(when (getenv "WAYLAND_DISPLAY") - ;; Fix: Emacs nox does not have clipboard integration under wayland - (use-package xclip - :config - (setq xclip-program "wl-copy") - (setq xclip-select-enable-clipboard t) - (setq xclip-mode t) - (setq xclip-method (quote wl-copy)))) - -(provide 'init-wayland) diff --git a/tools/emacs.d/lisp/init-writer.el b/tools/emacs.d/lisp/init-writer.el deleted file mode 100644 index cbdb7b3..0000000 --- a/tools/emacs.d/lisp/init-writer.el +++ /dev/null @@ -1,8 +0,0 @@ - -;; TODO -(use-package flyspell) - -(use-package olivetti - :hook (olivetti-mode . org-mode)) - -(provide 'init-writer) diff --git a/tools/emacs.d/site-lisp b/tools/emacs.d/site-lisp deleted file mode 120000 index 4683114..0000000 --- a/tools/emacs.d/site-lisp +++ /dev/null @@ -1 +0,0 @@ -../doom/lisp/ \ No newline at end of file diff --git a/tools/emacs.d/snippets/org-mode/begin_quote b/tools/emacs.d/snippets/org-mode/begin_quote deleted file mode 100644 index 3c90e2b..0000000 --- a/tools/emacs.d/snippets/org-mode/begin_quote +++ /dev/null @@ -1,7 +0,0 @@ -# -*- mode: snippet -*- -# name: begin_quote -# key: quote -# -- -#+BEGIN_QUOTE -$1 -#+END_QUOTE diff --git a/tools/emacs.d/snippets/org-mode/begin_src b/tools/emacs.d/snippets/org-mode/begin_src deleted file mode 100644 index 7ed1d69..0000000 --- a/tools/emacs.d/snippets/org-mode/begin_src +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: begin_src -# key: src -# -- -#+BEGIN_SRC $1 -$2 -#+END_SRC - diff --git a/tools/emacs.d/snippets/org-mode/begin_src_elisp b/tools/emacs.d/snippets/org-mode/begin_src_elisp deleted file mode 100644 index e0c5f57..0000000 --- a/tools/emacs.d/snippets/org-mode/begin_src_elisp +++ /dev/null @@ -1,8 +0,0 @@ -# -*- mode: snippet -*- -# name: elisp -# key: elisp -# -- - -#+BEGIN_SRC emacs-lisp -$1 -#+END_SRC diff --git a/tools/fish/.gitignore b/tools/fish/.gitignore deleted file mode 100644 index 1784bfc..0000000 --- a/tools/fish/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -fish_variables -completions -functions/br.fish -functions/dotenv.fish diff --git a/tools/nvim/lsp/luals.lua b/tools/nvim/lsp/luals.lua deleted file mode 100644 index f59f77a..0000000 --- a/tools/nvim/lsp/luals.lua +++ /dev/null @@ -1,37 +0,0 @@ --- Lua ---[[ Installation -scoop install lua-language-server -brew install lua-language-server -sudo port install lua-language-server ---]] ---[[ Build: Ninja & C++17 Required -git clone https://github.com/LuaLS/lua-language-server --depth 1 -cd lua-language-server -./make.sh ---]] ---[[ Note: For building from source, wrapper script is required -Accompanied with a wrapper script -#!/bin/bash -exec "$HOME/.local/build/lua-language-server/bin/lua-language-server" "$@" ---]] -return { - cmd = { "lua-language-server" }, - root_markers = { - ".luarc.json", - ".luarc.jsonc", - ".luacheckrc", - ".stylua.toml", - "stylua.toml", - "selene.toml", - "selene.yml", - }, - filetypes = { "lua" }, - settings = { - Lua = { - hint = { - enable = true, - setType = true, - }, - }, - }, -} diff --git a/tools/nvim/lua/plugins/mod/dap-setup.lua b/tools/nvim/lua/plugins/mod/dap-setup.lua deleted file mode 100644 index 8b13789..0000000 --- a/tools/nvim/lua/plugins/mod/dap-setup.lua +++ /dev/null @@ -1 +0,0 @@ - diff --git a/tools/obsidian/.markdownlint.jsonc b/tools/obsidian/.markdownlint.jsonc deleted file mode 100644 index 3aacfb0..0000000 --- a/tools/obsidian/.markdownlint.jsonc +++ /dev/null @@ -1,34 +0,0 @@ -{ - "ul-style": { // MD004 - "style": "dash" // - - }, - "ul-indent": { // MD007 - "indent": 4 - }, - "no-hard-tabs": { - "ignore_code_languages": [ - "go" - ] - }, - "line-length": false, // MD013 - "no-missing-space-atx": false, // MD018, prevent from formatting `#tag` to `# tag` - "no-inline-html": { // MD033 - "allowed_elements": [ - "kbd", // keyboard key - "u", // underline - "sup", // superscript - "sub", // subscript - "center", // center text - "cursor", // Personal use - "font", // Font family - "iframe" // Embed Web content - ] - }, - // "fenced-code-language": { // MD040 - // }, - "first-line-h1": false, // MD041 - "code-block-style": false // MD046: This will parse LaTeX indentation as indented code block - // "code-block-style": { - // "style": "fenced" // MD046 - // } -} \ No newline at end of file diff --git a/tools/obsidian/latex-suite-snippet b/tools/obsidian/latex-suite-snippet deleted file mode 100644 index e76d877..0000000 --- a/tools/obsidian/latex-suite-snippet +++ /dev/null @@ -1,489 +0,0 @@ -[ - {trigger: "mk", replacement: "$$0$", options: "tA" - }, - {trigger: "dm", replacement: "$$\n$0\n$$", options: "tAw" - }, - {trigger: "beg", replacement: "\\begin{$0}\n$1\n\\end{$0}", options: "mA" - }, - // Dashes - // {trigger: "--", replacement: "–", options: "tA"}, - // {trigger: "–-", replacement: "—", options: "tA"}, - // {trigger: "—-", replacement: "---", options: "tA"}, - // Greek letters - {trigger: "@a", replacement: "\\alpha", options: "mA" - }, - {trigger: "@b", replacement: "\\beta", options: "mA" - }, - {trigger: "@g", replacement: "\\gamma", options: "mA" - }, - {trigger: "@G", replacement: "\\Gamma", options: "mA" - }, - {trigger: "@d", replacement: "\\delta", options: "mA" - }, - {trigger: "@D", replacement: "\\Delta", options: "mA" - }, - {trigger: "@e", replacement: "\\epsilon", options: "mA" - }, - {trigger: ":e", replacement: "\\varepsilon", options: "mA" - }, - {trigger: "@z", replacement: "\\zeta", options: "mA" - }, - {trigger: "@t", replacement: "\\theta", options: "mA" - }, - {trigger: "@T", replacement: "\\Theta", options: "mA" - }, - {trigger: ":t", replacement: "\\vartheta", options: "mA" - }, - {trigger: "@i", replacement: "\\iota", options: "mA" - }, - {trigger: "@k", replacement: "\\kappa", options: "mA" - }, - {trigger: "@l", replacement: "\\lambda", options: "mA" - }, - {trigger: "@L", replacement: "\\Lambda", options: "mA" - }, - {trigger: "@s", replacement: "\\sigma", options: "mA" - }, - {trigger: "@S", replacement: "\\Sigma", options: "mA" - }, - {trigger: "@u", replacement: "\\upsilon", options: "mA" - }, - {trigger: "@U", replacement: "\\Upsilon", options: "mA" - }, - {trigger: "@o", replacement: "\\omega", options: "mA" - }, - {trigger: "@O", replacement: "\\Omega", options: "mA" - }, - {trigger: "ome", replacement: "\\omega", options: "mA" - }, - {trigger: "Ome", replacement: "\\Omega", options: "mA" - }, - // Text environment - {trigger: "text", replacement: "\\text{$0}$1", options: "mA" - }, - {trigger: "\"", replacement: "\\text{$0}$1", options: "mA" - }, - // Basic operations - {trigger: "sr", replacement: "^{2}", options: "mA" - }, - {trigger: "cb", replacement: "^{3}", options: "mA" - }, - {trigger: "pow", replacement: "^{$0}$1", options: "mA" - }, - {trigger: "_", replacement: "_{$0}$1", options: "mA" - }, - {trigger: "sb", replacement: "_{$0}$1", options: "mA" - }, - {trigger: "sts", replacement: "_\\text{$0}", options: "mA" - }, - {trigger: "sq", replacement: "\\sqrt{ $0 }$1", options: "mA" - }, - {trigger: "//", replacement: "\\frac{$0}{$1}$2", options: "mA" - }, - {trigger: "ee", replacement: "e^{ $0 }$1", options: "mA" - }, - {trigger: "invs", replacement: "^{-1}", options: "mA" - }, - {trigger: /([A-Za-z - ])(\d)/, replacement: "[[0]]_{[[1]]}", options: "rmA", description: "Auto letter subscript", priority: -1 - }, - {trigger: /([^\\ - ])(exp|log|ln)/, replacement: "[[0]]\\[[1]]", options: "rmA" - }, - {trigger: "conj", replacement: "^{*}", options: "mA" - }, - {trigger: "Re", replacement: "\\mathrm{Re}", options: "mA" - }, - {trigger: "Im", replacement: "\\mathrm{Im}", options: "mA" - }, - {trigger: "bf", replacement: "\\mathbf{$0}", options: "mA" - }, - {trigger: "rm", replacement: "\\mathrm{$0}$1", options: "mA" - }, - // Linear algebra - {trigger: /([^\\ - ])(det)/, replacement: "[[0]]\\[[1]]", options: "rmA" - }, - {trigger: "trace", replacement: "\\mathrm{Tr}", options: "mA" - }, - // More operations - {trigger: "([a-zA-Z])hat", replacement: "\\hat{[[0]]}", options: "rmA" - }, - {trigger: "([a-zA-Z])bar", replacement: "\\bar{[[0]]}", options: "rmA" - }, - {trigger: "([a-zA-Z])dot", replacement: "\\dot{[[0]]}", options: "rmA", priority: -1 - }, - {trigger: "([a-zA-Z])ddot", replacement: "\\ddot{[[0]]}", options: "rmA", priority: 1 - }, - {trigger: "([a-zA-Z])tilde", replacement: "\\tilde{[[0]]}", options: "rmA" - }, - {trigger: "([a-zA-Z])und", replacement: "\\underline{[[0]]}", options: "rmA" - }, - {trigger: "([a-zA-Z])vec", replacement: "\\vec{[[0]]}", options: "rmA" - }, - {trigger: "([a-zA-Z]),\\.", replacement: "\\mathbf{[[0]]}", options: "rmA" - }, - {trigger: "([a-zA-Z])\\.,", replacement: "\\mathbf{[[0]]}", options: "rmA" - }, - {trigger: "\\\\(${GREEK}),\\.", replacement: "\\boldsymbol{\\[[0]]}", options: "rmA" - }, - {trigger: "\\\\(${GREEK})\\.,", replacement: "\\boldsymbol{\\[[0]]}", options: "rmA" - }, - {trigger: "hat", replacement: "\\hat{$0}$1", options: "mA" - }, - {trigger: "bar", replacement: "\\bar{$0}$1", options: "mA" - }, - {trigger: "dot", replacement: "\\dot{$0}$1", options: "mA", priority: -1 - }, - {trigger: "ddot", replacement: "\\ddot{$0}$1", options: "mA" - }, - {trigger: "cdot", replacement: "\\cdot", options: "mA" - }, - {trigger: "tilde", replacement: "\\tilde{$0}$1", options: "mA" - }, - {trigger: "und", replacement: "\\underline{$0}$1", options: "mA" - }, - {trigger: "vec", replacement: "\\vec{$0}$1", options: "mA" - }, - // More auto letter subscript - {trigger: /([A-Za-z - ])_(\d\d)/, replacement: "[[0]]_{[[1]]}", options: "rmA" - }, - {trigger: /\\hat{([A-Za-z - ]) - }(\d)/, replacement: "\\hat{[[0]]}_{[[1]]}", options: "rmA" - }, - {trigger: /\\vec{([A-Za-z - ]) - }(\d)/, replacement: "\\vec{[[0]]}_{[[1]]}", options: "rmA" - }, - {trigger: /\\mathbf{([A-Za-z - ]) - }(\d)/, replacement: "\\mathbf{[[0]]}_{[[1]]}", options: "rmA" - }, - {trigger: "xnn", replacement: "x_{n}", options: "mA" - }, - {trigger: "xii", replacement: "x_{i}", options: "mA" - }, - {trigger: "xjj", replacement: "x_{j}", options: "mA" - }, - {trigger: "xp1", replacement: "x_{n+1}", options: "mA" - }, - {trigger: "ynn", replacement: "y_{n}", options: "mA" - }, - {trigger: "yii", replacement: "y_{i}", options: "mA" - }, - {trigger: "yjj", replacement: "y_{j}", options: "mA" - }, - // Symbols - {trigger: "ooo", replacement: "\\infty", options: "mA" - }, - {trigger: "sum", replacement: "\\sum", options: "mA" - }, - {trigger: "prod", replacement: "\\prod", options: "mA" - }, - {trigger: "\\sum", replacement: "\\sum_{${0:i}=${1:1}}^{${2:N}} $3", options: "m" - }, - {trigger: "\\prod", replacement: "\\prod_{${0:i}=${1:1}}^{${2:N}} $3", options: "m" - }, - {trigger: "lim", replacement: "\\lim_{ ${0:n} \\to ${1:\\infty} } $2", options: "mA" - }, - {trigger: "+-", replacement: "\\pm", options: "mA" - }, - {trigger: "-+", replacement: "\\mp", options: "mA" - }, - {trigger: "...", replacement: "\\dots", options: "mA" - }, - {trigger: "nabl", replacement: "\\nabla", options: "mA" - }, - {trigger: "del", replacement: "\\nabla", options: "mA" - }, - {trigger: "xx", replacement: "\\times", options: "mA" - }, - {trigger: "**", replacement: "\\cdot", options: "mA" - }, - {trigger: "para", replacement: "\\parallel", options: "mA" - }, - {trigger: "===", replacement: "\\equiv", options: "mA" - }, - {trigger: "!=", replacement: "\\neq", options: "mA" - }, - {trigger: ">=", replacement: "\\geq", options: "mA" - }, - {trigger: "<=", replacement: "\\leq", options: "mA" - }, - {trigger: ">>", replacement: "\\gg", options: "mA" - }, - {trigger: "<<", replacement: "\\ll", options: "mA" - }, - {trigger: "simm", replacement: "\\sim", options: "mA" - }, - {trigger: "sim=", replacement: "\\simeq", options: "mA" - }, - {trigger: "prop", replacement: "\\propto", options: "mA" - }, - {trigger: "<->", replacement: "\\leftrightarrow ", options: "mA" - }, - {trigger: "->", replacement: "\\to", options: "mA" - }, - {trigger: "!>", replacement: "\\mapsto", options: "mA" - }, - {trigger: "=>", replacement: "\\implies", options: "mA" - }, - {trigger: "=<", replacement: "\\impliedby", options: "mA" - }, - {trigger: "and", replacement: "\\cap", options: "mA" - }, - {trigger: "orr", replacement: "\\cup", options: "mA" - }, - {trigger: "inn", replacement: "\\in", options: "mA" - }, - {trigger: "notin", replacement: "\\not\\in", options: "mA" - }, - {trigger: "\\\\\\", replacement: "\\setminus", options: "mA" - }, - {trigger: "sub=", replacement: "\\subseteq", options: "mA" - }, - {trigger: "sup=", replacement: "\\supseteq", options: "mA" - }, - {trigger: "eset", replacement: "\\emptyset", options: "mA" - }, - {trigger: "set", replacement: "\\{ $0 \\}$1", options: "mA" - }, - {trigger: "e\\xi sts", replacement: "\\exists", options: "mA", priority: 1 - }, - {trigger: "LL", replacement: "\\mathcal{L}", options: "mA" - }, - {trigger: "HH", replacement: "\\mathcal{H}", options: "mA" - }, - {trigger: "CC", replacement: "\\mathbb{C}", options: "mA" - }, - {trigger: "RR", replacement: "\\mathbb{R}", options: "mA" - }, - {trigger: "ZZ", replacement: "\\mathbb{Z}", options: "mA" - }, - {trigger: "NN", replacement: "\\mathbb{N}", options: "mA" - }, - // Handle spaces and backslashes - // Snippet variables can be used as shortcuts when writing snippets. - // For example, ${GREEK} below is shorthand for "alpha|beta|gamma|Gamma|delta|..." - // You can edit snippet variables under the Advanced snippet settings section. - {trigger: "([^\\\\])(${GREEK})", replacement: "[[0]]\\[[1]]", options: "rmA", description: "Add backslash before Greek letters" - }, - {trigger: "([^\\\\])(${SYMBOL})", replacement: "[[0]]\\[[1]]", options: "rmA", description: "Add backslash before symbols" - }, - // Insert space after Greek letters and symbols - {trigger: "\\\\(${GREEK}|${SYMBOL}|${MORE_SYMBOLS})([A-Za-z])", replacement: "\\[[0]] [[1]]", options: "rmA" - }, - {trigger: "\\\\(${GREEK}|${SYMBOL}) sr", replacement: "\\[[0]]^{2}", options: "rmA" - }, - {trigger: "\\\\(${GREEK}|${SYMBOL}) cb", replacement: "\\[[0]]^{3}", options: "rmA" - }, - {trigger: "\\\\(${GREEK}|${SYMBOL}) rd", replacement: "\\[[0]]^{$0}$1", options: "rmA" - }, - {trigger: "\\\\(${GREEK}|${SYMBOL}) hat", replacement: "\\hat{\\[[0]]}", options: "rmA" - }, - {trigger: "\\\\(${GREEK}|${SYMBOL}) dot", replacement: "\\dot{\\[[0]]}", options: "rmA" - }, - {trigger: "\\\\(${GREEK}|${SYMBOL}) bar", replacement: "\\bar{\\[[0]]}", options: "rmA" - }, - {trigger: "\\\\(${GREEK}|${SYMBOL}) vec", replacement: "\\vec{\\[[0]]}", options: "rmA" - }, - {trigger: "\\\\(${GREEK}|${SYMBOL}) tilde", replacement: "\\tilde{\\[[0]]}", options: "rmA" - }, - {trigger: "\\\\(${GREEK}|${SYMBOL}) und", replacement: "\\underline{\\[[0]]}", options: "rmA" - }, - // Derivatives and integrals - {trigger: "par", replacement: "\\frac{ \\partial ${0:y} }{ \\partial ${1:x} } $2", options: "m" - }, - {trigger: /pa([A-Za-z - ])([A-Za-z - ])/, replacement: "\\frac{ \\partial [[0]] }{ \\partial [[1]] } ", options: "rm" - }, - {trigger: "ddt", replacement: "\\frac{d}{dt} ", options: "mA" - }, - {trigger: /([^\\ - ])int/, replacement: "[[0]]\\int", options: "mA", priority: -1 - }, - {trigger: "\\int", replacement: "\\int $0 \\, d${1:x} $2", options: "m" - }, - {trigger: "dint", replacement: "\\int_{${0:0}}^{${1:1}} $2 \\, d${3:x} $4", options: "mA" - }, - {trigger: "oint", replacement: "\\oint", options: "mA" - }, - {trigger: "iint", replacement: "\\iint", options: "mA" - }, - {trigger: "iiint", replacement: "\\iiint", options: "mA" - }, - {trigger: "oinf", replacement: "\\int_{0}^{\\infty} $0 \\, d${1:x} $2", options: "mA" - }, - {trigger: "infi", replacement: "\\int_{-\\infty}^{\\infty} $0 \\, d${1:x} $2", options: "mA" - }, - // Trigonometry - {trigger: /([^\\ - ])(arcsin|sin|arccos|cos|arctan|tan|csc|sec|cot)/, replacement: "[[0]]\\[[1]]", options: "rmA", description: "Add backslash before trig funcs" - }, - {trigger: /\\(arcsin|sin|arccos|cos|arctan|tan|csc|sec|cot)([A-Za-gi-z - ])/, - replacement: "\\[[0]] [[1]]", options: "rmA", - description: "Add space after trig funcs. Skips letter h to allow sinh, cosh, etc." - }, - {trigger: /\\(sinh|cosh|tanh|coth)([A-Za-z - ])/, - replacement: "\\[[0]] [[1]]", options: "rmA", - description: "Add space after hyperbolic trig funcs" - }, - // Visual operations - {trigger: "U", replacement: "\\underbrace{ ${VISUAL} }_{ $0 }", options: "mA" - }, - {trigger: "O", replacement: "\\overbrace{ ${VISUAL} }^{ $0 }", options: "mA" - }, - {trigger: "B", replacement: "\\underset{ $0 }{ ${VISUAL} }", options: "mA" - }, - {trigger: "C", replacement: "\\cancel{ ${VISUAL} }", options: "mA" - }, - {trigger: "K", replacement: "\\cancelto{ $0 }{ ${VISUAL} }", options: "mA" - }, - {trigger: "S", replacement: "\\sqrt{ ${VISUAL} }", options: "mA" - }, - // Physics - {trigger: "kbt", replacement: "k_{B}T", options: "mA" - }, - {trigger: "msun", replacement: "M_{\\odot}", options: "mA" - }, - // Quantum mechanics - {trigger: "dag", replacement: "^{\\dagger}", options: "mA" - }, - {trigger: "o+", replacement: "\\oplus ", options: "mA" - }, - {trigger: "ox", replacement: "\\otimes ", options: "mA" - }, - {trigger: "bra", replacement: "\\bra{$0} $1", options: "mA" - }, - {trigger: "ket", replacement: "\\ket{$0} $1", options: "mA" - }, - {trigger: "brk", replacement: "\\braket{ $0 | $1 } $2", options: "mA" - }, - {trigger: "outer", replacement: "\\ket{${0:\\psi}} \\bra{${0:\\psi}} $1", options: "mA" - }, - // Chemistry - {trigger: "pu", replacement: "\\pu{ $0 }", options: "mA" - }, - {trigger: "cee", replacement: "\\ce{ $0 }", options: "mA" - }, - {trigger: "he4", replacement: "{}^{4}_{2}He ", options: "mA" - }, - {trigger: "he3", replacement: "{}^{3}_{2}He ", options: "mA" - }, - {trigger: "iso", replacement: "{}^{${0:4}}_{${1:2}}${2:He}", options: "mA" - }, - // Environments - {trigger: "pmat", replacement: "\\begin{pmatrix}\n$0\n\\end{pmatrix}", options: "MA" - }, - {trigger: "bmat", replacement: "\\begin{bmatrix}\n$0\n\\end{bmatrix}", options: "MA" - }, - {trigger: "Bmat", replacement: "\\begin{Bmatrix}\n$0\n\\end{Bmatrix}", options: "MA" - }, - {trigger: "vmat", replacement: "\\begin{vmatrix}\n$0\n\\end{vmatrix}", options: "MA" - }, - {trigger: "Vmat", replacement: "\\begin{Vmatrix}\n$0\n\\end{Vmatrix}", options: "MA" - }, - {trigger: "matrix", replacement: "\\begin{matrix}\n$0\n\\end{matrix}", options: "MA" - }, - {trigger: "pmat", replacement: "\\begin{pmatrix}$0\\end{pmatrix}", options: "nA" - }, - {trigger: "bmat", replacement: "\\begin{bmatrix}$0\\end{bmatrix}", options: "nA" - }, - {trigger: "Bmat", replacement: "\\begin{Bmatrix}$0\\end{Bmatrix}", options: "nA" - }, - {trigger: "vmat", replacement: "\\begin{vmatrix}$0\\end{vmatrix}", options: "nA" - }, - {trigger: "Vmat", replacement: "\\begin{Vmatrix}$0\\end{Vmatrix}", options: "nA" - }, - {trigger: "matrix", replacement: "\\begin{matrix}$0\\end{matrix}", options: "nA" - }, - {trigger: "cases", replacement: "\\begin{cases}\n$0\n\\end{cases}", options: "mA" - }, - {trigger: "align", replacement: "\\begin{align}\n$0\n\\end{align}", options: "mA" - }, - {trigger: "array", replacement: "\\begin{array}\n$0\n\\end{array}", options: "mA" - }, - // Brackets - {trigger: "avg", replacement: "\\langle $0 \\rangle $1", options: "mA" - }, - {trigger: "norm", replacement: "\\lvert $0 \\rvert $1", options: "mA", priority: 1 - }, - {trigger: "Norm", replacement: "\\lVert $0 \\rVert $1", options: "mA", priority: 1 - }, - {trigger: "ceil", replacement: "\\lceil $0 \\rceil $1", options: "mA" - }, - {trigger: "floor", replacement: "\\lfloor $0 \\rfloor $1", options: "mA" - }, - {trigger: "mod", replacement: "|$0|$1", options: "mA" - }, - {trigger: "(", replacement: "(${VISUAL})", options: "mA" - }, - {trigger: "[", replacement: "[${VISUAL}]", options: "mA" - }, - {trigger: "{", replacement: "{${VISUAL}}", options: "mA" - }, - {trigger: "(", replacement: "($0)$1", options: "mA" - }, - {trigger: "{", replacement: "{$0}$1", options: "mA" - }, - {trigger: "[", replacement: "[$0]$1", options: "mA" - }, - {trigger: "lr(", replacement: "\\left( $0 \\right) $1", options: "mA" - }, - {trigger: "lr{", replacement: "\\left\\{ $0 \\right\\} $1", options: "mA" - }, - {trigger: "lr[", replacement: "\\left[ $0 \\right] $1", options: "mA" - }, - {trigger: "lr|", replacement: "\\left| $0 \\right| $1", options: "mA" - }, - {trigger: "lra", replacement: "\\left< $0 \\right> $1", options: "mA" - }, - // User defined - {trigger: "b\\otimes ed", replacement: "\\boxed{$1}", options: "mA" - }, - {trigger: "\\disp", replacement: "\\displaystyle $0", options: "mA" - }, - // Misc - // Automatically convert standalone letters in text to math (except a, A, I). - // (Un-comment to enable) - // {trigger: /([^'])\b([B-HJ-Zb-z])\b([\n\s.,?!:'])/, replacement: "[[0]]$[[1]]$[[2]]", options: "tA"}, - // Automatically convert Greek letters in text to math. - // {trigger: "(${GREEK})([\\n\\s.,?!:'])", replacement: "$\\[[0]]$[[1]]", options: "rtAw"}, - // Automatically convert text of the form "x=2" and "x=n+1" to math. - // {trigger: /([A-Za-z]=\d+)([\n\s.,?!:'])/, replacement: "$[[0]]$[[1]]", options: "rtAw"}, - // {trigger: /([A-Za-z]=[A-Za-z][+-]\d+)([\n\s.,?!:'])/, replacement: "$[[0]]$[[1]]", options: "tAw"}, - // Snippet replacements can have placeholders. - {trigger: "tayl", replacement: "${0:f}(${1:x} + ${2:h}) = ${0:f}(${1:x}) + ${0:f}'(${1:x})${2:h} + ${0:f}''(${1:x}) \\frac{${2:h}^{2}}{2!} + \\dots$3", options: "mA", description: "Taylor expansion" - }, - // Snippet replacements can also be JavaScript functions. - // See the documentation for more information. - {trigger: /iden(\d)/, replacement: (match) => { - const n = match[ - 1 - ]; - - let arr = []; - for (let j = 0; j < n; j++) { - arr[j - ] = []; - for (let i = 0; i < n; i++) { - arr[j - ][i - ] = (i === j) ? 1 : 0; - } - } - - let output = arr.map(el => el.join(" & ")).join(" \\\\\n"); - output = `\\begin{pmatrix - }\n${output - }\n\\end{pmatrix - }`; - return output; - }, options: "mA", description: "N x N identity matrix" - }, -] diff --git a/tools/obsidian/obsidian.vimrc b/tools/obsidian/obsidian.vimrc deleted file mode 100644 index db4a0cc..0000000 --- a/tools/obsidian/obsidian.vimrc +++ /dev/null @@ -1,111 +0,0 @@ -" Put this in OBSIDIAN_VAULT/.obsidian.vimrc -set clipboard=unnamed " Sync with System Clipboard - -" Colemak vim-like -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 - -" Y to yank to end of line -noremap Y y$ - -""" Visual mode surrounding -exmap addbold obcommand editor:toogle-bold -exmap additalic obcommand editor:toogle-italic -exmap addhighlight obcommand editor:toogle-highlight -exmap addcode obcommand editor:toogle-code -exmap adddel obcommand editor:toogle-strikethrough -vnoremap ~ :adddel " Add delete to selection -vnoremap ` c`"` " editor:toogle-code is buggy -vnoremap * :addbold " Add bold to selection -vnoremap _ :additalic " Add italic to selection -vnoremap = :addhighlight " Add highlight to selection - -""" Commands -exmap write editor:save-file -exmap w editor:save-file -exmap q workspace:close-tab-group - -exmap prevtab obcommand workspace:previous-tab -exmap nexttab obcommand workspace:next-tab -nnoremap H :prevtab -nnoremap I :nexttab - -exmap prevhist obcommand app:go-back -exmap nexthist obcommand app:go-forward -nnoremap gh :prevhist -nnoremap gi :nexthist - -exmap reload :source .obsidian.vimrc - -unmap -exmap vsplit obcommand workspace:split-vertical -exmap hsplit obcommand workspace:split-horizontal -map | :vsplit -map - :hsplit -" map bd - -exmap chat obcommand obsidian-custom-frames:open-custom-frames-chatgpt -map ai :chat - - - -""" g-commands -exmap tsource obcommand editor:toggle-source -exmap tpreview obcommand markdown:toggle-preview -nnoremap gs :tsource -nnoremap gp :tpreview - -exmap wl obcommand editor:focus-left -exmap wr obcommand editor:focus-right -exmap wt obcommand editor:focus-top -exmap wb obcommand editor:focus-bottom - -map h :wl -map i :wr -map n :wb -map e :wt - -exmap FoldToggle obcommand editor:toggle-fold -exmap FoldLess obcommand editor:fold-less -exmap FoldMore obcommand editor:fold-more -exmap FoldAll obcommand editor:fold-all -exmap UnfoldAll obcommand editor:unfold-all -nnoremap za :FoldToggle -nnoremap zr :FoldLess -nnoremap zm :FoldMore -nnoremap zM :FoldAll -nnoremap zR :UnfoldAll - -exmap switchany obcommand darlal-switcher-plus:switcher-plus:open -exmap switchcmd obcommand darlal-switcher-plus:switcher-plus:open-commands -exmap switchrecent obcommand darlal-switcher-plus:switcher-plus:open-related-items -map :switchany -map : :switchcmd -map fr :switchrecent - -" b : +buffer -exmap bd obcommand -exmap DeleteOthers obcommand workspace:close-others -map bd :bd -map bX :DeleteOthers - -" m : +major/markdown -exmap addCallout obcommand editor:insert-callout -map mb :addbold -map mi :additalic -map mc :addcode -map md :adddel -map mh :addhighlight -map mp :tpreview -map mo :addCallout diff --git a/tools/yazi/keymap.toml b/tools/yazi/keymap.toml deleted file mode 100644 index 31fb743..0000000 --- a/tools/yazi/keymap.toml +++ /dev/null @@ -1,70 +0,0 @@ -# A TOML linter such as https://taplo.tamasfe.dev/ can use this schema to validate your config. -# If you encounter any issues, please make an issue at https://github.com/yazi-rs/schemas. -"$schema" = "https://yazi-rs.github.io/schemas/prepend_keymap.json" - -[mgr] - -prepend_keymap = [ - - # Hopping - { on = "e", run = "arrow -1", desc = "Move cursor up" }, - { on = "n", run = "arrow 1", desc = "Move cursor down" }, - { on = "i", run = "enter", desc = "Enter the child directory" }, - { on = "I", run = "forward", desc = "Go forward to the next directory" }, - - # Seeking - { on = "E", run = "seek -5", desc = "Seek up 5 units in the preview" }, - { on = "N", run = "seek 5", desc = "Seek down 5 units in the preview" }, - - # Find - { on = "k", run = "find_arrow", desc = "Go to the next found" }, - { on = "K", run = "find_arrow --previous", desc = "Go to the previous found" }, - { on = ["g", "p"], run = "cd ~/Pictures", desc = "Go ~/Pictures/"} - - -] - -[tasks] - -prepend_keymap = [ - { on = "e", run = "arrow -1", desc = "Move cursor up" }, - { on = "n", run = "arrow 1", desc = "Move cursor down" }, -] - -[select] - -prepend_keymap = [ - { on = "e", run = "arrow -1", desc = "Move cursor up" }, - { on = "n", run = "arrow 1", desc = "Move cursor down" }, -] - -[input] - -prepend_keymap = [ - # Mode - { on = "l", run = "insert", desc = "Enter insert mode" }, - { on = "L", run = [ "move -999", "insert" ], desc = "Move to the BOL, and enter insert mode" }, - { on = "i", run = "move 1", desc = "Move forward a character" }, - { on = "j", run = "forward --end-of-word", desc = "Move forward to the end of the current or next word" }, -] - -[confirm] -prepend_keymap = [ - { on = "N", run = "close", desc = "Cancel the confirm" }, - - { on = "e", run = "arrow -1", desc = "Move cursor up" }, - { on = "n", run = "arrow 1", desc = "Move cursor down" }, -] - -[completion] - -prepend_keymap = [ -] - -[help] - -prepend_keymap = [ - # Navigation - { on = "e", run = "arrow -1", desc = "Move cursor up" }, - { on = "n", run = "arrow 1", desc = "Move cursor down" }, -] diff --git a/tools/yazi/theme.toml b/tools/yazi/theme.toml deleted file mode 120000 index 8235aba..0000000 --- a/tools/yazi/theme.toml +++ /dev/null @@ -1 +0,0 @@ -light.toml \ No newline at end of file diff --git a/tools/zed/keymap.json b/tools/zed/keymap.json deleted file mode 100644 index 041288d..0000000 --- a/tools/zed/keymap.json +++ /dev/null @@ -1,112 +0,0 @@ -// $DOTFILES/tools/zed/keymaps.json -// Date: 2025-01-25 -// Author: js0ny -// Description: Zed keymaps - -// Location: -// GNU/Linux: ~/.config/zed/keymaps.json -// Windows: %APPDATA%\Zed\keymaps.json -// Linking: (link the whole directory) -// ln -sf $DOTFILES/tools/zed ~/.config/zed - -// Zed keymap - -// - -// For information on binding keys, see the Zed - -// documentation: https://zed.dev/docs/key-bindings - -// - -// To see the default key bindings run `zed: open default keymap` - -// from the command palette. - -// https://github.com/zed-industries/zed/tree/main/assets/keymaps -// Sequence: https://zed.dev/docs/key-bindings#remapping-keys -[ - { - "context": "Workspace", - - "bindings": { - // "shift shift": "file_finder::Toggle" - } - }, - - { - "context": "Editor", - - "bindings": { - // "j k": ["workspace::SendKeystrokes", "escape"] - "alt-e": "editor::AddSelectionAbove", // Insert Cursor Above - "alt-n": "editor::AddSelectionBelow" // Insert Cursor Below - } - }, - { - "context": "vim_mode == normal || vim_mode == visual", - - "bindings": { - "N": "vim::JoinLines", - "l": "vim::InsertBefore", - "L": "vim::InsertFirstNonWhitespace" - } - }, - { - "context": "vim_mode == visual || vim_mode == operator", - - "bindings": { - "H": "vim::StartOfLine", - "I": "vim::EndOfLine" - } - }, - { - "context": "vim_mode == normal", - - "bindings": { - "H": "pane::ActivatePreviousItem", - "I": "pane::ActivateNextItem" - } - }, - { - "context": "GitPanel || ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView", - - "bindings": { - "space space": "file_finder::Toggle", - "space ;": "command_palette::Toggle", - "space f c": "zed::OpenSettings", - "space f e c": "zed::OpenSettings", - "space f t": "project_panel::ToggleFocus", - "ctrl-w h": "workspace::ActivatePaneLeft", - "ctrl-w i": "workspace::ActivatePaneRight", - "ctrl-w e": "workspace::ActivatePaneUp", - "ctrl-w n": "workspace::ActivatePaneDown" - } - }, - { - "context": "vim_mode == normal || vim_mode == visual || vim_mode == operator", - - "bindings": { - "n": "vim::Down", - "e": "vim::Up", - "i": "vim::Right", - "k": "search::SelectNextMatch", - "K": "search::SelectPreviousMatch", - "N": ["workspace::SendKeystrokes", "n n n n n"], - "E": ["workspace::SendKeystrokes", "e e e e e"], - "Y": ["workspace::SendKeystrokes", "y $"] - } - }, - { - "context": "ProjectPanel && not_editing", - - "bindings": { - "n": "menu::SelectNext", - "e": "menu::SelectPrevious", - "i": "project_panel::ExpandSelectedEntry", - "A": "project_panel::NewDirectory", - "a": "project_panel::NewFile", - "d": "project_panel::Delete" - } - } -] diff --git a/tools/zed/keymap_backup.json b/tools/zed/keymap_backup.json deleted file mode 100644 index 516848a..0000000 --- a/tools/zed/keymap_backup.json +++ /dev/null @@ -1,109 +0,0 @@ -// $DOTFILES/tools/zed/keymaps.json -// Date: 2025-01-25 -// Author: js0ny -// Description: Zed keymaps - -// Location: -// GNU/Linux: ~/.config/zed/keymaps.json -// Windows: %APPDATA%\Zed\keymaps.json -// Linking: (link the whole directory) -// ln -sf $DOTFILES/tools/zed ~/.config/zed - -// Zed keymap - -// - -// For information on binding keys, see the Zed - -// documentation: https://zed.dev/docs/key-bindings - -// - -// To see the default key bindings run `zed: open default keymap` - -// from the command palette. - -// https://github.com/zed-industries/zed/tree/main/assets/keymaps -// Sequence: https://zed.dev/docs/key-bindings#remapping-keys -[ - { - "context": "Workspace", - - "bindings": { - // "shift shift": "file_finder::Toggle" - } - }, - - { - "context": "Editor", - - "bindings": { - // "j k": ["workspace::SendKeystrokes", "escape"] - } - }, - { - "context": "vim_mode == normal || vim_mode == visual", - - "bindings": { - "N": "vim::JoinLines", - "l": "vim::InsertBefore", - "L": "vim::InsertFirstNonWhitespace" - } - }, - { - "context": "vim_mode == visual || vim_mode == operator", - - "bindings": { - "H": "vim::StartOfLine", - "I": "vim::EndOfLine" - } - }, - { - "context": "vim_mode == normal", - - "bindings": { - "H": "pane::ActivatePrevItem", - "I": "pane::ActivateNextItem" - } - }, - { - "context": "GitPanel || ProjectPanel || CollabPanel || OutlinePanel || ChatPanel || VimControl || EmptyPane || SharedScreen || MarkdownPreview || KeyContextView", - - "bindings": { - "space space": "file_finder::Toggle", - "space ;": "command_palette::Toggle", - "space f c": "zed::OpenSettings", - "space f e c": "zed::OpenSettings", - "space f t": "project_panel::ToggleFocus", - "ctrl-w h": "workspace::ActivatePaneLeft", - "ctrl-w i": "workspace::ActivatePaneRight", - "ctrl-w e": "workspace::ActivatePaneUp", - "ctrl-w n": "workspace::ActivatePaneDown" - } - }, - { - "context": "vim_mode == normal || vim_mode == visual || vim_mode == operator", - - "bindings": { - "n": "vim::Down", - "e": "vim::Up", - "i": "vim::Right", - "k": "search::SelectNextMatch", - "K": "search::SelectPrevMatch", - "N": ["workspace::SendKeystrokes", "n n n n n"], - "E": ["workspace::SendKeystrokes", "e e e e e"] - } - }, - { - "context": "ProjectPanel && not_editing", - - "bindings": { - "n": "menu::SelectNext", - "e": "menu::SelectPrev", - "i": "project_panel::ExpandSelectedEntry", - "A": "project_panel::NewDirectory", - "a": "project_panel::NewFile", - "d": "project_panel::Delete" - } - } -]