Compare commits

...
7 Commits
Author SHA1 Message Date
Tri Vo Khac da6f073bdc fix(zshrc): set up aliases during binaries loading 2024-07-25 13:16:56 +07:00
Tri Vo Khac 5ed0cba195 update: fastfetch config 2024-07-20 20:39:25 +07:00
Tri Vo Khac 5263d1f693 update: optimize binary loading 2024-07-05 00:46:20 +07:00
Tri Vo Khac 406c0a5d6a feat: add fzf tab plugin 2024-07-04 23:03:54 +07:00
Tri Vo Khac 31b2255fbe update(aliases): add lsd 2024-07-04 23:03:26 +07:00
Tri Vo Khac 398aa1e864 update:
- remove codium
- remove unnecessary exports
- add micro and fnm binanry
- fix cd + tab issue
2024-07-04 22:06:54 +07:00
Tri Vo Khac 885a795aa5 refactor: use zinit 2024-07-04 17:49:07 +07:00
10 changed files with 82 additions and 475 deletions

No files matched your search

@@ -1 +0,0 @@
[]
@@ -1,87 +0,0 @@
{
"editor.acceptSuggestionOnEnter": "on",
"editor.accessibilitySupport": "off",
"editor.bracketPairColorization.enabled": true,
"editor.colorDecorators": true,
"editor.cursorBlinking": "smooth",
"editor.cursorSmoothCaretAnimation": "on",
"editor.fontFamily": "JetBrainsMono Nerd Font",
"editor.fontLigatures": true,
"editor.formatOnPaste": false,
"editor.formatOnSave": false,
"editor.formatOnType": false,
"editor.largeFileOptimizations": false,
"editor.linkedEditing": true,
"editor.quickSuggestions": {
"strings": true
},
"editor.rulers": [
80
],
"editor.semanticHighlighting.enabled": "configuredByTheme",
"editor.smoothScrolling": true,
"editor.suggestSelection": "first",
"editor.tabSize": 2,
"emmet.includeLanguages": {
"postcss": "css"
},
"eslint.format.enable": true,
"explorer.fileNesting.enabled": false,
"files.eol": "\n",
"files.exclude": {},
"files.simpleDialog.enable": true,
"files.trimTrailingWhitespace": true,
"json.maxItemsComputed": 100000,
"search.searchOnType": false,
"security.workspace.trust.untrustedFiles": "open",
"telemetry.telemetryLevel": "off",
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.defaultProfile.linux": "zsh",
"terminal.integrated.defaultProfile.windows": "PowerShell Core",
"terminal.integrated.fontFamily": "JetBrainsMono Nerd Font",
"terminal.integrated.gpuAcceleration": "on",
"terminal.integrated.persistentSessionReviveProcess": "never",
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.updateImportsOnFileMove.enabled": "always",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"window.autoDetectColorScheme": false,
"workbench.editor.preferHistoryBasedLanguageDetection": true,
"workbench.list.smoothScrolling": true,
"workbench.startupEditor": "none",
"git.autofetch": true,
"css.validate": false,
"diffEditor.ignoreTrimWhitespace": false,
"files.watcherExclude": {
// "**/public/**": true
},
"search.exclude": {
// "**/public": true
},
"editor.inlineSuggest.enabled": false,
"git.ignoreRebaseWarning": true,
"[vue]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"vue.complete.casing.props": "kebab",
"vue.complete.casing.tags": "kebab",
"vsicons.dontShowNewVersionMessage": true,
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"git.enableSmartCommit": true,
"syncSettings.resources": [
"extensions",
"keybindings",
"settings",
"snippets",
"uiState"
],
"workbench.iconTheme": "vscode-icons",
"editor.fontSize": 14
}
-8
View File
@@ -1,8 +0,0 @@
{
"extensionsGallery": {
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"itemUrl": "https://marketplace.visualstudio.com/items",
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
"controlUrl": ""
}
}
-323
View File
@@ -1,323 +0,0 @@
# Fastfetch configuration
# Write every argument in different lines.
# Direct arguments will overwrite the corresponding ones in this file.
# Argument keys are not case sensitive.
# Whitespaces are trimmed at the beginning and the end.
# Empty lines or lines starting with # are ignored.
# This file was shipped with 1.7.2.
# Use fastfetch --print-config-user > ~/.config/fastfetch/config.conf to overwrite this file with the current defaults
# Below some often usefull options are listed. Uncomment and modify them so they take affect.
# Note that there are a lot more options than the ones listed here, take a look at "fastfetch --help".
# Of course all of them can be made persistent here too.
# Config option:
# Load additional config files.
# Some are shipped with fastfetch, list them with "fastfetch --list-presets".
# Must be a path to a config file or the name of a shipped preset.
# The config file is completly loaded before continuing in the current file, so the placement of this option matters, as later options overwrite already set ones.
# Can be used multiple times to load multiple config files / presets.
#--load-config /path/to/config.txt
# Structure option:
# Sets the modules to use and their order.
# Must be a list of module names, separated by colons.
# List available modules with "fastfetch --list-modules".
# Get the default structure with "fastfetch --print-structure".
#--structure Title:Separator:OS:Host:Kernel:Uptime:Packages:Shell:Resolution:DE:WM:WMTheme:Theme:Icons:Font:Cursor:Terminal:TerminalFont:CPU:GPU:Memory:Disk:Battery:Locale:Break:Colors
# Multithreading option:
# Sets if fastfetch should use multiple threads to detect the values.
# Must be true or false.
# Default is true.
#--multithreading true
# Slow operations option:
# Sets if fastfetch is allowed to use known slow operations to detect more / better values.
# Must be true or false.
# Default is false.
#--allow-slow-operations false
# Linewrap option:
# Sets if fastfetch should disable linewrap during the run.
# Must be true or false.
# Default is true.
#--disable-linewrap true
# Cursor option:
# Sets if fastfetch should hide the console cursor during the run.
# Must be true or false.
# Default is true.
#--hide-cursor true
# Logo option:
# Sets the logo to use.
# List available logos with "fastfetch --list-logos".
# Print available logos with "fastfetch --print-logos".
# Must be the name of an available logo or a path to a text file containing a custom logo.
# Default is the current distribution.
#--logo arch
# Logo type option:
# Sets the logo type to use.
# Must be auto, builtin, file, raw, sixel, kitty or chafa.
# Default is auto.
#--logo-type auto
# Logo width option:
# Sets the width of the logo (in characters) if the logo is an image.
# Must be a positive integer.
# Default is 65.
#--logo-width 65
# Logo height option:
# Sets the height of the logo (in characters) if the logo is an image.
# Must be a positive integer.
# Default is 0 (keeps aspect ration).
#--logo-height 0
# Logo color options:
# Overwrite a color in the logo. Also works for user provided logos.
# In the user logo, they replace $[1-9]. Use $$ to print a single $ sign.
# Must be linux console color codes or the name of a color.
# Default is the one specified by the logo.
# Use "fastfetch --help color" to learn more and see examples.
# Valid index range is [1-9].
#--logo-color-1 red
#--logo-color-2 32
# [...]
#--logo-color-9 yellow
# Logo padding option:
# Adds a padding to the left and the right side of the logo.
# Must be a positive integer.
# Default is 0.
#--logo-padding 0
# Logo padding left option:
# Adds a padding to the left side of the logo.
# Must be a positive integer.
# Default is 0.
#--logo-padding-left 0
# Logo padding right option:
# Adds a padding to the right side of the logo.
# Must be a positive integer.
# Default is 0.
#--logo-padding-right 0
# Logo print remaining option:
# Sets if the remaining logo should be printed, it is has more lines than modules to show.
# Must be true or false.
# Default is true.
#--logo-print-remaining true
# Color keys option:
# Sets the color of the keys.
# Must be linux console color codes or the name of a color.
# Default is the key color of the logo.
# Use "fastfetch --help color" to learn more and see examples.
#--color-keys magenta
# Color title option:
# Sets the color of the title.
# Must be linux console color codes or the name of a color.
# Default is the title color of the logo.
# Use "fastfetch --help color" to learn more and see examples.
#--color-title magenta
# Binary prefix option:
# Sets the binary prefix to use.
# Must be a IEC, SI or JEDEC.
# Default is IEC.
#--binary-prefix IEC
# Title FQDN option:
# Sets if the title should use the fully qualified domain name.
# Must be true or false.
# Default is false.
#--title-fqdn false
# Separator option:
# Sets the string placed between a key and its value.
# Can be any string.
# Default is ": ".
#--separator ": "
# Separator string option:
# Sets the string printed by the "separator" module (usually between title and rest of output)
# Must be any string. It is repated / cut to fit perfectly.
# Default is "-"
#--separator-string -
# Public IP timeout option:
# Sets the time to wait for the public ip server to respond.
# Must be a positive integer.
# Default is 0 (disabled).
#--public-ip-timeout 0
# OS file option
# Sets the path to the file containing the operating system information.
# Should be a valid path to an existing file.
# Note that you might need to run fastfetch with --recache once for it to take affect.
# Default is /etc/os-release.
#--os-file /etc/os-release
# Player name option
# Sets the name of the player. This is also used in song detection
# Must be the exact name of the player or a dbus address (e.g. org.mpris.MediaPlayer2.spotify)
# Default is the first match starting with org.mpris.MediaPlayer2.
#--player-name spotify
# Escape bedrock option
# Sets if fastfetch should escape the bedrock jail, if it detectes that it is running in one
# Must be true or false.
# Default is true.
#--escape-bedrock true
# GL option
# Sets with opengl context creation library to use
# Must be either auto, egl, glx or osmesa
# Default is auto.
#--gl auto
# Key options:
# Sets the displayed key of a module
# Can be any string. Some of theme take an argument like a format string. See "fastfetch --help format" for help.
#--os-key OS
#--host-key Host
#--kernel-key Kernel
#--uptime-key Uptime
#--processes-key Processes
#--packages-key Packages
#--shell-key Shell
#--resolution-key Resolution {1}
#--de-key DE
#--wm-key WM
#--wm-theme-key WM Theme
#--theme-key Theme
#--icons-key Icons
#--font-key Font
#--cursor-key Cursor
#--terminal-key Terminal
#--terminal-font-key Terminal Font
#--cpu-key CPU
#--cpu-usage-key CPU Usage
#--gpu-key GPU {1}
#--memory-key Memory
#--swap-key Swap
#--disk-key Disk ({1})
#--battery-key Battery {1}
#--locale-key Locale
#--local-ip-key Local IP ({1})
#--public-ip-key Public IP
#--player-key Media Player
#--song-key Song
#--datetime-key Date Time
#--vulkan-key Vulkan
#--opengl-key OpenGL
#--opencl-key OpenCL
# Format options:
# Sets the format string for module values.
# For information on format strings, see "fastfetch --help format".
# To see the parameter they take and their default value, see "fastfetch --help *-format", e.g. "fastfetch --help os-format".
# An empty format string (As they are currently below) will behave as if it was not set.
#--os-format
#--host-format
#--kernel-format
#--uptime-format
#--processes-format
#--packages-format
#--shell-format
#--resolution-format
#--de-format
#--wm-format
#--wm-theme-format
#--theme-format
#--icons-format
#--font-format
#--cursor-format
#--terminal-format
#--terminal-font-format
#--cpu-format
#--cpu-usage-format
#--gpu-format
#--memory-format
#--swap-format
#--disk-format
#--battery-format
#--locale-format
#--local-ip-format
#--public-ip-format
#--player-format
#--song-format
#--datetime-format
#--vulkan-format
#--opengl-format
#--opencl-format
# Error options:
# Sets the format string to use if an error occured
# For information on format strings, see "fastfetch --help format".
# Each of them take the error as first and only argument.
# If one of them is set, the module will appear, even if --show-errors is not given.
#--os-error
#--host-error
#--kernel-error
#--uptime-error
#--processes-error
#--packages-error
#--shell-error
#--resolution-error
#--de-error
#--wm-error
#--wm-theme-error
#--theme-error
#--icons-error
#--font-error
#--cursor-error
#--terminal-error
#--terminal-font-error
#--cpu-error
#--cpu-usage-error
#--gpu-error
#--memory-error
#--swap-error
#--disk-error
#--battery-error
#--locale-error
#--local-ip-error
#--public-ip-error
#--player-error
#--song-error
#--datetime-error
#--vulkan-error
#--opengl-error
#--opencl-error
# Library options:
# Sets an user specific path to a library to load.
# Must be a valid path to a library.
#--lib-PCI /usr/lib/libpci.so
#--lib-vulkan /usr/lib/libvulkan.so
#--lib-wayland /usr/lib/libwayland-client.so
#--lib-xcb-randr /usr/lib/libxcb-randr.so
#--lib-xcb /usr/lib/libxcb.so
#--lib-Xrandr /usr/lib/libXrandr.so
#--lib-X11 /usr/lib/libX11.so
#--lib-gio /usr/lib/libgio-2.0.so
#--lib-DConf /usr/lib/libdconf.so
#--lib-DBus /usr/lib/libdbus-1.so
#--lib-XFConf /usr/lib/libxfconf-0.so
#--lib-sqlite3 /usr/lib/libsqlite3.so
#--lib-rpm /usr/lib/librpm.so
#--lib-imagemagick /usr/lib/libMagickCore-7.Q16HDRI.so
#--lib-z /usr/lib/libz.so
#--lib-chafa /usr/lib/libchafa.so
#--lib-egl /usr/lib/libEGL.so
#--lib-glx /usr/lib/libGLX.so
#--lib-osmesa /usr/lib/libOSMesa.so
#--lib-opencl /usr/lib/libOpenCL.so
+42
View File
@@ -0,0 +1,42 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "builtin",
"source": "arch"
},
"modules": [
"title",
"separator",
{
"type": "os",
"format": "Arch Linux ({12})"
},
"host",
"kernel",
"uptime",
{
"type": "packages",
"format": "{} (pacman)"
},
"shell",
"display",
"de",
"wm",
"wmtheme",
"theme",
"icons",
"font",
"cursor",
"terminal",
"terminalfont",
"cpu",
"gpu",
"memory",
"disk",
"battery",
"poweradapter",
"locale",
"break",
"colors"
]
}
+32 -43
View File
@@ -1,49 +1,38 @@
ZAP_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/zap"
ZAP_SCRIPT="$ZAP_DIR/zap.zsh"
ZAP_BRANCH=release-v1
# install zinit
source $ZDOTDIR/zinit.zsh
if [ ! -f $ZAP_SCRIPT ]; then
git clone -b "$ZAP_BRANCH" https://github.com/zap-zsh/zap.git "$ZAP_DIR"
fi
source "$ZAP_SCRIPT"
remote_plugins=(
zap-zsh/supercharge
zap-zsh/fzf
wintermi/zsh-lsd
wintermi/zsh-fnm
zsh-users/zsh-autosuggestions
# load remote plugins
zinit wait lucid light-mode for \
wintermi/zsh-brew \
hlissner/zsh-autopair \
Aloxaf/fzf-tab \
atinit"zicompinit; zicdreplay -q" \
zdharma-continuum/fast-syntax-highlighting zap-zsh/supercharge \
atload"_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions \
blockf atpull'zinit creinstall -q .' \
zsh-users/zsh-completions
zdharma-continuum/fast-syntax-highlighting
hlissner/zsh-autopair
)
plugins=("${remote_plugins[@]}" "$ZDOTDIR/*")
mac_plugins=(wintermi/zsh-brew)
case "$(uname -s)" in
Darwin)
# echo 'Mac OS X'
plugins=("${mac_plugins[@]}" "${plugins[@]}")
;;
Linux)
# echo 'Linux'
;;
CYGWIN* | MINGW32* | MSYS* | MINGW*)
# echo 'MS Windows'
;;
*)
# echo 'Other OS'
;;
esac
# load prompt theme
zinit ice as"command" from"gh-r" \
atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \
atpull"%atclone" src"init.zsh"
zinit light starship/starship
for plugin in $plugins; do plug $plugin; done
# load binaries
zinit as"command" wait lucid light-mode from"gh-r" for \
extract"!" atload="alias cat=bat" lsd-rs/lsd \
extract"!" atload="alias nano=micro" zyedidia/micro \
extract"!" cp"autocomplete/bat.zsh -> _bat" atload"alias cat=bat" @sharkdp/bat \
extract"!" atclone="cp usr/bin/fastfetch .; rm -rf usr" \
fastfetch-cli/fastfetch \
atclone"./zoxide init zsh > init.zsh" atpull"%atclone" src"init.zsh" \
ajeetdsouza/zoxide \
atclone"./fzf --zsh > init.zsh" atpull="%atclone" src"init.zsh" \
junegunn/fzf \
atclone"./fnm env --use-on-cd > init.zsh" atpull"%atclone" src"init.zsh" Schniz/fnm
# Clean startup prompt
[ ! -f ~/.hushlogin ] && touch ~/.hushlogin
# load local snippets
source $ZDOTDIR/exports.zsh
unsetopt PROMPT_SP
# Load and initialise completion system
autoload -Uz compinit
compinit
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'lsd -1 --color=always --icon=always $realpath'
+2 -3
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env zsh
[ -x "$(command -v bat)" ] && alias cat="bat"
[ -x "$(command -v codium)" ] && alias code="codium"
[ -x "$(command -v nvim)" ] && alias v="nvim"
(($+commands[bat])) && alias cat="bat"
(($+commands[lsd])) && alias ls="lsd"
-5
View File
@@ -1,5 +0,0 @@
#!/usr/bin/env zsh
command -v zoxide > /dev/null 2>&1 && eval "$(zoxide init zsh)"
command -v starship > /dev/null 2>&1 && eval "$(starship init zsh)"
command -v opam > /dev/null 2>&1 && eval $(opam env)
-5
View File
@@ -1,6 +1,5 @@
#!/usr/bin/env zsh
HISTFILE="$ZDOTDIR"/.zsh_history
HISTSIZE=1000000
SAVEHIST=1000000
@@ -12,7 +11,3 @@ export VISUAL="micro"
export SUDO_EDITOR="micro"
export STARSHIP_CONFIG="$XDG_CONFIG_HOME"/starship/starship.toml
export NODE_OPTIONS="--dns-result-order=ipv4first"
export PATH="/home/trivk/.local/share/fnm:$PATH"
+6
View File
@@ -0,0 +1,6 @@
#!/usr/bin/env zsh
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
source "${ZINIT_HOME}/zinit.zsh"