Skip to content
This repository
Browse code

editirano

  • Loading branch information...
commit ea8ef2d4d11549a556008307ff246c6e96e0b49c 1 parent a207113
simke authored March 18, 2012
167  .bashrc
... ...
@@ -0,0 +1,167 @@
  1
+#!/bin/bash
  2
+# ~/.bashrc
  3
+#
  4
+
  5
+# If not running interactively, don't do anything
  6
+[[ $- != *i* ]] && return
  7
+
  8
+
  9
+PS1='\[\e[0;34m\]\u\[\e[m\] \[\e[1;31m\]\w\[\e[m\] 
  10
+\[\e[1;34m\]\$\[\e[m\] \[\e[1;37m\]'
  11
+
  12
+complete -cf sudo
  13
+complete -cf gksu
  14
+
  15
+export EDITOR=vim
  16
+export SUDO_EDITOR="/usr/bin/vim -p -X"
  17
+export BROWSER=firefox
  18
+export LESS="-R"
  19
+export VARIABLE=content
  20
+
  21
+s() { su -c "$*";}
  22
+
  23
+alias p='s pacman-color'
  24
+alias S='s pacman-color -S --needed'
  25
+alias Ss='pacman-color -Ss'
  26
+alias Q='pacman-color -Q'
  27
+alias Qi='pacman-color -Qi'
  28
+alias R='s pacman-color -Run'
  29
+alias Ra='s pacman-color -Runsc'
  30
+alias Syu='s pacman-color -Syu'
  31
+alias popt='s pacman-optimize'
  32
+alias rmdblck='s rm /var/lib/pacman/db.lck'
  33
+alias y='yaourt'
  34
+alias yy='yaourt -Syua'
  35
+alias pacdif='s pacdiffviewer'
  36
+
  37
+alias ..='cd ..'
  38
+alias ...='cd ../..'
  39
+alias xx='exit'
  40
+alias cd~='cd ~/'
  41
+alias cdetc='cd /etc'
  42
+alias cdusr='cd /usr'
  43
+alias cdvar='cd /var'
  44
+alias cp='cp -iv'
  45
+alias mv='mv -iv'
  46
+alias rm='rm -Iv'
  47
+alias mkdir='mkdir -p'
  48
+alias ls='ls -hF --color=auto --group-directories-first '
  49
+alias grep='grep --color=auto'
  50
+alias ll='ls -l'
  51
+alias la='ls -al | less'
  52
+alias l.='ls -d .[[:alnum:]]* 2> /dev/null || echo "No hidden file here..."'
  53
+
  54
+alias h='history'
  55
+alias hist='history | grep $1'
  56
+alias path='echo -e ${PATH//:/\\n}'
  57
+alias dF='df -kTh'
  58
+alias swap='s swapoff -a && swapon -a'
  59
+alias off='s shutdown'
  60
+alias reb='s reboot'
  61
+alias tresh='s rm -r -f /home/simke/.local/share/Trash'
  62
+alias ping='ping -c 4 www.googe.com'
  63
+alias alijas='cat ~/.bashrc | grep alias'
  64
+alias wlanauto='s iwconfig wlan0 rate 5.5M auto'
  65
+alias wlanfix='s iwconfig wlan0 rate 5.5M fixed'
  66
+alias up='cd "$(ls -d */ | dmenu -i)"'
  67
+alias pp='ps $@ -u $USER -o pid,%cpu,%mem,bsdtime,command'
  68
+alias pg='ps -Af | grep $1'
  69
+alias ii='netstat -pan --inet'
  70
+alias gita='git add -A'
  71
+alias gitc="git commit -m 'editirano'"
  72
+alias gitp='git push -u origin master'
  73
+alias awe='awesome -k rc.lua'
  74
+alias xdg='xdg_menu --format awesome --root-menu /etc/xdg/menus/xfce-applications.menu >> ~/.config/awesome/xdg-menu.lua'
  75
+alias xdg-arch='xdg_menu --format awesome --root-menu /etc/xdg/menus/arch-applications.menu >> ~/.config/awesome/menu.lua'
  76
+alias monitor='xset dpms'
  77
+
  78
+ppp() {
  79
+	s pppoe-stop;
  80
+	sleep 1;
  81
+	s pppoe-start;
  82
+}
  83
+
  84
+rprobe() {
  85
+	s modprobe -r $1;
  86
+	s modprobe $1;
  87
+}
  88
+wprobe() {
  89
+	s rmmod $1;
  90
+	s modprobe $1;
  91
+	s modprobe rtap_iface=$2 $1;
  92
+}
  93
+chscr() {
  94
+	s chmod +x ~/.scripts/$1;
  95
+}
  96
+tintre() {
  97
+        killall -e tint2;
  98
+        killall -e perl /usr/share/volwheel/volwheel;
  99
+        tint2;
  100
+        /usr/bin/volwheel;
  101
+		exit
  102
+}
  103
+goto() {
  104
+	[ -d "$1" ] && cd "$1" || cd "$(dirname "$1")";
  105
+}
  106
+
  107
+cdl() {
  108
+	builtin cd $@ && ls
  109
+}
  110
+cpf() {
  111
+	if [[ -d $*[-1] ]]; then
  112
+		cp $* && cd $*[-1]
  113
+	elif [[ -d ${*[-1]%/*} ]]; then
  114
+		cp $* && cd ${*[-1]%/*}
  115
+	fi
  116
+}
  117
+mvf() {
  118
+	if [[ -d $*[-1] ]]; then
  119
+		mv $* && cd $*[-1]
  120
+	elif [[ -d ${*[-1]%/*} ]]; then
  121
+		mv $* && cd ${*[-1]%/*}
  122
+	fi
  123
+}
  124
+del() {
  125
+	mv "$@" "/${HOME}/.local/share/Trash/files/"
  126
+}
  127
+ff() {
  128
+	/usr/bin/find . -name "$@" ;
  129
+}
  130
+ffe() {
  131
+	/usr/bin/find . -name '*'"$@" ;
  132
+}
  133
+ffs() {
  134
+	/usr/bin/find . -name "$@"'*' ;
  135
+}
  136
+extract() {
  137
+	if [ -f $1 ] ; then
  138
+		case $1 in
  139
+			*.tar.bz2) tar xvjf $1 ;;
  140
+			*.tar.gz) tar xvzf $1 ;;
  141
+			*.bz2) bunzip2 $1 ;;
  142
+			*.rar) unrar x $1 ;;
  143
+			*.gz) gunzip $1 ;;
  144
+			*.tar) tar xvf $1 ;;
  145
+			*.tbz2) tar xvjf $1 ;;
  146
+			*.tgz) tar xvzf $1 ;;
  147
+			*.zip) unzip $1 ;;
  148
+			*.Z) uncompress $1 ;;
  149
+			*.7z) 7z x $1 ;;
  150
+			*) echo "'$1' cannot be extracted via >extract<" ;;
  151
+		esac
  152
+	else
  153
+		echo "'$1' is not a valid file"
  154
+	fi
  155
+}
  156
+compress() {
  157
+	FILE=$1
  158
+	case $FILE in
  159
+		*.tar.bz2) shift && tar cjf $FILE $* ;;
  160
+		*.tar.gz) shift && tar czf $FILE $* ;;
  161
+		*.tgz) shift && tar czf $FILE $* ;;
  162
+		*.zip) shift && zip $FILE $* ;;
  163
+		*.rar) shift && rar $FILE $* ;;
  164
+	esac
  165
+}
  166
+
  167
+
17  .scripts/darch
... ...
@@ -0,0 +1,17 @@
  1
+#!/bin/bash
  2
+
  3
+if [ -f $HOME/.dmenurc ]; then
  4
+  . $HOME/.dmenurc
  5
+else
  6
+  DMENU='dmenu -i'
  7
+fi
  8
+
  9
+GS=`cat ~/.archhist | $DMENU $*`
  10
+
  11
+if grep -q "$GS" "$HOME/.archhist" ; then
  12
+    echo already exists in history
  13
+else
  14
+    echo $GS >> ~/.archhist
  15
+fi
  16
+
  17
+firefox -new-tab "http://www.archlinux.org/packages/?sort=&q="$GS"&maintainer=&last_update=&flagged=&limit=50"
17  .scripts/daur
... ...
@@ -0,0 +1,17 @@
  1
+#!/bin/bash
  2
+
  3
+if [ -f $HOME/.dmenurc ]; then
  4
+  . $HOME/.dmenurc
  5
+else
  6
+  DMENU='dmenu -i'
  7
+fi
  8
+
  9
+GS=`cat ~/.archhist | $DMENU $*`
  10
+
  11
+if grep -q "$GS" "$HOME/.archhist" ; then
  12
+    echo already exists in history
  13
+else
  14
+    echo $GS >> ~/.archhist
  15
+fi
  16
+
  17
+firefox -new-tab "https://aur.archlinux.org/packages.php?O=0&K="$GS"&do_Search=Go"
17  .scripts/dgoogle
... ...
@@ -0,0 +1,17 @@
  1
+#!/bin/bash
  2
+
  3
+if [ -f $HOME/.dmenurc ]; then
  4
+  . $HOME/.dmenurc
  5
+else
  6
+  DMENU='dmenu -i'
  7
+fi
  8
+
  9
+GS=`cat ~/.gshist | $DMENU $*`
  10
+
  11
+if grep -q "$GS" "$HOME/.gshist" ; then
  12
+    echo already exists in history
  13
+else
  14
+    echo $GS >> ~/.gshist
  15
+fi
  16
+
  17
+firefox -new-tab http://www.google.hr/search?q="$GS"
30  .scripts/dprog
... ...
@@ -0,0 +1,30 @@
  1
+#!/bin/bash
  2
+ 
  3
+if [ -f $HOME/.dmenurc ]; then
  4
+  . $HOME/.dmenurc
  5
+else
  6
+  DMENU='dmenu -i'
  7
+fi
  8
+ 
  9
+prog="wlanfix
  10
+daur
  11
+darch
  12
+autostart.sh
  13
+.xinitrc
  14
+rc.conf
  15
+.scripts
  16
+obnovi_sve"
  17
+ 
  18
+cmd=$($DMENU -fn "-*-nu-*-*-*-*-*-*-*-*-*-*-*-*" <<< "$prog")
  19
+ 
  20
+case ${cmd%% *} in
  21
+        .scripts)         exec thunar ~/.scripts;;
  22
+        obnovi_sve)       exec xterm -e "packer -Syu --noedit --noconfirm --quiet";;
  23
+		wlanfix)          exec xterm -e "sudo iwconfig wlan0 rate 5.5M auto";;
  24
+        .xinitrc)         exec medit ~/.xinitrc;;
  25
+        autostart.sh)     exec medit ~/.config/openbox/autostart.sh;;
  26
+        daur)             exec  ~/.scripts/daur;;
  27
+        darch)            exec  ~/.scripts/darch;;
  28
+		rc.conf)          exec gksu medit /etc/rc.conf;;
  29
+		*)                exec "'${cmd}'"  ;;
  30
+esac
9  .scripts/drun
... ...
@@ -0,0 +1,9 @@
  1
+#!/bin/bash
  2
+
  3
+if [ -f $HOME/.dmenurc ]; then
  4
+  . $HOME/.dmenurc
  5
+else
  6
+  DMENU='dmenu_run -i'
  7
+fi
  8
+
  9
+exe=`dmenu_path | $DMENU ${1+"$@"}` && exec $exe

0 notes on commit ea8ef2d

Please sign in to comment.
Something went wrong with that request. Please try again.