## my personal shorthands # TODO find PowerShell equivalents # d := disk usage information / directory size # e := edit file # f := find a file # g := search for a substring in text files # i := inform me with a message # l := list current working directory content # m := create folder and change to it # o := [file] open file for viewing or [folder] show current/this folder in file explorer # t := show file system tree with maxdepth 3 d() { df -h } e() { $EDITOR "$@" } f() { find . -iname "$1" } g() { #E=""; #if [[ "$2" == *.log ]]; then # E="$E --exclude='*.log'" #fi echo rg --color=always -g "\!*venv" -g "\!*.log" -g "\!*.depr" -g "\!node_module/**" -g "\!.git/**" $@ } i() { zenity --info --text "$1" } l() { pwd; ls -la } m() { if [ -z "$1" ]; then echo "folder name required"; else mkdir -p "$1" && cd "$1"; fi } o() { if [ -z "$1" ]; then thunar "$PWD" & else if [ -d "$1" ]; then thunar "$1" & else xdg-open "$@" fi; fi } t() { find . -maxdepth 3 } ## more shorthands c() { cd "$1" && find . -maxdepth 1 -type d && echo "\nCurrent working directory: $PWD" } alias py="python3" ## set environment variables export PATH="$PATH:$HOME/bin" # common unicode symbols chars() { echo " ♡ ♥ ❤ 💕 🧡 💓 "; echo " sup: ⁰¹²³⁴⁵⁶⁷⁸⁹ ⁺⁻⁼⁽⁾ ᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁⱽᵂ "; echo " sub: ₀₁₂₃₄₅₆₇₈₉ ₊₋₌₍₎ ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓ "; echo " 😀 😁 😂 😄 😅 😆 😃 😇 😉 😎 😊 🙂 😍 😘 😙 😚"; echo " 😛 😜 😝 🤓 😶 😐 😋 😌 😈 😏 😒 😓 😔 😑 😗 😲 "; echo " 😕 😖 😞 😟 🤔 🙃 👍 💩 🖥️ 💻 ⌨️ 🖊️ ✒️ ✍️ 🇦🇹 🇯🇵"; echo " ½ ¼ ¾ ⅐ ⅑ ⅒ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞ ⅟ ↉ ‰ ‱ © ® "; echo " ⟷ ← → ↓ ↑ × ✖ ⋮ … · ・ ÷ - - — ↤ ↦ ↧ ↥ ⟻ ⟼ "; echo " ⇔ ⇐ ⇒ ⇓ ⇑ ‖ ⟸ ⟹ ⤆ ⤇ ⇩ ⇧ ⟽ ⟾ ⟺ "; echo " ∀ ∃ ∈ ∉ ⊂ ⊆ ⊇ ⊃ ⋀ ∧ ⋁ ∨ ≠ ≡ ≢ ≅ ≤ ≥ ∆ ⊲ ¬ ℚ ℕ ℤ ℂ ℝ ∞ ∑ "; echo " “en” ‘en’ „dt“ ‚dt‘ «Guillemets» ‹fr› 《アルバム》【quote】「kagikakko」 † € £ ¥ 円 "; echo " α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω "; echo " Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω "; echo " ā ē ī ō ū ä ë ï ö ü ß Ä Ë Ï Ö Ü § … ♂ ♀ "; echo " ✓ 🗸 ✔ ✔️ ☑️ 🗹 ✅ ⍻ ⭕ 🗴 🗙 ❌ ❎ "; } wttr () { curl -4 http://wttr.in/ } up() { [ "${1/[^0-9]/}" == "$1" ] && { local ups="" for i in $(seq 1 $1); do ups=$ups"../" done cd "$ups" } || echo "usage: up INTEGER" } observe() { time "$@" && zenity --info --text="Command finished" }