From a0dd4f3c018ee66ac366508aaf592938c6aead27 Mon Sep 17 00:00:00 2001 From: overflowerror Date: Fri, 22 Aug 2014 16:39:19 +0200 Subject: [PATCH] some changes :3 --- home/overflow/.zshrc | 36 ++++++++++++++++++++++++++++++++ usr/local/bin/battery-percentage | 4 ++-- usr/local/bin/cpu-temp | 2 +- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/home/overflow/.zshrc b/home/overflow/.zshrc index be58dea..0aa64ab 100644 --- a/home/overflow/.zshrc +++ b/home/overflow/.zshrc @@ -41,8 +41,44 @@ zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' #PROMPT="%F{red}%(?..%U%?%b%u)%F{cyan}%~ %B%#%b%f " #RPROMPT="%F{magenta}[%l]%f" +PATH="$PATH:/bin:/sbin:/usr/bin:/usr/sbin" + autoload promptinit promptinit prompt overflow +alias please=sudo +alias plz=gksu +alias edit=vim +alias sniffer=wireshark +alias whereami=pwd +alias whatami="ip addr | grep inet" +alias whatisthis=hostname +alias whatsthetime="date +%T" +alias mrpropper=clear + +function proxy(){ + echo -n "username:" + read username + echo -n "password:" + read -s password + export http_proxy="https://$username:$password@192.168.195.101:8080/" + export https_proxy=$http_proxy + export ftp_proxy=$http_proxy + export rsync_proxy=$http_proxy + export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com" + echo -e "\nProxy environment variable set." +} +function proxyoff(){ + unset HTTP_PROXY + unset http_proxy + unset HTTPS_PROXY + unset https_proxy + unset FTP_PROXY + unset ftp_proxy + unset RSYNC_PROXY + unset rsync_proxy + echo -e "\nProxy environment variable removed." +} + ./.messagerc diff --git a/usr/local/bin/battery-percentage b/usr/local/bin/battery-percentage index 622258a..d46a428 100755 --- a/usr/local/bin/battery-percentage +++ b/usr/local/bin/battery-percentage @@ -2,8 +2,8 @@ pushd /sys/class/power_supply/BAT0 > /dev/null -now=`cat charge_now` -full=`cat charge_full` +now=`cat energy_now` +full=`cat energy_full` percentage=`python -c "print (int($now.0/$full*100 + 0.5))"` diff --git a/usr/local/bin/cpu-temp b/usr/local/bin/cpu-temp index 3edcc3a..4204491 100755 --- a/usr/local/bin/cpu-temp +++ b/usr/local/bin/cpu-temp @@ -1,3 +1,3 @@ #!/bin/bash -python -c "print (int(`sensors | grep Physical | awk '{ print $4 }' | awk -F "°" '{ print $1 }'`))" +python -c "print (int(`sensors | grep high | awk '{ print $2 }' | awk -F "°" '{ print $1 }'`))"