alias lsa='ls -lah'
alias gbd='go build -ldflags="-s -w"'
alias zk='zk -W ~/cyb/note/'
alias pandoc='pandoc --template ~/.local/share/pandoc/template.html -s -f markdown -t html -V mainfont="Chakra Petch" -V fontsize=25px --metadata-file ~/.local/share/pandoc/metadata.yaml --toc'
alias note='cd ~/cyb/notes/'
alias pass='passage'
alias rami='shred -fzuv $@'
alias li='ls -li'
alias r='ranger $@'
# alias m='mpv'
alias ip='ip -br -c a'
alias feh='feh --conversion-timeout 1'
alias gimp='((gimp > /dev/null 2>&1)&)'
alias jtl='journalctl -f'
alias ggc='cd ~/git/playground/'
alias px='pwd | xclip' 
alias ..='cd .. 2>/dev/null || cd "$(dirname $PWD)"'
alias mouse='doas modprobe -r psmouse && doas modprobe psmouse'
alias anydesk='anydesk && xmodmap ~/.Xmodmap'
alias zq='zathura $HOME/kit/pdf/Quran/Quran.pdf &'
alias jbs='JEKYLL_ENV=production bundle exec jekyll serve'
alias getip="curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'"
alias du='du -h'
alias colorize='toilet --gay -f term $@'
alias xquery='xdg-mime query filetype $1'
alias c='xclip-copyfile'
alias p='xclip-pastefile'
alias d='xclip-cutfile'
alias awr="awesome-client 'awesome.restart()'"
alias z='zathura $1'
alias cpwd='pwd | tr -d "\n" | xsel -ib'
alias info='info --vi-keys'
alias tmp='mkdir /tmp/$$ ; cd /tmp/$$'
alias thumbs='sxiv -atrq "$@"'
alias untmp='rm -rf /tmp/$$'
alias dox='cd ~/dos'
alias ipp='curl ipinfo.io/ip'
alias img="imgur-screenshot $@"
alias mwx='mplayer -vo fbdev2 -vf scale=931:580 -geometry 978:4 -ni $1'
alias ta='\tmux a -t'
alias sct='termite -t 'scratchpad' &'
alias sxt='xfce4-terminal -T scratchpad &'
alias subupdate='git submodule foreach git pull origin master'
alias ncm='ncmpcpp 2>/dev/null'
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias un='$EDITOR /home/ak/lab/notes/shell/zsh'
alias ipy='ipython3'
alias tmux='tmux has-session -t $USER || tmux new-session -s $USER &&  tmux -2 attach-session -t $USER'
alias py='python3'
alias cdw='cd ~/git/dwm; ls'
#alias pyc='export _JAVA_AWT_WM_NONREPARENTING=1 ; $HOME/bin/pycharm/bin/pycharm.sh $1'
alias cdc='cd $HOME/cfg'
alias chkill="ps ux | grep '[C]hrome --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
alias pak='cd $HOME/git/ports/ak'
alias psgrep='ps aux | grep $(echo $1 | sed "s/^\(.\)/[\1]/g")'
alias tkill='\tmux kill-session -a'
alias vte='$EDITOR ~/.config/termite/config'
alias pgs='prt-get search'
alias pt='doas prt-get'
alias pgf='prt-get fsearch'
alias pgi='doas prt-get install'
alias ltd='ls *(m0)' # files and dirs modified in the last day
alias lt='ls *(.m0)' # files modified in last day (no dirs)
alias ltr='ls -ltr'
alias lnew='ls *(.om[1,3])' # list three newest
alias lsrdir='ls -d *(/om[1])'
alias lH='ls -d .*' # only hidden files
alias lh='ls -lh'
alias pa='doas pkgadd'
alias ytvid='yt-dlp --restrict-filenames -o "~/mus/vid/%(title)s_%(width)sx%(height)s_%(upload_date)s.%(ext)s"'
alias ytaudio='yt-dlp --restrict-filenames -x --audio-quality 0 --audio-format mp3 -o "~/mus/%(title)s_%(width)sx%(height)s_%(upload_date)s.%(ext)s"'
alias sit='cd ~/git/mysite/'
alias reboot='doas reboot'
alias api='doas apt install --yes -V'
alias aps='apt search $1'
alias spy='lsof -i -P +c 0 +M'
alias netlist='lsof -i -P | grep LISTEN'
alias apg='doas apt purge -V'
#alias mk='$EDITOR $HOME/lab/notes/python/learnPython'
alias xq='xbps-query'
alias xi='doas xbps-install'
alias xr='doas xbps-remove'
alias vx='$EDITOR ~/.Xresources'
if [ -f ~/.config/git/config ]; then alias vg="git config -e --global"; fi
alias vmc='$EDITOR ~/.config/nvim/init.vim'
alias fst='doas $EDITOR /etc/fstab'
#alias u="urxvt -pixmap '`find ~/pix/wall/ -name '*.jpg' | sort -R | head -n 1`;style=tiled' -T myKitten &" 
#alias u='termite -t myKitten &'
#alias mk='doas $EDITOR /etc/portage/make.conf'
#alias py='pyscript'
alias mutc='$EDITOR ~/.config/mutt/muttrc'
alias msc='mbsync -VXa'
#alias termux='terminator -g ~/.config/terminator/configfortermux'
alias ssr='simplescreenrecorder --start-hidden --no-systray'
#alias nv='doas $EDITOR /etc/nixos/configuration.nix'
#alias wtc="qutebrowser -s content.headers.user_agent 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36' web.whatsapp.com &"
alias cdm='cd ~/mus'
alias xf='xfce4-terminal'
alias lf='leafpad'
alias gd='git diff'
alias cD='cd ~/sys/downloads'
alias ds="dirs -v | head -n 10"
alias lla='ls -la'
alias lc='ls | wc -l'
#alias less=/usr/share/vim/vim82/macros/less.sh
#alias less=$PAGER
#alias zless=$PAGER
alias chmod='chmod --preserve-root'
alias vc='$EDITOR ~/.vimrc'
alias g='git'
alias ter='\tmux a -r -t'
alias tl='\tmux ls'
#alias git='hub'
alias gs='git status'
alias 'apar'='doas apt autoremove -V'
alias xp='xrdb -merge ~/.Xresources'
alias cdv='cd ~/dev'
alias gu='git push'
alias vw='$EDITOR $HOME/.config/sway/config'
alias top='htop'
alias ga='git add'
alias cdd='cd ~/.cfg'
alias q='exit'
alias sm='doas mount'
alias fk='$EDITOR ~/.zsh/functions'
alias plz='doas $(fc -ln -1)'
alias rfz='source $HOME/.zshrc'
alias vz='$EDITOR $HOME/.zshrc'
alias rr='fc -s'
alias df='df -h'
alias S='systemctl'
alias cdg='cd $HOME/git'
alias clock='ncmpcpp -s clock'
alias cm='mutt 2>/dev/null'
alias vp='$EDITOR $HOME/.config/polybar/config.ini'
alias cp='cp -i'
alias mv='mv -i'
#alias pb="curl -sF c=@- 'https://ptpb.pw/?u=1' | xsel"
alias mi='mid3v2'
alias mnv='mpv --no-video'
alias mp='mpv --loop-file'
alias mq='mpv --really-quiet --speed=0.50 --loop-file'
alias ms='mpv --really-quiet --shuffle'
alias hr='printf $(printf "\e[$(shuf -i 91-97 -n 1);1m%%%ds\e[0m\n" $(tput cols)) | tr " " ='
alias starwars='telnet towel.blinkenlights.nl'
alias e='evince'
alias sv='doas $EDITOR'
alias rf='source $HOME/.bashrc'
alias a='cd $HOME/.config'
alias sk='autoscript'
alias alis='$EDITOR ~/.zsh/custom-alias'
alias yt='cd $HOME/mus/ && youtube-viewer && cd -'
alias v3='$EDITOR $HOME/.config/i3/config'
# Install the package only if its not updated/already installed
alias si='doas pacman -S --needed'
# Remove the package
alias sr='doas pacman -R'
# Remove the package with dependencies not required by other packages too.
alias srs='doas pacman -Rs'
# Remove the package, dependencies and also those who depend on it
alias srsc='doas pacman -Rsc'
# Remove the package with no .pacsave configurations being left.
alias srn='doas pacman -Rn'
# Update the system
alias update='doas pacman -Syu'
# Get info about a package
alias ssi='pacman -Si'
# Same thing with local packages
alias sqi='pacman -Qi'
# Query local packages
alias sq='pacman -Qs'
# Search a package
alias pS='pacman -Ss'
# Also display modified and backed up files
alias sqii='pacman -Qii'
# Files installed by package
alias sqd='pacman -Ql'
# Same thing for a remote package
alias sqr='pacman -Fl'
# Verify presence of files installed by a package
alias sqk='pacman -Qk'
# Query a file in the filesystem belongs to which package
alias sqo='pacman -Qo'
# Same thing for a remote package
alias sqor='pacman -F'
# Check orphan packages
alias sor='pacman -Qdt'
# List packages installed explicitly
alias sde='pacman -Qet'
# Clean cache
alias sC='doas pacman -Scc'
# Download a package without installing it 
alias sdw='doas pacman -Sw'
# Install local package
alias sil='doas pacman -U'
alias awq='$EDITOR $HOME/.config/qtile/config.py'
alias vkt='$EDITOR $HOME/.config/kitty/kitty.conf'
alias awb='$EDITOR $HOME/.config/bspwm/bspwmrc'
alias awh='$EDITOR $HOME/.config/herbstluftwm/autostart'
alias br='$EDITOR $HOME/.config/bspwm/external_rules'
alias rfb='bash $HOME/.config/bspwm/bspwmrc'
alias cdb='cd $HOME/.config/bspwm'
alias awx='$EDITOR $HOME/.config/sxhkd/sxhkdrc'
alias rfi='i3 restart'
alias x='xdg-open'
alias lf='leafpad'
alias cfg-cava='$EDITOR $HOME/.config/cava/config'
alias lilbak='cmus-remote -k -10'
alias lilfor='cmus-remote -k +10'
alias bigbak='cmus-remote -k -120'
alias ct='cmus-remote -u'
alias bigfor='cmus-remote -k +120'
alias pup='bash $HOME/.config/polybar/launch.sh'
alias cdi='cd $HOME/.config/i3/'
alias cdp='cd $HOME/lab/pcc'
alias cdpo='cd $HOME/.config/polybar'
alias ll='ls -l'
alias lss='ls -lh'
alias k='clear'
alias wars='telnet towel.blinkenlights.nl'
alias moon='curl -sL http://wttr.in/moon | head -n-4'
alias mount='mount | column -t'
alias scrot='import png:- | xclip -selection c -t image/png'
# alias v='$EDITOR'
# alias vi='$EDITOR'

# zsh global functions
alias -g null="2>&1 >/dev/null"
