Skip to content

Commit

Permalink
current config
Browse files Browse the repository at this point in the history
  • Loading branch information
autrimpo committed Oct 31, 2015
1 parent b152f63 commit f0b605d
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 26 deletions.
65 changes: 62 additions & 3 deletions modules/aliases/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function ltd() {
}

function rtd() {
#sed -i "/${1}/d" ~/TODO
sed -i "${1}d" ~/TODO
}

Expand All @@ -45,7 +44,7 @@ alias svim="sudo -E vim"
alias makemake="cp ~/.Makefile_temp ./Makefile"

# Update pacman mirrors
alias mirrupd="sudo reflector --verbose -l 200 -p http --sort rate --save /etc/pacman.d/mirrorlist"
alias mirrupd="sudo reflector --verbose -l 64 -p http -p https -p ftp --sort rate --save /etc/pacman.d/mirrorlist"

# Menu for bspwm actions
alias bmenu="mygtkmenu ~/.config/GTKmenu/BspwmMenu > /dev/null"
Expand Down Expand Up @@ -92,4 +91,64 @@ alias root="sudo -sE"
alias uu='devmon --unmount-all'

# use neovim
#alias vim=nvim
# alias vim=nvim

function 8dump()
{
if [[ "$#" -ne "3" ]]; then
printf 'Usage: %s [TARGET] [DIRECTORY] [DELAY]\n' ${FUNCNAME}
return
fi

printf '
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣠⣤⣴⣶⣶⣶⣦⣤⣄⣀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣄
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⠟⠁⣾⠿⠛⠉⠉⠀⠈⠉⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣷
⠀⠀⠀⠀⠀⠀⠀⣀⣤⣶⣶⣿⣿⣿⣿⣿⣷⣶⣦⣄⡀⠀⠀⠀⠀⢰⣿⠿⠋⠀⠀⠰⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢻⣿⣿⣿⣿⣿⣿⣿⡇
⠀⠀⠀⠀⢀⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣿⣿⣧
⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⡟
⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⣿⣿⣿⡇
⠀⣾⣿⣿⣿⣿⣿⣿⡟⠋⠀⠀⠀⠀⠀⠈⠉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⣀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⡿
⣸⣿⣿⣿⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣤⣶⣾⣿⣿⣿⣿⣿⣿⣿⡿⠁
⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁
⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⠁
⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡆⠀⠀⣠⣴⣿⡇⠀⠀⠀⠈⠛⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠋⠁
⠸⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⡀⠀⠀⠀⠀⢀⣠⣴⣿⢀⣠⣾⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠁
⠀⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣷⣿⣿⣿⣿⡟⠁
⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋
⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋
⠀⠀⠀⠀⠀⠀⠈⠙⠛⠿⠿⣿⣿⣿⣿⠿⠿⠛⠋⠁
'

local _link=$1
local _board=$(printf $1 | sed 's/^.*net\///; s/\/.*//')
local _thread=$(printf $1 | sed 's/^.*res\///; s/\..*//')

local _count=0
local _total=$(ls "$2" | wc -l)

for i in "$2"*; do
_count=$(($_count+1))

printf 'File: "%s" > Response: ' "$i"
curl --user-agent "Mozilla/5.0" \
--form "board=$_board" \
--form "body=$_count/$_total" \
--form "file=@$i" \
--form "json_response=1" \
--form "password=ayylmao" \
--form "post=New Reply" \
--form "thread=$_thread" \
--referer "https://8ch.net" \
"https://8ch.net/post.php"
sleep $3
printf '\n'
done
}

function silent(){
$@ &> /dev/null
}
44 changes: 25 additions & 19 deletions modules/pacman/init.zsh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#
# Defines Pacman aliases.
#
Expand All @@ -22,8 +23,7 @@ fi
zstyle -s ':prezto:module:pacman' frontend '_pacman_frontend'

if (( $+commands[$_pacman_frontend] )); then
#alias pacman="$_pacman_frontend"
_pacman_sudo='sudo '
alias pacman="$_pacman_frontend"

if [[ -s "${0:h}/${_pacman_frontend}.zsh" ]]; then
source "${0:h}/${_pacman_frontend}.zsh"
Expand All @@ -41,16 +41,16 @@ fi
alias pac="${_pacman_frontend}"

# Installs packages from repositories.
alias paci="${_pacman_sudo}${_pacman_frontend} -S"
alias paci="${_pacman_frontend} -S"

# Installs packages from files.
alias pacI="${_pacman_sudo}${_pacman_frontend} -U"
alias pacI="${_pacman_frontend} -U"

# Removes packages and unneeded dependencies.
alias pacx="${_pacman_sudo}${_pacman_frontend} -Rs"
alias pacx="${_pacman_frontend} -Rs"

# Removes packages, their configuration, and unneeded dependencies.
alias pacX="${_pacman_sudo}${_pacman_frontend} -Rns"
alias pacX="${_pacman_frontend} -Rns"

