Skip to content

Instantly share code, notes, and snippets.

@sharpicx
Last active May 15, 2025 00:47
Show Gist options
  • Save sharpicx/662a505b04141f9b634c66ab9bae4724 to your computer and use it in GitHub Desktop.
Save sharpicx/662a505b04141f9b634c66ab9bae4724 to your computer and use it in GitHub Desktop.
windows terminal emulator themes | my windows ricing
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"pwd": "osc99",
"palette": {
"os": "#ff269a",
"closer": "p:os",
"pink": "#F5C2E7",
"lavender": "#6699df",
"blue": "#ab9df2"
},
"blocks": [
{
"alignment": "left",
"segments": [
{
"foreground": "p:os",
"style": "plain",
"template": "<b>󰣇</b> ",
"type": "os"
},
{
"foreground": "p:blue",
"style": "plain",
"template": "<b>{{ .UserName }}</b>@<b>{{ .HostName }}</b> ",
"type": "session"
},
{
"foreground": "p:lavender",
"properties": {
"folder_icon": "..\ue5fe..",
"home_icon": "~",
"style": "agnoster_short"
},
"style": "plain",
"template": "{{ .Path }} ",
"type": "path"
},
{
"foreground": "p:lavender",
"properties": {
"branch_icon": "\ue725 ",
"cherry_pick_icon": "\ue29b ",
"commit_icon": "\uf417 ",
"fetch_status": false,
"fetch_upstream_icon": false,
"merge_icon": "\ue727 ",
"no_commits_icon": "\uf0c3 ",
"rebase_icon": "\ue728 ",
"revert_icon": "\uf0e2 ",
"tag_icon": "\uf412 "
},
"template": "{{ .HEAD }} ",
"style": "plain",
"type": "git"
},
{
"style": "plain",
"foreground": "p:closer",
"template": "\uf105",
"type": "text"
}
],
"type": "prompt"
}
],
"final_space": true,
"version": 3
}
# My custom theme:
# - single line
# - quite simple by default: user@host:$PWD
# - green for local shell as non root
# - red for ssh shell as non root
# - magenta for root sessions
# - prefix with remote address for ssh shells
# - prefix to detect docker containers or chroot
# - git plugin to display current branch and status
# git plugin
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[cyan]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
# by default, use green for user@host and no prefix
local ZSH_ESSEMBEH_COLOR="magenta"
local ZSH_ESSEMBEH_PREFIX="%{$fg[red]%}󰣇%{$reset_color%} "
if [[ -n "$SSH_CONNECTION" ]]; then
# display the source address if connected via ssh
ZSH_ESSEMBEH_PREFIX="%{$fg[yellow]%}[$(echo $SSH_CONNECTION | awk '{print $1}')]%{$reset_color%} "
# use red color to highlight a remote connection
ZSH_ESSEMBEH_COLOR="red"
elif [[ -r /etc/debian_chroot ]]; then
# prefix prompt in case of chroot
ZSH_ESSEMBEH_PREFIX="%{$fg[yellow]%}[chroot:$(cat /etc/debian_chroot)]%{$reset_color%} "
elif [[ -r /.dockerenv ]]; then
# also prefix prompt inside a docker container
ZSH_ESSEMBEH_PREFIX="%{%B$fg[yellow]%}[docker]%{$reset_color%} "
fi
if [[ $UID = 0 ]]; then
# always use magenta for root sessions, even in ssh
ZSH_ESSEMBEH_COLOR="magenta"
fi
#PROMPT='${ZSH_ESSEMBEH_PREFIX}%{%B$fg[$ZSH_ESSEMBEH_COLOR]%}%n@%M%{$reset_color%} %{$fg[cyan]%}[%2~]%{$reset_color%b%} $(git_prompt_info)%(!.#.$) '
PROMPT='${ZSH_ESSEMBEH_PREFIX}%{%B$fg[$ZSH_ESSEMBEH_COLOR]%}%n@ARCI%{$reset_color%} %{$fg[blue]%}%2~%{$reset_color%b%} $(git_prompt_info)%(!.#.$fg[red]$reset_color) '
RPROMPT="%(?..%{$fg[red]%}%?%{$reset_color%})"
Import-Module -Name Terminal-Icons
Import-Module PSReadLine
Set-PSReadLineOption -PredictionSource History
Import-Module PSFzf
#Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+t' -PSReadlineChordReverseHistory 'Ctrl+r'
function Fzf-PSReadLineHistory {
Add-Type -AssemblyName System.Windows.Forms
$history = Get-Content (Get-PSReadLineOption).HistorySavePath | Out-String -Stream
$selected = $history | fzf --height=40% --reverse --layout=reverse
if ($selected) {
[System.Windows.Forms.SendKeys]::SendWait($selected)
}
}
Set-PSReadLineKeyHandler -Chord "Ctrl+r" -ScriptBlock { Fzf-PSReadLineHistory }
Set-PsFzfOption -TabExpansion
Set-PSReadLineKeyHandler -Key Tab -ScriptBlock { Invoke-FzfTabCompletion }
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
oh-my-posh init pwsh --config 'C:\Users\via\AppData\Local\Programs\oh-my-posh\themes\catppuccin_mocha.omp.json' | Invoke-Expression
Remove-Item -Path Alias:\cat -ErrorAction SilentlyContinue
Set-Alias vim nvim
Set-Alias sudo gsudo
function lin {
& "C:\Windows\system32\wsl.exe" -e zsh
}
function cat {
& 'C:\Programs_Fazle\bat.exe' --plain @args
}
function apktool {
& java -jar 'C:\Programs_Fazle\apktool.jar' @args
}
function c {
clear
}
function clear_proxy {
adb shell "settings put global global_http_proxy_host ''"; adb shell "settings put global global_http_proxy_port 0"; adb shell "settings delete global http_proxy"; adb reverse --remove tcp:8080
}
function Set-LocationAndShowDir{
param($path)
try {
Set-Location $path -ErrorAction Stop
ls
} catch {
Write-Error $_
}
}
function Update-WSLPath {
$pwdPath = (Get-Location).Path
$escapedPath = $pwdPath.Replace('\', '\\')
$outFile = "$env:USERPROFILE\.wsl_pwd"
try {
$escapedPath | Out-File -Encoding ASCII -Force -FilePath $outFile
} catch {
Write-Warning "Failed to write to $outFile"
}
}
Remove-Alias cd
function cd {
param(
[string]$path = "$HOME"
)
if (Test-Path $path) {
Set-LocationAndShowDir $path
Update-WSLPath
} else {
Write-Host "Path?: $path"
}
}
Remove-Alias ls
function ls {
param([string]$path)
Get-ChildItem $path
Update-WSLPath
}
#Remove-Alias cd
#Set-Alias cd Set-LocationAndShowDir -Force
function rmrf { Remove-Item -Recurse -Force -Confirm:$false @args }
function burp_proxy { $a = netstat -anonp tcp | findstr "8080" | findstr "LISTENING"; if ($a) { $b = adb reverse --list; if (-not $b) { adb reverse tcp:8080 tcp:8080; adb shell "settings put global global_http_proxy_port 8080"; adb shell "settings put global global_http_proxy_port 8080"; adb shell "settings put global http_proxy 127.0.0.1:8080" } else { Write-Output "[+] port dah ada" } } else { Write-Output "[-] 8080 not found" } }
# Import the Chocolatey Profile that contains the necessary code to enable
# tab-completions to function for `choco`.
# Be aware that if you are missing these lines from your profile, tab completion
# for `choco` will not function.
# See https://ch0.co/tab-completion for details.
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1"
if (Test-Path($ChocolateyProfile)) {
Import-Module "$ChocolateyProfile"
}
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
"actions":
[
{
"command":
{
"action": "copy",
"singleLine": false
},
"id": "User.copy.644BA8F2"
},
{
"command":
{
"action": "splitPane",
"split": "right",
"splitMode": "duplicate"
},
"id": "User.splitPane.FEF0D40B"
},
{
"command": "paste",
"id": "User.paste"
},
{
"command":
{
"action": "splitPane",
"split": "down",
"splitMode": "duplicate"
},
"id": "User.splitPane.10B260D2"
},
{
"command":
{
"action": "splitPane",
"split": "auto",
"splitMode": "duplicate"
},
"id": "User.splitPane.A6751878"
},
{
"command": "find",
"id": "User.find"
}
],
"alwaysOnTop": false,
"alwaysShowTabs": false,
"copyFormatting": "none",
"copyOnSelect": false,
"defaultProfile": "{a3a2e83a-884a-5379-baa8-16f193a13b21}",
"disableAnimations": true,
"focusFollowMouse": true,
"keybindings":
[
{
"id": "User.splitPane.A6751878",
"keys": "ctrl+shift+d"
},
{
"id": "User.copy.644BA8F2",
"keys": "ctrl+c"
},
{
"id": "User.splitPane.FEF0D40B",
"keys": "ctrl+shift+plus"
},
{
"id": "User.find",
"keys": "ctrl+shift+f"
},
{
"id": "User.paste",
"keys": "ctrl+v"
},
{
"id": "User.splitPane.10B260D2",
"keys": "ctrl+shift+minus"
}
],
"newTabMenu":
[
{
"type": "remainingProfiles"
}
],
"profiles":
{
"defaults":
{
"colorScheme": "Monokai Pro",
"cursorShape": "bar",
"experimental.retroTerminalEffect": false,
"font":
{
"cellHeight": "1",
"face": "UbuntuMono Nerd Font",
"size": 10
},
"historySize": 32767,
"intenseTextStyle": "bold",
"opacity": 100,
"padding": "2",
"scrollbarState": "hidden",
"useAcrylic": false
},
"list":
[
{
"commandline": "%SystemRoot%\\System32\\WindowsPowerShell\\v1.0\\powershell.exe -nologo -ExecutionPolicy Bypass",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell"
},
{
"commandline": "%SystemRoot%\\System32\\cmd.exe",
"guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}",
"hidden": false,
"name": "Command Prompt"
},
{
"guid": "{b453ae62-4e3d-5e58-b989-0a998ec441b8}",
"hidden": false,
"name": "Azure Cloud Shell",
"source": "Windows.Terminal.Azure"
},
{
"guid": "{a5a97cb8-8961-5535-816d-772efe0c6a3f}",
"hidden": false,
"name": "Arch",
"source": "Windows.Terminal.Wsl"
},
{
"guid": "{72282daa-b5b8-5001-bc15-a4616d1f9b33}",
"hidden": false,
"name": "Developer Command Prompt for VS 2022",
"source": "Windows.Terminal.VisualStudio"
},
{
"guid": "{f056e721-c9a2-57dd-916a-988a04ed5df1}",
"hidden": false,
"name": "Developer PowerShell for VS 2022",
"source": "Windows.Terminal.VisualStudio"
},
{
"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
"hidden": false,
"name": "PowerShell",
"source": "Windows.Terminal.PowershellCore"
},
{
"commandline": "\"C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe\" -nologo -ExecutionPolicy Bypass -command \"wsl.exe -d Arch -e zsh -ic 'tmux has-session -t SHARPICX 2>/dev/null && exec tmux attach-session -t SHARPICX || exec tmux new-session -s SHARPICX'\"",
"guid": "{a3a2e83a-884a-5379-baa8-16f193a13b21}",
"hidden": false,
"name": "PowerShell 7 Preview",
"source": "Windows.Terminal.PowershellCore"
},
{
"guid": "{16208362-94fc-5b1f-a491-5b2624d5ab56}",
"hidden": true,
"name": "Visual Studio Debug Console",
"source": "VSDebugConsole"
}
]
},
"rendering.graphicsAPI": "direct3d11",
"schemes":
[
{
"background": "#000000",
"black": "#2D2A2E",
"blue": "#6699DF",
"brightBlack": "#969596",
"brightBlue": "#6699DF",
"brightCyan": "#78DCE8",
"brightGreen": "#A9DC76",
"brightPurple": "#AB9DF2",
"brightRed": "#FF6188",
"brightWhite": "#FCFCFA",
"brightYellow": "#FFD866",
"cursorColor": "#FFFFFF",
"cyan": "#78DCE8",
"foreground": "#FCFCFA",
"green": "#A9DC76",
"name": "Monokai Pro",
"purple": "#AB9DF2",
"red": "#FF6188",
"selectionBackground": "#FFFFFF",
"white": "#FCFCFA",
"yellow": "#FFD866"
},
{
"background": "#000000",
"black": "#5C5C5C",
"blue": "#61AFEF",
"brightBlack": "#6B7574",
"brightBlue": "#61AFEF",
"brightCyan": "#56B6C2",
"brightGreen": "#98C379",
"brightPurple": "#C678DD",
"brightRed": "#E06C75",
"brightWhite": "#FFFFFF",
"brightYellow": "#D19A66",
"cursorColor": "#FFFFFF",
"cyan": "#56B6C2",
"foreground": "#A3A3A3",
"green": "#98C379",
"name": "One Dark",
"purple": "#C678DD",
"red": "#E06C75",
"selectionBackground": "#FFFFFF",
"white": "#ABB2BF",
"yellow": "#D19A66"
},
{
"background": "#F9F9F9",
"black": "#000000",
"blue": "#4078F2",
"brightBlack": "#676971",
"brightBlue": "#4078F2",
"brightCyan": "#0184BC",
"brightGreen": "#50A14F",
"brightPurple": "#A626A4",
"brightRed": "#E45649",
"brightWhite": "#FFFFFF",
"brightYellow": "#986801",
"cursorColor": "#FFFFFF",
"cyan": "#0184BC",
"foreground": "#383A42",
"green": "#50A14F",
"name": "One Light",
"purple": "#A626A4",
"red": "#E45649",
"selectionBackground": "#FFFFFF",
"white": "#A0A1A7",
"yellow": "#986801"
}
],
"showTabsInTitlebar": false,
"showTerminalTitleInTitlebar": false,
"snapToGridOnResize": false,
"tabWidthMode": "compact",
"theme": "legacyDark",
"themes": [],
"useAcrylicInTabRow": false
}
# tmux configuration by sharpicx.
#my lovely arch, archicx.
# Unbinded keys
unbind n # default: next window
unbind p # default: previous winodow
unbind C-b # default: prefix
unbind r
unbind h
unbind v
unbind % # default: key of vertcial split
unbind '"' # default: key of horizontal split
unbind c # default: create a new window
unbind k # default: none at all.
unbind , # default: rename
unbind +
unbind C-c
# ---
# ---
# General Settings.
# ---
set -g repeat-time 200
setw -g allow-rename off
setw -g automatic-rename off
set -g buffer-limit 20
set -g default-terminal "xterm-256color"
set -g base-index 1
set -g set-titles off
set -g base-index 1
set -g aggressive-resize on
set -g mouse on
set -g focus-events on
set -g mode-keys vi
set -s copy-command 'xclip -sel clipboard'
# ---
# replacing the default prefix with a new one.
# ---
set -g prefix C-a
bind-key a send-prefix
# ---
# key to reload a config file.
# ---
set -g default-command '/usr/local/bin/pwsh-nologo.sh'
bind + source ~/.tmux.conf \; display 'CONFIG RELOADED!'
# ---
# Window settings
# ---
bind -T copy-mode-vi s command-prompt -i -p "(search down)" "send -X search-forward-incremental \"%%%\""
bind -T copy-mode-vi r command-prompt -i -p "(search up)" "send -X search-backward-incremental \"%%%\""
# error in the sequences of these keys
bind-key -n Home send Escape "OH"
bind-key -n End send Escape "OF"
# create window
bind c new-window -c "#{pane_current_path}"
# kill window and pane
bind x kill-pane
bind X kill-window
# renaming window & session
bind r command-prompt "rename-window '%%"
bind R command-prompt "rename-session '%%'"
# hotkey to switch between panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# hotkeys to make a move between windows in a session.
bind -n S-Left previous-window
bind -n S-Right next-window
# Splitting Panels.
bind - split-window -v -c "#{pane_current_path}"
bind | split-window -h -c "#{pane_current_path}"
set -g display-panes-time 20000
# activating UTF-8
# set-window-option -g utf8 on
# moving pane to a new window.
bind-key C-@ choose-window 'join-pane -s "%%"'
# status line
source "/home/via/.local/lib/python3.11/site-packages/powerline/bindings/tmux/powerline.conf"
# set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
# adding more history.
set -g history-limit 200000
# List of plugins
set -g @plugin 'catppuccin/tmux'
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-cpu'
set -g @plugin 'laktak/extrakto'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'wfxr/tmux-fzf-url'
set -g @plugin 'tmux-plugins/tmux-urlview'
# Other examples:
# doesnt work
# set -g @plugin "arcticicestudio/nord-tmux"
set -g @plugin 'b0o/tmux-autoreload'
set -g @catppuccin_flavor "mocha"
set -g @catppuccin_window_status_style "rounded"
set -g @catppuccin_window_current_text " #W"
set -g @catppuccin_window_default_text " #W"
set -g @catppuccin_window_text " #W"
run /home/via/.tmux/plugins/tmux/catppuccin.tmux
set -g status-right-length 100
set -g status-left-length 100
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_application}"
set -agF status-right "#{E:@catppuccin_status_cpu}"
set -ag status-right "#{E:@catppuccin_status_session}"
set -ag status-right "#{E:@catppuccin_status_uptime}"
set -agF status-right "#{E:@catppuccin_status_battery}"
set -agF status-right "#[fg=#{@thm_crust},bg=#{@thm_teal}] ##H "
run ~/.tmux/plugins/tmux-cpu/cpu.tmux
run ~/.tmux/plugins/tmux-battery/battery.tmux
set -g pane-border-style "fg=#606060, bg=#000000"
set -g pane-active-border-style "fg=red, bg=#000000"
set-option -g status-position top
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:$HOME/.local/bin:/usr/local/bin:$PATH
# Path to your Oh My Zsh installation.
export ZSH="$HOME/.oh-my-zsh"
export LC_CTYPE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/PowerShell/7-preview/preview:/mnt/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Program Files/nodejs/:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Neovim/bin:/mnt/c/Users/via/AppData/Roaming/Python/Python312/Scripts:/mnt/c/Users/via/.cargo/bin:/mnt/c/Users/via/AppData/Local/Programs/Python/Launcher/:/mnt/c/Users/via/AppData/Local/Programs/oh-my-posh/bin/:/mnt/c/Windows/system32/:/mnt/c/Users/via/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/via/AppData/Local/Programs/oh-my-posh/bin:/mnt/c/Program Files (x86)/Nmap:/mnt/c/Users/via/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/via/.dotnet/tools:/mnt/c/Users/via/go/bin:/mnt/c/Users/via/AppData/Local/Microsoft/WinGet/Packages/AgileBits.1Password.CLI_Microsoft.Winget.Source_8wekyb3d8bbwe/:/mnt/c/Users/via/AppData/Local/Microsoft/WinGet/Packages/Genymobile.scrcpy_Microsoft.Winget.Source_8wekyb3d8bbwe/scrcpy-win64-v3.1:/mnt/c/Users/via/AppData/Local/Microsoft/WinGet/Packages/epi052.feroxbuster_Microsoft.Winget.Source_8wekyb3d8bbwe:/mnt/c/Users/via/AppData/Local/Microsoft/WinGet/Packages/BurntSushi.ripgrep.MSVC_Microsoft.Winget.Source_8wekyb3d8bbwe/ripgrep-14.1.1-x86_64-pc-windows-msvc:/mnt/c/Users/via/AppData/Roaming/npm:/mnt/c/Users/via/AppData/Local/Microsoft/WinGet/Packages/sharkdp.fd_Microsoft.Winget.Source_8wekyb3d8bbwe/fd-v10.2.0-x86_64-pc-windows-msvc:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/via/.local/share/gem/ruby/3.3.0/bin:/home/via/.local/bin:/home/via/go/bin:/home/via/.nimble/bin"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time Oh My Zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="essembeh"
# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment one of the following lines to change the auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
# Uncomment the following line to change how often to auto-update (in days).
# zstyle ':omz:update' frequency 13
# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS="true"
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# You can also set it to another string to have that shown instead of the default red dots.
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git fzf)
source $ZSH/oh-my-zsh.sh
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='nvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch $(uname -m)"
# Set personal aliases, overriding those provided by Oh My Zsh libs,
# plugins, and themes. Aliases can be placed here, though Oh My Zsh
# users are encouraged to define aliases within a top-level file in
# the $ZSH_CUSTOM folder, with .zsh extension. Examples:
# - $ZSH_CUSTOM/aliases.zsh
# - $ZSH_CUSTOM/macos.zsh
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias ls="exa --icons=always"
alias cat="bat --plain"
alias c="clear"
autoload -U compinit; compinit
function list_all() {
emulate -L zsh
ls -la
}
web() {
a1="if0_35958422"
a2="c3gnRHwF83Xu5vO"
command=$1
shift
case $command in
ls)
if [ -z "$1" ]; then
echo "[!] usage: web ls <remote_dir>"
return 1
fi
lftp -u $a1,$a2 ftpupload.net -e "cd sharpi.cx/htdocs/$1; ls; exit"
;;
put)
if [ -z "$1" ] || [ -z "$2" ]; then
echo "[!] usage: web put <local_file> <remote_dir>"
return 1
fi
file_to_upload=$1
target_dir=$2
lftp -u $a1,$a2 ftpupload.net -e "cd sharpi.cx/htdocs/$target_dir; put $file_to_upload; exit"
;;
get)
if [ -z "$1" ] || [ -z "$2" ]; then
echo "[!] usage: web get <remote_file> <remote_dir>"
return 1
fi
file_to_download=$1
target_dir=$2
lftp -u $a1,$a2 ftpupload.net -e "cd sharpi.cx/htdocs/$target_dir; get $file_to_download; exit"
;;
cat)
if [ -z "$1" ]; then
echo "[!] usage: web cat <remote_file>"
return 1
fi
file_to_cat=$1
lftp -u $a1,$a2 ftpupload.net -e "cd sharpi.cx/htdocs/; cat $file_to_cat; exit"
;;
*)
echo "[!] available commands: ls, put, get, cat"
return 1
;;
esac
}
fay() {
packages=$(awk {'print $1'} <<< $(yay -Ss $1 | awk 'NR%2 {printf "\033[1;32m%s \033[0;36m%s\033[0m ΓÇö ",$1,$2;next;}{ print substr($0, 5, length($0) - 4); }' | fzf -m --ansi))
[ "$packages" ] && yay -S $(echo "$packages" | tr "\n" " ")
}
fzfman() {
packages="$(awk {'print $1'} <<< $(pacman -Ss $1 | awk 'NR%2 {printf "\033[1;32m%s \033[0;36m%s\033[0m ΓÇö ",$1,$2;next;}{ print substr($0, 5, length($0) - 4); }' | fzf -m --ansi --select-1))"
[ "$packages" ] && pacman -S $(echo "$packages" | tr "\n" " ")
}
fixit() {
mv ~/.zsh_history ~/.zsh_history_bad
strings -eS ~/.zsh_history_bad > ~/.zsh_history
fc -R ~/.zsh_history
rm ~/.zsh_history_bad
}
cheat() {
if [ $# -lt 1 ]; then
echo '[-] error, a argument is missing.'
else
curl -s "cheat.sh/$1" | bat
fi
}
smartdec() {
if [ $# -lt 1 ]; then
echo -e 'usage: smartdec <string>'
else
decrypt=$(python -c "import html; string = \"$1\"; print(html.unescape(string))")
python -c "import urllib.parse; string = \"$decrypt\"; print(urllib.parse.unquote(string))"
fi
}
diffing() {
git diff --word-diff-regex=. $1 $2
}
urlenc() {
case $1 in
plus) python -c "import urllib.parse; string = '''$2'''; print(urllib.parse.quote_plus(string))" ;;
normal) python -c "import urllib.parse; string = '''$2'''; print(urllib.parse.quote(string))" ;;
*) echo -e "usage: urlencode [normal|plus] string\nby sharpicx" ;;
esac
}
urldec() {
case $1 in
normal)
python -c "import urllib.parse; string = '''$2'''; print(urllib.parse.unquote(string))"
;;
plus)
python -c "import urllib.parse; string = '''$2'''; print(urllib.parse.unquote_plus(string))"
;;
*)
echo -e "usage: urldecode [normal|plus] string"
;;
esac
}
toPS1() {
python -c "import base64; print(base64.b64encode(open('''$1''', 'r').read().encode('utf-16-le')).decode())"
}
chpwd_functions=(${chpwd_functions[@]} "list_all")
source /home/via/.oh-my-zsh/plugins/fzf-tab2/fzf-tab.plugin.zsh
source /home/via/.config/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source /home/via/.config/zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment