Procházet zdrojové kódy

misc changes

pull/1/head
10sr před 12 roky
rodič
revize
23acada393
3 změnil soubory, kde provedl 31 přidání a 25 odebrání
  1. +19
    -23
      bashrc
  2. +3
    -2
      conkyrc
  3. +9
    -0
      profile

+ 19
- 23
bashrc Zobrazit soubor

@@ -62,14 +62,6 @@ fi

uname -a

null type fortune && {
echo
fortune
echo
fortune -o
echo
}


if [ "${EMACS}" = "t" ]; then # for emacs shell
true export PS1="\u@\H \d \t \w\nemacs shell\$ "
@@ -97,25 +89,27 @@ alias ls="ls -hCF ${_ENABLECOLOR}--time-style=long-iso"
alias vl=/usr/share/vim/vimcurrent/macros/less.sh
alias em="emacs -nw"
alias pstree="LANG=C pstree"
# alias apt-get="sudo apt-get"
alias ut="ssh 6365454829@un001.ecc.u-tokyo.ac.jp"
alias rand="echo \$RANDOM"
alias xunp="file-roller -h"
alias pacome="sudo \paco -D"
alias cp="cp -v"
alias mv="mv -v"
alias psall="ps auxww"
alias q=exit
alias p="$PAGER"
alias c=cat
alias sudo="sudo " # use aliases through sudo
alias e3=e3em
alias halt="sudo halt"
alias reboot="sudo reboot"
alias rand="echo \$RANDOM"
# alias apt-get="sudo apt-get"
alias ut="ssh 6365454829@un001.ecc.u-tokyo.ac.jp"
alias xunp="file-roller -h"
# alias pacome="sudo \paco -D"
alias pcalc="python -i -c 'from math import *' "
alias py3=python3
alias py2=python2
alias _reloadrc="test -f ~/.bashrc && source ~/.bashrc"
alias sudo="sudo " # use aliases through sudo
alias e3=e3em
alias mytime="date +%Y%m%d-%H%M%S"
alias sh="ENV=$HOME/.shrc PS1=\$\ sh"
alias halt="sudo halt"
alias reboot="sudo reboot"
# type trash >/dev/null 2>&1 && alias rm=trash

alias aptin="apt-get install"
@@ -134,7 +128,7 @@ null type pacmatic && {
}

alias ubuntu-upgrade="sudo apt-get autoremove --yes && sudo apt-get update --yes && sudo apt-get upgrade --yes"
alias arch-upgrade="yaourt -Syu"
alias arch-upgrade="sudo pacman -Syu"
alias port-upgrade="port selfupdate && port sync && port upgrade installed"

if iscygwin; then
@@ -167,7 +161,8 @@ showinfo(){

x(){
if [[ -z $DISPLAY ]] && ! [[ -e /tmp/.X11-unix/X0 ]] && (( EUID )); then
nohup startx # >~/.backup/log/xorg.log 2>&1 &
#nohup startx # >~/.backup/log/xorg.log 2>&1 &
startx
else
echo "X cant be started! Maybe another X is already running!" 1>&2
fi
@@ -199,7 +194,7 @@ git-make-local-rep(){
bak(){
for file in "$@"
do
mv -v ${file} ${file}.bak
cp -v ${file} ${file}.bak
done
}
di(){
@@ -281,7 +276,7 @@ _mygitconfig(){
git config --global color.ui auto
git config --global status.relativePaths false
git config --global status.showUntrackedFiles normal
git config --global alias.graph "log --graph --date-order -C -M --pretty=format:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short"
git config --global alias.graph "log --graph --date-order -C -M --pretty=tformat:\"<%h> %ad [%an] %Cgreen%d%Creset %s\" --all --date=short"
git config --global alias.st "status -s"
git config --global alias.b "branch"
git config --global alias.ci "commit --verbose"
@@ -442,8 +437,9 @@ __my_prompt_function(){ # used by PS1
if test -z "$DISPLAY"
then
local ip=$(ip-address [Addr:%s])
test -f /tmp/batterystatus && local battery="[Battery:$(sed -e 's`%`%%`g' /tmp/batterystatus)]"
battery-status %s >/tmp/batterystatus &
local bst="/tmp/${USER}-tmp/batterystatus"
test -f $bst && local battery="[Battery:$(sed -e 's`%`%%`g' $bst)]"
battery-status %s >$bst &
fi
local tty=$(__try_exec tty | sed -e 's:/dev/::')
# local battery=$(battery-state [%s] | sed -e 's`%`%%`g') # very slow


+ 3
- 2
conkyrc Zobrazit soubor

@@ -49,17 +49,18 @@ ${color2}lgin ${color1}|${color0} ${uptime}
${color0}${stippled_hr}
${color2}cpu ${color1}|${color0} ${cpu}% ${cpubar}
${color2}freq ${color1}|${color0} ${freq 1}Mhz | ${freq 2}Mhz
${color2}temp ${color1}|${color0} ${acpitemp} °C
#${color2}btry ${color1}|${color0} ${battery}
#${color2}btime${color1}|${color0} ${battery_time}
${color0}${hr}
${color2}ram ${color1}|${color0} ${memperc}% ${membar}
${color2}swap ${color1}|${color0} ${if_match "${swapperc}" == "No swap"}None${else}${swapperc} ${swapbar}${endif}
${color2}swap ${color1}|${color0} ${if_match "${swapperc}" == "No swap"}None${else}${swapperc}% ${swapbar}${endif}
${color0}${stippled_hr}
${color2}root ${color1}|${color0} ${fs_used /} #/${fs_size /}
${fs_bar /}
${color2}/tmp ${color1}|${color0} ${fs_used /tmp} #/${fs_size /tmp}
${fs_bar /tmp}
${color2}dio ${color1}|${color0} ${diskio}
${color2}i/o ${color1}|${color0} ${diskio}
${color0}${hr}
${color2}${gw_iface} ${color1}|${color0} ${addr}
${color2}ssid ${color1}|${color0} ${wireless_essid}


+ 9
- 0
profile Zobrazit soubor

@@ -1,5 +1,13 @@
#!/bin/sh

type fortune >/dev/null 2>&1 && {
echo
fortune
echo
fortune -o
echo
}

# export PS1="\$ "
# export LANG=ja_JP.UTF-8
export LC_TIME=C
@@ -24,3 +32,4 @@ type setterm >/dev/null 2>&1 && setterm -blank 30 -powersave on # -powerdown 10
# in my environment powerdown does not work

mkdir -p ~/.backup/log
mkdir -p /tmp/$USER-tmp

Načítá se…
Zrušit
Uložit