# Displays information about a package from the repositories.
alias pacq="${_pacman_frontend} -Si"
Expand All @@ -59,43 +59,49 @@ alias pacq="${_pacman_frontend} -Si"
alias pacQ="${_pacman_frontend} -Qi"

# Searches for packages in the repositories.
alias pacs="${_pacman_frontend} -Ss"
if [ "${_pacman_frontend}" = "pacaur" ];then
alias pacs="${_pacman_frontend} -Ssr"
else
alias pacs="${_pacman_frontend} -Ss"
fi

# Searches for packages in the local database.
alias pacS="${_pacman_frontend} -Qs"

# Lists orphan packages.
alias paco="${_pacman_frontend} -O"
alias pacman-list-orphans="${_pacman_frontend} --query --deps --unrequired"

# Removes orphan packages.
alias pacox"${_pacman_sudo}${_pacman_frontend} --remove --recursive \$(${_pacman_frontend} --quiet --query --deps --unrequired)"
alias pacman-remove-orphans="${_pacman_frontend} --remove --recursive \$(${_pacman_frontend} --quiet --query --deps --unrequired)"

# Synchronizes the local package and Arch Build System databases against the
# repositories.
if (( $+commands[abs] )); then
alias pacu="${_pacman_sudo}${_pacman_frontend} -Sy && ${_pacman_sudo}abs"
alias pacu="${_pacman_frontend} -Sy && ${_pacman_sudo}abs"
else
alias pacu="${_pacman_sudo}${_pacman_frontend} -Sy"
alias pacu="${_pacman_frontend} -Sy"
fi

# Synchronizes the local package database against the repositories then
# upgrades outdated packages.
alias pacU="${_pacman_sudo}${_pacman_frontend} -Syu"
if [ "${_pacman_frontend}" = "pacaur" ];then
alias pacU="${_pacman_frontend} -Syur"
else
alias pacU="${_pacman_frontend} -Syu"
fi

# AUR commands
# Installs a package from AUR
alias yai="${_pacman_sudo}${_pacman_frontend} -A"

# Upgrades AUR packages only
alias yau="${_pacman_sudo}${_pacman_frontend} -Au"
alias yaU="${_pacman_frontend} -Sua"

# Upgrade all AUR packages, show PKGBUILD diffs, and remove unneeded makedeps after installation
alias yaU="${_pacman_sudo}${_pacman_frontend} -Akua"
# Upgrade AUR packages without asking for edits
alias yau="${_pacman_frontend} -Sua --noedit"

# Search AUR packages
alias yas="${_pacman_frontend} -ASs"
alias yas="${_pacman_frontend} -Ssa"

# Display info about AUR package
alias yaq="${_pacman_frontend} -ASi"
alias yaq="${_pacman_frontend} -Sia"

unset _pacman_{frontend,sudo}
4 changes: 2 additions & 2 deletions modules/prompt/functions/prompt_hydra_setup
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ function prompt_hydra_setup {
zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format '%F{red}[REPLACE]%f'
zstyle ':prezto:module:editor:info:keymap:alternate' format ' %B%F{green}❮%F{yellow}❮%F{red}❮%f%b'

prompt_main_true='%B%F{cyan}❯❯❯%f%b'
prompt_main_false='%B%F{magenta}%?:❮❮❮%f%b'
prompt_main_true='%B%F{cyan}%%%f%b'
prompt_main_false='%B%F{red}%?:%%%f%b'
prompt_main=" %(?.${prompt_main_true}.${prompt_main_false}) "


Expand Down
2 changes: 1 addition & 1 deletion runcoms/zpreztorc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ zstyle ':prezto:module:editor' key-bindings 'vi'
#

# Set the Pacman frontend.
zstyle ':prezto:module:pacman' frontend 'aura'
zstyle ':prezto:module:pacman' frontend 'pacaur'

#
# Prompt
Expand Down
5 changes: 4 additions & 1 deletion runcoms/zprofile
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ typeset -gU cdpath fpath mailpath path
# Set the list of directories that Zsh searches for programs.
path=(
/usr/local/{bin,sbin}
~/{bin,scripts,scripts/panel}
~/{bin,scripts}
~/scripts/{panel,aiu}
~/.gem/ruby/2.2.0/bin
$path
)
systemctl --user import-environment PATH

#
# Less
Expand Down Expand Up @@ -81,6 +83,7 @@ TMPPREFIX="${TMPDIR%/}/zsh"
# Panel
#
export PANEL_FIFO="/tmp/panel-fifo"
export PANEL_LARGE_FIFO="/tmp/panel-large-fifo"

#
# Gnome Keyring
Expand Down
1 change: 1 addition & 0 deletions runcoms/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ fi
#BASE16_VAR="dark"
#BASE16_SHELL="$HOME/.config/base16-shell/base16-$BASE16_SCHEME.$BASE16_VAR.sh"
#[[ -s $BASE16_SHELL ]] && . $BASE16_SHELL
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

0 comments on commit f0b605d

Please sign in to comment.