# --- flages --- # Clear-Host # --- source --- # . ~/.config/powershell/colours.ps1 # --- imports --- # Invoke-Expression (&starship init powershell) # --- PATHS --- # $env:PATH += ":$HOME/.local/bin" $env:PATH += ":$HOME/.opencode/bin" $env:PATH += ":$HOME/.cargo/bin" $env:PATH += ":/home/jadu/codespace/my-lang/nixi/src" # --- tools --- # $env:EDITOR="nvim" $env:PAGER="less" $env:TERM="xterm-256color" # zoxide Remove-Item Alias:cd -ErrorAction SilentlyContinue Invoke-Expression (& { (zoxide init powershell | Out-String) }) # --- BASIC --- # function source { . $PROFILE } function cd { if ($args.Count -gt 0) { z "$($args -join ' ')" } else { z } } function .. { z .. } function x { Clear-Host } function v { nvim $args } function y { yazi } function mk { mkdir $args } function t { New-Item $args -ItemType File } function ch { chmod +x $args } function th { thunar . } function cm { cmatrix } function :q { exit } # --- EZA --- function ls { eza --icons $args } function ll { eza --icons --long $args } function l { eza --icons --long $args } function lt { eza --icons --tree $args } # --- FILES --- function tar { tar -xvf $args } function un { unzip $args } function open { xdg-open $args } # --- GIT --- Remove-Item Alias:gi -ErrorAction SilentlyContinue Remove-Item Alias:gc -ErrorAction SilentlyContinue Remove-Item Alias:gp -ErrorAction SilentlyContinue function ga { git add @args } function gm { git commit -m @args } function gp { git push } function gs { git status } # --- SYSTEM --- function fa { fastfetch --logo Arch } function install { sudo pacman -S $args } function remove { sudo pacman -Rs $args } # --- MISC --- function code { opencode } # --- PSReadLine (Linux-safe, zsh-like) --- Import-Module PSReadLine Set-PSReadLineOption -EditMode Emacs Set-PSReadLineOption -PredictionSource History Set-PSReadLineOption -PredictionViewStyle InlineView Set-PSReadLineOption -Colors @{ Command = $ctp.blue Parameter = $ctp.teal String = $ctp.green Operator = $ctp.pink Variable = $ctp.mauve Number = $ctp.peach InlinePrediction = $ctp.overlay0 }