From 54f06b10c5877424d22f6ad3241e07c56e049759 Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Fri, 28 Apr 2017 00:06:13 -0400 Subject: [PATCH 1/5] finalized tmux config for server --- .tmux.conf##Linux.a-server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tmux.conf##Linux.a-server b/.tmux.conf##Linux.a-server index 9f20259..c2e8ba4 100644 --- a/.tmux.conf##Linux.a-server +++ b/.tmux.conf##Linux.a-server @@ -25,5 +25,5 @@ set-window-option -g mode-keys vi set -g status-right '%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 f00d2445628d95df3f0db6db2bea9c3463e12b5a Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Sat, 18 Nov 2017 01:00:35 -0500 Subject: [PATCH 2/5] 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..4ead8fe 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' +alias tmh='ssh home-server -t "tmux new -A -s sys"' +alias tm='tmux new -A -s ' +alias tms='tmux new -A -s sys' +alias hsfs='sshfs 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 206d0ee8520e9bd1b140edc2ca489cbaf331cbc6 Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Mon, 20 Nov 2017 01:36:20 -0500 Subject: [PATCH 3/5] added previm plugin --- .vimrc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.vimrc b/.vimrc index 6d4a622..0a927d9 100644 --- a/.vimrc +++ b/.vimrc @@ -17,6 +17,8 @@ Plugin 'itchyny/lightline.vim' Plugin 'airblade/vim-gitgutter' Plugin 'altercation/vim-colors-solarized' + +Plugin 'kannokanno/previm' " All of your Plugins must be added before the following line call vundle#end() " required filetype plugin indent on " required @@ -50,12 +52,10 @@ set ruler set undolevels=1000 set backspace=indent,eol,start set colorcolumn=80 + " lastline plugin config set laststatus=2 -"let g:lightline = {'colorshceme': 'solarized dark'} -" gitgutter -let g:gitgutter_realtime = 1 -let g:gitgutter_eager = 1 + " colorscheme syntax enable "set background=dark @@ -65,3 +65,4 @@ highlight colorcolumn ctermbg=grey ctermfg=blue highlight OverLength ctermbg=red ctermfg=white match OverLength /\%>80v.\+/ filetype plugin on +nmap ne :NERDTreeToggle From 8484419740aa87713d73c9ecaa8fcaf1253963ba Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Mon, 20 Nov 2017 01:44:06 -0500 Subject: [PATCH 4/5] catching up changes on server --- .bash_aliases | 1 + .bashrc => .bashrc##Linux.a-server | 2 +- .tmux.conf##Linux.a-server | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename .bashrc => .bashrc##Linux.a-server (96%) diff --git a/.bash_aliases b/.bash_aliases index b92686e..8ec3a0d 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -14,3 +14,4 @@ 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 tm='tmux new-session -A -s sys' diff --git a/.bashrc b/.bashrc##Linux.a-server similarity index 96% rename from .bashrc rename to .bashrc##Linux.a-server index 583df93..5d1e67a 100644 --- a/.bashrc +++ b/.bashrc##Linux.a-server @@ -57,7 +57,7 @@ if [ -n "$force_color_prompt" ]; then fi if [ "$color_prompt" = yes ]; then - PS1='${debian_chroot:+($debian_chroot)}[\[\e[01;32m\]\u@\h\[\e[00m\]](\[\e[1;36m\]\D{%b %d} \A\[\033[00m\]):\[\033[01;34m\]\W \$\[\033[00m\] ' + PS1='${debian_chroot:+($debian_chroot)}[\[\e[01;32m\]\u@\[\033[0;31m\]\h\[\e[00m\]](\[\e[1;36m\]\D{%b %d} \A\[\033[00m\]):\[\033[01;34m\]\W \$\[\033[00m\] ' else PS1='${debian_chroot:+($debian_chroot)}[\u@\h](\D{%b %d} \A):\W \$ ' fi diff --git a/.tmux.conf##Linux.a-server b/.tmux.conf##Linux.a-server index 9f20259..c2e8ba4 100644 --- a/.tmux.conf##Linux.a-server +++ b/.tmux.conf##Linux.a-server @@ -25,5 +25,5 @@ set-window-option -g mode-keys vi set -g status-right '%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 89b35ef5157817a4ff6ccc310ee700ee5c5be403 Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Mon, 20 Nov 2017 02:06:37 -0500 Subject: [PATCH 5/5] added default bashrc --- .bashrc## | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 .bashrc## diff --git a/.bashrc## b/.bashrc## new file mode 100644 index 0000000..4b45aaa --- /dev/null +++ b/.bashrc## @@ -0,0 +1,147 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +case $- in + *i*) ;; + *) return;; +esac + +# don't put duplicate lines or lines starting with space in the history. +# See bash(1) for more options +HISTCONTROL=ignoreboth + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + PS1='${debian_chroot:+($debian_chroot)}[\[\e[01;32m\]\u@\h\[\e[00m\]](\[\e[1;36m\]\D{%b %d} \A\[\033[00m\]):\[\033[01;34m\]\W \$\[\033[00m\] ' +else + PS1='${debian_chroot:+($debian_chroot)}[\u@\h](\D{%b %d} \A):\W \$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=auto' + alias fgrep='fgrep --color=auto' + alias egrep='egrep --color=auto' +fi + +# colored GCC warnings and errors +#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + +# some more ls aliases +#alias ll='ls -l' +#alias la='ls -A' +#alias l='ls -CF' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# split tmux window for monitoring with watch or any command +function tmw { + tmux split-window -dh "$*"; +} + +function cmpl () { + if [ -z "$1" ] + then + echo "No Parameter" + elif [ "$1" == "pthread" ] && ! [ -z "$2" ] + then + clang -lpthread -Wall -Wextra -lm -std=c99 $2.c -o $2 && ./$2 + else + clang -Wall -Wextra -lm -std=c99 $1.c -o $1 && ./$1 + fi +} + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + 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 + +# editor setup +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 +