From 6be01201898edca15a43f8ed15e7427a81318b59 Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Sat, 18 Nov 2017 01:00:35 -0500 Subject: [PATCH 1/2] catching up with uncommited chages --- .bash_aliases | 19 ++++++++++++------- .bashrc | 8 ++++++++ .i3/.conkyrc | 40 ++++++++++++++++------------------------ .i3/config | 33 ++++++++++++++++++--------------- .tmux.conf##Linux | 5 ++++- 5 files changed, 58 insertions(+), 47 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index b92686e..71a9818 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -6,11 +6,16 @@ alias gpwd='pwd | xclip -i -selection clipboard' alias cdclip="cd \$(xclip -o -selection clipboard)" alias clipi='xclip -i -selection clipboard' alias clipo='xclip -o -selection clipboard' -alias ml='livestreamer --config ~/.livestreamerrc -v' -alias jblive='mpv rtmp://jblive.videocdn.scaleengine.net/jb-live/play/jblive.stream' -alias twit='livestreamer --config ~/.livestreamerrc -v http://www.ustream.tv/leolaporte' -alias glog='git log --pretty=format:"%C(auto) %h,%Cgreen \"%s\"%Creset, %aN,%Cblue %cD"' -alias antlr4='java -cp ~/antlr-4.6-complete.jar:. org.antlr.v4.Tool ' -alias antlr4c='javac -cp ~/antlr-4.6-complete.jar:. ' -alias grun='java -cp ~/antlr-4.6-complete.jar:. org.antlr.v4.runtime.misc.TestRig ' alias ssh-agent='ssh-agent -t 1h' +alias ssh-home='ssh home-server -p 4944' +alias tmh='ssh home-server -p 4944 -t "tmux new -A -s sys"' +alias tm='tmux new -A -s ' +alias tms='tmux new -A -s sys' +alias hsfs='sshfs -p 4944 andrei@home-server:/utility /hsfs' +alias uhsfs='sudo umount /hsfs' +alias exfs='sudo zpool import external' +alias uexfs='sudo zpool export external' +alias ta='rsync -avr /home/andrei/CSCI_1060/ home-server:/home/andrei/backups/school/TA/CSCI_1060' +alias thesis='rsync -avz /home/andrei/Thesis/ home-server:~/Thesis' +alias socks='ssh -D 8081 -C -q -N home-server' +alias gmonitor='while [ true ] ; do nvidia-smi; nvidia-settings -q gpucoretemp | grep gpu; sensors| grep CPU; sleep 1; clear; done' diff --git a/.bashrc b/.bashrc index 583df93..4b45aaa 100644 --- a/.bashrc +++ b/.bashrc @@ -129,6 +129,8 @@ if ! shopt -oq posix; then fi fi +TERM=xterm-256color + # Junit setup export JUNIT_HOME=/home/andrei/.junit export CLASSPATH=$JUNIT_HOME/junit4.12.jar:$JUNIT_HOME/hamcrest-core-1.3.jar @@ -137,3 +139,9 @@ export CLASSPATH=$JUNIT_HOME/junit4.12.jar:$JUNIT_HOME/hamcrest-core-1.3.jar export VISUAL=vim export EDITOR="$VISUAL" +export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}} +export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} +export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}} +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64:/usr/lib/nvidia-384:/usr/local/cuda/extras/CUPTI/lib64" +export CUDA_HOME=/usr/local/cuda + diff --git a/.i3/.conkyrc b/.i3/.conkyrc index 93d3efb..369ad7e 100644 --- a/.i3/.conkyrc +++ b/.i3/.conkyrc @@ -10,43 +10,35 @@ override_utf8_locale yes #| SF: ${tztime US/Pacific %H:%M} | Free: $memfree | ${exec /home/andrei/.i3/pacvol.sh display} | $downspeed $upspeed | ${smapi_bat_perc 0}% ${smapi_bat_power 0} | CPU $cpu% [ ${cpu cpu1}.${cpu cpu2}.${cpu cpu3}.${cpu cpu4} ] | ${time %a %d %b | %H:%M} | -template1 ${if_match "${battery_short \1}"=="U"} ${battery_short \1} ${battery_percent \1}% $else ${battery_short \1} $endif -template0 {"full_text": " \1 ${template1 BAT0}/${template1 BAT1}","color":\2} +template1 ${if_match "${battery_short \1}"=="U"} ${battery_short \1} ${battery_percent}% $else ${battery_short \1} $endif +template0 {"full_text": " \1 %$battery_percent ","color":\2} TEXT ,[{"full_text": " "}, {"full_text": " ▣ $cpu% [${cpu cpu1}.${cpu cpu2}.${cpu cpu3}.${cpu cpu4}] ","color": "\#99D7FF", "name":"cpu"}, - {"full_text": " 🌡${exec sensors | awk '/Physical id 0/ {print substr($0,index($0,":")+2,index($0,"°")-index($0,":"))}' } ","color": "\#FB4646", "name":"temp"}, + {"full_text": " 🌡 ${exec sensors | awk '/Package id 0/ {print substr($0,index($0,":")+2,index($0,"°")-index($0,":"))}' } ","color": "\#FB4646", "name":"temp"}, # {"full_text": " ☼ ${exec /home/andrei/.i3/blevel.sh} ","color": "\#DFD60C", "name":"bright"}, # {"full_text": " ${fs_free /} (${fs_free_perc /}%)", "color":"\#E98F15"}, {"full_text": " ${exec free -m | grep Mem | awk '{print $1, $3}'}", "color":"\#F3D194"}, {"full_text": " ${exec /home/andrei/.i3/pacvol.sh display} ","color":"\#6AFFD8", "name":"volume"}, -# {"full_text": " $downspeed $upspeed ", "color":"\#FFFE6A"}, -# ${if_existing /sys/class/power_supply/AC/online 0} -# ${if_match ${battery_percent BAT0} <= 20} -# ${if_match ${battery_percent BAT1} <= 20} -# ${template0 🔋 "\\#FF0000"}, -# ${execi 120 notify-send -t 2000 -i "/usr/share/icons/Numix/status/48/battery-low.svg" "Battery Low"} -# $else -# ${template0 🔋 "\\#94F397"}, -# $endif -# $else -# ${template0 🔋 "\\#94F397"}, -# $endif -# $else -# ${template0 🔌 "\\#94F397"}, -# $endif +# {"full_text": " $downspeed $upspeed ", "color":"\#FFFE6A"}, + ${if_existing /sys/class/power_supply/AC/online 0} + ${if_match ${battery_percent} <= 20} + ${template0 🔋 "\\#FF0000"}, + ${execi 120 notify-send -t 2000 -i "/usr/share/icons/Pop/48x48/status/battery-empty.svg" "Battery Low"} + $else + ${template0 🔋 "\\#94F397"}, + $endif + $else + ${template0 🔌 "\\#94F397"}, + $endif ${if_existing /sys/class/net/enp0s25/operstate up} {"full_text": "🜷", "color": "\#8BADF9"}, ${endif} - ${if_existing /sys/class/net/wlp3s0/operstate up} - {"full_text": " 📡 ${wireless_link_qual_perc wlp3s0}%", "color": "\#8BADF9"}, + ${if_up wlp2s0} + {"full_text": " 📡 ${upspeed wlp2s0}:${downspeed wlp2s0}", "color": "\#8BADF9"}, ${endif} - {"full_text": " ${execi 1800 /home/andrei/.i3/update_count.sh} ", "name":"updates"}, -# {"full_text": " Ft: ${tztime Europe/Berlin %H:%M} ","color": "\#909090"}, -# {"full_text": " ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EDDF temperature}° ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ EDDF cloud_cover} "}, -# {"full_text": " ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KOAK temperature}° ${weather http://weather.noaa.gov/pub/data/observations/metar/stations/ KOAK cloud_cover} "}, # {"full_text": " 🎧 ${exec /home/andrei/.i3/gmusicsong.pm}", "color": "\#FF905C", "name":"music"}, {"full_text": " ${time %a %d %b} ", "name":"date"}, {"full_text": " ${time %H:%M} "}, diff --git a/.i3/config b/.i3/config index f2daac4..e817c60 100755 --- a/.i3/config +++ b/.i3/config @@ -9,7 +9,7 @@ # # Please see http://i3wm.org/docs/userguide.html for a complete reference! -set $mod Mod4 +set $mod mod4 # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. ISO 10646 = Unicode @@ -24,18 +24,18 @@ set $mod Mod4 floating_modifier $mod # set up gaps -gaps inner 14 +#gaps inner 14 for_window [class="^.*"] border pixel 1 # start a terminal -bindsym $mod+Shift+Return exec terminator +bindsym $mod+Shift+Return exec gnome-terminal # goto terminal bindsym $mod+Return [class="^Terminator$"] focus # start a browser window -bindsym $mod+Shift+b exec chromium +bindsym $mod+Shift+b exec vivaldi # goto browser bindsym $mod+b [window_role="^browser$"] focus @@ -53,7 +53,7 @@ bindsym $mod+s [class = "^Skype$"] focus bindsym $mod+t [class = "^TeamSpeak 3$"] focus # goto hexchat -bindsym $mod+c [class = "^Hexchat$"] focus +bindsym $mod+c [class = "^Slack"] focus # kill focused window bindsym $mod+Shift+q kill @@ -105,8 +105,7 @@ bindsym $mod+e layout toggle split # toggle tiling / floating bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows +# change focus between tiling / floating windows bindsym $mod+space focus mode_toggle # focus the parent container @@ -146,7 +145,7 @@ bindsym $mod+Shift+r restart # exit i3 (logs you out of your X session) bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'" # lock using i3lock -bindsym Ctrl+Break exec "i3lock -i '/home/andrei/Pictures/pcmr dye.png' -t" +bindsym Ctrl+Shift+l exec "i3lock -c 383A3B" # suspend with lock bindsym Shift+Ctrl+Break exec ~/.i3/suspend.sh # shutdown computer @@ -192,7 +191,7 @@ mode "resize" { bindsym $mod+r mode "resize" # Volume controls -set $sink `pactl list short sinks | grep RUNNING | cut -f1` +set $sink `pactl list short sinks | grep alsa_output.pci-0000_00_1f.3.analog-stereo | cut -f1` bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume $sink +1% bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume $sink -1% bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume $sink +10% @@ -205,6 +204,10 @@ bindsym XF86AudioStop exec playerctl stop bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous +# Sreen brightness controls +bindsym XF86MonBrightnessUp exec xbacklight -inc 20 # increase screen brightness +bindsym XF86MonBrightnessDown exec xbacklight -dec 20 # decrease screen brightness + #scrot focused window bindsym Print exec scrot -u -e 'mv $f ~/Dropbox/Pictures/Screenshots/' @@ -230,18 +233,18 @@ bindsym $mod+mod1+Right move workspace to output right popup_during_fullscreen smart # setup display -exec xrandr --output DP-0 -- primary --rotate left -exec xrandr --output HDMI-0 --right-of DP-0 -exec xrandr --output HDMI-0 --pos 1441x1000 +exec xrandr --dpi 220 +#exec xrandr --output DP-0 -- primary --rotate left +#exec xrandr --output HDMI-0 --right-of DP-0 +#exec xrandr --output HDMI-0 --pos 1441x1000 # set the background -exec feh --bg-fill "/home/andrei/Pictures/ArchGate2.png" +#exec feh --bg-fill "/home/andrei/Pictures/ArchGate2.png" exec --no-startup-id compton --config ~/.comptonrc # setup coding workspace -exec --no-startup-id i3-msg "workspace 1:Coding; exec terminator" -exec --no-startup-id i3-msg "workspace 1:Coding; exec terminator" +exec --no-startup-id i3-msg "workspace 1:Coding; exec " # open a web browser diff --git a/.tmux.conf##Linux b/.tmux.conf##Linux index 2e816d7..b33b93b 100644 --- a/.tmux.conf##Linux +++ b/.tmux.conf##Linux @@ -18,6 +18,9 @@ unbind '"' bind | split-window -h bind - split-window -v +# sync panes +bind S setw synchronize-panes + # setting vi mode set-window-option -g mode-keys vi @@ -25,5 +28,5 @@ set-window-option -g mode-keys vi set -g status-right '♥#(acpi | cut -d ',' -f 2) | %H:%m %d-%b-%y ' # default shell -set -g default-terminal "screen-256color" /bin/bash +#set -g default-terminal "screen-256color" /bin/bash #set-option -g default-shell /bin/bash From 6719896f46bd9c9d2694e98d807c0cfdf0a01aef Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Mon, 27 Nov 2017 18:15:30 -0500 Subject: [PATCH 2/2] added markdown preview to vim --- .vimrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.vimrc b/.vimrc index 6d4a622..afa86ee 100644 --- a/.vimrc +++ b/.vimrc @@ -12,11 +12,16 @@ Plugin 'VundleVim/Vundle.vim' Plugin 'scrooloose/nerdtree' +Plugin 'digitaltoad/vim-pug' + Plugin 'itchyny/lightline.vim' Plugin 'airblade/vim-gitgutter' Plugin 'altercation/vim-colors-solarized' + +Plugin 'suan/vim-instant-markdown' + " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required