This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| #Put in /etc/adblock.sh | |
| #Block ads, malware, etc. | |
| # Only block wireless ads? Y/N | |
| ONLY_WIRELESS="N" | |
| # IPv6 support? Y/N | |
| IPV6="N" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name="Krusader"; | |
| session_num=$(qdbus org.kde.konsole /Konsole newSession) | |
| sleep 0.03 | |
| qdbus org.kde.konsole /Sessions/$session_num setTitle 0 $name | |
| sleep 0.03 | |
| qdbus org.kde.konsole /Sessions/$session_num setTitle 1 $name | |
| sleep 0.03 | |
| qdbus org.kde.konsole /Sessions/$session_num sendText "cd $1" | |
| sleep 0.03 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ########################### ALIASES | |
| alias _='sudo' | |
| alias ll="ls -al" | |
| alias sz="source ~/.zshrc" | |
| #Opens current directory in a file explorer | |
| alias ex='doublecmd .' | |
| #Opens current directory in a file explorer with super user privileges | |
| alias suex='sudo doublecmd .' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############################# HOOKS ##################### | |
| #function virtualenv_preexec() { | |
| function virtualenv_precmd(){ | |
| FOUND_ENV=0; | |
| x=`pwd`; | |
| while [ "$x" != "/" ] ; do ; | |
| #echo "$x"; | |
| if [ `find "$x" -maxdepth 1 -name .venv` ]; then | |
| FOUND_ENV=1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| typeset -A virtualenv_map | |
| virtualenv_map=() | |
| for file in ~/.virtualenvs/*/.project(N) | |
| virtualenv_map[${file:h:t}]=$(<$file) | |
| virtualenv_chpwd() | |
| { | |
| setopt local_options no_auto_pushd | |
| local project_path longest_path new_venv | |
| if [[ $ZSH_SUBSHELL == 0 ]] && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # virtualenv-auto-activate.sh | |
| # | |
| # Installation: | |
| # Add this line to your .bashrc or .bash-profile: | |
| # | |
| # source /path/to/virtualenv-auto-activate.sh | |
| # | |
| # Go to your project folder, run "virtualenv .venv", so your project folder | |
| # has a .venv folder at the top level, next to your version control directory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # virtualenv-auto-activate.sh | |
| # | |
| # Installation: | |
| # Add this line to your .bashrc or .bash-profile: | |
| # | |
| # source /path/to/virtualenv-auto-activate.sh | |
| # | |
| # Go to your project folder, run "virtualenv .venv", so your project folder | |
| # has a .venv folder at the top level, next to your version control directory. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function cd() { builtin cd $1 && ls } | |
| function pman() { man -t "${1}" | open -f -a /Applications/Preview.app } | |
| function preview() { open -a Preview $* } | |
| # Force 'sudo zsh' to start root as a loging shell to | |
| # avoid problems with environment clashes | |
| function sudo() { | |
| if [[ $1 = "zsh" ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #http://zshwiki.org/home/examples/zleiab | |
| typeset -Ag abbreviations | |
| abbreviations=( | |
| "Im" "| more" | |
| "Ia" "| awk" | |
| "Ig" "| grep" | |
| "Ieg" "| egrep" | |
| "Iag" "| agrep" | |
| "Igr" "| groff -s -p -t -e -Tlatin1 -mandoc" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ################ mudasobwa prompt ################## | |
| for config_file ($HOME/.yadr/zsh/*.zsh) source $config_file | |
| autoload -U colors && colors | |
| autoload -Uz promptinit | |
| promptinit | |
| prompt mudasobwa | |
| ################################################ | |
| #EDIT MAIN THEME ############################### |