From 0c430087e70938396f62e9394280cd743b693896 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Mon, 30 Sep 2019 19:51:24 -0700 Subject: [PATCH 1/8] base version of dotfile archival script --- dotfiles-achive | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 dotfiles-achive diff --git a/dotfiles-achive b/dotfiles-achive new file mode 100644 index 0000000..bd6b277 --- /dev/null +++ b/dotfiles-achive @@ -0,0 +1,21 @@ +#!/bin/sh + +# What? +# Script which copies all dotfiles specified in locs.conf file into a new directory "dotfiles" + +locations=locs.conf +output=dotfiles/ + +if [ ! -f "$locations" ];then + echo 'Missing locs.conf file to read dotfile locations from' +fi +mkdir -p $output + +while read line; do + if [ ! -z "$line" ]; then + base="`dirname $line`" + mkdir -p "$output/$base" + cp "$line" "$output/$base" + fi +done < $locations + From c68c0cfd08414be20ffb27b9f11041e1c8b60303 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Wed, 16 Oct 2019 17:51:37 -0700 Subject: [PATCH 2/8] polybar timing and dotfiles things --- .gitignore | 1 + dotfiles/.vimrc | 49 ++++++++++++++++++++++ dotfiles/.zshrc | 106 ++++++++++++++++++++++++++++++++++++++++++++++++ polybar | 4 +- 4 files changed, 158 insertions(+), 2 deletions(-) create mode 100644 dotfiles/.vimrc create mode 100644 dotfiles/.zshrc diff --git a/.gitignore b/.gitignore index 6d315a0..f73de56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *swp test/ +locs.conf diff --git a/dotfiles/.vimrc b/dotfiles/.vimrc new file mode 100644 index 0000000..9a21a54 --- /dev/null +++ b/dotfiles/.vimrc @@ -0,0 +1,49 @@ +" Pathogen stuff from here +execute pathogen#infect() +syntax on +filetype plugin indent on + +set background=dark +set autoindent +set shiftwidth=0 +set tabstop=4 +set relativenumber +set number +set numberwidth=5 +set hlsearch + + +" f6=copy f7=paste +map :w !xclip -f -sel clip +map ::-1r !xclip -o -sel clip + +" colors +syntax on +"colorscheme molokai + +" vim default for this is dumb +set splitright +set splitbelow +" Ebin copy pasterino +command Copy execute "w !xclip" +command Paste execute "r !xclcip -o" + +" moving around windows +nnoremap +nnoremap +nnoremap +nnoremap + +" Writing stuff +let g:limelight_conceal_ctermcfg = 240 +autocmd Filetype markdown :Goyo +"autocmd Filetype markdown :Limelight +autocmd Filetype markdown :set spell +autocmd Filetype markdown :set linebreak + +" Pandoc compiling +autocmd Filetype md setlocal makeprg=pandoc\ % -o %:r.md +" Tex compiling +autocmd Filetype tex setlocal makeprg=pdflatex\ % +autocmd Filetype md inoremap :!echopandoc-fmarkdown-implicit_figures-fmarkdown-tpdf% +autocmd Filetype tex inoremap ,mp :!pdflatex % diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc new file mode 100644 index 0000000..425def5 --- /dev/null +++ b/dotfiles/.zshrc @@ -0,0 +1,106 @@ +# Set up the prompt + +autoload -Uz promptinit +#promptinit +#prompt adam1 +PROMPT="%K{grey}%F{white}%n%f%k %F{grey} %~%} %F{white} %# %f" + +setopt histignorealldups sharehistory + +# Remove horrible beep in tty +unsetopt BEEP +# Use emacs keybindings even if our EDITOR is set to vi +bindkey -e + +# Keep 1000 lines of history within the shell and save it to ~/.zsh_history: +HISTSIZE=1000 +SAVEHIST=1000 +HISTFILE=~/.zsh_history + +# Use modern completion system +autoload -Uz compinit +compinit + +zstyle ':completion:*' auto-description 'specify: %d' +zstyle ':completion:*' completer _expand _complete _correct _approximate +zstyle ':completion:*' format 'Completing %d' +zstyle ':completion:*' group-name '' +zstyle ':completion:*' menu select=2 +eval "$(dircolors -b)" +zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS} +zstyle ':completion:*' list-colors '' +zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s +zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=* l:|=*' +zstyle ':completion:*' menu select=long +zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s +zstyle ':completion:*' use-compctl false +zstyle ':completion:*' verbose true + +zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31' +zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd' + +# 256 color support +[[ "$TERM" == "xterm" ]] && export TERM=xterm-256color + +# full file path - someimtes you need a dank copy paste +fpath() { + echo "$(pwd)/$(ls $1)" +} + +# grep colors +alias grep='grep --color' + +# arrows +bindkey "^[[1;5C" forward-word +bindkey "^[[1;5D" backward-word + +# ls aliases +alias ls='ls --color' +alias la='ls -A' +alias ll='ls -alLF' +alias l='ls -CF' + +# brightness +alias bup="xbacklight -inc 5;xbacklight" +alias bdown="xbacklight -dec 5;xbacklight" +alias bstat='xbacklight' + + +# program aliases +alias v='vim' +alias r='ranger' +alias p3='python3' +alias clip='xclip -selection c' +alias xclip='xclip -selection c' + + +# git stuff +alias ssign='ssh-add ~/.ssh/id_gitlab' +alias gitcheat='mupdf ~/Downloads/gitSheet/git-cheatsheet-EN-dark.pdf &' +alias push='git push' +alias pull='git pull' +alias gst='git status' +alias gd="git diff $1" +alias gr="git remote -v" + +# logins to vm's +alias mininet='ssh mininet@localhost -Y -p 2223' +alias debsand='ssh meme@localhost -Y -p 6969' + +# /comfy/ aliases +alias c='clear' +alias cls='clear;ls' +alias e='exit' +alias p='pwd' +alias b='cd ..' +alias rm="rm -i" +alias tc='clear;pwd;l' +alias m='micro' + +# rust shiz +export PATH="$HOME/.cargo/bin:$PATH" + +# java trash +alias java="$HOME/Downloads/jdk-11.0.2/bin/java" +alias javac="$HOME/Downloads/jdk-11.0.2/bin/javac" +export PATH_TO_FX="$HOME/Downloads/javafx-sdk-11.0.2/lib" diff --git a/polybar b/polybar index 1bd0dd6..1d5716d 100644 --- a/polybar +++ b/polybar @@ -1,3 +1,3 @@ #!/bin/sh -sleep 3 -polybar top > /dev/null +sleep 4 +setsid polybar top > /dev/null & From 14fc6dbe4e24eada7079d3f7bc7be6e1055dccfb Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Mon, 2 Dec 2019 16:58:00 -0800 Subject: [PATCH 3/8] committing to annoy: default screen detection would nice --- proj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proj b/proj index c614bc5..3670d5c 100755 --- a/proj +++ b/proj @@ -8,6 +8,7 @@ then # Grab the display device out=`xrandr | grep ' connected' | awk '{print $1}' | \ dmenu -i -p 'Device to attach'` + echo $out if [ -z "$out" ]; then exit 0; fi # what side should it go on @@ -16,7 +17,7 @@ then if [ -z "$side" ]; then exit 0; fi echo "xrandr --output $out --auto $side eDP-1" - xrandr --output $out --auto --$side DVI-I-1 + xrandr --output $out --auto --$side eDP1 #DVI-I-1 else # Get the display we want to remove out=`xrandr | grep ' connected' | awk '{print $1}' | \ From a08cd7461fa8ddcb48986096febf5e62932b2f86 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Mon, 2 Dec 2019 23:53:46 -0800 Subject: [PATCH 4/8] added stage to pick out interface before anything else --- wifi | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/wifi b/wifi index fbb4f89..da8d26e 100755 --- a/wifi +++ b/wifi @@ -2,8 +2,10 @@ # TODO: rid ourselves of plaintext configs which can have sensitive network keys -cfg_loc="/home/shockrah/.config/wifi-configs/" -iface="wlp1s0" +export cfg_loc="/home/shockrah/.config/wifi-configs/" +export usb_iface='enx9cebe828e98a' +export default_iface='wlp1s0' +export iface=$default_iface debug_kill= # wpa_supplicant and dhclient are only exposed to root by default @@ -49,7 +51,7 @@ __connect_config() { then if [ ! -f "$1" ]; then echo Config not found - exit 0 + exit 1 fi __kill_old wpa_supplicant -B -i $iface -c "$1" @@ -59,6 +61,18 @@ __connect_config() { fi } +select_interface() { + _iface="`ip a \ + | awk '{print $2}' \ + | grep -E '^[a-z0-9]+:$' \ + | sed 's/://g' \ + | dmenu -i -p 'Select interface to connect on'`" + if [ -z "$_iface" ];then + exit 1 + fi + iface=$_iface +} + remove_old_config() { name="`ls $cfg_loc | dmenu -i -p 'Name of config to remove'`" rm -f "$cfg_loc/$name" @@ -97,6 +111,8 @@ option=`printf "Remove\nConnect\nNew\nDiconnect\n" | dmenu -i -p 'Options:'` case $option in New) create_new_config;; Remove) remove_old_config;; - Connect) reconnect_old_config;; + Connect) + select_interface; echo 'yes'; reconnect_old_config + ;; Disconnect) __kill_old;; esac From d7b09948968be975a1344a287170657ec466a5e4 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Thu, 12 Dec 2019 16:56:52 -0800 Subject: [PATCH 5/8] tfw typo --- polybar | 2 +- wifi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/polybar b/polybar index 1d5716d..e34f012 100644 --- a/polybar +++ b/polybar @@ -1,3 +1,3 @@ #!/bin/sh -sleep 4 +sleep 3 setsid polybar top > /dev/null & diff --git a/wifi b/wifi index da8d26e..9ecd63d 100755 --- a/wifi +++ b/wifi @@ -107,7 +107,7 @@ create_new_config() { } -option=`printf "Remove\nConnect\nNew\nDiconnect\n" | dmenu -i -p 'Options:'` +option=`printf "Remove\nConnect\nNew\nDisconnect\n" | dmenu -i -p 'Options:'` case $option in New) create_new_config;; Remove) remove_old_config;; From b9e1f2c2dc6c7c6964c8a724383a3370e45ca822 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Sat, 14 Dec 2019 14:42:43 -0800 Subject: [PATCH 6/8] wt hecc echo --- wifi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wifi b/wifi index 9ecd63d..0ece943 100755 --- a/wifi +++ b/wifi @@ -112,7 +112,7 @@ case $option in New) create_new_config;; Remove) remove_old_config;; Connect) - select_interface; echo 'yes'; reconnect_old_config + select_interface; reconnect_old_config ;; Disconnect) __kill_old;; esac From c3e4aca9ba9500d76381b5f870c0ea71201da2e8 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Sat, 21 Dec 2019 19:25:07 -0800 Subject: [PATCH 7/8] tfw pinging script --- itest | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 itest diff --git a/itest b/itest new file mode 100755 index 0000000..abe0dbe --- /dev/null +++ b/itest @@ -0,0 +1,5 @@ +#!/bin/sh + +# Tests wether or not we have internet connection +ping 1.1.1.1 -c 3& +ping shockrah.shop -c 3& From d15deed7c22881b3eb4d7c60f3879d0593b5916f Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Sat, 21 Dec 2019 21:19:31 -0800 Subject: [PATCH 8/8] singles install was missing -o flag --- ytdl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ytdl b/ytdl index c7be8d4..61286e1 100755 --- a/ytdl +++ b/ytdl @@ -25,5 +25,5 @@ if echo "$url" | grep -q '&list='; then elif echo "$url" | grep -q '/sets/'; then $cmd -o "$outplaylist" "$url" else - $cmd "$outsingle" "$url" + $cmd -o "$outsingle" "$url" fi