Compare commits

..
10 Commits
37 changed files with 7207 additions and 314 deletions
+4
View File
@@ -2,6 +2,10 @@
.conan/data
.conan2/p/**
.conan/data/**
.ssh
.ssh/**
id_*
*.ppk
{{ if eq .chezmoi.os "windows" }}
install_wsl_plugins.sh
{{ else }}
@@ -15,10 +15,6 @@
"command": "paste",
"id": "User.paste"
},
{
"command": "find",
"id": "User.find"
},
{
"command":
{
@@ -27,6 +23,10 @@
"splitMode": "duplicate"
},
"id": "User.splitPane.A6751878"
},
{
"command": "find",
"id": "User.find"
}
],
"copyFormatting": "none",
@@ -39,14 +39,14 @@
"id": "User.copy.644BA8F2",
"keys": "ctrl+c"
},
{
"id": "User.find",
"keys": "ctrl+shift+f"
},
{
"id": "User.paste",
"keys": "ctrl+v"
},
{
"id": "User.find",
"keys": "ctrl+shift+f"
},
{
"id": "User.splitPane.A6751878",
"keys": "alt+shift+d"
@@ -156,6 +156,24 @@
"hidden": false,
"name": "Developer PowerShell for VS 18",
"source": "Windows.Terminal.VisualStudio"
},
{
"guid": "{64cda46f-1222-57c1-83f5-ec6fd8094efa}",
"hidden": false,
"name": "Developer Command Prompt for VS 18",
"source": "Windows.Terminal.VisualStudio"
},
{
"guid": "{03b4b313-3250-56e1-9569-5c0b17c40ba3}",
"hidden": false,
"name": "Developer PowerShell for VS 18",
"source": "Windows.Terminal.VisualStudio"
},
{
"guid": "{8554482d-c56b-5f2e-a62f-1fca4b905252}",
"hidden": false,
"name": "Ubuntu",
"source": "Microsoft.WSL"
}
]
},
+24 -3
View File
@@ -2,12 +2,33 @@ local function alias(short, long)
os.execute('doskey ' .. short .. '=' .. long)
end
alias('ls', 'dir $*')
-- File listing (using eza)
alias('ls', 'eza --icons --git --color=always $*')
alias('ll', 'eza -l --icons --git --color=always $*')
alias('la', 'eza -la --icons --git --color=always $*')
alias('lt', 'eza --tree --icons $*')
-- Modern tools replacements
alias('cat', 'bat $*')
alias('vi', 'nvim $*')
alias('rdp','mstsc /v:$*')
alias('grep', 'rg')
alias('grep', 'rg $*')
alias('find', 'fd $*')
alias('top', 'btm $*')
alias('du', 'dust $*')
alias('df', 'duf $*')
-- Utilities
alias('rdp','mstsc /v:$*')
alias('jdk8home', 'set JAVA_HOME=%PROGRAMFILES%\\Java\\jdk-1.8')
alias('jdk8home32', 'set JAVA_HOME=C:\\Program Files (x86)\\Java\\jdk-1.8')
alias('jdk21home', 'set JAVA_HOME=%PROGRAMFILES%\\Java\\jdk-21')
-- Git aliases
alias('ga', 'git add $*')
alias('gc', 'git commit -m $*')
alias('gp', 'git push $*')
alias('gl', 'git pull $*')
alias('gs', 'git status $*')
alias('gd', 'git diff $*')
alias('gb', 'git branch $*')
alias('gco', 'git checkout $*')
+468 -20
View File
@@ -1,3 +1,44 @@
# name: Show input hints from argmatchers
# type: boolean
argmatcher.show_hints = True
# name: Enable asynchronous suggestions
# type: boolean
autosuggest.async = True
# name: Enable automatic suggestions
# type: boolean
autosuggest.enable = True
# name: Show usage hint for automatic suggestions
# type: boolean
autosuggest.hint = True
# name: Accept original capitalization
# type: boolean
autosuggest.original_case = True
# name: Controls how suggestions are chosen
# type: string
autosuggest.strategy = match_prev_cmd history fuzzy_history completion
# name: Command to run when injected
# type: string
clink.autostart =
# name: Auto-update the Clink program files
# type: enum
# options: off,check,prompt,auto
clink.autoupdate = check
# name: Colorize the input text
# type: boolean
clink.colorize_input = True
# name: A .clinkprompt file to use for the prompt
# type: string
clink.customprompt =
# name: Selects default key bindings
# type: enum
# options: bash,windows
@@ -8,10 +49,62 @@ clink.default_bindings = windows
# options: none,full,short
clink.logo = none
# name: Maximum rows for the input line
# type: integer
clink.max_input_rows = 0
# name: Strips CR and LF chars on paste
# type: enum
# options: delete,space,ampersand,crlf
clink.paste_crlf = crlf
# name: Paths to load Lua scripts from
# type: string
clink.path =
# name: Direction for repeated deletion in popup lists
# type: enum
# options: down,up
clink.popup_delete_direction = down
# name: Default search mode in popup lists
# type: enum
# options: find,filter
clink.popup_search_mode = find
# name: Enable prompt filtering by Lua scripts
# type: boolean
clink.promptfilter = True
# name: Scroll offset above/below selected item in list
# type: integer
clink.scroll_offset = 3
# name: Days between update checks
# type: integer
clink.update_interval = 5
# name: Replaces the console title prefix when elevated
# type: string
cmd.admin_title_prefix =
# name: Pressing Alt-F4 exits session
# type: boolean
cmd.altf4_exits = True
# name: Auto-answer terminate prompt
# type: enum
# options: off,answer_yes,answer_no
cmd.auto_answer = off
# name: Pressing Ctrl-D exits session
# type: boolean
cmd.ctrld_exits = False
# name: Retrieve last exit code
# type: boolean
cmd.get_errorlevel = True
# name: Argument color
# type: color
color.arg = bold
@@ -24,10 +117,6 @@ color.arginfo = sgr 38;5;172
# type: color
color.argmatcher = sgr 1;38;5;40
# name: Color for home dir tilde
# type: color
color.autoexpandtilde = bright cyan
# name: Shell command completions
# type: color
color.cmd = bold
@@ -44,26 +133,18 @@ color.cmdsep = sgr 38;5;135
# type: color
color.comment_row = sgr 38;5;87;48;5;18
# name: Common prefix of completions
# type: color
color.common_match_prefix =
# name: Description completion color
# type: color
color.description = sgr 38;5;39
# name: Color for command divider line
# type: color
color.divider_line = sgr 30;48;5;25
# name: Color for command end divider line
# type: color
color.divider_line_end = sgr 38;5;25
# name: Doskey completions
# type: color
color.doskey = sgr 1;38;5;75
# name: Color for escape for plain tilde
# type: color
color.escapetilde = bright cyan on blue
# name: Color for executable command word
# type: color
color.executable = sgr 1;38;5;33
@@ -96,14 +177,46 @@ color.input = sgr 38;5;214
# type: color
color.interact = bold
# name: Color for 'rem lua:' prefix
# type: color
color.luaprefix = bright cyan on blue
# name: Message area color
# type: color
color.message = default
# name: Modified history line mark color
# type: color
color.modmark =
# name: Color for popup lists and messages
# type: color
color.popup =
# name: Color for popup border
# type: color
color.popup_border =
# name: Color for popup description column(s)
# type: color
color.popup_desc =
# name: Color for popup footer message
# type: color
color.popup_footer =
# name: Color for popup title text
# type: color
color.popup_header =
# name: Color for selected item in popup list
# type: color
color.popup_select =
# name: Color for selected item in popup list
# type: color
color.popup_selectdesc =
# name: Prompt color
# type: color
color.prompt =
# name: Readonly file completions
# type: color
color.readonly = sgr 38;5;28
@@ -116,6 +229,30 @@ color.selected_completion = sgr 7
# type: color
color.selection = sgr 38;5;16;48;5;179
# name: Color for suggestion text
# type: color
color.suggestion =
# name: Color for suggestions in the suggestion list
# type: color
color.suggestionlist =
# name: Color for dim text in the suggestion list header
# type: color
color.suggestionlist_dim = sgr 38;5;242
# name: Color for highlight in the suggestion list
# type: color
color.suggestionlist_highlight = sgr 38;5;87
# name: Color for markup in the suggestion list
# type: color
color.suggestionlist_markup = sgr 38;2;253;174;31
# name: Color for the current selected suggestion
# type: color
color.suggestionlist_selected = sgr 48;5;238
# name: Unexpected argument color
# type: color
color.unexpected = default
@@ -124,23 +261,334 @@ color.unexpected = default
# type: color
color.unrecognized = sgr 38;5;203
# name: Delay before showing input hints
# type: integer
comment_row.hint_delay = 500
# name: Allow showing input hints in the comment row
# type: boolean
comment_row.show_hints = False
# name: Include callstack when logging output
# type: boolean
debug.log_output_callstacks = False
# name: Log the prompt string
# type: boolean
debug.log_prompt = False
# name: Log terminal input and output
# type: boolean
debug.log_terminal = False
# name: Controls duplicates in directory history
# type: enum
# options: add,erase_prev
directories.dupe_mode = add
# name: Add enhancements to Doskey
# type: boolean
doskey.enhanced = True
# name: Include aliases
# type: boolean
exec.aliases = True
# name: Include launchable documents
# type: boolean
exec.associations = False
# name: Include CMD commands
# type: boolean
exec.commands = True
# name: Match executables in current directory
# type: boolean
exec.cwd = True
# name: Include directories
# type: boolean
exec.dirs = True
# name: Enable executable completions
# type: boolean
exec.enable = True
# name: Include files
# type: boolean
exec.files = False
# name: Match executables in PATH
# type: boolean
exec.path = True
# name: Whitespace prefix matches files
# type: boolean
exec.space_prefix = True
# name: Include hidden files
# type: boolean
files.hidden = True
# name: Include system files
# type: boolean
files.system = False
# name: Perform history expansion automatically
# type: boolean
history.auto_expand = True
# name: Commands not automatically added to the history
# type: string
history.dont_add_to_history_cmds = exit history
# name: Controls how duplicate entries are handled
# type: enum
# options: add,ignore,erase_prev
history.dupe_mode = erase_prev
# name: Sets how command history expansion is applied
# type: enum
# options: off,on,not_squoted,not_dquoted,not_quoted
history.expand_mode = not_quoted
# name: Skip adding lines prefixed with whitespace
# type: boolean
history.ignore_space = True
# name: The number of history lines to save
# type: integer
history.max_lines = 25000
# name: Save history between sessions
# type: boolean
history.save = True
# name: Share history between instances
# type: boolean
history.shared = False
# name: Show preview of history expansion at cursor
# type: boolean
history.show_preview = True
# name: Makes it easy to replay a series of commands
# type: boolean
history.sticky_search = False
# name: Format for showing history times
# type: string
history.time_format = %F %T
# name: History item timestamps
# type: enum
# options: off,save,show
history.time_stamp = show
# name: Breaks into Lua debugger on Lua errors
# type: boolean
lua.break_on_error = False
# name: Breaks into Lua debugger on traceback
# type: boolean
lua.break_on_traceback = False
# name: Enables Lua debugging
# type: boolean
lua.debug = False
# name: 'require' search path
# type: string
lua.path =
# name: Fail on argument errors
# type: boolean
lua.strict = True
# name: Restricts coroutine execution
# type: integer
lua.throttle_interval = 0
# name: Prints stack trace on Lua errors
# type: boolean
lua.traceback_on_error = False
# name: Coloring rules for completions
# type: string
match.coloring_rules =
# name: Expand abbreviated paths when completing
# type: boolean
match.expand_abbrev = True
# name: Expand envvars when completing
# type: boolean
match.expand_envvars = True
# name: Fits match columns to screen width
# type: boolean
match.fit_columns = True
# name: Accent insensitive matching
# type: boolean
match.ignore_accent = True
# name: Case insensitive matching
# type: enum
# options: off,on,relaxed
match.ignore_case = relaxed
# name: Limits fitted columns by number of matches
# type: integer
match.max_fitted_matches = 0
# name: Max rows in clink-select-complete
# type: integer
match.max_rows = 0
# name: Preview rows
# type: integer
match.preview_rows = 5
# name: Where to sort matching directories
# type: enum
# options: before,with,after
match.sort_dirs = with
# name: Try substring if no prefix matches
# type: boolean
match.substring = True
# name: Translate slashes and backslashes
# type: enum
# options: off,system,slash,backslash,auto
match.translate_slashes = auto
# name: Match ? and * wildcards when completing
# type: boolean
match.wild = True
# name: Enables asynchronous prompt refresh
# type: boolean
prompt.async = True
# name: Controls spacing before prompt
# type: enum
# options: normal,compact,sparse
prompt.spacing = normal
# name: Controls when past prompts are collapsed
# type: enum
# options: off,always,same_dir
prompt.transient = off
# name: Suppress stderr from the Readline library
# type: boolean
readline.hide_stderr = False
# name: Start with the suggestion list enabled
# type: boolean
suggestionlist.default = False
# name: Hide input hints in the suggestion list
# type: boolean
suggestionlist.hide_hints = True
# name: History items to show at the top
# type: integer
suggestionlist.num_history = 3
# name: Adjusts the cursor visibility and shape
# type: boolean
terminal.adjust_cursor_style = True
# name: Color emoji support in terminal
# type: enum
# options: off,on,auto
terminal.color_emoji = auto
# name: Use special sequences for Ctrl-H, -I, -M, -[
# type: boolean
terminal.differentiate_keys = False
# name: East Asian Ambiguous character widths
# type: enum
# options: font,one,two,auto
terminal.east_asian_ambiguous = auto
# name: Controls VT emulation
# type: enum
# options: native,emulate,auto
terminal.emulation = auto
# name: Clink mouse input
# type: enum
# options: off,on,auto
terminal.mouse_input = auto
# name: Modifier keys for mouse input
# type: string
terminal.mouse_modifier =
# name: Esc sends a literal escape character
# type: boolean
terminal.raw_esc = False
# name: Show scrollbars in lists
# type: boolean
terminal.scrollbars = True
# name: Send terminal shell integration codes
# type: enum
# options: off,on,auto
terminal.shell_integration = auto
# name: Support Windows' Ctrl-Alt substitute for AltGr
# type: boolean
terminal.use_altgr_substitute = False
# name: Color for home dir tilde
# type: color
color.autoexpandtilde = bright cyan
# name: Color for command divider line
# type: color
color.divider_line = sgr 30;48;5;25
# name: Color for command end divider line
# type: color
color.divider_line_end = sgr 38;5;25
# name: Color for escape for plain tilde
# type: color
color.escapetilde = bright cyan on blue
# name: Color for 'rem lua:' prefix
# type: color
color.luaprefix = bright cyan on blue
# name: Ignores command extension
# type: boolean
fuzzy_history.ignore_ext = True
# name: Ignores command path
# type: boolean
fuzzy_history.ignore_path = True
# name: Limit fuzzy_history searches
# type: integer
fuzzy_history.max_items = 0
# name: Use default key bindings
# type: boolean
fzf.default_bindings = True
# name: Enables icons in file completions
# type: boolean
matchicons.enable = True
# name: Show a tip when Clink starts
# type: boolean
tips.enable = False
+10 -2
View File
@@ -1,2 +1,10 @@
-- oh-my-posh.lua
load(io.popen('oh-my-posh.exe --config="C:/Users/reazul.ashraf/AppData/Local/Programs/oh-my-posh/themes/nordtron.omp.json" --init --shell cmd'):read("*a"))()
-- oh-my-posh.lua (cached)
local cache_file = "C:/Users/reazul.ashraf/AppData/Local/clink/oh-my-posh_cache.lua"
local f = io.open(cache_file, "r")
if f then
f:close()
dofile(cache_file)
else
-- Fallback if cache is missing
load(io.popen('oh-my-posh.exe --config="C:/Users/reazul.ashraf/AppData/Local/clink/nordtron.omp.json" --init --shell cmd'):read("*a"))()
end
+1 -1
View File
@@ -587,7 +587,7 @@ local function get_jdtls_config()
local java_cmd = "java"
if vim.fn.has("win32") == 1 then
java_cmd = "C:/Program Files/Eclipse Adoptium/jdk-25.0.1.8-hotspot/bin/java.exe"
java_cmd = "C:/Program Files/Eclipse Adoptium/jdk-25.0.2.10-hotspot/bin/java.exe"
end
local cmd = {
+8 -8
View File
@@ -10,35 +10,35 @@
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"git-worktree.nvim": { "branch": "master", "commit": "f247308e68dab9f1133759b05d944569ad054546" },
"gitsigns.nvim": { "branch": "main", "commit": "31217271a7314c343606acb4072a94a039a19fb5" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"gitsigns.nvim": { "branch": "main", "commit": "9f3c6dd7868bcc116e9c1c1929ce063b978fa519" },
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"luasnip": { "branch": "master", "commit": "dae4f5aaa3574bd0c2b9dd20fb9542a02c10471c" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "ae609525ddf01c153c39305730b1791800ffe4fe" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "21c2a84ce368e99b18f52ab348c4c02c32c02fcf" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"neogit": { "branch": "master", "commit": "73870229977fdd8747025820e15e98cfde787b9c" },
"neogit": { "branch": "master", "commit": "d5af26e085a21b468b98c0e1257ac52706c1066f" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
"nvim-dap": { "branch": "master", "commit": "db321947bb289a2d4d76a32e76e4d2bd6103d7df" },
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
"nvim-jdtls": { "branch": "master", "commit": "77ccaeb422f8c81b647605da5ddb4a7f725cda90" },
"nvim-lint": { "branch": "master", "commit": "bcd1a44edbea8cd473af7e7582d3f7ffc60d8e81" },
"nvim-lspconfig": { "branch": "master", "commit": "d1597791f8196519439b3a036b59b09023981e1d" },
"nvim-lint": { "branch": "master", "commit": "486474c2ace8d78d28995074dbdbe29011bc63d0" },
"nvim-lspconfig": { "branch": "master", "commit": "5a855bcfec7973767a1a472335684bbd71d2fa2b" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "746ffbb17975ebd6c40142362eee1b0249969c5c" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "d6b802552cbe7d643a3b6b31f419c248d1f1e220" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "e2858c43caafec291f915ef25fbed27bbe78abbd" },
"telescope-tabs": { "branch": "master", "commit": "777b1f630f3d6a12a2e71635a82581c988d6da2e" },
"telescope.nvim": { "branch": "master", "commit": "ad7d9580338354ccc136e5b8f0aa4f880434dcdc" },
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
+3 -1
View File
@@ -307,5 +307,7 @@
"markdownlint.config": {},
"markdownlint.focusMode": false,
"markdownlint.configPath": "C:/Users/reazul.ashraf/.markdownlint.json",
"window.newWindowProfile": "Default"
"window.newWindowProfile": "Default",
"workbench.colorTheme": "Visual Studio Dark",
"workbench.editor.enablePreview": false
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,75 @@
export def "nu-complete get scripts" [] {
open package.json
| get scripts
#| describe record<start: string, build: string, test: string, eject: string>
| transpose # to convert the record<start: string, build: string, test: string, eject: string> into a table
| rename value description
}
export def "nu-complete get deps" [] {
let packagejson = (open ./package.json)
let deps = try { $packagejson | get dependencies | columns } catch { [] }
let devDeps = try { $packagejson | get devDependencies | columns } catch { [] }
$deps | append $devDeps
}
def "nu-complete pnpm" [] {
[
# manage your dependencies section
{ value: "add", description: "Installs a package and any packages that it depends on. By default, any new package is installed as a prod dependency" }
{ value: "import", description: "Generates a pnpm-lock.yaml from an npm package-lock.json (or npm-shrinkwrap.json) file" }
{ value: "install", description: "(i) Install all dependencies for a project" }
{ value: "install-test", description: "(it) Runs a pnpm install followed immediately by a pnpm test" }
{ value: "link", description: "(ln) Connect the local project to another one" }
{ value: "prune", description: "Removes extraneous packages" }
{ value: "rebuild", description: "(rb) Rebuild a package" }
{ value: "remove", description: "(rm) Removes packages from node_modules and from the project's package.json" }
{ value: "unlink", description: "Unlinks a package. Like yarn unlink but pnpm re-installs the dependency after removing the external link" }
{ value: "update", description: "(up) Updates packages to their latest version based on the specified range" }
# review your dependencies section
{ value: "audit", description: "Checks for known security issues with the installed packages" }
{ value: "licenses", description: "Check licenses in consumed packages" }
{ value: "list", description: "(ls) Print all the versions of packages that are installed, as well as their dependencies, in a tree-structure" }
{ value: "outdated", description: "Check for outdated packages" }
# run your scripts section
{ value: "exec", description: "Executes a shell command in scope of a project" }
{ value: "run", description: "Runs a defined package script" }
{ value: "start", description: "Runs an arbitrary command specified in the package's `start` property of its `scripts` object" }
{ value: "test", description: "(t) Runs a package's `test` script, if one was provided" }
# others
{ value: "pack", description:"" }
{ value: "publish", description:"Publishes a package to the registry" }
{ value: "root", description:"" }
{ value: "store", description:"store add, store path, store prune & store status" }
]
}
export extern "pnpm" [
command?: string@"nu-complete pnpm"
--recursive(-r) # Run the command for each project in the workspace.
--help(-h) # Print help information
]
export extern "pnpm run" [
command?: string@"nu-complete get scripts"
--help(-h) # Print help information
]
export extern "pnpm remove" [
command?: string@"nu-complete get deps"
--help(-h) # Print help information
]
export extern "pnpm add" [
--help(-h) # Print help information
--save-exact(-E) # Install exact version
--global(-g) # Install as a global package
--recursive(-r) # Run installation recursively in every package found in subdirectories or in every workspace package, when executed inside a workspace. For options that may be used with `-r`, see "pnpm help recursive"
--save-dev(-D) # Save package to your `devDependencies`
--save-optional(-O) # Save package to your `optionalDependencies`
--save-peer # Save package to your `peerDependencies` and `devDependencies`
--save-prod(-P) # Save package to your `dependencies`. The default behavior
]
@@ -0,0 +1,768 @@
# author: e2dk4r
################################################################
# FUNCTIONS
################################################################
# list of supported architecture
def scoopArches [] {
["32bit" "64bit"]
}
# list of all installed apps
def scoopInstalledApps [] {
let localAppDir = if ('SCOOP' in $env) {
[$env.SCOOP 'apps'] | path join
} else {
[$env.USERPROFILE 'scoop' 'apps'] | path join
}
let localApps = (ls $localAppDir | get name | path basename)
let globalAppDir = if ('SCOOP_GLOBAL' in $env) {
[$env.SCOOP_GLOBAL 'apps'] | path join
} else {
[$env.ProgramData 'scoop' 'apps'] | path join
}
let globalApps = if ($globalAppDir | path exists) { ls $globalAppDir | get name | path basename }
$localApps | append $globalApps
}
# list of all installed apps with star
def scoopInstalledAppsWithStar [] {
scoopInstalledApps | prepend '*'
}
# list of all manifests from all buckets
def scoopAllApps [] {
let bucketsDir = if ('SCOOP' in $env) {
[$env.SCOOP 'buckets'] | path join
} else {
[$env.USERPROFILE 'scoop' 'buckets'] | path join
}
(ls -s $bucketsDir | get name) | each {|bucket| ls ([$bucketsDir $bucket 'bucket'] | path join) | get name | path parse | where extension == json | get stem } | flatten | uniq
}
# list of all apps that are not installed
def scoopAvailableApps [] {
let all = (scoopAllApps)
let installed = (scoopInstalledApps)
$all | where $it not-in $installed
}
# list of all config options
def scoopConfigs [] {
[
'use_external_7zip'
'use_lessmsi'
'use_sqlite_cache'
'no_junction'
'scoop_repo'
'scoop_branch'
'proxy'
'autostash_on_conflict'
'default_architecture'
'debug'
'force_update'
'show_update_log'
'show_manifest'
'shim'
'root_path'
'global_path'
'cache_path'
'gh_token'
'virustotal_api_key'
'cat_style'
'ignore_running_processes'
'private_hosts'
'hold_update_until'
'update_nightly'
'use_isolated_path'
'aria2-enabled'
'aria2-warning-enabled'
'aria2-retry-wait'
'aria2-split'
'aria2-max-connection-per-server'
'aria2-min-split-size'
'aria2-options'
]
}
# boolean as strings
def scoopBooleans [] {
["'true'" "'false'" ' ']
}
def scoopRepos [] {
[
'https://github.com/ScoopInstaller/Scoop'
]
}
def scoopBranches [] {
['master' 'develop']
}
def scoopShimBuilds [] {
['kiennq' 'scoopcs' '71']
}
def scoopCommands [] {
let libexecDir = if ('SCOOP' in $env) {
[$env.SCOOP 'apps' 'scoop' 'current' 'libexec'] | path join
} else {
[$env.USERPROFILE 'scoop' 'apps' 'scoop' 'current' 'libexec'] | path join
}
let commands = (
ls $libexecDir
| each {|command|
[
[value description];
[
# eg. scoop-help.ps1 -> help
($command.name | path parse | get stem | str substring 6..)
# second line is starts with '# Summary: '
# eg. '# Summary: Install apps' -> 'Install apps'
(open $command.name | lines | skip 1 | first | str substring 11..)
]
]
}
| flatten
)
$commands
}
def scoopAliases [] {
scoop alias list | str trim | lines | slice 2.. | split column " " | get column1
}
def batStyles [] {
['default' 'auto' 'full' 'plain' 'changes' 'header' 'header-filename' 'header-filesize' 'grid' 'rule' 'numbers' 'snip']
}
def scoopShims [] {
let localShimDir = if ('SCOOP' in $env) { [$env.SCOOP 'shims'] | path join } else if (scoop config root_path | path exists) { scoop config root_path } else { [$env.USERPROFILE 'scoop' 'shims'] | path join }
let localShims = if ($localShimDir | path exists) { ls $localShimDir | get name | path parse | select stem extension | where extension == shim | get stem } else { [] }
let globalShimDir = if ('SCOOP_GLOBAL' in $env) { [$env.SCOOP_GLOBAL 'shims'] | path join } else if (scoop config global_path | path exists) { scoop config global_path } else { [$env.ProgramData 'scoop' 'shims'] | path join }
let globalShims = if ($globalShimDir | path exists) { ls $globalShimDir | get name | path parse | select stem extension | where extension == shim | get stem } else { [] }
$localShims | append $globalShims | uniq | sort
}
################################################################
# scoop
################################################################
# Windows command line installer
export extern "scoop" [
alias?: string@scoopCommands # available scoop commands and aliases
--help (-h) # Show help for this command.
--version (-v) # Show current scoop and added buckets versions
]
################################################################
# scoop list
################################################################
# Lists all installed apps, or the apps matching the supplied query.
export def "scoop list" [
query?: string@scoopInstalledApps # string that will be matched
] {
^scoop list ($query | default "")
| complete
| if $in.exit_code == 0 {
$in.stdout
| lines
| skip 4
| parse -r '(?P<name>\S+)\s+(?P<version>\S+)\s+(?P<source>\S+)\s+(?P<updated>\S+\s+\S+)\s+(?P<info>\S+)?'
}
}
################################################################
# scoop uninstall
################################################################
# Uninstall specified application(s).
export extern "scoop uninstall" [
app?: string@scoopInstalledApps # app that will be uninstalled
--help (-h) # Show help for this command.
--global (-g) # Uninstall a globally installed application(s).
--purge (-p) # Persisted data will be removed. Normally when application is being uninstalled, the data defined in persist property/manually persisted are kept.
]
################################################################
# scoop cleanup
################################################################
# Perform cleanup on specified installed application(s) by removing old/not actively used versions.
export extern "scoop cleanup" [
app?: string@scoopInstalledAppsWithStar # app that will be cleaned
--help (-h) # Show help for this command.
--all (-a) # Cleanup all apps (alternative to '*')
--global (-g) # Perform cleanup on globally installed application(s). (Include them if '*' is used)
--cache (-k) # Remove outdated download cache. This will keep only the latest version cached.
]
################################################################
# scoop info
################################################################
# Display information about an application.
export extern "scoop info" [
app?: string@scoopAllApps # app that will be questioned
--verbose (-v) # Show full paths and URLs
--help (-h) # Show help for this command.
]
################################################################
# scoop update
################################################################
# Update installed application(s), or scoop itself.
export extern "scoop update" [
app?: string@scoopInstalledAppsWithStar # which apps
--help (-h) # Show help for this command.
--force (-f) # Force update even when there is not a newer version.
--global (-g) # Update a globally installed application(s).
--independent (-i) # Do not install dependencies automatically.
--no-cache (-k) # Do not use the download cache.
--skip (-s) # Skip hash validation (use with caution!).
--quiet (-q) # Hide extraneous messages.
--all (-a) # Update all apps (alternative to '*')
]
################################################################
# scoop install
################################################################
# Install specific application(s).
export extern "scoop install" [
app?: string@scoopAvailableApps # which apps
--arch (-a): string@scoopArches # Use the specified architecture, if the application's manifest supports it.
--help (-h) # Show help for this command.
--global (-g) # Install the application(s) globally.
--independent (-i) # Do not install dependencies automatically.
--no-cache (-k) # Do not use the download cache.
--skip (-s) # Skip hash validation (use with caution!).
--no-update-scoop (-u) # Don't update Scoop before installing if it's outdated
]
################################################################
# scoop status
################################################################
# Show status and check for new app versions.
export extern "scoop status" [
--help (-h) # Show help for this command.
--local (-l) # Checks the status for only the locally installed apps, and disables remote fetching/checking for Scoop and buckets
]
################################################################
# scoop help
################################################################
# Show help for scoop
export extern "scoop help" [
--help (-h) # Show help for this command.
command?: string@scoopCommands # Show help for the specified command
]
################################################################
# scoop alias
################################################################
# Add, remove or list Scoop aliases
export extern "scoop alias" [
--help (-h) # Show help for this command.
]
# add an alias
export extern "scoop alias add" [
name: string # name of the alias
command: string # scoop command
description?: string # description of the alias
]
# list all aliases
export extern "scoop alias list" [
--verbose (-v) # Show alias description and table headers (works only for 'list')
]
# remove an alias
export extern "scoop alias rm" [
name: string@scoopAliases # alias that will be removed
]
################################################################
# scoop shim
################################################################
# Manipulate Scoop shims
export extern "scoop shim" [
--help (-h) # Show help for this command.
]
# add a custom shim
export extern "scoop shim add" [
shim_name: string # name of the shim
command_path: path # path to executable
cmd_args # additional command arguments
--global (-g) # Manipulate global shim(s)
]
# remove shims (CAUTION: this could remove shims added by an app manifest)
export extern "scoop shim rm" [
shim_name: string@scoopShims # shim that will be removed
--global (-g) # Manipulate global shim(s)
]
# list all shims or matching shims
export extern "scoop shim list" [
pattern?: string # list only matching shims
--global (-g) # Manipulate global shim(s)
]
# show a shim's information
export extern "scoop shim info" [
shim_name: string@scoopShims # shim info to retrieve
--global (-g) # Manipulate global shim(s)
]
# alternate a shim's target source
export extern "scoop shim alter" [
shim_name: string@scoopShims # shim that will be alternated
--global (-g) # Manipulate global shim(s)
]
################################################################
# scoop which
################################################################
# Locate the path to a shim/executable that was installed with Scoop (similar to 'which' on Linux)
export extern "scoop which" [
command: string # executable name with .exe
--help (-h) # Show help for this command.
]
################################################################
# scoop cat
################################################################
# Show content of specified manifest.
export extern "scoop cat" [
app?: string@scoopAllApps # app that will be shown
--help (-h) # Show help for this command.
]
################################################################
# scoop checkup
################################################################
# Performs a series of diagnostic tests to try to identify things that may cause problems with Scoop.
export extern "scoop checkup" [
--help (-h) # Show help for this command.
]
################################################################
# scoop home
################################################################
# Opens the app homepage
export extern "scoop home" [
app?: string@scoopAllApps # app that will be shown
--help (-h) # Show help for this command.
]
################################################################
# scoop config ...
################################################################
# Get or set configuration values
export extern "scoop config" [
--help (-h) # Show help for this command.
]
# External 7zip (from path) will be used for archives extraction.
export extern "scoop config use_external_7zip" [
value?: string@scoopBooleans
]
# Prefer lessmsi utility over native msiexec.
export extern "scoop config use_lessmsi" [
value?: string@scoopBooleans
]
# Use SQLite database for caching.
export extern "scoop config use_sqlite_cache" [
value?: string@scoopBooleans
]
# The 'current' version alias will not be used.
export extern "scoop config no_junction" [
value?: string@scoopBooleans
]
# Git repository containing scoop source code.
export extern "scoop config scoop_repo" [
value?: string@scoopRepos
]
# Allow to use different branch than master.
export extern "scoop config scoop_branch" [
value?: string@scoopBranches
]
# [username:password@]host:port
export extern "scoop config proxy" [
value?: string
]
# When a conflict is detected during updating, Scoop will auto-stash the uncommitted changes.
export extern "scoop config autostash_on_conflict" [
value?: string@scoopBooleans
]
# Allow to configure preferred architecture for application installation. If not specified, architecture is determined by system.
export extern "scoop config default_architecture" [
value?: string@scoopArches
]
# Additional and detailed output will be shown.
export extern "scoop config debug" [
value?: string@scoopBooleans
]
# Force apps updating to bucket's version.
export extern "scoop config force_update" [
value?: string@scoopBooleans
]
# Do not show changed commits on 'scoop update'
export extern "scoop config show_update_log" [
value?: string@scoopBooleans
]
# Displays the manifest of every app that's about to be installed, then asks user if they wish to proceed.
export extern "scoop config show_manifest" [
value?: string@scoopBooleans
]
# Choose scoop shim build.
export extern "scoop config shim" [
value?: string@scoopShimBuilds
]
# Path to Scoop root directory.
export extern "scoop config root_path" [
value?: directory
]
# Path to Scoop root directory for global apps.
export extern "scoop config global_path" [
value?: directory
]
# For downloads, defaults to 'cache' folder under Scoop root directory.
export extern "scoop config cache_path" [
value?: directory
]
# GitHub API token used to make authenticated requests.
export extern "scoop config gh_token" [
value?: string
]
# API key used for uploading/scanning files using virustotal.
export extern "scoop config virustotal_api_key" [
value?: string
]
# "scoop cat" display style. requires "bat" to be installed.
export extern "scoop config cat_style" [
value?: string@batStyles
]
# Discard application running messages when reset, uninstall or update
export extern "scoop config ignore_running_processes" [
value?: string@scoopBooleans
]
# Array of private hosts that need additional authentication.
export extern "scoop config private_hosts" [
value?: string
]
# Disable/Hold Scoop self-updates, until the specified date.
export extern "scoop config hold_update_until" [
value?: string
]
# Nightly version will be updated after one day if this is set to $true.
export extern "scoop config update_nightly" [
value?: string@scoopBooleans
]
# When set to $true, Scoop will use `SCOOP_PATH` environment variable to store apps' `PATH`s.
export extern "scoop config use_isolated_path" [
value?: string@scoopBooleans
]
# Aria2c will be used for downloading of artifacts.
export extern "scoop config aria2-enabled" [
value?: string@scoopBooleans
]
# Disable Aria2c warning which is shown while downloading.
export extern "scoop config aria2-warning-enabled" [
value?: string@scoopBooleans
]
# Number of seconds to wait between retries.
export extern "scoop config aria2-retry-wait" [
value?: number
]
# Number of connections used for download.
export extern "scoop config aria2-split" [
value?: number
]
# The maximum number of connections to one server for each download.
export extern "scoop config aria2-max-connection-per-server" [
value?: number
]
# Downloaded files will be split by this configured size and downloaded using multiple connections.
export extern "scoop config aria2-min-split-size" [
value?: string
]
# Array of additional aria2 options.
export extern "scoop config aria2-options" [
value?: string
]
# Remove a configuration setting
export extern "scoop config rm" [
name: string@scoopConfigs # configuration setting that will be removed
--help (-h) # Show help for this command.
]
################################################################
# scoop hold
################################################################
# Hold an app to disable updates
export extern "scoop hold" [
app?: string@scoopInstalledApps # app that will be hold back
--global (-g) # Hold globally installed apps
--help (-h) # Show help for this command.
]
################################################################
# scoop unhold
################################################################
# Unhold an app to enable updates
export extern "scoop unhold" [
app?: string@scoopInstalledApps # app that will be unhold back
--global (-g) # Unhold globally installed apps
--help (-h) # Show help for this command.
]
################################################################
# scoop depends
################################################################
# List dependencies for an app, in the order they'll be installed
export extern "scoop depends" [
app?: string@scoopAllApps # app in question
--arch (-a): string@scoopArches # Use the specified architecture, if the application's manifest supports it.
--help (-h) # Show help for this command.
]
################################################################
# scoop export
################################################################
# Exports installed apps, buckets (and optionally configs) in JSON format
export extern "scoop export" [
--config (-c) # Export the Scoop configuration file too
--help (-h) # Show help for this command.
]
################################################################
# scoop import
################################################################
# Imports apps, buckets and configs from a Scoopfile in JSON format
export extern "scoop import" [
file: path # path to Scoopfile
--help (-h) # Show help for this command.
]
################################################################
# scoop reset
################################################################
# Reset an app to resolve conflicts
export extern "scoop reset" [
app?: string@scoopInstalledAppsWithStar # app that will be reset
--all (-a) # Reset all apps. (alternative to '*')
--help (-h) # Show help for this command.
]
################################################################
# scoop prefix
################################################################
# Returns the path to the specified app
export extern "scoop prefix" [
app?: string@scoopInstalledApps # app in question
--help (-h) # Show help for this command.
]
################################################################
# scoop create
################################################################
# Create a custom app manifest
export extern "scoop create" [
url: string # url of manifest
--help (-h) # Show help for this command.
]
################################################################
# scoop search
################################################################
# Search available apps
export def "scoop search" [
query?: string # Show app names that match the query
] {
let output = (
^scoop search ($query | default "")
| complete
| if $in.exit_code == 0 {
$in.stdout
| lines
| skip 4
| parse -r '(?P<name>\S+)\s+(?P<version>\S+)\s+(?P<source>\S+)\s+(?P<binaries>.+)?'
}
)
if ($output | is-empty) {
print $"(ansi yellow)WARN No matches found."
} else {
$output
}
}
################################################################
# scoop cache ...
################################################################
# Show the download cache
export extern "scoop cache" [
apps: string@scoopInstalledAppsWithStar # apps in question
--help (-h) # Show help for this command.
]
# Show the download cache
export extern "scoop cache show" [
apps: string@scoopInstalledAppsWithStar # apps in question
]
# Clear the download cache
export extern "scoop cache rm" [
apps?: string@scoopInstalledAppsWithStar # apps in question
--all (-a) # Clear all apps (alternative to '*')
]
################################################################
# scoop download
################################################################
# Download apps in the cache folder and verify hashes
export extern "scoop download" [
app?: string@scoopAvailableApps # apps in question
--help (-h) # Show help for this command.
--force (-f) # Force download (overwrite cache)
--no-hash-check (-h) # Skip hash verification (use with caution!)
--no-update-scoop (-u) # Don't update Scoop before downloading if it's outdated
--arch (-a): string@scoopArches # Use the specified architecture, if the app supports it
]
################################################################
# scoop bucket ...
################################################################
def scoopKnownBuckets [] {
["main" "extras" "versions" "nirsoft" "php" "nerd-fonts" "nonportable" "java" "games" "sysinternals"]
}
def scoopInstalledBuckets [] {
let bucketsDir = if ('SCOOP' in $env) {
[$env.SCOOP 'buckets'] | path join
} else {
[$env.USERPROFILE 'scoop' 'buckets'] | path join
}
let buckets = (ls $bucketsDir | get name | path basename)
$buckets
}
def scoopAvailableBuckets [] {
let known = (scoopKnownBuckets)
let installed = (scoopInstalledBuckets)
$known | where $it not-in $installed
}
# Add, list or remove buckets.
export extern "scoop bucket" [
--help (-h) # Show help for this command.
]
# add a bucket
export extern "scoop bucket add" [
name: string@scoopAvailableBuckets # name of the bucket
repo?: string # url of git repo
--help (-h) # Show help for this command.
]
# list installed buckets
export extern "scoop bucket list" [
--help (-h) # Show help for this command.
]
# list known buckets
export extern "scoop bucket known" [
--help (-h) # Show help for this command.
]
# remove installed buckets
export extern "scoop bucket rm" [
name: string@scoopInstalledBuckets # bucket to be removed
--help (-h) # Show help for this command.
]
################################################################
# scoop virustotal
################################################################
# Look for app's hash or url on virustotal.com
export extern "scoop virustotal" [
apps: string@scoopInstalledAppsWithStar # apps to be scanned
--all (-a) # Check for all installed apps
--scan (-s) # Send download URL for analysis (and future retrieval).
--no-depends (-n) # By default, all dependencies are checked too. This flag avoids it.
--no-update-scoop (-u) # Don't update Scoop before checking if it's outdated
--passthru (-p) # Return reports as objects
--help (-h) # Show help for this command.
]
File diff suppressed because it is too large Load Diff
+82
View File
@@ -0,0 +1,82 @@
# Nushell Configuration (Templated)
# Standard Library
use std
$env.config = {
show_banner: false,
ls: {
use_ls_colors: true
clickable_links: true
}
rm: {
always_trash: false
}
table: {
mode: rounded
}
history: {
max_size: 100000
sync_on_enter: true
file_format: "sqlite"
}
completions: {
case_sensitive: false
quick: true
partial: true
algorithm: "fuzzy"
}
}
# Modern tooling aliases based on preferences
if (which eza | is-not-empty) {
alias l = eza -l
alias la = eza -la
alias ll = eza -l
alias ls = eza
}
if (which bat | is-not-empty) {
alias cat = bat -P
} else if (which batcat | is-not-empty) {
alias cat = batcat -P
alias bat = batcat
}
if (which rg | is-not-empty) {
alias grep = rg
}
if (which fd | is-not-empty) {
alias find = fd
alias ff = fd
}
if (which yazi | is-not-empty) {
alias y = yazi
}
# Source tool integrations generated in env.nu
source ($env.CACHE_DIR | path join "zoxide.nu")
source ($env.CACHE_DIR | path join "starship.nu")
# Java and JDK Utilities
use java-utils.nu *
{{ if eq .chezmoi.os "windows" -}}
# Visual Studio Utilities (Windows Only)
use vs-utils.nu *
{{- end }}
# completions
use completions/git-completions.nu *
{{ if eq .chezmoi.os "windows" -}}
use completions/scoop-completions.nu *
{{- end }}
use completions/pnpm-completions.nu *
use completions/uv-completions.nu *
# Set default JDK
if (which jdk25home | is-not-empty) {
jdk25home --quiet
}
+50
View File
@@ -0,0 +1,50 @@
# Nushell Environment Configuration (Templated)
{{ if eq .chezmoi.os "windows" -}}
$env.CACHE_DIR = ($env.HOME | path join "AppData" "Local" "nushell" "cache")
{{- else -}}
$env.CACHE_DIR = ($env.HOME | path join ".cache" "nushell")
{{- end }}
# Ensure cache directory exists
try { mkdir $env.CACHE_DIR }
# Initialize Zoxide
if (which zoxide | is-not-empty) {
zoxide init nushell | save -f ($env.CACHE_DIR | path join "zoxide.nu")
} else {
"" | save -f ($env.CACHE_DIR | path join "zoxide.nu")
}
# Initialize Starship
if (which starship | is-not-empty) {
starship init nu | save -f ($env.CACHE_DIR | path join "starship.nu")
} else {
"" | save -f ($env.CACHE_DIR | path join "starship.nu")
}
# Set default editor and pager
{{ if eq .chezmoi.os "windows" -}}
$env.EDITOR = "nvim.exe"
$env.VISUAL = "nvim.exe"
{{- else -}}
$env.EDITOR = "nvim"
$env.VISUAL = "nvim"
{{- end }}
{{- if (which bat | is-not-empty) }}
$env.PAGER = "bat --paging=always"
{{- else if (which batcat | is-not-empty) }}
$env.PAGER = "batcat --paging=always"
{{- end }}
{{ if eq .chezmoi.os "windows" -}}
# Modern PowerShell 7 wrapper (pw7) for Nushell (Windows Only)
def --env pw7 [cmd: string] {
let profile = "{{ joinPath .chezmoi.homeDir "onedrive" "Documents" "PowerShell" "Gemini_Profile.ps1" }}"
^pwsh.exe -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command $". '($profile)'; ($cmd) | Out-String"
}
{{- end }}
# Useful env variables
$env.BAT_THEME = "TwoDark"
+51
View File
@@ -0,0 +1,51 @@
# java-utils.nu
# JDK management functions for Nushell (modern syntax)
export def --env set-jdk [path: string, --quiet (-q)] {
let bin_path = ([$path, 'bin'] | path join)
$env.JAVA_HOME = $path
# Update PATH: remove any entry that looks like a JDK bin and add the new one
if ($env.PATH | describe | str contains 'list') {
$env.PATH = ($env.PATH | where {|row|
let is_jdk_bin = (($row | str contains 'jdk') and ($row | str ends-with 'bin'))
not $is_jdk_bin
} | prepend $bin_path)
} else {
let sep = (char esep)
let path_list = ($env.PATH | split row $sep)
$env.PATH = ($path_list | where {|row|
let is_jdk_bin = (($row | str contains 'jdk') and ($row | str ends-with 'bin'))
not $is_jdk_bin
} | prepend $bin_path | str join $sep)
}
if not $quiet {
print $"JAVA_HOME set to: ($path)"
try { java -version } catch { print "Warning: java command not found in new path." }
}
}
export def --env jdk8home [--quiet (-q)] {
set-jdk 'C:\Program Files\Eclipse Adoptium\jdk-8.0.482.8-hotspot' --quiet=$quiet
}
export def --env jdk8home32 [--quiet (-q)] {
set-jdk 'C:\Program Files (x86)\Eclipse Adoptium\jdk-8.0.472.8-hotspot' --quiet=$quiet
}
export def --env jdk8home32Liberica [--quiet (-q)] {
set-jdk 'C:\Users\reazul.ashraf\scoop\apps\liberica8-full-jdk\current' --quiet=$quiet
}
export def --env jdk8homeCorretto [--quiet (-q)] {
set-jdk 'C:\Users\reazul.ashraf\scoop\apps\corretto8-jdk\current' --quiet=$quiet
}
export def --env jdk21home [--quiet (-q)] {
set-jdk 'C:\Program Files\Eclipse Adoptium\jdk-21.0.10.7-hotspot' --quiet=$quiet
}
export def --env jdk25home [--quiet (-q)] {
set-jdk 'C:\Program Files\Eclipse Adoptium\jdk-25.0.2.10-hotspot' --quiet=$quiet
}
+43
View File
@@ -0,0 +1,43 @@
# vs-utils.nu
# Visual Studio environment management for Nushell
export def --env vcvars [] {
if ($env.VCINSTALLDIR? | is-not-empty) {
print "Visual Studio environment already initialized."
return
}
print "Initializing Visual Studio Developer Environment..."
# Bridge to PowerShell to get the environment variables
# The new pw7 function in env.nu already sources Gemini_Profile.ps1
let env_json = (pw7 '
$vsPath = & "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
if ($vsPath) {
$devShellModule = Get-ChildItem -Path "$vsPath\Common7\Tools" -Filter "Microsoft.VisualStudio.DevShell.dll" -Recurse | Select-Object -First 1 -ExpandProperty FullName
if ($devShellModule) {
Import-Module $devShellModule
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -Arch amd64 -NoLogo
Get-ChildItem env: | ForEach-Object { @{ Name = $_.Name; Value = $_.Value } } | ConvertTo-Json
}
}
' | from json)
if ($env_json | is-empty) {
print "Error: Could not initialize Visual Studio environment."
return
}
# Load the environment variables into Nushell
let new_env = ($env_json | reduce -f {} {|it, acc| $acc | insert $it.Name $it.Value })
# Path handling
load-env $new_env
# Convert Path string from PS back to Nu List if necessary
if ($env.Path? | is-not-empty) {
$env.PATH = ($env.Path | split row (char esep))
}
print "Visual Studio 2026 Developer Environment initialized."
}
+22 -30
View File
@@ -9,7 +9,6 @@ case $- in
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
@@ -23,10 +22,6 @@ HISTFILESIZE=2000
# 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)"
@@ -40,16 +35,8 @@ 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=
@@ -76,38 +63,24 @@ esac
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 -alF'
alias la='ls -A'
alias l='ls -CF'
# Add an "alert" alias for long running commands. Use like so:
# sleep 10; alert
# Add an "alert" alias for long running commands.
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# 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).
# enable programmable completion features
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
@@ -115,9 +88,28 @@ if ! shopt -oq posix; then
. /etc/bash_completion
fi
fi
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init --path)"
fi
export PYENV_ROOT="$HOME/.pyenv"
export XDG_DATA_DIRS="/usr/local/share:/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
alias ghostty="ghostty 2>/dev/null"
{{- if eq .chezmoi.os "linux" }}
# --- Linux/WSL Specifics ---
{{- if (lstat (joinPath .chezmoi.homeDir ".local/bin/env")) }}
. "$HOME/.local/bin/env"
{{- end }}
{{- if (lstat (joinPath .chezmoi.homeDir ".cargo/env")) }}
. "$HOME/.cargo/env"
{{- end }}
cd ~
{{- end }}
{{- if eq .chezmoi.os "windows" }}
# --- Windows Specifics ---
# Add your windows-specific bash (git bash) tweaks here if any.
{{- end }}
-7
View File
@@ -1,7 +0,0 @@
data
*.db
config_install.json
editable_packages.json
version.txt
*.pem
artifacts.properties
+74
View File
@@ -0,0 +1,74 @@
# This is the configuration file for Ghostty.
#
# This template file has been automatically created at the following
# path since Ghostty couldn't find any existing config files on your system:
#
# /home/riz/.config/ghostty/config
#
# The template does not set any default options, since Ghostty ships
# with sensible defaults for all options. Users should only need to set
# options that they want to change from the default.
#
# Run `ghostty +show-config --default --docs` to view a list of
# all available config options and their default values.
#
# Additionally, each config option is also explained in detail
# on Ghostty's website, at https://ghostty.org/docs/config.
#
# Ghostty can reload the configuration while running by using the menu
# options or the bound key (default: Command + Shift + comma on macOS and
# Control + Shift + comma on other platforms). Not all config options can be
# reloaded while running; some only apply to new windows and others may require
# a full restart to take effect.
# Config syntax crash course
# ==========================
# # The config file consists of simple key-value pairs,
# # separated by equals signs.
# font-family = Iosevka
# window-padding-x = 2
#
# # Spacing around the equals sign does not matter.
# # All of these are identical:
# key=value
# key= value
# key =value
# key = value
#
# # Any line beginning with a # is a comment. It's not possible to put
# # a comment after a config option, since it would be interpreted as a
# # part of the value. For example, this will have a value of "#123abc":
# background = #123abc
#
# # Empty values are used to reset config keys to default.
# key =
#
# # Some config options have unique syntaxes for their value,
# # which is explained in the docs for that config option.
# # Just for example:
# resize-overlay-duration = 4s 200ms
font-family = CaskaydiaCove Nerd Font
font-size = 10
theme = Atom
# --- Aesthetics ---
gtk-adwaita = true
window-decoration = client
window-step-resize = true
gtk-titlebar = true
background-opacity = 0.9
background-blur = 20
window-padding-x = 10
window-padding-y = 10
# --- Cursor ---
cursor-style = block
cursor-style-blink = true
# --- Integration & Usability ---
copy-on-select = true
confirm-close-surface = false
mouse-hide-while-typing = true
View File
Binary file not shown.
+31
View File
@@ -0,0 +1,31 @@
scan_timeout = 1500
format = """
$os$shell$hostname$username$directory$git_branch$git_status$status
$character"""
[os]
disabled = false
format = "[$symbol](bold $STARSHIP_DEVICE_COLOR) "
[os.symbols]
Windows = "󰍲 "
Ubuntu = " "
[shell]
disabled = false
powershell_indicator = "pwsh"
bash_indicator = "bash"
zsh_indicator = "zsh"
style = "cyan bold"
[status]
disabled = false
format = "[$symbol]($style) "
symbol = " "
[character]
success_symbol = "[>](bold green)"
error_symbol = "[>](bold red)"
+1
View File
@@ -0,0 +1 @@
/mnt/c/Users/reazul.ashraf/AppData/Local/nvim
+1
View File
@@ -0,0 +1 @@
insecure
+9 -10
View File
@@ -1,5 +1,4 @@
<settings>
<localRepository>c:/devtools/.m2/repository</localRepository>
<pluginGroups>
<pluginGroup>org.sonarsource.scanner.maven</pluginGroup>
</pluginGroups>
@@ -7,17 +6,17 @@
<server>
<id>italy-vlt-virtual</id>
<username>reazul.ashraf</username>
<password>AP6CxZgXfEdMtABPHJcW9DZeyT</password>
<password>APGb3CYtNHNBLddz53HxVqjvu1</password>
</server>
<server>
<id>inggRepo</id>
<username>reazul.ashraf</username>
<password>AP6CxZgXfEdMtABPHJcW9DZeyT</password>
<password>APGb3CYtNHNBLddz53HxVqjvu1</password>
</server>
<server>
<id>inggReleases</id>
<username>reazul.ashraf</username>
<password>AP6CxZgXfEdMtABPHJcW9DZeyT</password>
<password>APGb3CYtNHNBLddz53HxVqjvu1</password>
</server>
<server>
<id>inggSnapshots</id>
@@ -27,32 +26,32 @@
<server>
<id>repoPlugins</id>
<username>reazul.ashraf</username>
<password>AP6CxZgXfEdMtABPHJcW9DZeyT</password>
<password>APGb3CYtNHNBLddz53HxVqjvu1</password>
</server>
<server>
<id>jcenter</id>
<username>reazul.ashraf</username>
<password>AP6CxZgXfEdMtABPHJcW9DZeyT</password>
<password>APGb3CYtNHNBLddz53HxVqjvu1</password>
</server>
<server>
<id>releasePlugins</id>
<username>reazul.ashraf</username>
<password>AP6CxZgXfEdMtABPHJcW9DZeyT</password>
<password>APGb3CYtNHNBLddz53HxVqjvu1</password>
</server>
<server>
<id>jcenterPlugins</id>
<username>reazul.ashraf</username>
<password>AP6CxZgXfEdMtABPHJcW9DZeyT</password>
<password>APGb3CYtNHNBLddz53HxVqjvu1</password>
</server>
<server>
<id>inspired-corporate</id>
<username>reazul.ashraf</username>
<password>AP6CxZgXfEdMtABPHJcW9DZeyT</password>
<password>APGb3CYtNHNBLddz53HxVqjvu1</password>
</server>
<server>
<id>inspired-rpm-release</id>
<username>reazul.ashraf</username>
<password>AP6CxZgXfEdMtABPHJcW9DZeyT</password>
<password>APGb3CYtNHNBLddz53HxVqjvu1</password>
</server>
<server>
<id>registry.docker.ingg.com</id>
+31
View File
@@ -0,0 +1,31 @@
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
. "$HOME/.local/bin/env"
. "$HOME/.cargo/env"
+49
View File
@@ -0,0 +1,49 @@
set-option -g prefix C-b
set -g mouse on
# General settings
set -g base-index 1 # start windows at 1
setw -g pane-base-index 1 # start panes at 1
set -g renumber-windows on # renumber windows when one is closed
setw -g mode-keys vi # use vim keys in copy mode
set-option -g status-position top
# Key bindings
bind r source-file ~/.tmux.conf \; display "Config Reloaded!"
bind-key "|" split-window -h -c "#{pane_current_path}"
bind-key C-| split-window -h -c "#{pane_current_path}"
bind-key "\\" split-window -v -c "#{pane_current_path}"
bind-key C-\\ split-window -v -c "#{pane_current_path}"
bind-key "-" split-window -fv -c "#{pane_current_path}"
bind-key C-- split-window -fv -c "#{pane_current_path}"
bind -r "<" swap-window -d -t -1
bind -r ">" swap-window -d -t +1
bind c new-window -c "#{pane_current_path}"
bind Space last-window
bind-key C-Space switch-client -l
# Pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Pane resizing
bind -r C-j resize-pane -D 15
bind -r C-k resize-pane -U 15
bind -r C-h resize-pane -L 15
bind -r C-l resize-pane -R 15
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'erikw/tmux-powerline'
# Initialize TMUX plugin manager
run '~/.tmux/plugins/tpm/tpm'
-126
View File
@@ -1,126 +0,0 @@
-- Pull in the wezterm API
local wezterm = require 'wezterm'
-- This table will hold the configuration.
local config = {}
local keys = {}
local mouse_bindings = {}
local launch_menu = {}
if wezterm.config_builder then
config = wezterm.config_builder()
end
local mux = wezterm.mux
local act = wezterm.action
wezterm.on('format-window-title', function(tab, pane, tabs, panes, config)
local zoomed = 'wezterm: '
if tab.active_pane.is_zoomed then
zoomed = '[Z] '
end
local index = ''
if #tabs > 1 then
index = string.format('[%d/%d] ', tab.tab_index + 1, #tabs)
end
return zoomed .. index .. tab.active_pane.title
end)
config.enable_kitty_graphics = true
config.ssh_backend = "Ssh2"
config.ssh_domains = {}
config.leader = { key = 'a', mods = 'CTRL', timeout_milliseconds = 1000 }
config.use_fancy_tab_bar = true
config.enable_scroll_bar = true
config.initial_rows = 48
config.initial_cols = 160
config.window_decorations = "INTEGRATED_BUTTONS | RESIZE"
config.default_prog = { 'pwsh.exe', '-NoLogo' }
config.font = wezterm.font('CaskaydiaCove Nerd Font', { weight = 'Regular' })
config.font_size = 10.0
config.front_end = "WebGpu"
config.webgpu_power_preference = 'HighPerformance'
config.max_fps = 120
config.animation_fps = 120
config.scrollback_lines = 10000
config.default_cursor_style = "SteadyBar"
config.color_scheme = 'Adventure'
config.window_background_opacity = 1.0
config.window_background_gradient = {
orientation = 'Vertical',
colors = {
'#000000', '#000100', '#000200', '#000300', '#000400', '#000500',
'#000600', '#000700', '#000800', '#000900', '#001200',
},
interpolation = 'Linear',
blend = 'Rgb',
}
config.launch_menu = {
{
label = "PowerShell",
args = {"C:/Program Files/PowerShell/7/pwsh.exe", "-WorkingDirectory", wezterm.home_dir},
domain = {DomainName="local"}
},
{
label = 'cmd',
args = {'cmd.exe'}
},
{
label = 'Ubuntu',
args = {'wsl','-d','Ubuntu'}
}
}
-- switch active tab
local act = wezterm.action
config.keys = {
{
key = 'a', mods = 'LEADER|CTRL', action = act.SendKey { key = 'a', mods = 'CTRL' }},
-- Panes
{ key = "\\", mods="LEADER", action=act{SplitVertical={domain="CurrentPaneDomain"}}},
{ key = "|", mods="LEADER|SHIFT", action=act{SplitHorizontal={domain="CurrentPaneDomain"}}},
{ key = "w", mods="CTRL|SHIFT", action=act{CloseCurrentPane={confirm=true}}},
{ key = "LeftArrow", mods="CTRL|SHIFT", action=act{ActivatePaneDirection="Left"}},
{ key = "RightArrow", mods="CTRL|SHIFT", action=act{ActivatePaneDirection="Right"}},
{ key = "UpArrow", mods="CTRL|SHIFT", action=act{ActivatePaneDirection="Up"}},
{ key = "DownArrow", mods="CTRL|SHIFT", action=act{ActivatePaneDirection="Down"}},
-- Tabs
{ key = 'n', mods = 'CTRL|SHIFT', action=act.SpawnTab 'DefaultDomain'},
{ key = 'u', mods = 'CTRL|SHIFT', action=act.SpawnTab { DomainName = 'WSL:Ubuntu'}},
{ key = "Tab", mods="CTRL", action=act{ActivateTabRelative=-1}},
{ key = "Tab", mods="CTRL|SHIFT", action=act{ActivateTabRelative=1}},
{ key = "1", mods="CTRL", action=act{ActivateTab=(1-1)}},
{ key = "2", mods="CTRL", action=act{ActivateTab=(2-1)}},
{ key = "3", mods="CTRL", action=act{ActivateTab=(3-1)}},
{ key = "4", mods="CTRL", action=act{ActivateTab=(4-1)}},
{ key = "5", mods="CTRL", action=act{ActivateTab=(5-1)}},
{ key = "6", mods="CTRL", action=act{ActivateTab=(6-1)}},
{ key = "7", mods="CTRL", action=act{ActivateTab=(7-1)}},
{ key = "8", mods="CTRL", action=act{ActivateTab=(8-1)}},
{ key = "9", mods="CTRL", action=act{ActivateTab=(9-1)}},
}
-- triple click on my output to select it
mouse_bindings = {
{
event = { Down = { streak = 3, button = 'Left' } },
action = act.SelectTextAtMouseCursor 'SemanticZone',
mods = 'NONE',
},
}
return config
+232
View File
@@ -0,0 +1,232 @@
-- Pull in the wezterm API
local wezterm = require 'wezterm'
local config = {}
local act = wezterm.action
if wezterm.config_builder then
config = wezterm.config_builder()
end
-- --------------------------------------------------------------------
-- 1. HELPERS & STATE
-- --------------------------------------------------------------------
local function is_vim(pane)
-- This checks the process name of the active pane
local process_name = pane:get_foreground_process_name()
return process_name:find('n?vim') ~= nil or process_name:find('vim.exe') ~= nil
end
local key_to_dir = {
h = 'Left',
j = 'Down',
k = 'Up',
l = 'Right',
}
local function split_nav(resize_or_move, key)
return {
key = key,
mods = resize_or_move == 'resize' and 'META' or 'CTRL',
action = wezterm.action_callback(function(win, pane)
if is_vim(pane) then
-- pass the keys through to vim/nvim
win:perform_action({
SendKey = { key = key, mods = resize_or_move == 'resize' and 'META' or 'CTRL' },
}, pane)
else
if resize_or_move == 'resize' then
win:perform_action({ AdjustPaneSize = { key_to_dir[key], 3 } }, pane)
else
win:perform_action({ ActivatePaneDirection = key_to_dir[key] }, pane)
end
end
end),
}
end
-- --------------------------------------------------------------------
-- 2. EVENTS (Status Bar & Workspace Tracking)
-- --------------------------------------------------------------------
wezterm.on('update-right-status', function(window, pane)
local cells = {}
-- Workspace Name
table.insert(cells, "󱔐 " .. window:active_workspace())
-- Battery/Power (check if battery info exists to avoid errors on desktops)
local battery = wezterm.battery_info()
if battery and #battery > 0 then
for _, b in ipairs(battery) do
table.insert(cells, string.format('%.0f%%', b.state_of_charge * 100))
end
end
-- Date & Day
table.insert(cells, wezterm.strftime('󰃭 %a %d %b'))
-- Time
table.insert(cells, wezterm.strftime('󱑒 %H:%M'))
local colors = { '#313244', '#45475a', '#585b70', '#6c7086' } -- Catppuccin Mocha colors
local text_fg = '#cdd6f4'
local elements = {}
for i, seg in ipairs(cells) do
table.insert(elements, { Background = { Color = colors[i] or '#313244' } })
table.insert(elements, { Foreground = { Color = text_fg } })
table.insert(elements, { Text = ' ' .. seg .. ' ' })
end
window:set_right_status(wezterm.format(elements))
end)
wezterm.on('format-window-title', function(tab, pane, tabs, panes, config)
local zoomed = 'wezterm: '
if tab.active_pane.is_zoomed then zoomed = '[Z] ' end
local index = #tabs > 1 and string.format('[%d/%d] ', tab.tab_index + 1, #tabs) or ''
return zoomed .. index .. tab.active_pane.title
end)
-- --------------------------------------------------------------------
-- 3. VISUALS (Windows 11 Mica & Aesthetics)
-- --------------------------------------------------------------------
{{- if eq .chezmoi.os "windows" }}
config.win32_system_backdrop = 'Mica'
config.window_background_opacity = 0.85
config.prefer_egl = true -- Often smoother on Windows
{{- else }}
config.window_background_opacity = 1.0
{{- end }}
config.text_background_opacity = 1.0
config.color_scheme = 'Adventure'
config.front_end = "WebGpu"
config.webgpu_power_preference = 'HighPerformance'
config.max_fps = 120
config.animation_fps = 1 -- Disable UI animations for "snappier" feel
config.font = wezterm.font('CaskaydiaCove NF', { weight = 'Regular' })
config.font_size = 10.0
config.line_height = 1.1 -- Slightly more breathing room
config.default_cursor_style = "SteadyBar"
config.window_decorations = "INTEGRATED_BUTTONS | RESIZE"
config.use_fancy_tab_bar = false -- Faster rendering than fancy tab bar
config.enable_scroll_bar = false -- Cleaner look
config.initial_rows = 48
config.initial_cols = 160
-- --------------------------------------------------------------------
-- 4. GENERAL CONFIG
-- --------------------------------------------------------------------
config.use_ime = false -- Reduces input latency
config.use_dead_keys = false -- Better for coding (no double-quote issues)
config.pane_focus_follows_mouse = true
config.inactive_pane_hsb = {
saturation = 0.8,
brightness = 0.5,
}
-- Colors for the UI
config.colors = {
split = '#313244',
}
-- Default Shell Configuration
{{- if eq .chezmoi.os "windows" }}
config.default_prog = { 'pwsh.exe', '-NoLogo' }
{{- else }}
config.default_prog = { 'zsh', '-l' }
{{- end }}
config.scrollback_lines = 20000
config.enable_kitty_graphics = true
config.ssh_backend = "Ssh2"
-- Leader key Configuration
config.leader = { key = ' ', mods = 'CTRL', timeout_milliseconds = 1000 }
config.launch_menu = {
{{- if eq .chezmoi.os "windows" }}
{ label = "PowerShell", args = {"C:/Program Files/PowerShell/7/pwsh.exe"}, domain = {DomainName="local"}},
{ label = 'cmd', args = {'cmd.exe'}},
{ label = 'Ubuntu', args = {'wsl','-d','Ubuntu'}}
{{- else }}
{ label = "Zsh", args = {"zsh", "-l"}},
{{- end }}
}
-- --------------------------------------------------------------------
-- 5. KEYBINDINGS
-- --------------------------------------------------------------------
config.keys = {
-- Leader passthrough
{ key = 'b', mods = 'LEADER|CTRL', action = act.SendKey { key = 'a', mods = 'CTRL' }},
-- Smart Splits (CTRL+h/j/k/l to move between WezTerm and Neovim)
split_nav('move', 'h'),
split_nav('move', 'j'),
split_nav('move', 'k'),
split_nav('move', 'l'),
-- Panes
{ key = "\\", mods="LEADER", action=act{SplitVertical={domain="CurrentPaneDomain"}}},
{ key = "|", mods="LEADER|SHIFT", action=act{SplitHorizontal={domain="CurrentPaneDomain"}}},
{ key = "w", mods="CTRL|SHIFT", action=act{CloseCurrentPane={confirm=true}}},
{ key = "z", mods="LEADER", action=act.TogglePaneZoomState },
-- Tabs
{ key = 'n', mods = 'CTRL|SHIFT', action=act.SpawnTab 'DefaultDomain'},
{ key = "Tab", mods="CTRL", action=act{ActivateTabRelative=-1}},
{ key = "Tab", mods="CTRL|SHIFT", action=act{ActivateTabRelative=1}},
-- Workspaces
{ key = 's', mods = 'LEADER', action = act.ShowLauncherArgs { flags = 'WORKSPACES' }},
{ key = '$', mods = 'LEADER|SHIFT', action = act.PromptInputLine {
description = 'Enter new name for workspace',
action = wezterm.action_callback(function(window, pane, line)
if line then wezterm.mux.rename_workspace(wezterm.mux.get_active_workspace(), line) end
end),
}},
-- Quick Select (Grab URLs/Hashes)
{
key = 'f',
mods = 'LEADER',
action = act.QuickSelectArgs {
label = 'open url',
patterns = { 'https?://\\S+' },
action = wezterm.action_callback(function(window, pane)
local url = window:get_selection_text_for_pane(pane)
wezterm.open_with(url)
end),
},
},
}
-- Bind number keys to tabs
for i = 1, 9 do
table.insert(config.keys, {
key = tostring(i),
mods = 'CTRL',
action = act.ActivateTab(i - 1),
})
end
-- Mouse Bindings
config.mouse_bindings = {
{
event = { Down = { streak = 3, button = 'Left' } },
action = act.SelectTextAtMouseCursor 'SemanticZone',
mods = 'NONE',
},
}
-- Hyperlink rules
config.hyperlink_rules = wezterm.default_hyperlink_rules()
table.insert(config.hyperlink_rules, {
regex = [=[(\b[A-Za-z]:\\[^\s:"']+\b)]=],
format = 'file://$1',
})
return config
+2
View File
@@ -0,0 +1,2 @@
check-certificate=off
+1
View File
@@ -0,0 +1 @@
export XDG_DATA_DIRS="/home/riz/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/home/hyperion/.local/share/flatpak/exports/share:$XDG_DATA_DIRS"
+1
View File
@@ -0,0 +1 @@
. "$HOME/.cargo/env"
-84
View File
@@ -1,84 +0,0 @@
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
VI_MODE_SET_CURSOR=true
MODE_INDICATOR="%F{yellow}+%f"
bindkey -v
bindkey 'jk' vi-cmd-mode
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
# export manpath="/usr/local/man:$manpath"
export LC_CTYPE=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8
export LANG=en_GB.UTF-8
export EDITOR='/usr/bin/nvim'
# to customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export PYENV_ROOT="$HOME/.pyenv"
export JDK8_HOME="$HOME/.jdks/jdk-1.8"
export JDK21_HOME="$HOME/.jdks/jdk-21"
export JAVA_HOME="$JDK21_HOME"
export GROOVY_HOME="$HOME/devtools/groovy"
export M2_HOME="$HOME/devtools/maven"
export NODE_ENV=development
export PATH="$JAVA_HOME/bin:$M2_HOME/bin:$GROOVY_HOME/bin:$PYENV_ROOT/bin:$HOME/.npm-global/bin:/snap/bin:$HOME/.local/bin:/usr/local/bin:/usr/bin:/mnt/c/windows/system32"
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off
export ZSH="/home/riz/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k"
plugins=(git vi-mode zsh-autosuggestions zsh-syntax-highlighting zsh-history-substring-search)
#source /usr/share/doc/fzf/examples/key-bindings.zsh
export LIBGL_ALWAYS_INDIRECT=1
#export NNN_PLUG='f:finder;o:fzopen;p:mocplay;d:diffs;t:nmount;v:imgview'
export NNN_ARCHIVE="\\.(7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)$"
export DENO_INSTALL="/home/riz/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
source $ZSH/oh-my-zsh.sh
alias fcd='cd $(find * -type d | fzf)'
alias vi=nvim
alias jdk8home="export JAVA_HOME=$JDK8_HOME"
alias jdk21home="export JAVA_HOME=$JDK21_HOME"
alias g=git
alias cat=batcat
alias bat=batcat
alias code="/mnt/c/Program\ Files/Microsoft\ VS\ Code/bin/code"
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
gsquash() {
git reset --soft head~$(git rev-list --count head ^$1)
echo "To complete then do, git push --force"
}
dmvn() {
ws="/mnt/c/users/reazul.ashraf/workspace/uichannel-commission-bootstrap"
echo "ws: $ws"
id="$(docker run -t -d -u root:root -v /home/riz/.m2:/volume/.m2 -w $ws -v $ws:$ws:rw,z -v $ws@tmp:$ws@tmp:rw,z maven:3-openjdk-8-slim cat)"
echo "id: $id"
docker exec -ti $id ls -alp $ws
docker kill $id
}
sonarscan() {
MAVEN_OPTS="-Dsonar.branch.name=$(git branch --show-current)" JAVA_HOME=$JDK21_HOME mvn org.sonarsource.scanner.maven:sonar-maven-plugin:RELEASE:sonar -DskipTests
}
source /snap/google-cloud-cli/current/completion.zsh.inc
#if command -v pyenv >/dev/null 2>&1; then
# eval "$(pyenv init -)"
#fi
eval "$(zoxide init --cmd z zsh)"
+166
View File
@@ -0,0 +1,166 @@
{{- if eq .chezmoi.os "linux" -}}
# Instant prompt for Powerlevel10k
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# --- Homebrew Initialization ---
if [ -f "/home/linuxbrew/.linuxbrew/bin/brew" ]; then
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
fi
{{- end }}
VI_MODE_SET_CURSOR=true
MODE_INDICATOR="%F{yellow}+%f"
bindkey -v
bindkey 'jk' vi-cmd-mode
# Visual feedback for vi mode
function zle-keymap-select {
if [[ $KEYMAP == vicmd ]]; then
echo -ne "\e[2 q" # Block
else
echo -ne "\e[6 q" # Beam
fi
}
zle -N zle-keymap-select
echo -ne "\e[6 q" # Start with beam
precmd() { echo -ne "\e[6 q" } # Reset to beam before prompt
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
export LC_CTYPE=en_GB.UTF-8
export LC_ALL=en_GB.UTF-8
export LANG=en_GB.UTF-8
export EDITOR='/usr/bin/nvim'
export MAVEN_OPTS='-Dstyle.color=always'
# Options
setopt AUTO_CD
setopt CORRECT
setopt HIST_IGNORE_DUPS
setopt SHARE_HISTORY
# History
HISTSIZE=10000
SAVEHIST=10000
HISTFILE=~/.zsh_history
# to customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export PYENV_ROOT="$HOME/.pyenv"
export JDK8_HOME="$HOME/.jdks/jdk-1.8"
export JDK21_HOME="$HOME/.jdks/jdk-21"
export JDK25_HOME="$HOME/.jdks/jdk-25"
export JAVA_HOME="$JDK21_HOME"
export GROOVY_HOME="$HOME/devtools/groovy"
export M2_HOME="$HOME/devtools/maven"
export NODE_ENV=development
{{- if eq .chezmoi.os "linux" }}
export GDK_BACKEND=x11
export PNPM_HOME="$HOME/.local/share/pnpm"
export PATH="$PNPM_HOME:$HOME/.local/bin:$PATH:$JAVA_HOME/bin:$M2_HOME/bin:$GROOVY_HOME/bin:$PYENV_ROOT/bin:$HOME/.npm-global/bin:/snap/bin"
{{- else }}
export PATH="$JAVA_HOME/bin:$M2_HOME/bin:$GROOVY_HOME/bin:$PYENV_ROOT/bin:$HOME/.npm-global/bin:/snap/bin:$HOME/.local/bin:/usr/local/bin:/usr/bin"
{{- end }}
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
export ZSH="$HOME/.oh-my-zsh"
plugins=(
git
vi-mode
zsh-autosuggestions
zsh-history-substring-search
zsh-completions
{{- if eq .chezmoi.os "linux" }}
fzf-tab
{{- end }}
zsh-syntax-highlighting
)
{{- if eq .chezmoi.os "linux" }}
# fzf-tab settings
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
zstyle ':fzf-tab:complete:*' fzf-flags --color=fg:1,fg+:2 --height=50%
zstyle ':completion:*:descriptions' format '[%d]'
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
{{- end }}
if command -v fzf >/dev/null 2>&1; then
source <(fzf --zsh)
fi
export FZF_DEFAULT_OPTS="--height 40% --layout=reverse --border --preview 'bat --style=numbers --color=always --line-range :500 {}'"
export FZF_CTRL_T_OPTS="--preview 'bat --style=numbers --color=always --line-range :500 {}'"
export FZF_ALT_C_OPTS="--preview 'eza --tree --icons --color=always {} | head -200'"
# General Aliases
alias ai='gemini'
alias vi=nvim
alias g=git
alias lg=lazygit
alias code="/mnt/c/Users/reazul.ashraf/AppData/Local/Programs/Microsoft\ VS\ Code/bin/code"
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
# --- Gold Standard Tool Mapping ---
if command -v eza >/dev/null 2>&1; then
alias ls='eza --icons --group-directories-first'
alias la='eza --icons -la --group-directories-first --git'
alias tree='eza --tree --icons'
else
alias ls='ls --color=auto'
alias la='ls -la'
fi
if command -v bat >/dev/null 2>&1; then alias cat='bat'; fi
if command -v batcat >/dev/null 2>&1; then alias cat='batcat'; alias bat='batcat'; fi
if command -v fd >/dev/null 2>&1; then alias find='fd'; alias ff='fd'; fi
if command -v rg >/dev/null 2>&1; then alias grep='rg'; fi
if command -v sd >/dev/null 2>&1; then alias sed='sd'; fi
if command -v choose >/dev/null 2>&1; then alias awk='choose'; fi
if command -v procs >/dev/null 2>&1; then alias ps='procs'; fi
if command -v btm >/dev/null 2>&1; then alias top='btm'; fi
if command -v xh >/dev/null 2>&1; then alias curl='xh'; fi
if command -v ouch >/dev/null 2>&1; then alias zip='ouch'; alias tar='ouch'; fi
if command -v delta >/dev/null 2>&1; then alias diff='delta'; fi
# Navigation
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
# Functions
fcd() {
local dir
dir=$(fd -t d 2>/dev/null | fzf --preview 'eza --tree --icons --color=always {} | head -200') && cd "$dir"
}
alias jdk8home="export JAVA_HOME=$JDK8_HOME"
alias jdk21home="export JAVA_HOME=$JDK21_HOME"
alias jdk25home="export JAVA_HOME=$JDK25_HOME"
gsquash() {
git reset --soft head~$(git rev-list --count head ^$1)
echo "To complete then do, git push --force"
}
source $ZSH/oh-my-zsh.sh
{{- if eq .chezmoi.os "linux" }}
export STARSHIP_DEVICE_COLOR="orange"
export STARSHIP_CONFIG=~/.config/starship_linux.toml
eval "$(starship init zsh)"
alias refresh-vpn='powershell.exe -ExecutionPolicy Bypass -File "C:\Users\reazul.ashraf\scripts\refresh_wsl_vpn.ps1"'
{{- end }}
eval "$(zoxide init --cmd z zsh)"
# Autosuggestions color
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=cyan'
# Start in ~
cd ~
@@ -1,3 +1,7 @@
# Default file encoding to UTF-8 (no BOM)
$OutputEncoding = [System.Text.UTF8Encoding]::new($false)
[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false)
# Prioritize Scoop shims
$scoopShims = "$env:USERPROFILE\scoop\shims"
if ($env:Path -notlike "$scoopShims*") {
@@ -11,10 +15,14 @@ if ($env:Path -notlike "$scoopShims*") {
$env:YAZI_FILE_ONE = 'C:\Program Files\Git\usr\bin\file.exe'
$env:POSH_GIT_ENABLED = $true
$env:POSH_GIT_ENABLED = $false
$env:POSH_THEME = "$env:POSH_THEMES_PATH\nordtron.omp.json"
oh-my-posh --init --shell pwsh --config $env:POSH_THEME | Invoke-Expression
Import-Module Terminal-Icons
Import-Module DockerCompletion
Import-Module CompletionPredictor
Set-PSReadLineKeyHandler -Chord 'Ctrl+Spacebar' -Function MenuComplete
#Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { Invoke-FzfTabCompletion }
Set-PSReadlineKeyHandler -Key Shift+Tab -Function TabCompletePrevious
@@ -29,7 +37,6 @@ Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
#Set-PSReadLineOption -EditMode Windows
Set-PSReadlineOption -EditMode Vi
Set-PSReadLineOption -ViModeIndicator Cursor
@@ -140,6 +147,7 @@ Set-Alias -Name g -Value git
Set-Alias -Name cat -Value bat
Set-Alias -Name fork -Value 'C:\Users\reazul.ashraf\AppData\Local\Fork\Fork.exe'
Set-Alias -Name winfetch -Value pwshfetch-test-1
Set-Alias -Name ocgv -Value Out-ConsoleGridView
function vcvars {
&'C:\Program Files\Microsoft Visual Studio\18\Community\Common7\Tools\Launch-VsDevShell.ps1' -SkipAutomaticLocation
@@ -174,14 +182,12 @@ function acl {
}
function jdk8home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-8.0.472.8-hotspot" }
function jdk8home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-8.0.482.8-hotspot" }
function jdk8home32 { $env:JAVA_HOME="C:\Program Files (x86)\Eclipse Adoptium\jdk-8.0.472.8-hotspot" }
function jdk21home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-21.0.9.10-hotspot" }
function jdk25home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-25.0.1.8-hotspot" }
function jdk21home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-21.0.10.7-hotspot" }
function jdk25home { $env:JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-25.0.2.10-hotspot" }
function java { &$env:JAVA_HOME/bin/java.exe $args }
# set java home
jdk21home
function gemini { $env:NODE_OPTIONS="$env:NODE_OPTIONS --no-deprecation"; gemini.ps1}
function sonarscan {
pwsh -Command {
@@ -190,6 +196,7 @@ function sonarscan {
if ($null -eq $branch) { exit }
$env:MAVEN_OPTS="-Dsonar.dependencyCheck.htmlReportPath=target/dependency-check-report.html -Dsonar.dependencyCheck.jsonReportPath=target/dependency-check-report.json -Dsonar.branch.name=$branch"
mvn org.sonarsource.scanner.maven:sonar-maven-plugin:RELEASE:sonar -DskipTests -Drevision="$Env:USERNAME-$Env:COMPUTERNAME"
New-BurntToastNotification -Text "Sonar Scan Complete", "Branch: $branch"
}
}
@@ -198,6 +205,7 @@ function owaspdepcheck {
jdk25home
$env:MAVEN_OPTS="-Djdk.util.zip.disableZip64ExtraFieldValidation=true"
mvn -B org.owasp:dependency-check-maven:RELEASE:aggregate -DskipTests -Dformats='XML,JSON,HTML' -DnvdApiKey=b00166ac-5422-402e-830c-998beba0265d
New-BurntToastNotification -Text "OWASP Dependency Check Complete"
}
}
@@ -205,8 +213,21 @@ function owaspdepcheck {
# squash all commits into one
function gsquash { &git reset --soft HEAD~$(git rev-list --count HEAD ^$args) }
# Initialize a project for gemini-cli
function ginit {
&git init
&git checkout -b gemini-cli
Write-Host "Initialized git repository on 'gemini-cli' branch." -ForegroundColor Cyan
}
# set java home
jdk25home
$env:EDITOR = 'nvim'
$env:VISUAL = 'nvim'
$env:LESS = '-R -F -X'
$env:BAT_PAGER = 'less -R -F -X'
$env:DOCKER_HOST = "tcp://127.0.0.1:2375"
$env:GEMINI_API_KEY = 'inse-r-and-d' # Added by Gemini CLI
fnm env --use-on-cd | Out-String | Invoke-Expression
+2 -2
View File
@@ -1,13 +1,13 @@
Write-Host "Checking for required PowerShell modules..."
$modules = @(
"oh-my-posh",
"posh-git",
"Profiler",
"PSFzf",
"PSProfiler",
"PSScriptAnalyzer",
"Terminal-Icons",
"gsudoModule"
"Terminal-Icons"
)
foreach ($mod in $modules) {