From 5c09e239d9b139f982ffd388a37bc7dbad83deed Mon Sep 17 00:00:00 2001 From: Frank Villaro-Dixon Date: Tue, 28 Mar 2017 01:07:07 +0200 Subject: [PATCH] dotfiles --- Utils/octopus.sh | 35 ++++++++++++++++++++++++++++++++++- bash/.bashrc | 1 + crap/.signature | 1 - graphical/.Xmodmap | 1 + mutt/.mailcap | 1 + ssh/.ssh/config | 17 ++++++----------- vim/.vim/spell/en.utf-8.add | 6 ++++++ vim/.vim/vimrc | 9 ++++++--- 8 files changed, 55 insertions(+), 16 deletions(-) diff --git a/Utils/octopus.sh b/Utils/octopus.sh index 2400cd3..e6a0dec 100755 --- a/Utils/octopus.sh +++ b/Utils/octopus.sh @@ -67,6 +67,21 @@ case $1 in "off") echo 0 | sudo tee /sys/devices/platform/thinkpad_acpi/leds/tpacpi::power/brightness ;; + + "on") + echo 1 | sudo tee /sys/devices/platform/thinkpad_acpi/leds/tpacpi::power/brightness + ;; + esac + ;; + "thinklight") + case $3 in + "off") + echo 0 | sudo tee /sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/brightness + ;; + + "on") + echo 1 | sudo tee /sys/devices/platform/thinkpad_acpi/leds/tpacpi::thinklight/brightness + ;; esac ;; esac @@ -82,6 +97,10 @@ case $1 in xrandr --output $LVDS --off \ --output $VGA --auto --rotate normal ;; + "music") + xrandr --output $LVDS --auto --rotate left \ + --output $VGA --off + ;; "laptop") xrandr --output $LVDS --auto --rotate normal \ --output $VGA --off @@ -89,7 +108,7 @@ case $1 in "dual") xrandr --output $LVDS --auto --rotate normal \ --output $VGA --auto --rotate normal \ - --right-of $LVDS + --left-of $LVDS ;; "CV") xrandr --output $LVDS --auto --rotate normal \ @@ -144,6 +163,20 @@ case $1 in xsetroot -name "$VOLUME [$STAT $SONG] :: Bat $BATT_PCT $BATT_TIME :: $DATE" || true $0 conf-ifaces $0 leds power off + $0 checkbatt + ;; + + "checkbatt") + BATT_PCT=$(acpi -b | cut -d, -f2 | cut -d" " -f2 | cut -d'%' -f1) + if [ $BATT_PCT -le 10 ]; then + true + for i in `seq 10`; do + $0 leds thinklight on + sleep .1 + $0 leds thinklight off + sleep .1 + done + fi; ;; "wallpaper") diff --git a/bash/.bashrc b/bash/.bashrc index eecd3b2..2115840 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -73,6 +73,7 @@ source ~/.bash_ps1 #### ALIAS #### ############### # {{{ +alias spotify='spotify --force-device-scale-factor=1.0000001' alias ..='cd ..' alias vf='cd' alias xs='cd' diff --git a/crap/.signature b/crap/.signature index dbc9a9a..a8aa362 100644 --- a/crap/.signature +++ b/crap/.signature @@ -1,2 +1 @@ frank.villaro-dixon.eu -Envie d'électricité 100% verte ? Enercoop.fr diff --git a/graphical/.Xmodmap b/graphical/.Xmodmap index fc8d79b..acfb49e 100644 --- a/graphical/.Xmodmap +++ b/graphical/.Xmodmap @@ -18,6 +18,7 @@ !Espace insécable: Shift-Space ou Compose-Space-Space !keycode 65 = space nobreakspace emspace +remove Shift = Shift_L remove Lock = Caps_Lock remove Control = Control_L keysym Control_L = Caps_Lock diff --git a/mutt/.mailcap b/mutt/.mailcap index e4124ce..e9fd4ca 100644 --- a/mutt/.mailcap +++ b/mutt/.mailcap @@ -6,5 +6,6 @@ audio/*; vlc %s application/pdf; evince %s application/msword; libreoffice %s application/vnd.openxmlformats-officedocument.presentationml.presentation; libreoffice %s #fuck you +application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; libreoffice %s application/vnd.openxmlformats-officedocument.wordprocessingml.document; libreoffice %s #fuck you too application/x-gzip; file-roller %s diff --git a/ssh/.ssh/config b/ssh/.ssh/config index 624d769..9b1e885 100644 --- a/ssh/.ssh/config +++ b/ssh/.ssh/config @@ -15,14 +15,6 @@ host 178.250.210.95 port 1337 host 192.168.42.1 port 1337 -host git.vi-di.fr - user git - port 1337 - -host bor-git - hostname 94.23.42.46 - user git - port 55888 host chaudiere port 222 @@ -41,7 +33,6 @@ host bluewhale03 user villaro0 ProxyCommand ssh cuilxa nc %h %p - host cuilxa hostname cuilxa.unige.ch user villaro0 @@ -66,5 +57,9 @@ host erivers #2001:620:600:ac00:1a03:73ff:fe23:fc23/ hostname 129.194.173.249 -host osmutils - ProxyCommand ssh vi-di.fr nc 192.168.42.2 %p +host marmotte + hostname marmotte.lan.vi-di.fr + +host backup + hostname backup.vpn.vi-di.fr + diff --git a/vim/.vim/spell/en.utf-8.add b/vim/.vim/spell/en.utf-8.add index 8c30a9e..8883c34 100644 --- a/vim/.vim/spell/en.utf-8.add +++ b/vim/.vim/spell/en.utf-8.add @@ -99,3 +99,9 @@ wristpads PV PHES penstock +#lient/! +#lient +assez/! +assez +client/! +client diff --git a/vim/.vim/vimrc b/vim/.vim/vimrc index db3e2d0..d1fd99d 100644 --- a/vim/.vim/vimrc +++ b/vim/.vim/vimrc @@ -65,7 +65,7 @@ noremap inoremap kj "Will quickly get rid of the habit -inoremap :wq +"inoremap :wq noremap j gj noremap k gk @@ -174,10 +174,13 @@ autocmd BufRead,BufNewFile *.lista set filetype=lisp autocmd BufRead,BufNewFile *.xml set ts=4 sw=4 autocmd BufRead,BufNewFile *.html set ts=4 sw=4 autocmd BufRead,BufNewFile *.md set filetype=markdown tw=80 fo+=aw +autocmd BufRead,BufNewFile *.ts set filetype=typescript +autocmd BufRead,BufNewFile *.lib set syntax=no filetype= -au BufRead,BufNewFile *.utpl set filetype=html -au BufRead,BufNewFile *.utpl set syntax=underscore_template +"au BufRead,BufNewFile *.utpl set filetype=html ts=4 sw=4 +au BufRead,BufNewFile *.utpl set syntax=underscore_template ts=4 sw=4 +au BufRead,BufNewFile *.js set ts=4 sw=4 "autocmd BufRead,BufNewFile *.m set nospell