initial
parent
650f37c07d
commit
dbbc5a1ff3
|
|
@ -1,5 +0,0 @@
|
||||||
Downloads ~/Downloads
|
|
||||||
Go ~/projects/go/src/github.com
|
|
||||||
Home ~/
|
|
||||||
Work ~/projects/work
|
|
||||||
Projects ~/projects
|
|
||||||
|
|
@ -1,73 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
# vim: set ft=sh
|
|
||||||
alias cdp="cd -"
|
|
||||||
alias ..='cd ..'
|
|
||||||
alias pd="pushd $1"
|
|
||||||
|
|
||||||
# list files
|
|
||||||
alias ll='ls -hGla'
|
|
||||||
|
|
||||||
#rake
|
|
||||||
alias bake='bundle exec rake'
|
|
||||||
|
|
||||||
#tools
|
|
||||||
alias resrc='source ~/.bash_aliases && source ~/.bashrc && source ~/.profile'
|
|
||||||
alias role='whoami -groups -fo list | grep -i'
|
|
||||||
alias fu='find ./ -type f -print0 | xargs -0 grep -n $1'
|
|
||||||
|
|
||||||
# Add an "alert" alias for long running commands. Use like so:
|
|
||||||
# sleep 10; alert
|
|
||||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
|
||||||
|
|
||||||
|
|
||||||
#git
|
|
||||||
alias gs='git status'
|
|
||||||
|
|
||||||
alias gm='git merge --ff-only'
|
|
||||||
alias gpr='git pull --rebase'
|
|
||||||
alias gmt='git mergetool'
|
|
||||||
alias grc='git rebase --continue'
|
|
||||||
alias gk='git fetch origin; git remote prune origin; gitk --all &'
|
|
||||||
alias gl='git log --pretty=format:"%h %ar by %an: %s"'
|
|
||||||
|
|
||||||
# Get week number
|
|
||||||
alias week='date +%V'
|
|
||||||
|
|
||||||
# Stopwatch
|
|
||||||
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
|
|
||||||
alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport'
|
|
||||||
|
|
||||||
# Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
|
|
||||||
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update'
|
|
||||||
|
|
||||||
# IP addresses
|
|
||||||
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
|
|
||||||
alias localip="ipconfig getifaddr en0"
|
|
||||||
alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
|
|
||||||
|
|
||||||
# Empty the Trash on all mounted volumes and the main HDD
|
|
||||||
# Also, clear Apple’s System Logs to improve shell startup speed
|
|
||||||
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
|
||||||
|
|
||||||
# Show/hide hidden files in Finder
|
|
||||||
alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
|
|
||||||
alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
|
|
||||||
# Recursively delete `.DS_Store` files
|
|
||||||
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
|
|
||||||
|
|
||||||
# Hide/show all desktop icons (useful when presenting)
|
|
||||||
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
|
|
||||||
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
|
|
||||||
|
|
||||||
# Stuff I never really use but cannot delete either because of http://xkcd.com/530/
|
|
||||||
alias stfu="osascript -e 'set volume output muted true'"
|
|
||||||
alias pumpitup="osascript -e 'set volume 7'"
|
|
||||||
#
|
|
||||||
# Kill all the tabs in Chrome to free up memory
|
|
||||||
# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
|
|
||||||
alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
|
|
||||||
# Lock the screen (when going AFK)
|
|
||||||
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
|
|
||||||
|
|
||||||
# go
|
|
||||||
alias sgobuild="CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w'"
|
|
||||||
|
|
@ -1,195 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#vim: set ft=sh
|
|
||||||
|
|
||||||
# Determine size of a file or total size of a directory
|
|
||||||
function fs() {
|
|
||||||
if du -b /dev/null > /dev/null 2>&1; then
|
|
||||||
local arg=-sbh;
|
|
||||||
else
|
|
||||||
local arg=-sh;
|
|
||||||
fi
|
|
||||||
if [[ -n "$@" ]]; then
|
|
||||||
du $arg -- "$@";
|
|
||||||
else
|
|
||||||
du $arg .[^.]* *;
|
|
||||||
fi;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# Create a .tar.gz archive, using `zopfli`, `pigz` or `gzip` for compression
|
|
||||||
function targz() {
|
|
||||||
local tmpFile="${@%/}.tar";
|
|
||||||
tar -cvf "${tmpFile}" --exclude=".DS_Store" "${@}" || return 1;
|
|
||||||
|
|
||||||
size=$(
|
|
||||||
stat -f"%z" "${tmpFile}" 2> /dev/null; # OS X `stat`
|
|
||||||
stat -c"%s" "${tmpFile}" 2> /dev/null # GNU `stat`
|
|
||||||
);
|
|
||||||
|
|
||||||
local cmd="";
|
|
||||||
if (( size < 52428800 )) && hash zopfli 2> /dev/null; then
|
|
||||||
# the .tar file is smaller than 50 MB and Zopfli is available; use it
|
|
||||||
cmd="zopfli";
|
|
||||||
else
|
|
||||||
if hash pigz 2> /dev/null; then
|
|
||||||
cmd="pigz";
|
|
||||||
else
|
|
||||||
cmd="gzip";
|
|
||||||
fi;
|
|
||||||
fi;
|
|
||||||
|
|
||||||
echo "Compressing .tar using \`${cmd}\`…";
|
|
||||||
"${cmd}" -v "${tmpFile}" || return 1;
|
|
||||||
[ -f "${tmpFile}" ] && rm "${tmpFile}";
|
|
||||||
echo "${tmpFile}.gz created successfully.";
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create a new directory and enter it
|
|
||||||
function mkd() {
|
|
||||||
mkdir -p "$@" && cd "$_";
|
|
||||||
}
|
|
||||||
|
|
||||||
# runs vim outside of the term by forking the command and gvim, great for my windows box
|
|
||||||
function vd(){
|
|
||||||
if [[ $# -eq 0 ]]; then
|
|
||||||
gvim &
|
|
||||||
else
|
|
||||||
gvim --remote-tab-silent "$@" &
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# `v` with no arguments opens the current directory in Vim, otherwise opens the
|
|
||||||
# given location
|
|
||||||
function v(){
|
|
||||||
if [[ $# -eq 0 ]]; then
|
|
||||||
vim .;
|
|
||||||
else
|
|
||||||
vim --remote-tab-silent "$@";
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# `s` with no arguments opens the current directory in Sublime Text, otherwise
|
|
||||||
# opens the given location
|
|
||||||
function s() {
|
|
||||||
if [ $# -eq 0 ]; then
|
|
||||||
subl .;
|
|
||||||
else
|
|
||||||
subl "$@";
|
|
||||||
fi;
|
|
||||||
}
|
|
||||||
|
|
||||||
# delete merged local branches
|
|
||||||
function prunelocal(){
|
|
||||||
for b in `git branch --merged | grep -v \*`; do git branch -D $b; done
|
|
||||||
}
|
|
||||||
|
|
||||||
# generates a public key from a private key
|
|
||||||
function pubkey(){
|
|
||||||
if [[ -z $1 ]]; then
|
|
||||||
echo "Takes a path to a private key and prints a compatible public key to stdout"
|
|
||||||
echo "$1 required: path to a private key"
|
|
||||||
return -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
ssh-keygen -y -f $1
|
|
||||||
}
|
|
||||||
# list network interfaces
|
|
||||||
function interfaces(){
|
|
||||||
ifconfig | grep "\: flags" | awk '{print $1}' | sed 's/:$//';
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create a git.io short URL
|
|
||||||
function gitio() {
|
|
||||||
if [ -z "${1}" -o -z "${2}" ]; then
|
|
||||||
echo "Usage: \`gitio slug url\`";
|
|
||||||
return 1;
|
|
||||||
fi;
|
|
||||||
curl -i http://git.io/ -F "url=${2}" -F "code=${1}";
|
|
||||||
}
|
|
||||||
|
|
||||||
# kill the process using the specified port
|
|
||||||
function freeport(){
|
|
||||||
|
|
||||||
if [ -z $1 ]; then
|
|
||||||
echo "usage: freeport <port number>" >&2
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
lsof -t -i tcp:$1 | xargs kill
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# runs tcp dump on the port specified in $1. $1 defaults to 8080
|
|
||||||
function dumptcp(){
|
|
||||||
local DUMPPORT=$1
|
|
||||||
local DUMPINTERFACE=$2
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
DUMPPORT=8080
|
|
||||||
elif [[ "$1" == "help" ]]; then
|
|
||||||
echo "dumps tcp info at the specified port. Useful for looking at http requests"
|
|
||||||
echo "usage dumptcp <port>"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$2" ]; then
|
|
||||||
DUMPINTERFACE=lo0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "dumping tcp connections @ $DUMPINTERFACE on port $DUMPPORT..."
|
|
||||||
|
|
||||||
sudo tcpdump -s 0 -A -i $DUMPINTERFACE "tcp port $DUMPPORT and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)"
|
|
||||||
}
|
|
||||||
|
|
||||||
# Run `dig` and display the most useful info
|
|
||||||
function digga() {
|
|
||||||
dig +nocmd "$1" any +multiline +noall +answer;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Simple calculator
|
|
||||||
function calc() {
|
|
||||||
local result="";
|
|
||||||
result="$(printf "scale=10;$*\n" | bc --mathlib | tr -d '\\\n')";
|
|
||||||
# └─ default (when `--mathlib` is used) is 20
|
|
||||||
#
|
|
||||||
if [[ "$result" == *.* ]]; then
|
|
||||||
# improve the output for decimal numbers
|
|
||||||
printf "$result" |
|
|
||||||
sed -e 's/^\./0./' # add "0" for cases like ".5"` \
|
|
||||||
-e 's/^-\./-0./' # add "0" for cases like "-.5"`\
|
|
||||||
-e 's/0*$//;s/\.$//'; # remove trailing zeros
|
|
||||||
else
|
|
||||||
printf "$result";
|
|
||||||
fi;
|
|
||||||
printf "\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
# a shortcut for cloning from github
|
|
||||||
# usage: clone user/repo <dir>
|
|
||||||
function clone() {
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo "Missing git repository url ending"
|
|
||||||
echo "usage: clone 'git repository ending' ['target directory name']"
|
|
||||||
else
|
|
||||||
giturl="git@github.com:$1.git"
|
|
||||||
|
|
||||||
if [ -z "$2" ]; then
|
|
||||||
# we DON'T HAVE a target directory
|
|
||||||
git clone $giturl
|
|
||||||
else
|
|
||||||
# we HAVE a target directory
|
|
||||||
git clone $giturl $2
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create a data URL from a file
|
|
||||||
function dataurl() {
|
|
||||||
local mimeType=$(file -b --mime-type "$1");
|
|
||||||
if [[ $mimeType == text/* ]]; then
|
|
||||||
mimeType="${mimeType};charset=utf-8";
|
|
||||||
fi
|
|
||||||
echo "data:${mimeType};base64,$(openssl base64 -in "$1" | tr -d '\n')";
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +1,21 @@
|
||||||
[submodule "tools/modules/tmux-MacOSX-pasteboard"]
|
[submodule "tmux-MacOSX-pasteboard"]
|
||||||
path = tools/modules/tmux-MacOSX-pasteboard
|
path = tools/osx/iTerm2-Color-Schemes
|
||||||
url = git://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard.git
|
|
||||||
[submodule "tools/modules/powerline-fonts"]
|
|
||||||
path = tools/modules/powerline-fonts
|
|
||||||
url = git://github.com/Lokaltog/powerline-fonts.git
|
|
||||||
[submodule "tools/modules/iTerm2-Color-Schemes"]
|
|
||||||
path = tools/modules/iTerm2-Color-Schemes
|
|
||||||
url = git://github.com/mbadolato/iTerm2-Color-Schemes.git
|
url = git://github.com/mbadolato/iTerm2-Color-Schemes.git
|
||||||
[submodule "tools/modules/powerline"]
|
[submodule "iTerm2-Color-Schemes"]
|
||||||
path = tools/modules/powerline
|
path = tools/osx/iTerm2-Color-Schemes
|
||||||
|
url = git://github.com/mbadolato/iTerm2-Color-Schemes.git
|
||||||
|
[submodule "powerline-fonts"]
|
||||||
|
path = tools/powerline/powerline-fonts
|
||||||
|
url = git://github.com/Lokaltog/powerline-fonts.git
|
||||||
|
[submodule "powerline"]
|
||||||
|
path = tools/powerline/powerline
|
||||||
url = git://github.com/powerline/powerline.git
|
url = git://github.com/powerline/powerline.git
|
||||||
|
[submodule "polybar-spotify"]
|
||||||
|
path = tools/polybar/polybar-spotify
|
||||||
|
url = git://github.com/Jvanrhijn/polybar-spotify.git
|
||||||
|
[submodule "polypomo"]
|
||||||
|
path = tools/polybar/polypomo
|
||||||
|
url = git://github.com/unode/polypomo.git
|
||||||
|
[submodule "polybar-scripts"]
|
||||||
|
path = tools/polybar/polybar-scripts
|
||||||
|
url = git://github.com/polybar/polybar-scripts.git
|
||||||
|
|
|
||||||
26
.ssh/config
26
.ssh/config
|
|
@ -1,26 +0,0 @@
|
||||||
# some commonly set options
|
|
||||||
Host *
|
|
||||||
# verbosity used when logging messages from ssh, QUIET, FATAL, ERROR, INFO, VERBOSE, DEBUG, DEBUG1, DEBUG2, DEBUG3
|
|
||||||
LogLevel INFO
|
|
||||||
# if YES, never auto add host keyes and refuses to connecto to hosts that have changed. YES, NO, ASK
|
|
||||||
StrictHostKeyChecking ask
|
|
||||||
# known hosts file database location
|
|
||||||
UserKnownHostsFile ~/.ssh/known_hosts
|
|
||||||
# timeout in seconds after which if no data has been recieved from the server, ssh will send a keep alive message
|
|
||||||
ServerAliveInterval 30
|
|
||||||
# the number of times to send a keep alive message in a row, only applies to ssh v2
|
|
||||||
ServerAliveCountMax 120
|
|
||||||
# Shows the ssh key image on connection. YES or NO
|
|
||||||
VisualHostKey yes
|
|
||||||
# if the connection should use compression. YES or NO
|
|
||||||
Compression yes
|
|
||||||
# If ssh should use password auth. YES or NO
|
|
||||||
PasswordAuthentication yes
|
|
||||||
# allows ssh to prefer one method of auth over another if there are multiple methods available. gssapi-with-mic, hostbased, publickey, keyboard-interactive, password
|
|
||||||
PreferredAuthentications publickey
|
|
||||||
# send TCP keep alive messages to the host, which lets us know if the connection dies, but it can give false negatives (if the connection goes down temporarily, you'll get disconnected). YES, NO
|
|
||||||
TCPKeepAlive yes
|
|
||||||
|
|
||||||
# refer to: https://github.com/FiloSottile/whosthere/blob/master/README.md
|
|
||||||
PubkeyAuthentication yes
|
|
||||||
IdentitiesOnly yes
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
FROM debian:bullseye
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y sudo apt-utils && apt-get clean
|
||||||
|
RUN useradd -G sudo -U -u 1000 -m -s /bin/bash dev \
|
||||||
|
&& echo 'dev:dev' | chpasswd \
|
||||||
|
&& mkdir -p /home/dev/Projects \
|
||||||
|
&& chown -R dev:dev /home/dev/ \
|
||||||
|
&& echo "dev ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/dev_no_pass
|
||||||
|
|
||||||
|
|
||||||
|
USER 1000
|
||||||
|
|
||||||
|
WORKDIR /home/dev
|
||||||
|
COPY . /home/dev/Projects/dotfiles
|
||||||
|
RUN rm -rf /home/dev/.bashrc \
|
||||||
|
&& /home/dev/Projects/dotfiles/install dev \
|
||||||
|
&& sudo rm -rf /tmp/*
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/bash", "--login"]
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
from archlinux/base
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
FROM debian
|
||||||
|
|
||||||
|
COPY . /home/dotfiles/Projects/dotfiles
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y sudo
|
||||||
|
|
||||||
|
RUN useradd -G sudo -U -u 1000 -m -s /bin/bash dotfiles \
|
||||||
|
&& echo 'dotfiles:dotfiles' | chpasswd \
|
||||||
|
&& mkdir -p /home/dotfiles/Projects \
|
||||||
|
&& chown -R dotfiles:dotfiles /home/dotfiles
|
||||||
|
|
||||||
|
|
||||||
|
USER 1000
|
||||||
|
|
||||||
|
WORKDIR /home/dotfiles
|
||||||
|
|
||||||
|
ENTRYPOINT "/bin/bash"
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
MIT
|
||||||
|
|
||||||
|
Copyright 2019 Adam Veldhousen
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFWARE.
|
||||||
39
README.md
39
README.md
|
|
@ -1,42 +1,39 @@
|
||||||
laughing-hipster
|
Dotfiles
|
||||||
================
|
================
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
My dot files
|
My dot files
|
||||||
|
|
||||||
## What's included?
|
## What's included?
|
||||||
|
|
||||||
A very simplistic plugin system, drop shell scripts you would like to source into the ~/.extensions directory. .profile will load them automatically.
|
A very simplistic plugin system, drop shell scripts you would like to source into the `~/.shell_extensions` directory and they get automatically loaded.
|
||||||
|
|
||||||
A custom SSH config setup with nice defaults.
|
A custom SSH config setup with nice defaults.
|
||||||
|
|
||||||
Installs Brew when run on OSX, along with several utilities I commonly use.
|
|
||||||
|
|
||||||
Comes with an uninstall script.
|
Comes with an uninstall script.
|
||||||
|
|
||||||
Themes for vim, iterm2 and for cmder when ran on windows.
|
Themes for vim, iterm2 and for cmder when ran on windows.
|
||||||
|
|
||||||
Tmux and vim configurations
|
Tmux and vim configurations.
|
||||||
|
|
||||||
|
i3 (sway if using wayland), compton, polybar, dunst, nitrogen for linux window management.
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
1. cd into `~`
|
1. Run `./install <username>` and everything is automatically installed:
|
||||||
3. run `laughing-hipster/bootstrap.sh`
|
- symlinks `.vimrc`, `.tmux.conf`, `.gitconfig`, `.motd`, `.profile`, `.shell_extensions`, `.config`, `.ssh/config` to home directory
|
||||||
|
- backups existing copies of all files to `.dotfiles_backup_<date>/`
|
||||||
|
- installs rvm, gvm, nvm, rustup
|
||||||
|
- compton, dunst, nitrogen, polybar if x is detected
|
||||||
|
|
||||||
The installer backs up your current home folder dotfiles into `.home_bkup` and then symlinks in the dotfiles for this repo. The installer also preserves your ssh config if you have customized it already.
|
|
||||||
|
|
||||||
Because everything is symlinked, all you have to do for most updates is just `git pull`.
|
|
||||||
|
|
||||||
## Uninstall
|
|
||||||
|
|
||||||
1. cd into `~`
|
|
||||||
2. run `./laughing-hipster/remove.sh`
|
|
||||||
|
|
||||||
|
|
||||||
The uninstaller will leave the ssh config in place and copy all of the files from `.home_bkup` into their original places. It will also remove the tools folder and any dot files that have the same name as the ones in this repo.
|
|
||||||
|
|
||||||
Basically you end up back where you started (or close to) without anything destructive happening.
|
|
||||||
|
|
||||||
## Extending with custom scripts
|
## Extending with custom scripts
|
||||||
|
|
||||||
This set up will source all files found in a `~/.extensions/` directory or in a file named `~/.extensions` at the last moment. This allows you to extend and customize how everything works to your liking.
|
This set up will source all files found in a `~/.shell_extensions/` directory. This allows you to extend and customize how everything works to your liking.
|
||||||
|
|
||||||
|
|
||||||
|
## LICENSE
|
||||||
|
|
||||||
|
MIT
|
||||||
|
|
|
||||||
159
bootstrap.sh
159
bootstrap.sh
|
|
@ -1,159 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
IFS='\n\t'
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
source="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
dest="$(pwd)"
|
|
||||||
bkup="$dest/.home_bkup"
|
|
||||||
|
|
||||||
|
|
||||||
if [ -d ${bkup} ]; then
|
|
||||||
echo "A backup folder already exists, it must be moved/deleted before bootstrap can apply the new dotfiles."
|
|
||||||
exit -1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "Making a backup of old dotfiles into ${bkup}..."
|
|
||||||
mkdir -p "${bkup}"
|
|
||||||
|
|
||||||
IFS=$'\n'
|
|
||||||
if [ -f ${dest}/.ssh/config ]; then
|
|
||||||
mkdir -p "${bkup}/.ssh"
|
|
||||||
cp "${dest}/.ssh/config" "${bkup}/.ssh/config"
|
|
||||||
fi
|
|
||||||
for file in $(ls -lA "${source}" | grep "^-" | awk '{print $9}'); do
|
|
||||||
if [ -f "${dest}/${file}" ]; then
|
|
||||||
cp "${dest}/${file}" "${bkup}/${file}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "loading git modules in $source..."
|
|
||||||
pushd $source
|
|
||||||
git submodule init
|
|
||||||
git submodule update
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "copying \"./tools\" directories..."
|
|
||||||
if [ -z "${dest}/Tools" ]; then
|
|
||||||
mkdir -p ${dest}/tools
|
|
||||||
fi
|
|
||||||
|
|
||||||
#ln -fs ${source}/Tools ${dest}/tools
|
|
||||||
cp -R ${source}/tools ${dest}/tools
|
|
||||||
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "linking dotfiles from ${source} into ${dest}"
|
|
||||||
# ln on windows pretty much only works with hardlinks it seems
|
|
||||||
ls -lA "${source}" | grep "^-" | awk '{print $9}' | xargs -I file ln -fs "${source}/file" "${dest}/file"
|
|
||||||
if [ -z "${dest}/.ssh" ]; then
|
|
||||||
mkdir -p "${dest}/.ssh"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "setting up ssh default"
|
|
||||||
# a check to see if they're using a config file and if it has a host setup
|
|
||||||
if [ -f "${dest}/.ssh/config" && -z $(cat "${dest}/.ssh/config" | grep '[hH]ost \*') ]; then
|
|
||||||
echo "Appending ssh config"
|
|
||||||
# we append it so we don't destroy any custom settings they may have
|
|
||||||
cat "${source}/.ssh/config" >> "${dest}/.ssh/config"
|
|
||||||
elif [ -f "${dest}/.ssh/config" ]; then
|
|
||||||
echo "Your SSHfu is strong, skipping config copy..."
|
|
||||||
else
|
|
||||||
echo "Copying new ssh config"
|
|
||||||
mkdir -p "${dest}/.ssh/"
|
|
||||||
cp -n "${source}/.ssh/config" "${dest}/.ssh/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
mkdir -p ${dest}/projects/
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "installing platform stuff"
|
|
||||||
if [ $(uname -s) == "Darwin" ]; then
|
|
||||||
echo "installing fonts"
|
|
||||||
find ${source}/tools/modules/powerline-fonts | grep "\.[to]tf" | xargs -I {} cp {} /Users/$(whoami)/Library/Fonts/
|
|
||||||
|
|
||||||
echo "installing osx stuff"
|
|
||||||
sudo ./install/.osx
|
|
||||||
|
|
||||||
#rake
|
|
||||||
elif [ $(uname -s) == "Linux" ]; then
|
|
||||||
echo "installing linux stuff"
|
|
||||||
${source}/install/debian.sh
|
|
||||||
elif [ $(uname -o) == "Msys" ]; then
|
|
||||||
|
|
||||||
echo "If you would like to install vim plugins, ensure you have ruby 1.9.3 + rake installed and do the following:"
|
|
||||||
echo "rake;"
|
|
||||||
echo "~/tools/vim/bundle/YouCompleteMe/install.py --all;"
|
|
||||||
echo "installing fonts"
|
|
||||||
fonts="$(find ${source}/tools/modules/powerline-fonts | grep "\.[to]tf")"
|
|
||||||
|
|
||||||
mkdir -p "$dest/fonts_to_install"
|
|
||||||
for font in $fonts
|
|
||||||
do
|
|
||||||
fontname="$(basename $font)"
|
|
||||||
cp -n $font "$dest/fonts_to_install/"
|
|
||||||
#reg add "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts" /v "${fontname} (TrueType)" /t REG_SZ /d "$font" /f
|
|
||||||
done
|
|
||||||
echo "go to $dest/fonts_to_install, select all of the font files and right-click -> install"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d "${dest}/.extensions" ]; then
|
|
||||||
echo "${dest}/.extensions exists"
|
|
||||||
else
|
|
||||||
mkdir ${dest}/.extensions
|
|
||||||
cat <<EOF >~/.extensions/README.md
|
|
||||||
# Extensions
|
|
||||||
|
|
||||||
All script files in this folder get loaded by the .profile, so this is a nice place to organize plugins
|
|
||||||
or enhancements to the dotfile setup
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
|
|
||||||
rbenv install 1.9.3-p125;
|
|
||||||
rbenv global 1.9.3-p125;
|
|
||||||
rbenv rehash
|
|
||||||
|
|
||||||
rm -rf ${dest}/tools/modules/iTerm2-Color-Schemes
|
|
||||||
rm -rf ${dest}/tools/modules/tmux-MacOSX-pasteboard
|
|
||||||
|
|
||||||
#./tools/vim/bundle/YouCompleteMe/install.py --all &
|
|
||||||
|
|
||||||
rake
|
|
||||||
|
|
||||||
|
|
||||||
echo "You must install YouCompleteMe by going to ~/tools/vim/bundle/YouCompleteMe/ and following the instructions in the README.md"
|
|
||||||
|
|
||||||
if [ -f "~/.bashrc" ]; then
|
|
||||||
echo "sourcing .profile in .bashrc"
|
|
||||||
echo "source ./.profile" >> ~/.bashrc
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "Cleaning up..."
|
|
||||||
cleanup=".git
|
|
||||||
.gitmodules
|
|
||||||
.gitignore
|
|
||||||
install
|
|
||||||
bootstrap.sh
|
|
||||||
remove.sh
|
|
||||||
README.md"
|
|
||||||
|
|
||||||
for f in ${cleanup}
|
|
||||||
do
|
|
||||||
filetorm=${dest}/${f};
|
|
||||||
if [ -f ${filetorm} ]; then
|
|
||||||
rm -rf $filetorm
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "To uninstall, do cd ./lauging-hipster && ./remove.sh"
|
|
||||||
echo "Make sure your home_bkup folder is present, so keep it safe in the meantime!"
|
|
||||||
echo "Install ./tools/modules/powerline-fonts and set them up in your terminal to benefit from the custom PS1 in .shell_colors"
|
|
||||||
echo "done!"
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
||||||
// Place your key bindings in this file to overwrite the defaults
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"key": "ctrl+shift+alt+y",
|
|
||||||
"command": "extension.vim_ctrl+y",
|
|
||||||
"when": "editorTextFocus && vim.active && vim.use<C-y> && !inDebugRepl"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+y",
|
|
||||||
"command": "-extension.vim_ctrl+y",
|
|
||||||
"when": "editorTextFocus && vim.active && vim.use<C-y> && !inDebugRepl"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+y",
|
|
||||||
"command": "redo",
|
|
||||||
"when": "editorTextFocus && !editorReadonly"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+y",
|
|
||||||
"command": "-redo",
|
|
||||||
"when": "editorTextFocus && !editorReadonly"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+w",
|
|
||||||
"command": "-extension.vim_ctrl+w",
|
|
||||||
"when": "editorTextFocus && vim.active && vim.use<C-w> && !inDebugRepl"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+w",
|
|
||||||
"command": "-workbench.action.closeWindow",
|
|
||||||
"when": "!editorIsOpen"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+shift+]",
|
|
||||||
"command": "editor.action.goToDeclaration",
|
|
||||||
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "f12",
|
|
||||||
"command": "-editor.action.goToDeclaration",
|
|
||||||
"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+n",
|
|
||||||
"command": "workbench.action.files.newUntitledFile"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+\\",
|
|
||||||
"command": "workbench.action.terminal.split",
|
|
||||||
"when": "terminalFocus"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"key": "ctrl+k ctrl+i",
|
|
||||||
"command": "editor.action.showHover",
|
|
||||||
"when": "editorTextFocus"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
{
|
|
||||||
"terminal.integrated.shellArgs.linux": ["--login"],
|
|
||||||
"terminal.integrated.shellArgs.osx": ["--login"],
|
|
||||||
"terminal.integrated.fontFamily": "'Ubuntu Mono derivative Powerline', 'Fira Code Retina:style=Retina', 'PragmataPro', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
|
|
||||||
"terminal.integrated.fontSize": 14,
|
|
||||||
"editor.renderWhitespace": "boundary",
|
|
||||||
"editor.formatOnType": true,
|
|
||||||
"editor.formatOnPaste": true,
|
|
||||||
"editor.fontFamily": "'Fira Code Retina', 'Fira Code', 'PragmataPro'",
|
|
||||||
"editor.fontSize": 14,
|
|
||||||
"editor.codeLens": true,
|
|
||||||
"editor.fontLigatures": true,
|
|
||||||
"editor.hideCursorInOverviewRuler": true,
|
|
||||||
"editor.rulers": [120],
|
|
||||||
"eslint.alwaysShowStatus": true,
|
|
||||||
"eslint.autoFixOnSave": true,
|
|
||||||
"eslint.enable": true,
|
|
||||||
"[markdown]": {
|
|
||||||
"editor.wordWrap": "off",
|
|
||||||
"editor.quickSuggestions": {
|
|
||||||
"other": true,
|
|
||||||
"comments": false,
|
|
||||||
"strings": false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files.exclude": {
|
|
||||||
"**/.git": true,
|
|
||||||
"**/.svn": true,
|
|
||||||
"**/.hg": true,
|
|
||||||
"**/CVS": true,
|
|
||||||
"**/.DS_Store": true,
|
|
||||||
"**/node_modules": true
|
|
||||||
},
|
|
||||||
"git.enableCommitSigning": true,
|
|
||||||
"git.autofetch": true,
|
|
||||||
"git.autorefresh": true,
|
|
||||||
"go.testOnSave": true,
|
|
||||||
"go.lintOnSave": "package",
|
|
||||||
"go.autocompleteUnimportedPackages": false,
|
|
||||||
"go.formatTool": "goreturns",
|
|
||||||
"prettier.eslintIntegration": true,
|
|
||||||
"prettier.tabWidth": 4,
|
|
||||||
"window.openFilesInNewWindow": "on",
|
|
||||||
"telemetry.enableTelemetry": false,
|
|
||||||
"vim.leader": ",",
|
|
||||||
"vim.surround": true,
|
|
||||||
"vim.useSystemClipboard": true,
|
|
||||||
"workbench.colorTheme": "Cobalt2",
|
|
||||||
"window.zoomLevel": 0,
|
|
||||||
"workbench.activityBar.visible": true,
|
|
||||||
"workbench.editor.enablePreview": false,
|
|
||||||
"workbench.editor.enablePreviewFromQuickOpen": false,
|
|
||||||
"explorer.confirmDragAndDrop": false,
|
|
||||||
"explorer.confirmDelete": false,
|
|
||||||
"[javascript]": {
|
|
||||||
"editor.formatOnSave": true
|
|
||||||
},
|
|
||||||
"fs.inotify.max_user_watches":524288,
|
|
||||||
"gitlens.keymap": "alternate",
|
|
||||||
"gitlens.advanced.messages": {
|
|
||||||
"suppressCommitHasNoPreviousCommitWarning": false,
|
|
||||||
"suppressCommitNotFoundWarning": false,
|
|
||||||
"suppressFileNotUnderSourceControlWarning": false,
|
|
||||||
"suppressGitVersionWarning": false,
|
|
||||||
"suppressLineUncommittedWarning": true,
|
|
||||||
"suppressNoRepositoryWarning": false,
|
|
||||||
"suppressResultsExplorerNotice": false,
|
|
||||||
"suppressShowKeyBindingsNotice": true
|
|
||||||
},
|
|
||||||
"gitlens.historyExplorer.enabled": true,
|
|
||||||
"gitlens.mode.active": "review",
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
killall -q polybar
|
|
||||||
while pgrep -x polybar >/dev/null; do sleep 1; done
|
|
||||||
|
|
||||||
MONITOR=eDP-1-1 polybar bar1 &
|
|
||||||
MONITOR=DVI-I-3-2 polybar bar1 &
|
|
||||||
MONITOR=DVI-I-2-1 polybar bar1 &
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
[xin_0]
|
|
||||||
file=/home/adam/Pictures/Wallpapers/wallhaven-553335.jpg
|
|
||||||
mode=2
|
|
||||||
bgcolor=#6a8397
|
|
||||||
|
|
||||||
[xin_1]
|
|
||||||
file=/home/adam/Pictures/Wallpapers/wallhaven-553335.jpg
|
|
||||||
mode=2
|
|
||||||
bgcolor=#6a8397
|
|
||||||
|
|
||||||
[xin_2]
|
|
||||||
file=/home/adam/Pictures/Wallpapers/wallhaven-553335.jpg
|
|
||||||
mode=2
|
|
||||||
bgcolor=#6a8397
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
BASE_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd );
|
||||||
|
OLD_DIR=${PWD};
|
||||||
|
cd ${BASE_DIR};
|
||||||
|
./installers/base.sh $@;
|
||||||
|
cd ${OLD_DIR};
|
||||||
|
|
||||||
|
echo "Installation completed."
|
||||||
|
echo "Look in '/home/$@/tools/fonts' to install fonts. There is Fira Code, Pragmata Pro, Iosveka to choose from."
|
||||||
|
|
||||||
|
|
||||||
|
POST_INSTALL_MSG="\t- Keybase: https://keybase.io/docs/the_app/install_linux\n
|
||||||
|
\t- Firefox Developer Edition: https://www.mozilla.org/en-US/firefox/developer/\n
|
||||||
|
\t -Signal: https://signal.org/download/#linuxModal\n
|
||||||
|
\t- Docker: https://docs.docker.com/install/linux/docker-ce/ubuntu/\n
|
||||||
|
\t- or Podman: https://docs.docker.com/install/linux/docker-ce/ubuntu/\n
|
||||||
|
"
|
||||||
|
echo "Some things to install yourself:"
|
||||||
|
echo -e $POST_INSTALL_MSG
|
||||||
|
|
@ -1,92 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
if [ ! -d ${dest}/config ]; then
|
|
||||||
mkdir -p ${dest}/.config/
|
|
||||||
cp -R ${source}/config/ ${dest}/.config/
|
|
||||||
fi
|
|
||||||
|
|
||||||
apt-get update && apt-get install -y \
|
|
||||||
build-essential \
|
|
||||||
bison \
|
|
||||||
checkinstall \
|
|
||||||
cargo \
|
|
||||||
cmake \
|
|
||||||
cmake-data \
|
|
||||||
compton \
|
|
||||||
curl \
|
|
||||||
git \
|
|
||||||
i3-wm \
|
|
||||||
libunwind-dev \
|
|
||||||
libcairo2-dev \
|
|
||||||
libxcb1-dev \
|
|
||||||
libxcb-ewmh-dev \
|
|
||||||
libxcb-icccm4-dev \
|
|
||||||
libxcb-image0-dev \
|
|
||||||
libxcb-randr0-dev \
|
|
||||||
libxcb-util0-dev \
|
|
||||||
libxcb-xkb-dev \
|
|
||||||
libxcb-xrm-dev \
|
|
||||||
libasound2-dev \
|
|
||||||
libssl-dev \
|
|
||||||
libpulse-dev \
|
|
||||||
libmpdclient-dev \
|
|
||||||
libiw-dev \
|
|
||||||
libcurl4-openssl-dev \
|
|
||||||
libxcb-cursor-dev \
|
|
||||||
nitrogen \
|
|
||||||
pkg-config \
|
|
||||||
python-xcbgen \
|
|
||||||
python \
|
|
||||||
snap \
|
|
||||||
rbenv \
|
|
||||||
ruby-build \
|
|
||||||
rust \
|
|
||||||
terminator \
|
|
||||||
tmux \
|
|
||||||
wget \
|
|
||||||
xcb-proto;
|
|
||||||
|
|
||||||
snap install slack;
|
|
||||||
|
|
||||||
curl https://raw.githubusercontent.com/creationix/nvm/v0.25.0/install.sh | bash
|
|
||||||
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
|
|
||||||
source ~/.gvm/scripts/gvm
|
|
||||||
gvm install go1.4 -B
|
|
||||||
gvm use go1.4
|
|
||||||
export GOROOT_BOOTSTRAP=$GOROOT
|
|
||||||
gvm install go1.5
|
|
||||||
|
|
||||||
cd ${dest}/projects
|
|
||||||
|
|
||||||
# install polybar
|
|
||||||
git clone --branch 3.1.0 --recursive https://github.com/jaagr/polybar polybar
|
|
||||||
cd ./polybar
|
|
||||||
./build.sh
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
|
|
||||||
# install vim with all of the necessary features
|
|
||||||
git clone https://github.com/vim/vim vim
|
|
||||||
cd ./vim
|
|
||||||
|
|
||||||
./configure --with-features=huge \
|
|
||||||
--enable-multibyte \
|
|
||||||
--enable-rubyinterp=yes \
|
|
||||||
--enable-python3interp=yes \
|
|
||||||
--enable-perlinterp=yes \
|
|
||||||
--enable-luainterp=yes \
|
|
||||||
--enable-gui=gtk2 \
|
|
||||||
--enable-cscope \
|
|
||||||
--prefix=/usr/local
|
|
||||||
|
|
||||||
make VIMRUNTUME=~/tools/vim/
|
|
||||||
|
|
||||||
checkinstall
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
git clone https://github.com/51v4n/i3-gnome i3-gnome
|
|
||||||
cd ./i3-gnome
|
|
||||||
make install
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
cd ${dest}
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
@ -0,0 +1,142 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -eou pipefail
|
||||||
|
shopt -s extglob
|
||||||
|
|
||||||
|
GO_VERSION=1.13
|
||||||
|
NODE_VERSION=12
|
||||||
|
|
||||||
|
linkDirectory() {
|
||||||
|
SOURCE=$1;
|
||||||
|
DEST=$2;
|
||||||
|
echo "LINK $SOURCE -> $DEST"
|
||||||
|
find ${SOURCE} -type d ! -name '.ssh' | sed "s=${SOURCE}==" | xargs -I {} mkdir -p ${DEST}{};
|
||||||
|
find ${SOURCE} -type f ! -path "${SOURCE}/.ssh/config" | sed "s=${SOURCE}==" | xargs -I {} ln -vfs ${SOURCE}{} ${DEST}{};
|
||||||
|
# ln on windows pretty much only works with hardlinks it seems
|
||||||
|
#ls -lA "${SOURCE}" | grep "^-" | awk '{print $9}' | xargs -I {} ln -vfs "${SOURCE}/{}" "${DEST}/{}"
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "must define home directory";
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
export HOME_DIR=/home/$1;
|
||||||
|
export USER_ARG=$1;
|
||||||
|
BASE_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd );
|
||||||
|
SRC_DIR=${BASE_DIR}/src;
|
||||||
|
TOOLS_DIR=${BASE_DIR}/tools;
|
||||||
|
CONFIG_DIR=${SRC_DIR}/.config;
|
||||||
|
EXT_DIR=${SRC_DIR}/.shell_extensions;
|
||||||
|
export VIMRUNTIME=${HOME}/.config/vim/runtime;
|
||||||
|
|
||||||
|
if [ -d ${HOME_DIR} ]; then
|
||||||
|
echo "installing into ${HOME_DIR}";
|
||||||
|
else
|
||||||
|
echo "${HOME_DIR} doesn't exist";
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
export HOME=${HOME_DIR};
|
||||||
|
|
||||||
|
echo "installing dot files from ${BASE_DIR} into ${HOME_DIR}...";
|
||||||
|
|
||||||
|
mkdir -p ${HOME_DIR}/Projects;
|
||||||
|
mkdir -p ${HOME_DIR}/Downloads;
|
||||||
|
mkdir -p ${HOME_DIR}/Desktop;
|
||||||
|
mkdir -p ${HOME_DIR}/Documents/Pictures/Wallpapers;
|
||||||
|
mkdir -p ${HOME_DIR}/.ssh;
|
||||||
|
|
||||||
|
echo "linking dotfiles from ${SRC_DIR} to ${HOME_DIR}";
|
||||||
|
linkDirectory "${SRC_DIR}" "${HOME_DIR}";
|
||||||
|
|
||||||
|
echo "setting up ssh configuration";
|
||||||
|
# a check to see if they're using a config file and if it has a host setup
|
||||||
|
if [[ -f "${HOME_DIR}/.ssh/config" ]] && [[ -z $(cat "${HOME_DIR}/.ssh/config" | grep '[hH]ost \*') ]]; then
|
||||||
|
echo "Appending ssh config";
|
||||||
|
# we append it so we don't destroy any custom settings they may have
|
||||||
|
cat "${BASE_DIR}/.ssh/config" >> "${HOME_DIR}/.ssh/config";
|
||||||
|
elif [ -f "${HOME_DIR}/.ssh/config" ]; then
|
||||||
|
echo "Your SSHfu is strong, skipping config copy...";
|
||||||
|
else
|
||||||
|
echo "Copying new ssh config";
|
||||||
|
mkdir -p "${HOME_DIR}/.ssh/";
|
||||||
|
cp -n "${SRC_DIR}/.ssh/config" "${HOME_DIR}/.ssh/";
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(uname)" = "Linux" ]; then
|
||||||
|
source "${BASE_DIR}/installers/linux.sh";
|
||||||
|
rm -rf ${HOME_DIR}/.shell_extensions/osx/;
|
||||||
|
elif [ "$(uname)" = "Darwin" ]; then
|
||||||
|
echo "OSX not supported";
|
||||||
|
source "${BASE_DIR}/installers/osx.sh";
|
||||||
|
rm -rf ${HOME_DIR}/.shell_extensions/linux/;
|
||||||
|
else
|
||||||
|
echo "windows is not supported";
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
# Set up sub modules - link tools into home
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
|
||||||
|
git submodule init && git submodule --progress update;
|
||||||
|
|
||||||
|
linkDirectory ${TOOLS_DIR} ${HOME_DIR}/tools;
|
||||||
|
#find ${BASE_DIR}/tools -type f | sed "s=${BASE_DIR}==" | xargs -I {} ln -fsv ${BASE_DIR}/{} ${HOME_DIR}/{}
|
||||||
|
|
||||||
|
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
# Set up home directory deps
|
||||||
|
#------------------------------------------------------------------
|
||||||
|
mkdir -p ${HOME_DIR}/.bin;
|
||||||
|
|
||||||
|
echo "setting up vim runtime folder @ ${VIMRUNTIME}";
|
||||||
|
mkdir -p ${VIMRUNTIME}/autoload ${VIMRUNTIME}/bundle && \
|
||||||
|
curl -LSso ${VIMRUNTIME}/autoload/pathogen.vim https://tpo.pe/pathogen.vim;
|
||||||
|
|
||||||
|
|
||||||
|
if [ ! -d "${HOME_DIR}/.gvm/" ]; then
|
||||||
|
# install GVM
|
||||||
|
echo "installing gvm";
|
||||||
|
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer);
|
||||||
|
echo "[[ -s \"\$HOME/.gvm/scripts/gvm\" ]] && source \"\$HOME/.gvm/scripts/gvm\"" > ${HOME_DIR}/.shell_extensions/gvm.sh;
|
||||||
|
source ${HOME_DIR}/.gvm/scripts/gvm;
|
||||||
|
gvm install go${GO_VERSION} -B;
|
||||||
|
go use go${GO_VERSION} --default;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "${HOME}/.nvm" ]; then
|
||||||
|
# install nvm
|
||||||
|
echo "installing nvm";
|
||||||
|
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh | bash;
|
||||||
|
echo "export NVM_DIR=\"\$HOME/.nvm\"" > "${HOME}/.shell_extensions/nvm.sh";
|
||||||
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> "${HOME}/.shell_extensions/nvm.sh";
|
||||||
|
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion' >> "${HOME}/.shell_extensions/nvm.sh";
|
||||||
|
NVM_DIR=${HOME}/.nvm;
|
||||||
|
source $NVM_DIR/nvm.sh;
|
||||||
|
|
||||||
|
nvm install v${NODE_VERSION};
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "${HOME}/.cargo" ]; then
|
||||||
|
# install rust
|
||||||
|
echo "installing rustup + rust stable";
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh;
|
||||||
|
chmod +x /tmp/rustup.sh && /tmp/rustup.sh -y --no-modify-path;
|
||||||
|
echo 'source $HOME/.cargo/env' > "${HOME}/.shell_extensions/rust.sh";
|
||||||
|
source ${HOME}/.cargo/env
|
||||||
|
rustup install stable;
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "${HOME}/.rvm" ]; then
|
||||||
|
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
|
||||||
|
curl -sSL https://get.rvm.io | bash -s stable --ruby;
|
||||||
|
echo "source \${HOME}/.rvm/scripts/rvm" > "${HOME}/.shell_extensions/rvm.sh"
|
||||||
|
source ${HOME}/.rvm/scripts/rvm
|
||||||
|
fi
|
||||||
|
|
||||||
|
pushd ${HOME}/.config/vim/
|
||||||
|
rake
|
||||||
|
popd
|
||||||
|
|
||||||
|
find ${HOME} ! -path "${HOME}/Projects" ! -path "${HOME}" | xargs -I {} chown $@ {};
|
||||||
|
|
@ -0,0 +1,97 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
ALACRITTY_VERSION=0.3.3;
|
||||||
|
|
||||||
|
INSTALL_LIST='ctags dhex neofetch irssi man bison python2 iptables software-properties-common libncurses-dev uidmap gpg apt-transport-https tar zip unzip curl wget git ca-certificates build-essential make cmake gcc tmux apt-utils dnsutils python3 less libassuan-dev libc6-dev libdevmapper-dev libglib2.0-dev libgpgme-dev libgpg-error-dev libostree-dev libprotobuf-dev libprotobuf-c-dev libseccomp-dev libselinux1-dev libsystemd-dev pkg-config runc python-dev python3-dev ruby-dev lua5.1 libperl-dev';
|
||||||
|
|
||||||
|
X_INSTALL_LIST="snapd cairo libxcb terminator compton nitrogen i3 dunst xcb-proto xcb-util-image xcb-util-wm xcb-util-cursor xcb-util-xrm xcb-xk jsoncpp libcurl wireless_tools libmpdclient libx11-dev libxtst-dev" ;
|
||||||
|
|
||||||
|
echo "installing: ${INSTALL_LIST}";
|
||||||
|
|
||||||
|
SUDO="TRUE";
|
||||||
|
|
||||||
|
if [ "${UID}" = 0 ]; then
|
||||||
|
SUDO=""
|
||||||
|
elif [ -z "$(which sudo)" ]; then
|
||||||
|
echo "you must have sudo permissions or be root for this step";
|
||||||
|
exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo apt-get update;
|
||||||
|
sudo apt-get install -y ${INSTALL_LIST};
|
||||||
|
wget -q https://packages.microsoft.com/config/ubuntu/19.04/packages-microsoft-prod.deb -O /tmp/packages-microsoft-prod.deb;
|
||||||
|
sudo dpkg -i /tmp/packages-microsoft-prod.deb;
|
||||||
|
sudo apt-get update;
|
||||||
|
sudo apt-get install -y dotnet-sdk-3.0;
|
||||||
|
|
||||||
|
cd $HOME/Projects
|
||||||
|
|
||||||
|
if [ -z "$(which X)" ]; then
|
||||||
|
echo "no X server setup detected."
|
||||||
|
else
|
||||||
|
sudo apt-get install -y ${X_INSTALL_LIST};
|
||||||
|
curl -L https://github.com/jwilm/alacritty/releases/download/v${ALACRITTY_VERSION}/Alacritty-v${ALACRITTY_VERSION}-ubuntu_18_04_amd64.deb > /tmp/alacritty.deb;
|
||||||
|
sudo apt install -y /tmp/alacritty.deb;
|
||||||
|
|
||||||
|
# install polybar
|
||||||
|
git clone --branch 3.4.0 --recursive https://github.com/polybar/polybar polybar
|
||||||
|
cd ./polybar
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
make -j$(nproc)
|
||||||
|
sudo make install
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
snap install code docker firefox thunderbird insomnia discord slack spotify;
|
||||||
|
fi
|
||||||
|
|
||||||
|
# install vim with all of the necessary features
|
||||||
|
[ ! -s "${HOME}/Projects/vim" ] && git clone --branch v8.1.2109 https://github.com/vim/vim vim
|
||||||
|
cd ./vim
|
||||||
|
|
||||||
|
VIM_CONFIG_ARGS='
|
||||||
|
--enable-multibyte \
|
||||||
|
--enable-rubyinterp=yes \
|
||||||
|
--with-python3-config-dir=/usr/lib/python3.7/config-3.7m-x86_64-linux-gnu \
|
||||||
|
--enable-python3interp=yes \
|
||||||
|
--enable-perlinterp=yes \
|
||||||
|
--enable-luainterp=yes \
|
||||||
|
--disable-netbeans \
|
||||||
|
--with-compiledby="Adam V <adam@veldhousen.net>" \
|
||||||
|
--enable-gui=auto \
|
||||||
|
--enable-cscope \
|
||||||
|
--prefix=/usr/local
|
||||||
|
'
|
||||||
|
|
||||||
|
VIM_CONFIG_X_ARGS='
|
||||||
|
--enable-gtk2-check \
|
||||||
|
--enable-gnome-check \
|
||||||
|
--with-x
|
||||||
|
'
|
||||||
|
if [ ! -z "$(which X)" ]; then
|
||||||
|
echo "adding X options"
|
||||||
|
VIM_CONFIG_ARGS="${VOM_CONFIG_ARGS} ${VIM_CONFIG_X_ARGS}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
./configure ${VIM_CONFIG_ARGS}
|
||||||
|
|
||||||
|
make VIMRUNTUMEDIR=${HOME}/.config/vim/runtime/
|
||||||
|
sudo make install VIMRUNTIMEDIR=${HOME}/.config/vim/runtime/
|
||||||
|
|
||||||
|
|
||||||
|
VIMFILES=/usr/local/share/vim/vim81
|
||||||
|
find ${VIMFILES} -type f | \
|
||||||
|
sed "s=${VIMFILES}==" | \
|
||||||
|
xargs -I {} dirname {} | \
|
||||||
|
xargs -I {} mkdir -p ${VIMRUNTIME}{};
|
||||||
|
|
||||||
|
find ${VIMFILES} -type f | \
|
||||||
|
sed "s=${VIMFILES}==" | \
|
||||||
|
xargs -I {} cp $VIMFILES/{} $VIMRUNTIME{};
|
||||||
|
|
||||||
|
ln -svf ${HOME}/.config/vim/.vimrc ~/.vimrc
|
||||||
|
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
|
||||||
|
cd ${HOME}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
.PHONY: build build-test deb-test dev
|
||||||
|
|
||||||
|
./tools:
|
||||||
|
git submodule init && git submodule update
|
||||||
|
|
||||||
|
build: ./tools
|
||||||
|
docker build -t adamveld12/dotfiles:latest -f ./Dockerfile .
|
||||||
|
|
||||||
|
build-test: ./tools
|
||||||
|
docker build -t adamveld12/dotfiles:deb-test -f ./Dockerfile.debian .
|
||||||
|
|
||||||
|
deb-test:
|
||||||
|
docker run -it --rm --name dotfiles \
|
||||||
|
-u $${USER_ID:-1000} \
|
||||||
|
-v $$PWD:/home/dotfiles/Projects/dotfiles:ro \
|
||||||
|
--workdir /home/dotfiles/Projects/dotfiles \
|
||||||
|
adamveld12/dotfiles:deb-test
|
||||||
|
|
||||||
|
|
||||||
|
dev:
|
||||||
|
docker run -it --rm --name dotfiles \
|
||||||
|
-u $${USER_ID:-1000} \
|
||||||
|
-v $$PWD:/home/dev/Projects/dotfiles:ro \
|
||||||
|
--workdir /home/dev/Projects/dotfiles \
|
||||||
|
adamveld12/dotfiles:latest
|
||||||
|
|
||||||
28
remove.sh
28
remove.sh
|
|
@ -1,28 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
src=$(pwd)
|
|
||||||
pushd .. 2&> /dev/null
|
|
||||||
dest=$(pwd)
|
|
||||||
|
|
||||||
if [[ -d "$dest/.home_bkup" ]]; then
|
|
||||||
echo "Uninstalling files from ${dest}..."
|
|
||||||
ls -lAp $src | grep "^-" | awk '{print $9}' | xargs -n 1 -I file rm -f $dest/file
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
echo "Restoring from .home_bkup..."
|
|
||||||
ls -lA ./.home_bkup | grep "^-" | awk '{print $9}' | xargs -n 1 -P 8 -I file cp ./.home_bkup/file ./file
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
echo "Cleaning up home backup and tools..."
|
|
||||||
rm -rf ./.home_bkup
|
|
||||||
rm -rf ./tools
|
|
||||||
|
|
||||||
popd 2&> /dev/null
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
echo ".ssh config has been left alone"
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
echo "Restore completed!"
|
|
||||||
else
|
|
||||||
echo "you don't have a home backup, aborting"
|
|
||||||
fi
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
# ~/.bash_logout: executed by bash(1) when login shell exits.
|
||||||
|
|
||||||
|
# when leaving the console clear the screen to increase privacy
|
||||||
|
if [ "$SHLVL" = 1 ]; then
|
||||||
|
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,269 @@
|
||||||
|
# Configuration for Alacritty, the GPU enhanced terminal emulator
|
||||||
|
|
||||||
|
# Any items in the `env` entry below will be added as
|
||||||
|
# environment variables. Some entries may override variables
|
||||||
|
# set by alacritty it self.
|
||||||
|
env:
|
||||||
|
# TERM env customization.
|
||||||
|
#
|
||||||
|
# If this property is not set, alacritty will set it to xterm-256color.
|
||||||
|
#
|
||||||
|
# Note that some xterm terminfo databases don't declare support for italics.
|
||||||
|
# You can verify this by checking for the presence of `smso` and `sitm` in
|
||||||
|
# `infocmp xterm-256color`.
|
||||||
|
TERM: xterm-256color
|
||||||
|
|
||||||
|
# Window dimensions in character columns and lines
|
||||||
|
# (changes require restart)
|
||||||
|
dimensions:
|
||||||
|
columns: 80
|
||||||
|
lines: 24
|
||||||
|
|
||||||
|
# Adds this many blank pixels of padding around the window
|
||||||
|
# Units are physical pixels; this is not DPI aware.
|
||||||
|
# (change requires restart)
|
||||||
|
padding:
|
||||||
|
x: 2
|
||||||
|
y: 2
|
||||||
|
|
||||||
|
# The FreeType rasterizer needs to know the device DPI for best results
|
||||||
|
# (changes require restart)
|
||||||
|
dpi:
|
||||||
|
x: 96.0
|
||||||
|
y: 96.0
|
||||||
|
|
||||||
|
# Display tabs using this many cells (changes require restart)
|
||||||
|
tabspaces: 4
|
||||||
|
|
||||||
|
# When true, bold text is drawn using the bright variant of colors.
|
||||||
|
draw_bold_text_with_bright_colors: true
|
||||||
|
|
||||||
|
# Font configuration (changes require restart)
|
||||||
|
font:
|
||||||
|
# The normal (roman) font face to use.
|
||||||
|
normal:
|
||||||
|
family: monospace # should be "Menlo" or something on macOS.
|
||||||
|
# Style can be specified to pick a specific face.
|
||||||
|
# style: Regular
|
||||||
|
|
||||||
|
# The bold font face
|
||||||
|
bold:
|
||||||
|
family: monospace # should be "Menlo" or something on macOS.
|
||||||
|
# Style can be specified to pick a specific face.
|
||||||
|
# style: Bold
|
||||||
|
|
||||||
|
# The italic font face
|
||||||
|
italic:
|
||||||
|
family: monospace # should be "Menlo" or something on macOS.
|
||||||
|
# Style can be specified to pick a specific face.
|
||||||
|
# style: Italic
|
||||||
|
|
||||||
|
# Point size of the font
|
||||||
|
size: 11.0
|
||||||
|
|
||||||
|
# Offset is the extra space around each character. offset.y can be thought of
|
||||||
|
# as modifying the linespacing, and offset.x as modifying the letter spacing.
|
||||||
|
offset:
|
||||||
|
x: 0.0
|
||||||
|
y: 0.0
|
||||||
|
|
||||||
|
# Glyph offset determines the locations of the glyphs within their cells with
|
||||||
|
# the default being at the bottom. Increase the x offset to move the glyph to
|
||||||
|
# the right, increase the y offset to move the glyph upward.
|
||||||
|
glyph_offset:
|
||||||
|
x: 0.0
|
||||||
|
y: 0.0
|
||||||
|
|
||||||
|
# OS X only: use thin stroke font rendering. Thin strokes are suitable
|
||||||
|
# for retina displays, but for non-retina you probably want this set to
|
||||||
|
# false.
|
||||||
|
use_thin_strokes: true
|
||||||
|
|
||||||
|
# Should display the render timer
|
||||||
|
render_timer: true
|
||||||
|
|
||||||
|
# Use custom cursor colors. If true, display the cursor in the cursor.foreground
|
||||||
|
# and cursor.background colors, otherwise invert the colors of the cursor.
|
||||||
|
custom_cursor_colors: false
|
||||||
|
|
||||||
|
# Colors (Tomorrow Night Bright)
|
||||||
|
colors:
|
||||||
|
# Default colors
|
||||||
|
primary:
|
||||||
|
background: '0x000000'
|
||||||
|
foreground: '0xeaeaea'
|
||||||
|
|
||||||
|
# Colors the cursor will use if `custom_cursor_colors` is true
|
||||||
|
cursor:
|
||||||
|
text: '0x000000'
|
||||||
|
cursor: '0xffffff'
|
||||||
|
|
||||||
|
# Normal colors
|
||||||
|
normal:
|
||||||
|
black: '0x000000'
|
||||||
|
red: '0xd54e53'
|
||||||
|
green: '0xb9ca4a'
|
||||||
|
yellow: '0xe6c547'
|
||||||
|
blue: '0x7aa6da'
|
||||||
|
magenta: '0xc397d8'
|
||||||
|
cyan: '0x70c0ba'
|
||||||
|
white: '0x424242'
|
||||||
|
|
||||||
|
# Bright colors
|
||||||
|
bright:
|
||||||
|
black: '0x666666'
|
||||||
|
red: '0xff3334'
|
||||||
|
green: '0x9ec400'
|
||||||
|
yellow: '0xe7c547'
|
||||||
|
blue: '0x7aa6da'
|
||||||
|
magenta: '0xb77ee0'
|
||||||
|
cyan: '0x54ced6'
|
||||||
|
white: '0x2a2a2a'
|
||||||
|
|
||||||
|
# Visual Bell
|
||||||
|
#
|
||||||
|
# Any time the BEL code is received, Alacritty "rings" the visual bell. Once
|
||||||
|
# rung, the terminal background will be set to white and transition back to the
|
||||||
|
# default background color. You can control the rate of this transition by
|
||||||
|
# setting the `duration` property (represented in milliseconds). You can also
|
||||||
|
# configure the transition function by setting the `animation` property.
|
||||||
|
#
|
||||||
|
# Possible values for `animation`
|
||||||
|
# `Ease`
|
||||||
|
# `EaseOut`
|
||||||
|
# `EaseOutSine`
|
||||||
|
# `EaseOutQuad`
|
||||||
|
# `EaseOutCubic`
|
||||||
|
# `EaseOutQuart`
|
||||||
|
# `EaseOutQuint`
|
||||||
|
# `EaseOutExpo`
|
||||||
|
# `EaseOutCirc`
|
||||||
|
# `Linear`
|
||||||
|
#
|
||||||
|
# To completely disable the visual bell, set its duration to 0.
|
||||||
|
#
|
||||||
|
visual_bell:
|
||||||
|
animation: EaseOutExpo
|
||||||
|
duration: 1
|
||||||
|
|
||||||
|
# Key bindings
|
||||||
|
#
|
||||||
|
# Each binding is defined as an object with some properties. Most of the
|
||||||
|
# properties are optional. All of the alphabetical keys should have a letter for
|
||||||
|
# the `key` value such as `V`. Function keys are probably what you would expect
|
||||||
|
# as well (F1, F2, ..). The number keys above the main keyboard are encoded as
|
||||||
|
# `Key1`, `Key2`, etc. Keys on the number pad are encoded `Number1`, `Number2`,
|
||||||
|
# etc. These all match the glutin::VirtualKeyCode variants.
|
||||||
|
#
|
||||||
|
# Possible values for `mods`
|
||||||
|
# `Command`, `Super` refer to the super/command/windows key
|
||||||
|
# `Control` for the control key
|
||||||
|
# `Shift` for the Shift key
|
||||||
|
# `Alt` and `Option` refer to alt/option
|
||||||
|
#
|
||||||
|
# mods may be combined with a `|`. For example, requiring control and shift
|
||||||
|
# looks like:
|
||||||
|
#
|
||||||
|
# mods: Control|Shift
|
||||||
|
#
|
||||||
|
# The parser is currently quite sensitive to whitespace and capitalization -
|
||||||
|
# capitalization must match exactly, and piped items must not have whitespace
|
||||||
|
# around them.
|
||||||
|
#
|
||||||
|
# Either an `action` or `chars` field must be present. `chars` writes the
|
||||||
|
# specified string every time that binding is activated. These should generally
|
||||||
|
# be escape sequences, but they can be configured to send arbitrary strings of
|
||||||
|
# bytes. Possible values of `action` include `Paste` and `PasteSelection`.
|
||||||
|
#
|
||||||
|
# Want to add a binding (e.g. "PageUp") but are unsure what the X sequence
|
||||||
|
# (e.g. "\x1b[5~") is? Open another terminal (like xterm) without tmux,
|
||||||
|
# then run `showkey -a` to get the sequence associated to a key combination.
|
||||||
|
key_bindings:
|
||||||
|
- { key: V, mods: Control|Shift, action: Paste }
|
||||||
|
- { key: C, mods: Control|Shift, action: Copy }
|
||||||
|
- { key: Q, mods: Command, action: Quit }
|
||||||
|
- { key: W, mods: Command, action: Quit }
|
||||||
|
- { key: Insert, mods: Shift, action: PasteSelection }
|
||||||
|
- { key: Home, chars: "\x1bOH", mode: AppCursor }
|
||||||
|
- { key: Home, chars: "\x1b[1~", mode: ~AppCursor }
|
||||||
|
- { key: End, chars: "\x1bOF", mode: AppCursor }
|
||||||
|
- { key: End, chars: "\x1b[4~", mode: ~AppCursor }
|
||||||
|
- { key: PageUp, mods: Shift, chars: "\x1b[5;2~" }
|
||||||
|
- { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
|
||||||
|
- { key: PageUp, chars: "\x1b[5~" }
|
||||||
|
- { key: PageDown, mods: Shift, chars: "\x1b[6;2~" }
|
||||||
|
- { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
|
||||||
|
- { key: PageDown, chars: "\x1b[6~" }
|
||||||
|
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
|
||||||
|
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
|
||||||
|
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
|
||||||
|
- { key: Left, chars: "\x1b[D", mode: ~AppCursor }
|
||||||
|
- { key: Left, chars: "\x1bOD", mode: AppCursor }
|
||||||
|
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
|
||||||
|
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
|
||||||
|
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
|
||||||
|
- { key: Right, chars: "\x1b[C", mode: ~AppCursor }
|
||||||
|
- { key: Right, chars: "\x1bOC", mode: AppCursor }
|
||||||
|
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
|
||||||
|
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
|
||||||
|
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
|
||||||
|
- { key: Up, chars: "\x1b[A", mode: ~AppCursor }
|
||||||
|
- { key: Up, chars: "\x1bOA", mode: AppCursor }
|
||||||
|
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
|
||||||
|
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
|
||||||
|
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
|
||||||
|
- { key: Down, chars: "\x1b[B", mode: ~AppCursor }
|
||||||
|
- { key: Down, chars: "\x1bOB", mode: AppCursor }
|
||||||
|
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
|
||||||
|
- { key: F1, chars: "\x1bOP" }
|
||||||
|
- { key: F2, chars: "\x1bOQ" }
|
||||||
|
- { key: F3, chars: "\x1bOR" }
|
||||||
|
- { key: F4, chars: "\x1bOS" }
|
||||||
|
- { key: F5, chars: "\x1b[15~" }
|
||||||
|
- { key: F6, chars: "\x1b[17~" }
|
||||||
|
- { key: F7, chars: "\x1b[18~" }
|
||||||
|
- { key: F8, chars: "\x1b[19~" }
|
||||||
|
- { key: F9, chars: "\x1b[20~" }
|
||||||
|
- { key: F10, chars: "\x1b[21~" }
|
||||||
|
- { key: F11, chars: "\x1b[23~" }
|
||||||
|
- { key: F12, chars: "\x1b[24~" }
|
||||||
|
- { key: Back, chars: "\x7f" }
|
||||||
|
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
|
||||||
|
- { key: Insert, chars: "\x1b[2~" }
|
||||||
|
- { key: Delete, chars: "\x1b[3~" }
|
||||||
|
|
||||||
|
# Mouse bindings
|
||||||
|
#
|
||||||
|
# Currently doesn't support modifiers. Both the `mouse` and `action` fields must
|
||||||
|
# be specified.
|
||||||
|
#
|
||||||
|
# Values for `mouse`:
|
||||||
|
# - Middle
|
||||||
|
# - Left
|
||||||
|
# - Right
|
||||||
|
# - Numeric identifier such as `5`
|
||||||
|
#
|
||||||
|
# Values for `action`:
|
||||||
|
# - Paste
|
||||||
|
# - PasteSelection
|
||||||
|
# - Copy (TODO)
|
||||||
|
mouse_bindings:
|
||||||
|
- { mouse: Middle, action: PasteSelection }
|
||||||
|
|
||||||
|
mouse:
|
||||||
|
double_click: { threshold: 300 }
|
||||||
|
triple_click: { threshold: 300 }
|
||||||
|
|
||||||
|
selection:
|
||||||
|
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
|
||||||
|
|
||||||
|
hide_cursor_when_typing: false
|
||||||
|
|
||||||
|
# Shell
|
||||||
|
#
|
||||||
|
# You can set shell.program to the path of your favorite shell, e.g. /bin/fish.
|
||||||
|
# Entries in shell.args are passed unmodified as arguments to the shell.
|
||||||
|
shell:
|
||||||
|
program: /bin/bash
|
||||||
|
args:
|
||||||
|
- --login
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
#vim: set ft=sh
|
|
||||||
|
|
||||||
# basic configuration
|
# basic configuration
|
||||||
backend = "glx";
|
#backend = "glx";
|
||||||
vsync = "opengl-swc";
|
#vsync = "opengl-swc";
|
||||||
|
backend = "xrender";
|
||||||
|
vsync = "opengl";
|
||||||
# GLX backend: GLX buffer swap method we assume.
|
# GLX backend: GLX buffer swap method we assume.
|
||||||
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
|
# Could be undefined (0), copy (1), exchange (2), 3-6, or buffer-age (-1).
|
||||||
# undefined is the slowest and the safest, and the default value.
|
# undefined is the slowest and the safest, and the default value.
|
||||||
|
|
@ -13,10 +13,10 @@ vsync = "opengl-swc";
|
||||||
# Useless with --glx-use-copysubbuffermesa.
|
# Useless with --glx-use-copysubbuffermesa.
|
||||||
# Partially breaks --resize-damage.
|
# Partially breaks --resize-damage.
|
||||||
# Defaults to undefined.
|
# Defaults to undefined.
|
||||||
glx-swap-method = "3";
|
glx-swap-method = "2";
|
||||||
|
#glx-swap-method = "3";
|
||||||
|
|
||||||
glx-no-stencil = true;
|
glx-no-stencil = true;
|
||||||
|
|
||||||
glx-copy-from-front = false;
|
glx-copy-from-front = false;
|
||||||
xrender-sync = true;
|
xrender-sync = true;
|
||||||
xrender-sync-fence = true;
|
xrender-sync-fence = true;
|
||||||
|
|
@ -24,7 +24,9 @@ paint-on-overlay = true;
|
||||||
detect-rounded-corners = true;
|
detect-rounded-corners = true;
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
|
#
|
||||||
# Shadows
|
# Shadows
|
||||||
|
#
|
||||||
#################################
|
#################################
|
||||||
|
|
||||||
# Enabled client-side shadows on windows.
|
# Enabled client-side shadows on windows.
|
||||||
|
|
@ -88,7 +90,7 @@ inactive-opacity-override = false;
|
||||||
alpha-step = 0.06;
|
alpha-step = 0.06;
|
||||||
|
|
||||||
# Dim inactive windows. (0.0 - 1.0)
|
# Dim inactive windows. (0.0 - 1.0)
|
||||||
# inactive-dim = 0.2;
|
inactive-dim = 0.2;
|
||||||
# Do not let dimness adjust based on window opacity.
|
# Do not let dimness adjust based on window opacity.
|
||||||
# inactive-dim-fixed = true;
|
# inactive-dim-fixed = true;
|
||||||
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
|
# Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred.
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
[global]
|
[global]
|
||||||
### Display ###
|
### Display ###
|
||||||
|
|
||||||
|
|
@ -41,7 +42,7 @@
|
||||||
# The transparency of the window. Range: [0; 100].
|
# The transparency of the window. Range: [0; 100].
|
||||||
# This option will only work if a compositing window manager is
|
# This option will only work if a compositing window manager is
|
||||||
# present (e.g. xcompmgr, compiz, etc.).
|
# present (e.g. xcompmgr, compiz, etc.).
|
||||||
transparency = 0
|
transparency = 25
|
||||||
|
|
||||||
# The height of the entire notification. If the height is smaller
|
# The height of the entire notification. If the height is smaller
|
||||||
# than the font height and padding combined, it will be raised
|
# than the font height and padding combined, it will be raised
|
||||||
|
|
@ -15,11 +15,19 @@ font pango:DejaVu Sans Mono 12
|
||||||
# set dpi settings
|
# set dpi settings
|
||||||
exec_always xrandr --dpi 165
|
exec_always xrandr --dpi 165
|
||||||
|
|
||||||
|
# startup gnome
|
||||||
|
exec --no-startup-id /usr/lib/gnome-settings-daemon/gsd-xsettings
|
||||||
|
#exec --no-startup-id gnome-power-manager
|
||||||
|
exec --no-startup-id gnome-flashback
|
||||||
|
|
||||||
|
# start compton for window composition
|
||||||
exec --no-startup-id compton --config ~/.config/compton/compton.conf -b
|
exec --no-startup-id compton --config ~/.config/compton/compton.conf -b
|
||||||
|
|
||||||
# startup gnome
|
# start polybar
|
||||||
exec --no-startup-id /usr/lib/gnome-setting-daemon/gsd-xsettings
|
exec_always --no-startup-id ~/.config/i3/polybar.sh &
|
||||||
exec_always --no-startup-id gnome-power-manager
|
|
||||||
|
# start dunst for custom notification popups
|
||||||
|
exec --no-startup-id dunst -config ~/.config/dunst/dunstrc &
|
||||||
|
|
||||||
# startup pulse audio controls
|
# startup pulse audio controls
|
||||||
exec pa-applet
|
exec pa-applet
|
||||||
|
|
@ -29,14 +37,11 @@ exec_always --no-startup-id nitrogen --head=0 --save --set-centered ~/Pictures/W
|
||||||
exec_always --no-startup-id nitrogen --head=1 --save --set-centered ~/Pictures/Wallpapers/landscapes/03886_paintedplains_3840x2160.jpg &
|
exec_always --no-startup-id nitrogen --head=1 --save --set-centered ~/Pictures/Wallpapers/landscapes/03886_paintedplains_3840x2160.jpg &
|
||||||
exec_always --no-startup-id nitrogen --head=2 --save --set-centered ~/Pictures/Wallpapers/landscapes/03886_paintedplains_3840x2160.jpg &
|
exec_always --no-startup-id nitrogen --head=2 --save --set-centered ~/Pictures/Wallpapers/landscapes/03886_paintedplains_3840x2160.jpg &
|
||||||
|
|
||||||
# start polybar
|
# save power
|
||||||
exec_always --no-startup-id ~/.config/i3/polybar.sh &
|
exec_always --no-startup-id powertop --auto-tune
|
||||||
|
# connect to pritunl
|
||||||
|
#exec --no-startup-id pritunl-client enable 65adf618f9dc44b9818b558d1b84bdba && pritunl-client start 65adf618f9dc44b9818b558d1b84bdba
|
||||||
|
|
||||||
# connect to pritunl on i3 start
|
|
||||||
exec --no-startup-id pritunl-client enable 65adf618f9dc44b9818b558d1b84bdba && pritunl-client start 65adf618f9dc44b9818b558d1b84bdba
|
|
||||||
|
|
||||||
# tell dunst to use the custom dunstrc
|
|
||||||
exec --no-startup-id dunst -config ~/.config/dunst/dunstrc &
|
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
# BINDINGS
|
# BINDINGS
|
||||||
|
|
@ -53,14 +58,14 @@ bindsym XF86AudioPlay exec qdbus org.mpris.clementine /Player Pause
|
||||||
# start a terminal
|
# start a terminal
|
||||||
bindsym Mod1+Return exec terminator
|
bindsym Mod1+Return exec terminator
|
||||||
|
|
||||||
bindsym Mod1+Shift+i exec sudo insomnia
|
bindsym Mod1+Shift+i exec insomnia
|
||||||
|
|
||||||
# start chrome with correct DPI settings
|
# start chrome with correct DPI settings
|
||||||
bindsym Mod1+Shift+Return exec google-chrome-stable --force-device-scale-factor=1.65 %U
|
bindsym Mod1+Shift+Return exec google-chrome-stable --force-device-scale-factor=1.65 %U
|
||||||
|
|
||||||
# Sets up 2 external displays side by side, with the laptop display on the far right
|
# Sets up 2 external displays side by side, with the laptop display on the far right
|
||||||
bindsym Mod1+Shift+f exec xrandr --output DVI-I-2-1 --auto --left-of DVI-I-3-2 && sleep 1 && xrandr --output DVI-I-3-2 --auto --left-of eDP-1-1 && sleep 1 && xrandr --output eDP-1-1 --auto --primary --preferred
|
bindsym Mod1+Shift+f exec xrandr --output DVI-I-2-1 --auto --left-of DVI-I-3-2 && sleep 1 && xrandr --output DVI-I-3-2 --auto --left-of DP-0 && sleep 1 && xrandr --output DP-0 --auto --primary --preferred
|
||||||
bindsym Mod1+Shift+g exec xrandr --output DVI-I-3-2 --auto --left-of DVI-I-2-1 && sleep 1 && xrandr --output DVI-I-2-1 --auto --left-of eDP-1-1 && sleep 1 && xrandr --output eDP-1-1 --auto --primary --preferred
|
bindsym Mod1+Shift+g exec xrandr --output DVI-I-2-2 --auto --left-of DVI-I-1-1 && sleep 1 && xrandr --output DVI-I-1-1 --auto --left-of DP-0 && sleep 1 && xrandr --output DP-0 --auto --primary --preferred
|
||||||
|
|
||||||
# disconnects the 2 external monitors
|
# disconnects the 2 external monitors
|
||||||
bindsym Mod1+Shift+Ctrl+g exec xrandr --output DVI-I-3-2 --off && xrandr --output DVI-I-2-1 --off
|
bindsym Mod1+Shift+Ctrl+g exec xrandr --output DVI-I-3-2 --off && xrandr --output DVI-I-2-1 --off
|
||||||
|
|
@ -68,7 +73,7 @@ bindsym Mod1+Shift+Ctrl+g exec xrandr --output DVI-I-3-2 --off && xrandr --outpu
|
||||||
bindsym Mod1+Shift+x move workspace to output right
|
bindsym Mod1+Shift+x move workspace to output right
|
||||||
|
|
||||||
# turn off laptop monitor
|
# turn off laptop monitor
|
||||||
bindsym Mod1+Shift+~ exec xrandr --output eDP-1-1 --off
|
bindsym Mod1+Shift+~ exec xrandr --output DP-0 --off
|
||||||
|
|
||||||
# start/stop pritunl
|
# start/stop pritunl
|
||||||
bindsym Mod1+Shift+v exec pritunl-client start 65adf618f9dc44b9818b558d1b84bdba
|
bindsym Mod1+Shift+v exec pritunl-client start 65adf618f9dc44b9818b558d1b84bdba
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
killall -q polybar
|
||||||
|
while pgrep -x polybar >/dev/null; do sleep 1; done
|
||||||
|
|
||||||
|
MONITOR=DP-0 polybar bar1 &
|
||||||
|
MONITOR=DVI-I-1-1 polybar bar1 &
|
||||||
|
MONITOR=DVI-I-2-2 polybar bar1 &
|
||||||
|
|
@ -0,0 +1,210 @@
|
||||||
|
servers = (
|
||||||
|
{
|
||||||
|
address = "chat.freenode.net";
|
||||||
|
chatnet = "freenode";
|
||||||
|
port = "7000";
|
||||||
|
use_ssl = "yes";
|
||||||
|
ssl_verify = "yes";
|
||||||
|
ssl_capath = "/etc/ssl/certs";
|
||||||
|
autoconnect = "no";
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
channels = (
|
||||||
|
{ name = "#plone"; chatnet = "freenode"; autojoin = "yes"; },
|
||||||
|
{ name = "#plone-framework"; chatnet = "freenode"; autojoin = "yes"; },
|
||||||
|
{ name = "#nixos"; chatnet = "freenode"; autojoin = "yes"; },
|
||||||
|
{ name = "#vimperator"; chatnet = "freenode"; autojoin = "yes"; }
|
||||||
|
);
|
||||||
|
|
||||||
|
aliases = {
|
||||||
|
J = "join";
|
||||||
|
WJOIN = "join -window";
|
||||||
|
WQUERY = "query -window";
|
||||||
|
LEAVE = "part";
|
||||||
|
BYE = "quit";
|
||||||
|
EXIT = "quit";
|
||||||
|
SIGNOFF = "quit";
|
||||||
|
DESCRIBE = "action";
|
||||||
|
DATE = "time";
|
||||||
|
HOST = "userhost";
|
||||||
|
LAST = "lastlog";
|
||||||
|
SAY = "msg *";
|
||||||
|
WI = "whois";
|
||||||
|
WII = "whois $0 $0";
|
||||||
|
WW = "whowas";
|
||||||
|
W = "who";
|
||||||
|
N = "names";
|
||||||
|
M = "msg";
|
||||||
|
T = "topic";
|
||||||
|
C = "clear";
|
||||||
|
CL = "clear";
|
||||||
|
K = "kick";
|
||||||
|
KB = "kickban";
|
||||||
|
KN = "knockout";
|
||||||
|
BANS = "ban";
|
||||||
|
B = "ban";
|
||||||
|
MUB = "unban *";
|
||||||
|
UB = "unban";
|
||||||
|
IG = "ignore";
|
||||||
|
UNIG = "unignore";
|
||||||
|
SB = "scrollback";
|
||||||
|
UMODE = "mode $N";
|
||||||
|
WC = "window close";
|
||||||
|
WN = "window new hide";
|
||||||
|
SV = "say Irssi $J ($V) - http://irssi.org/";
|
||||||
|
GOTO = "sb goto";
|
||||||
|
CHAT = "dcc chat";
|
||||||
|
RUN = "SCRIPT LOAD";
|
||||||
|
CALC = "exec - if command -v bc >/dev/null 2>&1\\; then printf '%s=' '$*'\\; echo '$*' | bc -l\\; else echo bc was not found\\; fi";
|
||||||
|
SBAR = "STATUSBAR";
|
||||||
|
INVITELIST = "mode $C +I";
|
||||||
|
Q = "QUERY";
|
||||||
|
"MANUAL-WINDOWS" = "set use_status_window off;set autocreate_windows off;set autocreate_query_level none;set autoclose_windows off;set reuse_unused_windows on;save";
|
||||||
|
EXEMPTLIST = "mode $C +e";
|
||||||
|
ATAG = "WINDOW SERVER";
|
||||||
|
UNSET = "set -clear";
|
||||||
|
RESET = "set -default";
|
||||||
|
};
|
||||||
|
|
||||||
|
statusbar = {
|
||||||
|
# formats:
|
||||||
|
# when using {templates}, the template is shown only if it's argument isn't
|
||||||
|
# empty unless no argument is given. for example {sb} is printed always,
|
||||||
|
# but {sb $T} is printed only if $T isn't empty.
|
||||||
|
|
||||||
|
items = {
|
||||||
|
# start/end text in statusbars
|
||||||
|
barstart = "{sbstart}";
|
||||||
|
barend = "{sbend}";
|
||||||
|
|
||||||
|
topicbarstart = "{topicsbstart}";
|
||||||
|
topicbarend = "{topicsbend}";
|
||||||
|
|
||||||
|
# treated "normally", you could change the time/user name to whatever
|
||||||
|
time = "{sb $Z}";
|
||||||
|
user = "{sb {sbnickmode $cumode}$N{sbmode $usermode}{sbaway $A}}";
|
||||||
|
|
||||||
|
# treated specially .. window is printed with non-empty windows,
|
||||||
|
# window_empty is printed with empty windows
|
||||||
|
window = "{sb $winref:$tag/$itemname{sbmode $M}}";
|
||||||
|
window_empty = "{sb $winref{sbservertag $tag}}";
|
||||||
|
prompt = "{prompt $[.15]itemname}";
|
||||||
|
prompt_empty = "{prompt $winname}";
|
||||||
|
topic = " $topic";
|
||||||
|
topic_empty = " Irssi v$J - http://www.irssi.org";
|
||||||
|
|
||||||
|
# all of these treated specially, they're only displayed when needed
|
||||||
|
lag = "{sb Lag: $0-}";
|
||||||
|
act = "{sb Act: $0-}";
|
||||||
|
more = "-- more --";
|
||||||
|
};
|
||||||
|
|
||||||
|
# there's two type of statusbars. root statusbars are either at the top
|
||||||
|
# of the screen or at the bottom of the screen. window statusbars are at
|
||||||
|
# the top/bottom of each split window in screen.
|
||||||
|
default = {
|
||||||
|
# the "default statusbar" to be displayed at the bottom of the window.
|
||||||
|
# contains all the normal items.
|
||||||
|
window = {
|
||||||
|
disabled = "no";
|
||||||
|
|
||||||
|
# window, root
|
||||||
|
type = "window";
|
||||||
|
# top, bottom
|
||||||
|
placement = "bottom";
|
||||||
|
# number
|
||||||
|
position = "1";
|
||||||
|
# active, inactive, always
|
||||||
|
visible = "active";
|
||||||
|
|
||||||
|
# list of items in statusbar in the display order
|
||||||
|
items = {
|
||||||
|
barstart = { priority = "100"; };
|
||||||
|
time = { };
|
||||||
|
user = { };
|
||||||
|
window = { };
|
||||||
|
window_empty = { };
|
||||||
|
lag = { priority = "-1"; };
|
||||||
|
act = { priority = "10"; };
|
||||||
|
more = { priority = "-1"; alignment = "right"; };
|
||||||
|
barend = { priority = "100"; alignment = "right"; };
|
||||||
|
vim_mode = { };
|
||||||
|
vim_windows = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# statusbar to use in inactive split windows
|
||||||
|
window_inact = {
|
||||||
|
type = "window";
|
||||||
|
placement = "bottom";
|
||||||
|
position = "1";
|
||||||
|
visible = "inactive";
|
||||||
|
items = {
|
||||||
|
barstart = { priority = "100"; };
|
||||||
|
window = { };
|
||||||
|
window_empty = { };
|
||||||
|
more = { priority = "-1"; alignment = "right"; };
|
||||||
|
barend = { priority = "100"; alignment = "right"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# we treat input line as yet another statusbar :) It's possible to
|
||||||
|
# add other items before or after the input line item.
|
||||||
|
|
||||||
|
# topicbar
|
||||||
|
topic = {
|
||||||
|
type = "root";
|
||||||
|
placement = "top";
|
||||||
|
position = "1";
|
||||||
|
visible = "always";
|
||||||
|
items = {
|
||||||
|
topicbarstart = { priority = "100"; };
|
||||||
|
topic = { };
|
||||||
|
topic_empty = { };
|
||||||
|
topicbarend = { priority = "100"; alignment = "right"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
prompt = {
|
||||||
|
items = {
|
||||||
|
uberprompt = { priority = "-1"; };
|
||||||
|
input = { priority = "10"; };
|
||||||
|
};
|
||||||
|
position = "100";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
core = {
|
||||||
|
real_name = "solzhenitsyn";
|
||||||
|
user_name = "ivan";
|
||||||
|
nick = "deep";
|
||||||
|
};
|
||||||
|
"fe-text" = {
|
||||||
|
actlist_sort = "refnum";
|
||||||
|
term_force_colors = "yes";
|
||||||
|
autostick_split_windows = "yes";
|
||||||
|
};
|
||||||
|
"fe-common/core" = {
|
||||||
|
autocreate_own_query = "yes";
|
||||||
|
autocreate_query_level = "DCCMSGS";
|
||||||
|
use_status_window = "no";
|
||||||
|
use_msgs_window = "yes";
|
||||||
|
autoclose_windows = "no";
|
||||||
|
reuse_unused_windows = "yes";
|
||||||
|
print_active_channel = "yes";
|
||||||
|
autolog = "yes";
|
||||||
|
autolog_path = "~/.irssi/logs/$tag/%Y-%m-%d/$0.log";
|
||||||
|
};
|
||||||
|
"fe-common/irc" = { show_away_once = "yes"; };
|
||||||
|
"irc/core" = { channel_sync = "no"; };
|
||||||
|
};
|
||||||
|
hilights = ( { text = "datetimewidget"; nick = "yes"; word = "yes"; } );
|
||||||
|
logs = { };
|
||||||
|
ignores = (
|
||||||
|
{ level = "JOINS"; servertag = "freenode"; },
|
||||||
|
{ level = "NICKS"; servertag = "freenode"; },
|
||||||
|
{ level = "PARTS"; servertag = "freenode"; },
|
||||||
|
{ level = "QUITS"; servertag = "freenode"; }
|
||||||
|
);
|
||||||
|
chatnets = { bitlbee = { type = "IRC"; }; freenode = { type = "IRC"; }; };
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
[xin_0]
|
||||||
|
file=~/.config/nitrogen/painted_plains_3840x2160.jpg
|
||||||
|
mode=2
|
||||||
|
bgcolor=#000000
|
||||||
|
|
||||||
|
[xin_1]
|
||||||
|
file=~/.config/nitrogen/painted_plains_3840x2160.jpg
|
||||||
|
mode=2
|
||||||
|
bgcolor=#000000
|
||||||
|
|
||||||
|
[xin_2]
|
||||||
|
file=~/.config/nitrogen/painted_plains_3840x2160.jpg
|
||||||
|
mode=2
|
||||||
|
bgcolor=#000000
|
||||||
|
|
||||||
|
[:1.2]
|
||||||
|
file=~/.config/nitrogen/painted_plains_3840x2160.jpg
|
||||||
|
mode=2
|
||||||
|
bgcolor=#000000
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
[geometry]
|
[geometry]
|
||||||
posx=0
|
posx=3840
|
||||||
posy=24
|
posy=24
|
||||||
sizex=1916
|
sizex=3836
|
||||||
sizey=2134
|
sizey=2089
|
||||||
|
|
||||||
[nitrogen]
|
[nitrogen]
|
||||||
view=icon
|
view=icon
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 6.1 MiB |
|
|
@ -19,9 +19,57 @@ secondary = #e60053
|
||||||
alert = #bd2c40
|
alert = #bd2c40
|
||||||
|
|
||||||
[bar/bar1]
|
[bar/bar1]
|
||||||
monitor = ${env:MONITOR:eDP-1-1}
|
;remove padding around bar
|
||||||
|
;override-redirect = true
|
||||||
|
monitor = ${env:MONITOR:DP-0}
|
||||||
width = 100%
|
width = 100%
|
||||||
height = 45
|
height = 50
|
||||||
|
|
||||||
|
;offset-x = 1%
|
||||||
|
;offset-y = 0% - 10
|
||||||
|
radius = 0
|
||||||
|
fixed-center = false
|
||||||
|
|
||||||
|
background = ${colors.background}
|
||||||
|
foreground = ${colors.foreground}
|
||||||
|
|
||||||
|
line-size = 3
|
||||||
|
line-color = #f00
|
||||||
|
|
||||||
|
border-size = 5
|
||||||
|
border-color = #00000000
|
||||||
|
|
||||||
|
padding-left = 3
|
||||||
|
padding-right = 3
|
||||||
|
|
||||||
|
module-margin-left = 1
|
||||||
|
module-margin-right = 1
|
||||||
|
|
||||||
|
font-0 = "Ubuntu Mono derivative Powerline:style=Regular:pixelsize=16:1"
|
||||||
|
font-1 = "Symbola:size=18:antialias=true"
|
||||||
|
font-2 = "OpenSymbol:style=bold:size=20;antialias=false"
|
||||||
|
font-3 = "nanumbarungothic:style=bold:size=20;antialias=false"
|
||||||
|
|
||||||
|
modules-left = i3 xwindow
|
||||||
|
modules-center = spotify mpd
|
||||||
|
modules-right = polypomo volume filesystem temperature cpu memory wlan eth battery date powermenu
|
||||||
|
|
||||||
|
bottom = true
|
||||||
|
tray-position = right
|
||||||
|
tray-padding = 4
|
||||||
|
tray-transparent = false
|
||||||
|
tray-maxsize = 32
|
||||||
|
;tray-background = #0063ff
|
||||||
|
|
||||||
|
cursor-click = pointer
|
||||||
|
cursor-scroll = ns-resize
|
||||||
|
dpi-y = 125
|
||||||
|
dpi-x = 125
|
||||||
|
|
||||||
|
[bar/bar2]
|
||||||
|
monitor = ${env:MONITOR:DP-0}
|
||||||
|
width = 100%
|
||||||
|
height = 50
|
||||||
|
|
||||||
;offset-x = 1%
|
;offset-x = 1%
|
||||||
;offset-y = 1%
|
;offset-y = 1%
|
||||||
|
|
@ -34,40 +82,31 @@ foreground = ${colors.foreground}
|
||||||
line-size = 3
|
line-size = 3
|
||||||
line-color = #f00
|
line-color = #f00
|
||||||
|
|
||||||
border-size = 0
|
border-size = 5
|
||||||
border-color = #00000000
|
border-color = #00000000
|
||||||
|
|
||||||
padding-left = 5
|
padding-left = 3
|
||||||
padding-right = 5
|
padding-right = 3
|
||||||
|
|
||||||
module-margin-left = 1
|
module-margin-left = 1
|
||||||
module-margin-right = 2
|
module-margin-right = 1
|
||||||
|
|
||||||
font-0 = fixed:pixelsize=18;1
|
font-0 = "Ubuntu Mono derivative Powerline:style=Regular:pixelsize=20;1"
|
||||||
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
font-1 = "Symbola:size=25:antialias=true"
|
||||||
font-2 = siji:pixelsize=18;1
|
font-2 = "OpenSymbol:style=bold:size=26;antialias=false"
|
||||||
|
font-3 = "nanumbarungothic:style=bold:size=26;antialias=false"
|
||||||
|
|
||||||
modules-left = bspwm i3 powermenu
|
modules-left = i3 xwindow
|
||||||
modules-center = mpd
|
modules-center = mpd
|
||||||
modules-right = filesystem volume cpu memory temperature battery wlan eth date
|
modules-right = xkeyboard volume filesystem temperature cpu memory wlan eth battery date powermenu
|
||||||
|
|
||||||
bottom = true
|
bottom = false
|
||||||
|
top = true
|
||||||
tray-position = right
|
tray-position = right
|
||||||
tray-padding = 4
|
tray-padding = 4
|
||||||
tray-transparent = false
|
tray-transparent = false
|
||||||
;tray-background = #0063ff
|
;tray-background = #0063ff
|
||||||
|
|
||||||
;wm-restack = bspwm
|
|
||||||
;wm-restack = i3
|
|
||||||
|
|
||||||
;override-redirect = true
|
|
||||||
|
|
||||||
;scroll-up = bspwm-desknext
|
|
||||||
;scroll-down = bspwm-deskprev
|
|
||||||
|
|
||||||
;scroll-up = i3wm-wsnext
|
|
||||||
;scroll-down = i3wm-wsprev
|
|
||||||
|
|
||||||
cursor-click = pointer
|
cursor-click = pointer
|
||||||
cursor-scroll = ns-resize
|
cursor-scroll = ns-resize
|
||||||
|
|
||||||
|
|
@ -101,24 +140,25 @@ label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%%
|
||||||
label-unmounted = %mountpoint% not mounted
|
label-unmounted = %mountpoint% not mounted
|
||||||
label-unmounted-foreground = ${colors.foreground-alt}
|
label-unmounted-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
|
; https://github.com/polybar/polybar/wiki/Module:-bspwm
|
||||||
[module/bspwm]
|
[module/bspwm]
|
||||||
type = internal/bspwm
|
type = internal/bspwm
|
||||||
|
|
||||||
label-focused = %index%
|
label-focused = %icon% %index% %name%
|
||||||
label-focused-background = ${colors.background-alt}
|
label-focused-background = ${colors.background-alt}
|
||||||
label-focused-underline= ${colors.primary}
|
label-focused-underline= ${colors.primary}
|
||||||
label-focused-padding = 2
|
label-focused-padding = 2
|
||||||
|
|
||||||
label-occupied = %index%
|
label-occupied = %index% %name%
|
||||||
label-occupied-padding = 2
|
label-occupied-padding = 1
|
||||||
|
|
||||||
label-urgent = %index%!
|
label-urgent = %index%!
|
||||||
label-urgent-background = ${colors.alert}
|
label-urgent-background = ${colors.alert}
|
||||||
label-urgent-padding = 2
|
label-urgent-padding = 1
|
||||||
|
|
||||||
label-empty = %index%
|
label-empty = %index% %name%
|
||||||
label-empty-foreground = ${colors.foreground-alt}
|
label-empty-foreground = ${colors.foreground-alt}
|
||||||
label-empty-padding = 2
|
label-empty-padding = 1
|
||||||
|
|
||||||
[module/i3]
|
[module/i3]
|
||||||
type = internal/i3
|
type = internal/i3
|
||||||
|
|
@ -167,32 +207,29 @@ icon-next =
|
||||||
label-song-maxlen = 25
|
label-song-maxlen = 25
|
||||||
label-song-ellipsis = true
|
label-song-ellipsis = true
|
||||||
|
|
||||||
[module/xbacklight]
|
; [module/xbacklight]
|
||||||
type = internal/xbacklight
|
; type = internal/xbacklight
|
||||||
|
;
|
||||||
|
; output = DP-0
|
||||||
|
; format = <label> <bar>
|
||||||
|
; label = BL: %percentage%
|
||||||
|
;
|
||||||
|
; bar-width = 10
|
||||||
|
; bar-indicator = |
|
||||||
|
; bar-indicator-foreground = #ff
|
||||||
|
; bar-indicator-font = 2
|
||||||
|
; bar-fill = ─
|
||||||
|
; bar-fill-font = 2
|
||||||
|
; bar-fill-foreground = #9f78e1
|
||||||
|
; bar-empty = ─
|
||||||
|
; bar-empty-font = 2
|
||||||
|
; bar-empty-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
format = <label> <bar>
|
|
||||||
label = BL
|
|
||||||
|
|
||||||
bar-width = 10
|
|
||||||
bar-indicator = |
|
|
||||||
bar-indicator-foreground = #ff
|
|
||||||
bar-indicator-font = 2
|
|
||||||
bar-fill = ─
|
|
||||||
bar-fill-font = 2
|
|
||||||
bar-fill-foreground = #9f78e1
|
|
||||||
bar-empty = ─
|
|
||||||
bar-empty-font = 2
|
|
||||||
bar-empty-foreground = ${colors.foreground-alt}
|
|
||||||
|
|
||||||
[module/backlight-acpi]
|
|
||||||
inherit = module/xbacklight
|
|
||||||
type = internal/backlight
|
|
||||||
card = intel_backlight
|
|
||||||
|
|
||||||
[module/memory]
|
[module/memory]
|
||||||
type = internal/memory
|
type = internal/memory
|
||||||
interval = 2
|
interval = 15
|
||||||
format-prefix = " "
|
format-prefix = "MEM: "
|
||||||
format-prefix-foreground = ${colors.foreground-alt}
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
format-underline = #4bffdc
|
format-underline = #4bffdc
|
||||||
label = %gb_used%/%gb_total%
|
label = %gb_used%/%gb_total%
|
||||||
|
|
@ -200,38 +237,40 @@ label = %gb_used%/%gb_total%
|
||||||
[module/cpu]
|
[module/cpu]
|
||||||
type = internal/cpu
|
type = internal/cpu
|
||||||
interval = 2
|
interval = 2
|
||||||
format-prefix = " "
|
format-prefix = "CPU: "
|
||||||
format-prefix-foreground = ${colors.foreground-alt}
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
format-underline = #f90000
|
format-underline = #f90000
|
||||||
label = CPU: %percentage:2%%
|
label = %percentage%%
|
||||||
|
|
||||||
[module/wlan]
|
[module/wlan]
|
||||||
type = internal/network
|
type = internal/network
|
||||||
interface = wlp110s0
|
interface = wlp110s0
|
||||||
interval = 1.0
|
interval = 5.0
|
||||||
|
|
||||||
label-connected = wlan: '%essid%' - %local_ip% - U-%upspeed% D-%downspeed%
|
format-connected-prefix =
|
||||||
|
format-connected-prefix-foreground = ${colors.foreground-alt}
|
||||||
|
label-connected = '%essid%' %local_ip% U-%upspeed% D-%downspeed%
|
||||||
format-connected = <ramp-signal> <label-connected>
|
format-connected = <ramp-signal> <label-connected>
|
||||||
format-connected-underline = #9f78e1
|
format-connected-underline = #9f78e1
|
||||||
|
|
||||||
;format-disconnected =
|
;format-disconnected =
|
||||||
format-disconnected = <label-disconnected>
|
format-disconnected = <label-disconnected>
|
||||||
format-disconnected-underline = ${self.format-connected-underline}
|
format-disconnected-underline = ${self.format-connected-underline}
|
||||||
label-disconnected = %ifname% disconnected
|
label-disconnected = %ifname% X
|
||||||
label-disconnected-foreground = ${colors.foreground-alt}
|
label-disconnected-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
ramp-signal-0 =
|
ramp-signal-0 = ▁
|
||||||
ramp-signal-1 =
|
ramp-signal-1 = ▁▂
|
||||||
ramp-signal-2 =
|
ramp-signal-2 = ▁▂▃
|
||||||
ramp-signal-3 =
|
ramp-signal-3 = ▁▂▃▄
|
||||||
ramp-signal-4 =
|
ramp-signal-4 = ▁▂▃▅▇
|
||||||
ramp-signal-foreground = ${colors.foreground-alt}
|
ramp-signal-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
[module/network]
|
[module/network]
|
||||||
type = internal/network
|
type = internal/network
|
||||||
interface = enp109s0f1
|
interface = enp109s0f1
|
||||||
;interface = enx8cae5cec01dd
|
;interface = enx8cae5cec01dd
|
||||||
interval = 3.0
|
interval = 5.0
|
||||||
|
|
||||||
format-connected-underline = #55aa55
|
format-connected-underline = #55aa55
|
||||||
;format-connected-prefix = " "
|
;format-connected-prefix = " "
|
||||||
|
|
@ -246,7 +285,7 @@ label-disconnected = %ifname% disconnected
|
||||||
|
|
||||||
[module/date]
|
[module/date]
|
||||||
type = internal/date
|
type = internal/date
|
||||||
interval = 5
|
interval = 1
|
||||||
|
|
||||||
date = "%Y-%m-%d"
|
date = "%Y-%m-%d"
|
||||||
date-alt = " %Y-%m-%d"
|
date-alt = " %Y-%m-%d"
|
||||||
|
|
@ -254,7 +293,7 @@ date-alt = " %Y-%m-%d"
|
||||||
time = %H:%M
|
time = %H:%M
|
||||||
time-alt = %H:%M:%S
|
time-alt = %H:%M:%S
|
||||||
|
|
||||||
format-prefix =
|
format-prefix = "📅 "
|
||||||
format-prefix-foreground = ${colors.foreground-alt}
|
format-prefix-foreground = ${colors.foreground-alt}
|
||||||
format-underline = #0a6cf5
|
format-underline = #0a6cf5
|
||||||
|
|
||||||
|
|
@ -267,18 +306,16 @@ format-volume = <label-volume> <bar-volume>
|
||||||
label-volume = 🔊
|
label-volume = 🔊
|
||||||
label-volume-foreground = ${root.foreground}
|
label-volume-foreground = ${root.foreground}
|
||||||
|
|
||||||
format-muted-prefix = " "
|
format-muted-prefix = "🔊 "
|
||||||
format-muted-foreground = ${colors.foreground-alt}
|
format-muted-foreground = ${colors.foreground-alt}
|
||||||
label-muted = sound muted
|
label-muted = muted
|
||||||
|
|
||||||
bar-volume-width = 10
|
bar-volume-width = 5
|
||||||
bar-volume-foreground-0 = #55aa55
|
bar-volume-foreground-0 = #55aa55
|
||||||
bar-volume-foreground-1 = #55aa55
|
bar-volume-foreground-1 = #f5a70a
|
||||||
bar-volume-foreground-2 = #55aa55
|
bar-volume-foreground-2 = #f5a70a
|
||||||
bar-volume-foreground-3 = #55aa55
|
bar-volume-foreground-3 = #ff5555
|
||||||
bar-volume-foreground-4 = #55aa55
|
bar-volume-foreground-4 = #ff5555
|
||||||
bar-volume-foreground-5 = #f5a70a
|
|
||||||
bar-volume-foreground-6 = #ff5555
|
|
||||||
bar-volume-gradient = true
|
bar-volume-gradient = true
|
||||||
bar-volume-indicator = |
|
bar-volume-indicator = |
|
||||||
bar-volume-indicator-font = 2
|
bar-volume-indicator-font = 2
|
||||||
|
|
@ -292,35 +329,48 @@ bar-volume-empty-foreground = ${colors.foreground-alt}
|
||||||
type = internal/battery
|
type = internal/battery
|
||||||
battery = BAT0
|
battery = BAT0
|
||||||
adapter = AC
|
adapter = AC
|
||||||
full-at = 98
|
full-at = 97
|
||||||
|
poll-interval = 5
|
||||||
|
|
||||||
label-charging = %percentage%% - charging
|
label-charging = %percentage%% - charging @ %consumption%W
|
||||||
format-charging = <animation-charging> <label-charging>
|
format-charging = <animation-charging> <label-charging>
|
||||||
format-charging-underline = #ffb52a
|
format-charging-underline = #ffb52a
|
||||||
|
|
||||||
label-discharging = %percentage%% - %time% remaining
|
label-discharging = %percentage%% - %time% remaining @ %consumption%W
|
||||||
format-discharging = <ramp-capacity> <label-discharging>
|
format-discharging = <ramp-capacity> <label-discharging>
|
||||||
format-discharging-underline = ${self.format-charging-underline}
|
format-discharging-underline = ${self.format-charging-underline}
|
||||||
|
|
||||||
label-full = Full
|
label-full = Full
|
||||||
format-full-prefix = " "
|
format-full-prefix = "▇ "
|
||||||
format-full-prefix-foreground = ${colors.foreground-alt}
|
format-full-prefix-foreground = ${colors.foreground-alt}
|
||||||
format-full-underline = ${self.format-charging-underline}
|
format-full-underline = ${self.format-charging-underline}
|
||||||
|
|
||||||
ramp-capacity-0 =
|
ramp-capacity-0 = ▁
|
||||||
ramp-capacity-1 =
|
ramp-capacity-1 = ▂
|
||||||
ramp-capacity-2 =
|
ramp-capacity-2 = ▃
|
||||||
|
ramp-capacity-3 = ▄
|
||||||
|
ramp-capacity-4 = ▅
|
||||||
|
ramp-capacity-5 = ▆
|
||||||
|
ramp-capacity-6 = ▇
|
||||||
ramp-capacity-foreground = ${colors.foreground-alt}
|
ramp-capacity-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
animation-charging-0 =
|
animation-charging-0 = ▁
|
||||||
animation-charging-1 =
|
animation-charging-1 = ▂
|
||||||
animation-charging-2 =
|
animation-charging-2 = ▃
|
||||||
|
animation-charging-3 = ▄
|
||||||
|
animation-charging-4 = ▅
|
||||||
|
animation-charging-5 = ▆
|
||||||
|
animation-charging-6 = ▇
|
||||||
animation-charging-foreground = ${colors.foreground-alt}
|
animation-charging-foreground = ${colors.foreground-alt}
|
||||||
animation-charging-framerate = 1000
|
|
||||||
|
animation-discharging-framerate = 2000
|
||||||
|
animation-charging-framerate = 500
|
||||||
|
|
||||||
[module/temperature]
|
[module/temperature]
|
||||||
type = internal/temperature
|
type = internal/temperature
|
||||||
|
interval = 2
|
||||||
thermal-zone = 0
|
thermal-zone = 0
|
||||||
|
base-temperature = 40
|
||||||
warn-temperature = 70
|
warn-temperature = 70
|
||||||
|
|
||||||
format = <ramp> <label>
|
format = <ramp> <label>
|
||||||
|
|
@ -329,12 +379,12 @@ format-warn = <ramp> <label-warn>
|
||||||
format-warn-underline = ${self.format-underline}
|
format-warn-underline = ${self.format-underline}
|
||||||
|
|
||||||
label = %temperature%
|
label = %temperature%
|
||||||
label-warn = !!%temperature%!!
|
label-warn = 🔥%temperature%🔥
|
||||||
label-warn-foreground = ${colors.secondary}
|
label-warn-foreground = ${colors.secondary}
|
||||||
|
|
||||||
ramp-0 =
|
ramp-0 = _
|
||||||
ramp-1 =
|
ramp-1 = -
|
||||||
ramp-2 =
|
ramp-2 = ^
|
||||||
ramp-foreground = ${colors.foreground-alt}
|
ramp-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
[module/powermenu]
|
[module/powermenu]
|
||||||
|
|
@ -351,11 +401,15 @@ label-close-foreground = ${colors.secondary}
|
||||||
label-separator = |
|
label-separator = |
|
||||||
label-separator-foreground = ${colors.foreground-alt}
|
label-separator-foreground = ${colors.foreground-alt}
|
||||||
|
|
||||||
menu-0-0 = reboot
|
|
||||||
menu-0-0-exec = menu-open-1
|
|
||||||
|
|
||||||
menu-0-1 = power off
|
menu-0-0 = suspend
|
||||||
menu-0-1-exec = menu-open-2
|
menu-0-0-exec = suspend
|
||||||
|
|
||||||
|
menu-0-1 = reboot
|
||||||
|
menu-0-1-exec = menu-open-1
|
||||||
|
|
||||||
|
menu-0-2 = shutdown
|
||||||
|
menu-0-2-exec = menu-open-2
|
||||||
|
|
||||||
menu-1-0 = cancel
|
menu-1-0 = cancel
|
||||||
menu-1-0-exec = menu-open-0
|
menu-1-0-exec = menu-open-0
|
||||||
|
|
@ -380,4 +434,26 @@ screenchange-reload = true
|
||||||
margin-top = 5
|
margin-top = 5
|
||||||
margin-bottom = 5
|
margin-bottom = 5
|
||||||
|
|
||||||
|
[module/polypomo]
|
||||||
|
type = custom/script
|
||||||
|
|
||||||
|
exec = ~/tools/polypomo/polypomo
|
||||||
|
tail = true
|
||||||
|
|
||||||
|
label = %output%
|
||||||
|
click-left = ~/tools/polypomo/polypomo toggle
|
||||||
|
click-right = ~/tools/polypomo/polypomo end
|
||||||
|
click-middle = ~/tools/polypomo/polypomo lock
|
||||||
|
scroll-up = ~/tools/polypomo time +60
|
||||||
|
scroll-down = ~/tools/polypomo time -60
|
||||||
|
format-underline = #1db954
|
||||||
|
|
||||||
|
[module/spotify]
|
||||||
|
type = custom/script
|
||||||
|
interval = 5
|
||||||
|
format-prefix = "🎶 "
|
||||||
|
format = <label>
|
||||||
|
exec = python ~/tools/polybar-spotify/spotify_status.py -f '{play_pause} {song} - {artist}'
|
||||||
|
format-underline = #1db954
|
||||||
|
|
||||||
; vim:ft=dosini
|
; vim:ft=dosini
|
||||||
|
|
@ -20,8 +20,8 @@
|
||||||
new_window = <Primary>n
|
new_window = <Primary>n
|
||||||
next_tab = <Primary>Tab
|
next_tab = <Primary>Tab
|
||||||
search = <Primary>f
|
search = <Primary>f
|
||||||
split_horiz = <Primary>s
|
split_horiz = <Primary>i
|
||||||
split_vert = <Primary>i
|
split_vert = <Primary>s
|
||||||
ungroup_all = <Primary><Shift>g
|
ungroup_all = <Primary><Shift>g
|
||||||
ungroup_tab = <Primary><Shift>u
|
ungroup_tab = <Primary><Shift>u
|
||||||
zoom_in = <Primary><Alt>equal
|
zoom_in = <Primary><Alt>equal
|
||||||
|
|
@ -49,13 +49,13 @@
|
||||||
[plugins]
|
[plugins]
|
||||||
[profiles]
|
[profiles]
|
||||||
[[default]]
|
[[default]]
|
||||||
background_darkness = 0.85
|
background_darkness = 0.82
|
||||||
background_type = transparent
|
background_type = transparent
|
||||||
cursor_color = "#aaaaaa"
|
cursor_color = "#aaaaaa"
|
||||||
font = Ubuntu Mono derivative Powerline 18
|
font = Ubuntu Mono derivative Powerline 16
|
||||||
foreground_color = "#ffffff"
|
foreground_color = "#ffffff"
|
||||||
login_shell = True
|
login_shell = True
|
||||||
palette = "#000000:#cc0000:#4e9a06:#c4a000:#3465a4:#75507b:#06989a:#d3d7cf:#555753:#ef2929:#8ae234:#fce94f:#729fcf:#ad7fa8:#34e2e2:#eeeeec"
|
palette = "#282828:#cc241d:#98971a:#d79921:#458588:#b16286:#689d6a:#a89984:#928374:#fb4934:#b8bb26:#fabd2f:#83a598:#d3869b:#8ec07c:#ebdbb2"
|
||||||
scrollback_infinite = True
|
scrollback_infinite = True
|
||||||
use_system_font = False
|
use_system_font = False
|
||||||
visible_bell = True
|
visible_bell = True
|
||||||
|
|
@ -1,18 +1,16 @@
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
# vim:set ft=sh ("set modeline" in ~/.exrc)#
|
# vim:set ft=sh ("set modeline" in ~/.exrc)#
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
# Config file : ~/.tmux.conf #
|
# Config file : ~/.config/tmux/.tmux.conf #
|
||||||
# #
|
# #
|
||||||
# Author : Adam Veldhousen The USA #
|
# Author : Adam Veldhousen The USA #
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#default to bash
|
#default to bash
|
||||||
set -g default-command "/bin/bash --login"
|
set -g default-command "/bin/bash --login"
|
||||||
set -g default-shell "/bin/bash"
|
set -g default-shell "/bin/bash"
|
||||||
|
|
||||||
source ~/tools/modules/powerline/powerline/bindings/tmux/powerline.conf
|
source ~/tools/powerline/powerline/powerline/bindings/tmux/powerline.conf
|
||||||
|
|
||||||
set -g default-terminal "screen-256color"
|
set -g default-terminal "screen-256color"
|
||||||
|
|
||||||
|
|
@ -20,10 +18,10 @@ set -g default-terminal "screen-256color"
|
||||||
set-option -sg escape-time 0
|
set-option -sg escape-time 0
|
||||||
|
|
||||||
#set prefix to ctrl-a
|
#set prefix to ctrl-a
|
||||||
unbind-key C-a
|
|
||||||
unbind-key C-b
|
unbind-key C-b
|
||||||
set-option -g prefix C-a
|
set-option -g prefix C-a
|
||||||
bind-key C-a send-prefix
|
unbind-key C-a ; bind-key C-a send-prefix
|
||||||
|
|
||||||
|
|
||||||
# some nice ops
|
# some nice ops
|
||||||
set-option -g bell-action any
|
set-option -g bell-action any
|
||||||
|
|
@ -50,16 +48,16 @@ set-option -g status-right ' tmux is rad | %A %B %d, %Y %Ts '
|
||||||
set-option buffer-limit 10
|
set-option buffer-limit 10
|
||||||
|
|
||||||
#window options
|
#window options
|
||||||
set-window-option -g utf8 on
|
#set-window-option -g utf8 on
|
||||||
set-window-option -g clock-mode-style 24
|
set-window-option -g clock-mode-style 24
|
||||||
set-window-option -g monitor-activity on
|
set-window-option -g monitor-activity on
|
||||||
set-window-option -g automatic-rename on
|
set-window-option -g automatic-rename on
|
||||||
set-window-option -g mouse
|
set-window-option -g mouse
|
||||||
#set -g pane-active-border-fg green
|
#set -g pane-active-border-fg green
|
||||||
set -g pane-border-fg white
|
#set -g pane-border-fg white
|
||||||
set -g pane-border-bg white
|
#set -g pane-border-bg white
|
||||||
set -g pane-active-border-fg cyan
|
#set -g pane-active-border-fg cyan
|
||||||
set -g pane-active-border-bg cyan
|
#set -g pane-active-border-bg cyan
|
||||||
|
|
||||||
# Window nav
|
# Window nav
|
||||||
unbind-key 1 ; bind-key 1 select-window -t 1
|
unbind-key 1 ; bind-key 1 select-window -t 1
|
||||||
|
|
@ -96,9 +94,13 @@ unbind-key M-i ; bind-key M-i split-window -v
|
||||||
unbind-key M-s ; bind-key M-s split-window -h
|
unbind-key M-s ; bind-key M-s split-window -h
|
||||||
unbind-key i ; bind-key i split-window -v
|
unbind-key i ; bind-key i split-window -v
|
||||||
unbind-key s ; bind-key s split-window -h
|
unbind-key s ; bind-key s split-window -h
|
||||||
|
unbind-key c ; bind-key n new-window
|
||||||
|
unbind-key & ; bind-key w confirm-before -p "Kill #W? (y/n)" kill-window
|
||||||
|
#unbind-key $ ; bind-key R command-prompt -I "#S" "rename-session -- '%%'"
|
||||||
|
unbind-key , ; bind-key r command-prompt -I "#W" "rename-window -- '%%'"
|
||||||
|
|
||||||
#nice bindings
|
#nice bindings
|
||||||
unbind-key R ; bind-key R source-file ~/.tmux.conf
|
unbind-key R ; bind-key R source-file ~/.config/tmux/.tmux.conf
|
||||||
unbind-key q ; bind-key q list-keys
|
unbind-key q ; bind-key q list-keys
|
||||||
unbind-key M-q ; bind-key M-q list-keys
|
unbind-key M-q ; bind-key M-q list-keys
|
||||||
|
|
||||||
|
|
@ -106,8 +108,8 @@ unbind-key M-q ; bind-key M-q list-keys
|
||||||
|
|
||||||
unbind [ ; bind Escape copy-mode
|
unbind [ ; bind Escape copy-mode
|
||||||
unbind p ; bind p paste-buffer
|
unbind p ; bind p paste-buffer
|
||||||
bind -t vi-copy 'v' begin-selection
|
#bind -t vi-copy 'v' begin-selection
|
||||||
bind -t vi-copy 'y' copy-selection
|
#bind -t vi-copy 'y' copy-selection
|
||||||
|
|
||||||
#unbind-key ^A-c ; bind-key -n ^A-c copy-mode
|
#unbind-key ^A-c ; bind-key -n ^A-c copy-mode
|
||||||
#unbind-key ^A-NPage ; bind-key -n ^A-NPage copy-mode
|
#unbind-key ^A-NPage ; bind-key -n ^A-NPage copy-mode
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
Home ~/
|
||||||
|
Projects ~/Projects
|
||||||
|
Work ~/Projects/work
|
||||||
|
Documents ~/Documents
|
||||||
|
Configs ~/.config
|
||||||
|
Shell Extensions ~/.shell_extensions
|
||||||
|
Downloads ~/Desktop
|
||||||
|
|
@ -49,8 +49,6 @@
|
||||||
--regex-Rust=/macro_rules! +([a-zA-Z0-9_]+) *{/\1/d,macros,macro definitions/
|
--regex-Rust=/macro_rules! +([a-zA-Z0-9_]+) *{/\1/d,macros,macro definitions/
|
||||||
--regex-Rust=/impl([ \t\n]*<[^>]*>)?[ \t]+(([a-zA-Z0-9_:]+)[ \t]*(<[^>]*>)?[ \t]+(for)[ \t]+)?([a-zA-Z0-9_]+)/\6/i,impls,trait implementations/
|
--regex-Rust=/impl([ \t\n]*<[^>]*>)?[ \t]+(([a-zA-Z0-9_:]+)[ \t]*(<[^>]*>)?[ \t]+(for)[ \t]+)?([a-zA-Z0-9_]+)/\6/i,impls,trait implementations/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# LESS
|
# LESS
|
||||||
--langdef=less
|
--langdef=less
|
||||||
--langmap=less:.less
|
--langmap=less:.less
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
" change runtime path
|
" change runtime path
|
||||||
set runtimepath=~/tools/vim/
|
set runtimepath=~/.config/vim/runtime/
|
||||||
|
|
||||||
execute pathogen#infect()
|
execute pathogen#infect()
|
||||||
execute pathogen#helptags()
|
execute pathogen#helptags()
|
||||||
|
|
@ -36,8 +36,6 @@ colorscheme torte
|
||||||
"colorscheme peaksea
|
"colorscheme peaksea
|
||||||
"colorscheme murphy
|
"colorscheme murphy
|
||||||
"colorscheme zellner
|
"colorscheme zellner
|
||||||
|
|
||||||
|
|
||||||
"colorscheme sunburst
|
"colorscheme sunburst
|
||||||
"colorscheme pinksea
|
"colorscheme pinksea
|
||||||
"colorscheme CandyPaper
|
"colorscheme CandyPaper
|
||||||
|
|
@ -67,6 +65,81 @@ set ttyfast
|
||||||
set gdefault
|
set gdefault
|
||||||
" Use UTF-8 without BOM
|
" Use UTF-8 without BOM
|
||||||
set encoding=utf-8 "nobomb
|
set encoding=utf-8 "nobomb
|
||||||
|
|
||||||
|
set binary
|
||||||
|
|
||||||
|
" Don't add empty newlines at the end of files
|
||||||
|
set noeol
|
||||||
|
|
||||||
|
set history=500 " Number of things to remember in history.
|
||||||
|
set t_Co=256
|
||||||
|
|
||||||
|
" Centralize backups, swapfiles and undo history
|
||||||
|
if exists("&backupdir")
|
||||||
|
set backupdir=~/tools/vim/backups
|
||||||
|
endif
|
||||||
|
if exists("&directory")
|
||||||
|
set directory=~/tools/vim/swaps
|
||||||
|
endif
|
||||||
|
if exists("&undodir")
|
||||||
|
set undodir=~/tools/vim/undo
|
||||||
|
endif
|
||||||
|
|
||||||
|
" Respect modeline in files
|
||||||
|
set modeline
|
||||||
|
set modelines=4
|
||||||
|
|
||||||
|
" Enable per-directory .vimrc files and disable unsafe commands in them
|
||||||
|
set exrc
|
||||||
|
set secure
|
||||||
|
|
||||||
|
" Enable line numbers
|
||||||
|
set number
|
||||||
|
" Enable syntax highlighting
|
||||||
|
syntax on
|
||||||
|
" Highlight current line
|
||||||
|
set cursorline
|
||||||
|
" Make tabs as wide as four spaces
|
||||||
|
set tabstop=4
|
||||||
|
set expandtab
|
||||||
|
set shiftwidth=4
|
||||||
|
|
||||||
|
" Show “invisible” characters
|
||||||
|
set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_
|
||||||
|
set list
|
||||||
|
" Highlight searches
|
||||||
|
set hlsearch
|
||||||
|
" Ignore case of searches
|
||||||
|
set ignorecase
|
||||||
|
" Highlight dynamically as pattern is typed
|
||||||
|
set incsearch
|
||||||
|
" Always show status line
|
||||||
|
set laststatus=2
|
||||||
|
" Enable mouse in all modes
|
||||||
|
set mouse=a
|
||||||
|
" Disable error bells
|
||||||
|
set noerrorbells
|
||||||
|
" Dont reset cursor to start of line when moving around.
|
||||||
|
set nostartofline
|
||||||
|
" Show the cursor position
|
||||||
|
set ruler
|
||||||
|
" Dont show the intro message when starting Vim
|
||||||
|
set shortmess=atI
|
||||||
|
" Show the current mode
|
||||||
|
set showmode
|
||||||
|
" Show the filename in the window titlebar
|
||||||
|
set title
|
||||||
|
" Show the (partial) command as its being typed
|
||||||
|
set showcmd
|
||||||
|
|
||||||
|
" Start scrolling x lines before the horizontal window border
|
||||||
|
set scrolloff=4
|
||||||
|
|
||||||
|
autocmd FileType javascript setlocal ts=4 sts=4 sw=4 expandtab
|
||||||
|
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
|
||||||
|
autocmd Filetype go setlocal ts=4 sw=4 sts=4 noexpandtab
|
||||||
|
|
||||||
|
|
||||||
" Change mapleader
|
" Change mapleader
|
||||||
let mapleader = ","
|
let mapleader = ","
|
||||||
|
|
||||||
|
|
@ -142,73 +215,10 @@ let g:neocomplete#enable_at_startup = 0
|
||||||
" Use smartcase
|
" Use smartcase
|
||||||
let g:neocomplete#enable_smart_case = 0
|
let g:neocomplete#enable_smart_case = 0
|
||||||
|
|
||||||
set binary
|
" indent guides
|
||||||
|
let g:indent_guides_enable_on_vim_startup = 1
|
||||||
" Don't add empty newlines at the end of files
|
let g:indent_guides_guide_size = 1
|
||||||
set noeol
|
let g:indent_guides_start_level = 2
|
||||||
|
|
||||||
set history=500 " Number of things to remember in history.
|
|
||||||
set t_Co=256
|
|
||||||
|
|
||||||
" Centralize backups, swapfiles and undo history
|
|
||||||
if exists("&backupdir")
|
|
||||||
set backupdir=~/tools/vim/backups
|
|
||||||
endif
|
|
||||||
if exists("&directory")
|
|
||||||
set directory=~/tools/vim/swaps
|
|
||||||
endif
|
|
||||||
if exists("&undodir")
|
|
||||||
set undodir=~/tools/vim/undo
|
|
||||||
endif
|
|
||||||
|
|
||||||
" Respect modeline in files
|
|
||||||
set modeline
|
|
||||||
set modelines=4
|
|
||||||
|
|
||||||
" Enable per-directory .vimrc files and disable unsafe commands in them
|
|
||||||
set exrc
|
|
||||||
set secure
|
|
||||||
|
|
||||||
" Enable line numbers
|
|
||||||
set number
|
|
||||||
" Enable syntax highlighting
|
|
||||||
syntax on
|
|
||||||
" Highlight current line
|
|
||||||
set cursorline
|
|
||||||
" Make tabs as wide as four spaces
|
|
||||||
set tabstop=4
|
|
||||||
set expandtab
|
|
||||||
set shiftwidth=4
|
|
||||||
" Show “invisible” characters
|
|
||||||
set lcs=tab:▸\ ,trail:·,eol:¬,nbsp:_
|
|
||||||
set list
|
|
||||||
" Highlight searches
|
|
||||||
set hlsearch
|
|
||||||
" Ignore case of searches
|
|
||||||
set ignorecase
|
|
||||||
" Highlight dynamically as pattern is typed
|
|
||||||
set incsearch
|
|
||||||
" Always show status line
|
|
||||||
set laststatus=2
|
|
||||||
" Enable mouse in all modes
|
|
||||||
set mouse=a
|
|
||||||
" Disable error bells
|
|
||||||
set noerrorbells
|
|
||||||
" Dont reset cursor to start of line when moving around.
|
|
||||||
set nostartofline
|
|
||||||
" Show the cursor position
|
|
||||||
set ruler
|
|
||||||
" Dont show the intro message when starting Vim
|
|
||||||
set shortmess=atI
|
|
||||||
" Show the current mode
|
|
||||||
set showmode
|
|
||||||
" Show the filename in the window titlebar
|
|
||||||
set title
|
|
||||||
" Show the (partial) command as its being typed
|
|
||||||
set showcmd
|
|
||||||
|
|
||||||
" Start scrolling x lines before the horizontal window border
|
|
||||||
set scrolloff=4
|
|
||||||
|
|
||||||
" tern
|
" tern
|
||||||
let g:tern_show_argument_hits='on_hold'
|
let g:tern_show_argument_hits='on_hold'
|
||||||
|
|
@ -259,6 +269,7 @@ let g:ctrlp_map = '<C-P>'
|
||||||
|
|
||||||
let g:ctrlp_cmd = 'CtrlPLastMode'
|
let g:ctrlp_cmd = 'CtrlPLastMode'
|
||||||
let g:ctrlp_extensions = ['line']
|
let g:ctrlp_extensions = ['line']
|
||||||
|
let g:ctrlp_show_hidden = 1
|
||||||
|
|
||||||
|
|
||||||
"'c' - the directory of the current file.
|
"'c' - the directory of the current file.
|
||||||
|
|
@ -363,6 +374,9 @@ if has("autocmd")
|
||||||
autocmd BufRead,BufNewFile *.template setfiletype html template syntax=htmldjango
|
autocmd BufRead,BufNewFile *.template setfiletype html template syntax=htmldjango
|
||||||
autocmd BufRead,BufNewFile *.go setfiletype golang syntax=go
|
autocmd BufRead,BufNewFile *.go setfiletype golang syntax=go
|
||||||
autocmd BufRead,BufNewFile *.php setfiletype php syntax=go
|
autocmd BufRead,BufNewFile *.php setfiletype php syntax=go
|
||||||
|
autocmd BufRead,BufNewFile Dockerfile* setfiletype Dockerfile syntax=go
|
||||||
|
" Spell check and line wrap just for git commit messages
|
||||||
|
autocmd Filetype gitcommit setlocal spell textwidth=72
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
git://github.com/tpope/vim-pathogen.git
|
||||||
|
git://github.com/tpope/vim-fugitive.git
|
||||||
|
git://github.com/tpope/vim-dispatch.git
|
||||||
|
git://github.com/Valloric/YouCompleteMe.git
|
||||||
|
git://github.com/nathanaelkane/vim-indent-guides.git
|
||||||
|
git://github.com/airblade/vim-gitgutter.git
|
||||||
|
git://github.com/fholgado/minibufexpl.vim.git
|
||||||
|
git://github.com/bling/vim-airline.git
|
||||||
|
git://github.com/fatih/vim-go.git
|
||||||
|
git://github.com/scrooloose/nerdtree.git
|
||||||
|
git://github.com/tpope/vim-dadbod.git
|
||||||
|
# utils
|
||||||
|
git://github.com/scrooloose/syntastic.git
|
||||||
|
git://github.com/easymotion/vim-easymotion.git
|
||||||
|
git://github.com/ervandew/supertab.git
|
||||||
|
git://github.com/tpope/vim-repeat.git
|
||||||
|
git://github.com/tpope/vim-surround.git
|
||||||
|
git://github.com/kien/ctrlp.vim.git
|
||||||
|
git://github.com/vim-scripts/tComment
|
||||||
|
# syntax
|
||||||
|
git://github.com/cakebaker/scss-syntax.vim.git
|
||||||
|
git://github.com/pangloss/vim-javascript.git
|
||||||
|
git://github.com/vim-ruby/vim-ruby.git
|
||||||
|
git://github.com/vim-scripts/matchit.zip.git
|
||||||
|
git://github.com/oscarh/vimerl.git
|
||||||
|
git://github.com/sukima/xmledit.git
|
||||||
|
git://github.com/mxw/vim-jsx.git
|
||||||
|
git://github.com/gorodinskiy/vim-coloresque.git
|
||||||
|
git://github.com/groenewege/vim-less.git
|
||||||
|
git://github.com/tpope/vim-markdown.git
|
||||||
|
git://github.com/tpope/vim-haml.git
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
require 'rake/clean'
|
require 'rake/clean'
|
||||||
require 'fileutils'
|
require 'fileutils'
|
||||||
|
|
||||||
vimFolder = "tools/vim"
|
vimFolder = File.expand_path("~/.config/vim")
|
||||||
bundles_dir = File.join("#{vimFolder}/bundle/")
|
vimRuntimeFolder = "#{vimFolder}/runtime"
|
||||||
|
bundles_dir = File.join("#{vimRuntimeFolder}/bundle")
|
||||||
pluginsFile = File.join("#{vimFolder}/plugins.txt")
|
pluginsFile = File.join("#{vimFolder}/plugins.txt")
|
||||||
|
|
||||||
CLEAN.include "#{bundles_dir}"
|
CLEAN.include "#{bundles_dir}"
|
||||||
|
|
@ -13,7 +14,7 @@ task :default => ['clean', 'vim:reinstall']
|
||||||
namespace :vim do
|
namespace :vim do
|
||||||
|
|
||||||
directory "#{bundles_dir}"
|
directory "#{bundles_dir}"
|
||||||
desc "reinstalls all vim plugins from #{vimFolder}/plugins.txt"
|
desc "reinstalls all vim plugins from #{pluginsFile} into #{bundles_dir}"
|
||||||
task :reinstall do
|
task :reinstall do
|
||||||
puts "loading plugins into #{bundles_dir}..."
|
puts "loading plugins into #{bundles_dir}..."
|
||||||
lines = IO.readlines pluginsFile
|
lines = IO.readlines pluginsFile
|
||||||
|
|
@ -28,25 +29,25 @@ namespace :vim do
|
||||||
puts "Plugins installed!"
|
puts "Plugins installed!"
|
||||||
end
|
end
|
||||||
|
|
||||||
desc 'downloads a vim plugin from a git repo.'
|
desc "downloads a vim plugin from a git repo, installs it into #{bundles_dir}"
|
||||||
task :downloadPlugin, [:source] => "#{bundles_dir}" do |t, args|
|
task :downloadPlugin, [:source] => "#{bundles_dir}" do |t, args|
|
||||||
raise "Must specify git repo to pull from." unless args.source not(nil)
|
raise "Must specify git repo to pull from." unless args.source not(nil)
|
||||||
dir = gitName args.source
|
dir = gitName args.source
|
||||||
puts "Installing #{dir}...."
|
puts "Installing #{dir}...."
|
||||||
Dir.chdir bundles_dir do
|
Dir.chdir bundles_dir do
|
||||||
sh "git clone #{args.source} #{dir}"
|
sh "git clone #{args.source} #{dir}"
|
||||||
#FileUtils.rm_rf(File.join(dir, ".git"))
|
FileUtils.rm_rf(File.join(dir, ".git"))
|
||||||
end
|
end
|
||||||
puts "\n\n"
|
puts "\n\n"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
desc "downloads a new plugin and adds it to #{vimFolder}/plugins.txt"
|
desc "downloads a new plugin into #{bundles_dir} and adds it to #{pluginsFile}"
|
||||||
task :install, [:sourceName] do |t, args|
|
task :install, [:sourceName] do |t, args|
|
||||||
raise "Must specify git repo to pull from." unless args.sourceName not(nil)
|
raise "Must specify git repo to pull from." unless args.sourceName not(nil)
|
||||||
source = "git://github.com/#{args.sourceName}.git"
|
source = "git://github.com/#{args.sourceName}.git"
|
||||||
Rake::Task['vim:downloadPlugin'].invoke source
|
Rake::Task['vim:downloadPlugin'].invoke source
|
||||||
puts "Adding to #{vimFolder}/plugins.txt"
|
puts "Adding to #{pluginsFile}"
|
||||||
File.open pluginsFile, 'a' do |file|
|
File.open pluginsFile, 'a' do |file|
|
||||||
file.puts "#{source}\n"
|
file.puts "#{source}\n"
|
||||||
end
|
end
|
||||||
|
|
@ -7,8 +7,8 @@
|
||||||
s = status -s
|
s = status -s
|
||||||
|
|
||||||
# Show the diff between the latest commit and the current state
|
# Show the diff between the latest commit and the current state
|
||||||
d = !"git diff --color --patch-with-stat | diff-so-fancy"
|
d = !"git diff --color --patch-with-stat"
|
||||||
dc = !"git diff --cached --color --patch-with-stat | diff-so-fancy"
|
dc = !"git diff --cached --color --patch-with-stat"
|
||||||
|
|
||||||
# `git di $number` shows the diff between the state `$number` revisions ago and the current state
|
# `git di $number` shows the diff between the state `$number` revisions ago and the current state
|
||||||
di = !"d() { git diff --color --patch-with-stat HEAD~$1 | diff-so-fancy; }; git diff-index --color --quiet HEAD --; d"
|
di = !"d() { git diff --color --patch-with-stat HEAD~$1 | diff-so-fancy; }; git diff-index --color --quiet HEAD --; d"
|
||||||
|
|
@ -59,6 +59,7 @@
|
||||||
|
|
||||||
# Remove branches that have already been merged with master
|
# Remove branches that have already been merged with master
|
||||||
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
|
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
|
||||||
|
plog = log --graph --pretty=format:'%h -%d %s %n' --abbrev-commit --date=relative --branches
|
||||||
|
|
||||||
[diff]
|
[diff]
|
||||||
# Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject
|
# Git diff will use (i)ndex, (w)ork tree, (c)ommit and (o)bject
|
||||||
|
|
@ -146,15 +147,19 @@
|
||||||
default = current
|
default = current
|
||||||
[pull]
|
[pull]
|
||||||
default = current
|
default = current
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
email = adamveld12@gmail.com
|
email = adam.veldhousen@liveauctioneers.com
|
||||||
name = Adam Veldhousen
|
name = Adam Veldhousen
|
||||||
signingkey = 415C0B9C
|
signingkey = 415C0B9C
|
||||||
|
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign = true
|
gpgsign = true
|
||||||
|
template = /home/adam/.gitmessage
|
||||||
|
|
||||||
[help]
|
[help]
|
||||||
autocorrect=20
|
autocorrect=20
|
||||||
|
|
||||||
[credential]
|
[credential]
|
||||||
# for OSX
|
# for OSX
|
||||||
#helper = osxkeychain
|
#helper = osxkeychain
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -f "$PWD/makefile" ] && [ ! -z "$(cat $PWD/makefile | grep 'lint:')" ]; then
|
||||||
|
echo "lint rule found in $PWD/makefile..."
|
||||||
|
make lint
|
||||||
|
elif [ -f "$PWD/package.json" ] && [ ! -z "$(cat $PWD/package.json | grep '\"lint\"')" ]; then
|
||||||
|
echo "running npm run lint..."
|
||||||
|
npm run lint
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$PWD/makefile" ] && [ ! -z "$(cat $PWD/makefile | grep 'test:')" ]; then
|
||||||
|
echo "test rule found in $PWD/makefile..."
|
||||||
|
make test
|
||||||
|
elif [ -f "$PWD/package.json" ] && [ ! -z "$(cat $PWD/package.json | grep '\"test\"')" ]; then
|
||||||
|
echo "running npm run test..."
|
||||||
|
npm run test
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# If the following text is found anywhere in the source for HEAD, we will prevent pushing
|
||||||
|
dont_push_flag="DONT PUSH ME"
|
||||||
|
|
||||||
|
flag_found=`git grep --color "$dont_push_flag" HEAD`
|
||||||
|
if [ -n "$flag_found" ]
|
||||||
|
then
|
||||||
|
# Display which commit the first occurence of the flag was found and exit failure
|
||||||
|
commit=`git log --pretty=format:'%Cred%h%Creset' -S "$dont_push_flag" | tail -n1`
|
||||||
|
echo "Found $flag_found, first occurence was in $commit, not pushing"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
|
@ -4,10 +4,8 @@
|
||||||
.rnd
|
.rnd
|
||||||
*.kdbx
|
*.kdbx
|
||||||
.vim_colorv_cache
|
.vim_colorv_cache
|
||||||
.NERDTreeBookmarks
|
|
||||||
*.log
|
*.log
|
||||||
*.exe
|
*.exe
|
||||||
.DS_Store
|
|
||||||
.viminfo
|
.viminfo
|
||||||
.bash_history
|
.bash_history
|
||||||
.erlang.cookie
|
.erlang.cookie
|
||||||
|
|
@ -16,7 +14,6 @@
|
||||||
.dbshell
|
.dbshell
|
||||||
.netrc
|
.netrc
|
||||||
*.dll
|
*.dll
|
||||||
tags
|
|
||||||
*.orig
|
*.orig
|
||||||
.dockercfg
|
.dockercfg
|
||||||
.gnupg
|
.gnupg
|
||||||
|
|
@ -35,7 +32,6 @@ target
|
||||||
Library
|
Library
|
||||||
Tools/vim/bundle/*
|
Tools/vim/bundle/*
|
||||||
Tools/vim/tutor/
|
Tools/vim/tutor/
|
||||||
.config/
|
|
||||||
.lesshst
|
.lesshst
|
||||||
.atom
|
.atom
|
||||||
./assets/**/lib
|
./assets/**/lib
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
# [Add/Fix/Remove/Update/Refactor/Document] [issue #id] [summary]
|
||||||
|
|
||||||
|
# Why is it necessary? (Bug fix, feature, improvements?)
|
||||||
|
|
||||||
|
# How does the change address the issue?
|
||||||
|
|
||||||
|
# What side effects does this change have?
|
||||||
|
|
@ -6,34 +6,22 @@ case $- in
|
||||||
*) return;;
|
*) return;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
# source environment settings
|
# source environment settings
|
||||||
if [ -f ~/.environment ]; then
|
if [ -f ~/.environment ]; then
|
||||||
. ~/.environment
|
. ~/.environment
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load functions
|
|
||||||
#if [ -f ~/.bash_functions ]; then
|
|
||||||
# . ~/.bash_functions
|
|
||||||
#fi
|
|
||||||
|
|
||||||
# Load any extra aliases
|
|
||||||
if [ -f ~/.bash_aliases ]; then
|
|
||||||
. ~/.bash_aliases
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Load pretty colors
|
|
||||||
if [ -f ~/.shell_colors ]; then
|
|
||||||
. ~/.shell_colors
|
|
||||||
fi
|
|
||||||
|
|
||||||
# for when you want to do custom junk
|
# for when you want to do custom junk
|
||||||
# Sources a folder with shell extensions
|
# Sources a folder with shell extensions
|
||||||
if [ -d ~/.extensions ]; then
|
if [ -d ~/.shell_extensions ]; then
|
||||||
for plugin in ~/.extensions/*; do
|
for plugin in ~/.shell_extensions/*; do
|
||||||
if [ -f $plugin ]; then
|
if [ -f $plugin ]; then
|
||||||
source $plugin
|
source $plugin
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f "./.motd" ]; then
|
||||||
|
source .motd
|
||||||
|
fi
|
||||||
|
|
@ -0,0 +1,42 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# vim: set ft=sh
|
||||||
|
alias cdp="cd -"
|
||||||
|
alias ..='cd ..'
|
||||||
|
alias pd="pushd $1"
|
||||||
|
alias tx="tmux -f ~/.config/tmux/.tmux.conf"
|
||||||
|
|
||||||
|
# list files
|
||||||
|
alias ll='ls -hGla'
|
||||||
|
|
||||||
|
#rake
|
||||||
|
alias bake='bundle exec rake'
|
||||||
|
|
||||||
|
#tools
|
||||||
|
alias resrc='source ~/.bash_aliases && source ~/.bashrc && source ~/.profile'
|
||||||
|
alias role='whoami -groups -fo list | grep -i'
|
||||||
|
alias fu='find ./ -type f -print0 | xargs -0 grep -n $1'
|
||||||
|
|
||||||
|
#git
|
||||||
|
alias gs='git status'
|
||||||
|
|
||||||
|
alias gm='git merge --ff-only'
|
||||||
|
alias gpr='git pull --rebase'
|
||||||
|
alias gmt='git mergetool'
|
||||||
|
alias grc='git rebase --continue'
|
||||||
|
alias gk='git fetch origin; git remote prune origin; gitk --all &'
|
||||||
|
alias gl='git log --pretty=format:"%h %ar by %an: %s"'
|
||||||
|
|
||||||
|
# Get week number
|
||||||
|
alias week='date +%V'
|
||||||
|
|
||||||
|
# Stopwatch
|
||||||
|
alias timer='echo "Timer started. Stop with Ctrl-D." && date && time cat && date'
|
||||||
|
|
||||||
|
# IP addresses
|
||||||
|
alias ip="dig +short myip.opendns.com @resolver1.opendns.com"
|
||||||
|
alias localip="ipconfig getifaddr en0"
|
||||||
|
alias ips="ifconfig -a | grep -o 'inet6\? \(addr:\)\?\s\?\(\(\([0-9]\+\.\)\{3\}[0-9]\+\)\|[a-fA-F0-9:]\+\)' | awk '{ sub(/inet6? (addr:)? ?/, \"\"); print }'"
|
||||||
|
|
||||||
|
# Kill all the tabs in Chrome to free up memory
|
||||||
|
# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
|
||||||
|
alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill"
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
|
# sleep 10; alert
|
||||||
|
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -26,8 +26,12 @@ shopt -s histappend # Append to the history file, not over
|
||||||
export LESS='-iMR' # Case insensite search, verbose prompting and raw output
|
export LESS='-iMR' # Case insensite search, verbose prompting and raw output
|
||||||
export PAGER=less # Used to display text / man files
|
export PAGER=less # Used to display text / man files
|
||||||
|
|
||||||
export LANG="en_US.UTF-8"
|
export POWERLINE_CONFIG_COMMAND=~/tools/powerline/powerline/scripts/powerline-config
|
||||||
export POWERLINE_CONFIG_COMMAND=~/Tools/modules/powerline/scripts/powerline-config
|
export GIT_EDITOR=vim
|
||||||
|
export EDITOR=$GIT_EDITOR
|
||||||
|
export VISUAL=$EDITOR
|
||||||
|
export VIMRUNTIME=${HOME}/.config/vim/runtime
|
||||||
|
export VIM=${HOME}/.config/vim
|
||||||
|
|
||||||
export WINDOWS=false
|
export WINDOWS=false
|
||||||
|
|
||||||
|
|
@ -35,30 +39,43 @@ if [ -d "${HOME}/.bin" ] ; then
|
||||||
PATH=${HOME}/.bin:${PATH}
|
PATH=${HOME}/.bin:${PATH}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export GIT_EDITOR=vim
|
|
||||||
|
|
||||||
# give windows boxes a chance to override environment
|
# give windows boxes a chance to override environment
|
||||||
if [ -d "/c/Windows" ]; then
|
if [ -d "/c/Windows" ]; then
|
||||||
WINDOWS="TRUE"
|
WINDOWS="TRUE"
|
||||||
GIT_EDITOR=~/tools/vim/gvim.exe
|
export GIT_EDITOR=~/tools/vim/gvim.exe
|
||||||
|
|
||||||
if [ -f ~/.windows ]; then
|
if [ -f ~/.windows ]; then
|
||||||
. ~/.windows
|
. ~/.windows
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
export GOPATH=~/projects/go
|
export GOPATH=~/Projects/go
|
||||||
export DOTNETPATH=~/.dotnet/
|
export DOTNETPATH=~/.dotnet/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export EDITOR=$GIT_EDITOR
|
|
||||||
export VISUAL=$EDITOR
|
|
||||||
export VIMRUNTIME=~/tools/vim
|
|
||||||
|
|
||||||
if [ -d "${HOME}/tools/vim" ] ; then
|
if [ -d "${HOME}/.config/vim" ] ; then
|
||||||
PATH=${HOME}/tools/vim:${PATH}
|
PATH=${HOME}/.config/vim:${PATH}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PATH=/usr/local/bin:${GOPATH}/bin:${GOROOT}/bin:${DOTNETPATH}:${PATH}
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
export PATH=/usr/local/bin:${GOPATH}/bin:${GOROOT}/bin:${DOTNETPATH}:${HOME}/.bin:${PATH}
|
||||||
|
|
||||||
|
# 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
|
||||||
|
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color|*-256color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# http://stackoverflow.com/questions/410616/increasing-the-maximum-number-of-tcp-ip-connections-in-linux
|
# http://stackoverflow.com/questions/410616/increasing-the-maximum-number-of-tcp-ip-connections-in-linux
|
||||||
# run these to increase concurrent connections in linux
|
# run these to increase concurrent connections in linux
|
||||||
|
|
@ -198,38 +198,11 @@ function json() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function pubkey(){
|
|
||||||
if [[ -z $1 ]]; then
|
|
||||||
echo "Takes a path to a private key and prints a compatible public key to stdout"
|
|
||||||
echo "$1 required: path to a private key"
|
|
||||||
return -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
ssh-keygen -y -f $1
|
|
||||||
}
|
|
||||||
|
|
||||||
# delete merged local branches
|
# delete merged local branches
|
||||||
function prunelocal(){
|
function prunelocal(){
|
||||||
for b in `git branch --merged | grep -v \*`; do git branch -D $b; done
|
for b in `git branch --merged | grep -v \*`; do git branch -D $b; done
|
||||||
}
|
}
|
||||||
|
|
||||||
function tunnel(){
|
|
||||||
if [[ -z $1 ]]; then
|
|
||||||
echo "Takes an ssh config host name and starts an SSH tunnel"
|
|
||||||
echo "$1 required: name of an ssh tunnel host"
|
|
||||||
echo "$2 optional: run the tunnel as a background job if defined"
|
|
||||||
return -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z $2 ]]; then
|
|
||||||
sudo ssh -f -N $1
|
|
||||||
else
|
|
||||||
sudo ssh -f -N $1 &
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# `s` with no arguments opens the current directory in Sublime Text, otherwise
|
# `s` with no arguments opens the current directory in Sublime Text, otherwise
|
||||||
# opens the given location
|
# opens the given location
|
||||||
function s() {
|
function s() {
|
||||||
|
|
@ -244,18 +217,18 @@ function s() {
|
||||||
# given location
|
# given location
|
||||||
function v(){
|
function v(){
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
vim .;
|
vim -U ~/.config/vim/vimrc .;
|
||||||
else
|
else
|
||||||
vim --remote-tab-silent "$@";
|
vim -U ~/.config/vim/vimrc --remote-tab-silent "$@";
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# runs vim outside of the term by forking the command and gvim, great for my windows box
|
# runs vim outside of the term by forking the command and gvim, great for my windows box
|
||||||
function vd(){
|
function vd(){
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
gvim &
|
gvim -U ~/.config/vim/vimrc &
|
||||||
else
|
else
|
||||||
gvim --remote-tab-silent "$@" &
|
gvim -U ~/.config/vim/vimrc --remote-tab-silent "$@" &
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -269,7 +242,6 @@ function o() {
|
||||||
fi;
|
fi;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Create a new directory and enter it
|
# Create a new directory and enter it
|
||||||
function mkd() {
|
function mkd() {
|
||||||
mkdir -p "$@" && cd "$_";
|
mkdir -p "$@" && cd "$_";
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport'
|
||||||
|
|
||||||
|
# Get OS X Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
|
||||||
|
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update'
|
||||||
|
|
||||||
|
# Empty the Trash on all mounted volumes and the main HDD
|
||||||
|
# Also, clear Apple’s System Logs to improve shell startup speed
|
||||||
|
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
||||||
|
|
||||||
|
# Show/hide hidden files in Finder
|
||||||
|
alias show="defaults write com.apple.finder AppleShowAllFiles -bool true && killall Finder"
|
||||||
|
alias hide="defaults write com.apple.finder AppleShowAllFiles -bool false && killall Finder"
|
||||||
|
|
||||||
|
# Recursively delete `.DS_Store` files
|
||||||
|
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
|
||||||
|
|
||||||
|
# Hide/show all desktop icons (useful when presenting)
|
||||||
|
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
|
||||||
|
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
|
||||||
|
|
||||||
|
# Stuff I never really use but cannot delete either because of http://xkcd.com/530/
|
||||||
|
alias stfu="osascript -e 'set volume output muted true'"
|
||||||
|
alias pumpitup="osascript -e 'set volume 7'"
|
||||||
|
# Lock the screen (when going AFK)
|
||||||
|
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
|
||||||
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# Prompt Customizations
|
# Prompt Customizations
|
||||||
#
|
|
||||||
|
|
||||||
# If not running interactively, don't do anything
|
# If not running interactively, don't do anything
|
||||||
[ -z "$PS1" ] && return
|
[ -z "$PS1" ] && return
|
||||||
|
|
@ -38,11 +37,16 @@ VC=""
|
||||||
LK=""
|
LK=""
|
||||||
LA="𝝺"
|
LA="𝝺"
|
||||||
|
|
||||||
|
#╭─ ~/src/v8/v8 ‹master›
|
||||||
|
#╰─$
|
||||||
|
START_LINE_1="╭─"
|
||||||
|
START_LINE_2="╰─"
|
||||||
|
|
||||||
|
|
||||||
colorize() {
|
colorize() {
|
||||||
# $1 is foreground
|
# $1 is foreground
|
||||||
# $2 is background
|
# $2 is background
|
||||||
# $3 is content
|
# $3 is content
|
||||||
#
|
|
||||||
if [ $OSTYPE = 'msys' ]; then
|
if [ $OSTYPE = 'msys' ]; then
|
||||||
echo -e "\033[48;3;$2;38;3;$1m$3\\033[0m"
|
echo -e "\033[48;3;$2;38;3;$1m$3\\033[0m"
|
||||||
else
|
else
|
||||||
|
|
@ -63,7 +67,7 @@ parse_git_branch_or_tag() {
|
||||||
if [ "$OUT" == " ((no branch))" ]; then
|
if [ "$OUT" == " ((no branch))" ]; then
|
||||||
echo "$VC ($(parse_git_tag)) "
|
echo "$VC ($(parse_git_tag)) "
|
||||||
elif [ "$OUT" == "$VC" ]; then
|
elif [ "$OUT" == "$VC" ]; then
|
||||||
echo "x$VC"
|
echo "x $VC"
|
||||||
else
|
else
|
||||||
echo "$OUT"
|
echo "$OUT"
|
||||||
fi
|
fi
|
||||||
|
|
@ -79,7 +83,7 @@ build_prompt_win(){
|
||||||
echo "$LEFT"
|
echo "$LEFT"
|
||||||
}
|
}
|
||||||
|
|
||||||
build_prompt_mac(){
|
build_prompt_unix(){
|
||||||
local TIME="$(colorize 15 33 ' [$(date +%H:%M)] ')$(colorize 33 34 $RARS)";
|
local TIME="$(colorize 15 33 ' [$(date +%H:%M)] ')$(colorize 33 34 $RARS)";
|
||||||
local USER="$(colorize 15 34 ' \u@\h ')$(colorize 34 124 $RARS)"
|
local USER="$(colorize 15 34 ' \u@\h ')$(colorize 34 124 $RARS)"
|
||||||
local GIT="$(colorize 252 124 ' $(parse_git_branch_or_tag) ')$(colorize 124 240 '$RARS')"
|
local GIT="$(colorize 252 124 ' $(parse_git_branch_or_tag) ')$(colorize 124 240 '$RARS')"
|
||||||
|
|
@ -88,6 +92,10 @@ build_prompt_mac(){
|
||||||
echo "$LEFT"
|
echo "$LEFT"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
build_prompt_unix_2(){
|
||||||
|
echo -e "${START_LINE_1} \u@\h \w <$(parse_git_branch)>\n${START_LINE_2}${LA} "
|
||||||
|
}
|
||||||
|
|
||||||
print_prompt(){
|
print_prompt(){
|
||||||
local TIME="$(colorize 15 33)[$(date +%H:%M)] $(colorize 33 34)$RARS";
|
local TIME="$(colorize 15 33)[$(date +%H:%M)] $(colorize 33 34)$RARS";
|
||||||
local USER="$(colorize 15 34)\u@\h $(colorize 34 124)$RARS"
|
local USER="$(colorize 15 34)\u@\h $(colorize 34 124)$RARS"
|
||||||
|
|
@ -96,7 +104,7 @@ print_prompt(){
|
||||||
local LEFT="$TIME$USER$GIT$DIR "
|
local LEFT="$TIME$USER$GIT$DIR "
|
||||||
local RIGHT="$DIR"
|
local RIGHT="$DIR"
|
||||||
local COMPENSATE=11
|
local COMPENSATE=11
|
||||||
PS1=$(printf "%*s\r%s\n$EMPTY\$$GRAY" "$($(tput cols) + ${compensate})" "$RIGHT" "$LEFT")
|
PS1=$(printf "%*s\r%s\n$EMPTY\$$GRAY" "$(($(tput cols) - ${compensate}))" "$RIGHT" "$LEFT")
|
||||||
}
|
}
|
||||||
|
|
||||||
# looks like the following:
|
# looks like the following:
|
||||||
|
|
@ -105,7 +113,7 @@ print_prompt(){
|
||||||
if [ $OSTYPE = 'msys' ]; then
|
if [ $OSTYPE = 'msys' ]; then
|
||||||
PROMPT_COMMAND='PS1="$(build_prompt_win)\n\$LA "'
|
PROMPT_COMMAND='PS1="$(build_prompt_win)\n\$LA "'
|
||||||
else
|
else
|
||||||
PROMPT_COMMAND='PS1="$(build_prompt_mac)\n\$LA "'
|
PROMPT_COMMAND='PS1="$(build_prompt_unix)\n\$LA "'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -144,5 +152,3 @@ banner() {
|
||||||
for i in {16..21} {23..27} {27..23} {21..16} ; do echo -en "\033[38;5;${i}m#" ; done ; echo
|
for i in {16..21} {23..27} {27..23} {21..16} ; do echo -en "\033[38;5;${i}m#" ; done ; echo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function tunnel(){
|
||||||
|
if [[ -z $1 ]]; then
|
||||||
|
echo "Takes an ssh config host name and starts an SSH tunnel"
|
||||||
|
echo "$1 required: name of an ssh tunnel host"
|
||||||
|
echo "$2 optional: run the tunnel as a background job if defined"
|
||||||
|
return -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $2 ]]; then
|
||||||
|
sudo ssh -f -N $1
|
||||||
|
else
|
||||||
|
sudo ssh -f -N $1 &
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
function pubkey(){
|
||||||
|
if [[ -z $1 ]]; then
|
||||||
|
echo "Takes a path to a private key and prints a compatible public key to stdout"
|
||||||
|
echo "$1 required: path to a private key"
|
||||||
|
return -1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
ssh-keygen -y -f $1
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<key name="Software">
|
<key name="Software">
|
||||||
<key name="ConEmu">
|
<key name="ConEmu">
|
||||||
Binary file not shown.
|
|
@ -0,0 +1,123 @@
|
||||||
|
Return to [FiraCode](https://github.com/tonsky/FiraCode)
|
||||||
|
|
||||||
|
### [](#installing-font)Installing font
|
||||||
|
|
||||||
|
Windows:
|
||||||
|
|
||||||
|
* In the ttf folder, double-click each font file, click “Install font”; to install all at once, select all files, right-click, and choose “Install”
|
||||||
|
|
||||||
|
_or_
|
||||||
|
|
||||||
|
* Use [chocolatey](https://chocolatey.org): `choco install firacode`
|
||||||
|
|
||||||
|
Mac:
|
||||||
|
|
||||||
|
In the downloaded TTF folder:
|
||||||
|
|
||||||
|
1. Select all font files
|
||||||
|
2. Right click and select `Open` (alternatively `Open With Font Book`)
|
||||||
|
3. Select "Install Font"
|
||||||
|
|
||||||
|
_or_
|
||||||
|
|
||||||
|
* Use [brew](http://brew.sh) and [cask](https://caskroom.github.io):
|
||||||
|
|
||||||
|
_Not officially supported, might install outdated version_
|
||||||
|
|
||||||
|
<div class="highlight highlight-source-shell">
|
||||||
|
|
||||||
|
brew tap caskroom/fonts
|
||||||
|
brew cask install font-fira-code
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Linux:
|
||||||
|
|
||||||
|
* Install a package available for your distribution following [the instructions](https://github.com/tonsky/FiraCode/wiki/Linux-instructions#installing-with-a-package-manager)
|
||||||
|
|
||||||
|
_or_
|
||||||
|
|
||||||
|
* In the ttf folder double-click each font file and click “Install font”; see [“Manual Installation”](https://github.com/tonsky/FiraCode/wiki/Linux-instructions#manual-installation) if double-clicking doesn't work
|
||||||
|
|
||||||
|
FreeBSD:
|
||||||
|
|
||||||
|
* Using pkg(8): `pkg install firacode`
|
||||||
|
|
||||||
|
_or_
|
||||||
|
|
||||||
|
* Using ports: `cd /usr/ports/x11-fonts/firacode && make install clean`
|
||||||
|
|
||||||
|
### [](#how-to-enable-ligatures)How to enable ligatures
|
||||||
|
|
||||||
|
You need to explicitly enable ligatures support in following editors:
|
||||||
|
|
||||||
|
* [Atom](https://github.com/tonsky/FiraCode/wiki/Atom-instructions)
|
||||||
|
* [Brackets](https://github.com/tonsky/FiraCode/wiki/Brackets-Instructions/)
|
||||||
|
* [Cloud9](https://github.com/tonsky/FiraCode/wiki/cloud9-instructions)
|
||||||
|
* [Jetbrains' products](https://github.com/tonsky/FiraCode/wiki/Intellij-products-instructions) (IntelliJ, etc)
|
||||||
|
* [Emacs](https://github.com/tonsky/FiraCode/wiki/Emacs-instructions)
|
||||||
|
* [MacVim](https://github.com/tonsky/FiraCode/wiki/MacVim-instructions)
|
||||||
|
* [VS Code](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions)
|
||||||
|
* [BBEdit](https://github.com/tonsky/FiraCode/wiki/BBEdit-instructions)
|
||||||
|
* [LightTable](https://github.com/tonsky/FiraCode/wiki/LightTable-instructions)
|
||||||
|
* [Sublimetext](https://github.com/tonsky/FiraCode/wiki/Sublimetext-Instructions)
|
||||||
|
|
||||||
|
For other editors it must be enough to simply select Fira Code as your font of choice. [Full list of supported editors](https://github.com/tonsky/FiraCode#editor-support)
|
||||||
|
|
||||||
|
### [](#troubleshooting)Troubleshooting
|
||||||
|
|
||||||
|
#### [](#1-make-sure-the-font-your-editor-displays-is-actually-fira-code)1\. Make sure the font your editor displays is actually Fira Code
|
||||||
|
|
||||||
|
Easiest way is to compare the shape of `@` `&` and `r` with the reference image:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Issues: [#393](https://github.com/tonsky/FiraCode/issues/393) [#373](https://github.com/tonsky/FiraCode/issues/373) [#227](https://github.com/tonsky/FiraCode/issues/227)
|
||||||
|
|
||||||
|
#### [](#2-make-sure-youve-enabled-ligatures-in-your-editor)2\. Make sure you’ve enabled ligatures in your editor
|
||||||
|
|
||||||
|
Consult this wiki (see above ↑) for instruction on how to do that.
|
||||||
|
|
||||||
|
Issues: [#291](https://github.com/tonsky/FiraCode/issues/291)
|
||||||
|
|
||||||
|
#### [](#3-make-sure-youre-on-the-latest-version-of-fira-code)3\. Make sure you’re on the latest version of Fira Code
|
||||||
|
|
||||||
|
Consult [CHANGELOG](https://github.com/tonsky/FiraCode/blob/master/CHANGELOG.md) to see when it was last updated.
|
||||||
|
|
||||||
|
#### [](#4-check-the-list-of-known-issues-below-)4\. Check the list of known issues below ↓
|
||||||
|
|
||||||
|
### [](#known-issues)Known issues
|
||||||
|
|
||||||
|
#### [](#hinting-issues)Hinting issues
|
||||||
|
|
||||||
|
* Uneven spacing in `===` and `!==` at certain font sizes, esp. on Windows [#405](https://github.com/tonsky/FiraCode/issues/405) [#243](https://github.com/tonsky/FiraCode/issues/243) [#119](https://github.com/tonsky/FiraCode/issues/119) [#114](https://github.com/tonsky/FiraCode/issues/114)
|
||||||
|
|
||||||
|
* Different height of `[]` at certain font sizes [#332](https://github.com/tonsky/FiraCode/issues/332) [#251](https://github.com/tonsky/FiraCode/issues/251)
|
||||||
|
|
||||||
|
#### [](#powerline-characters-are-of-slightly-wrong-size)Powerline characters are of slightly wrong size
|
||||||
|
|
||||||
|
Unfortunately this can’t be fixed for all terminals because they have different ways of calculate font metrics. See [this comment](https://github.com/tonsky/FiraCode/issues/44#issuecomment-187305276)
|
||||||
|
|
||||||
|
Issues: [#426](https://github.com/tonsky/FiraCode/issues/426) [#131](https://github.com/tonsky/FiraCode/issues/131) [#44](https://github.com/tonsky/FiraCode/issues/44)
|
||||||
|
|
||||||
|
#### [](#some-ligatures-work-while-some-dont)Some ligatures work while some don’t
|
||||||
|
|
||||||
|
This is an issue with your editor and how it handles tokenization/syntax highlighting. Nothing can be done in a font to work around that. Report your problem to the corresponding editor’s issue tracker.
|
||||||
|
|
||||||
|
* All ligatures with dashes in Visual Studio (not Code) [#422](https://github.com/tonsky/FiraCode/issues/422) [#395](https://github.com/tonsky/FiraCode/issues/395) [#360](https://github.com/tonsky/FiraCode/issues/360) [#273](https://github.com/tonsky/FiraCode/issues/273) [#259](https://github.com/tonsky/FiraCode/issues/259) [#233](https://github.com/tonsky/FiraCode/issues/233) [#220](https://github.com/tonsky/FiraCode/issues/220) [#196](https://github.com/tonsky/FiraCode/issues/196) [#181](https://github.com/tonsky/FiraCode/issues/181) [#157](https://github.com/tonsky/FiraCode/issues/157) [#99](https://github.com/tonsky/FiraCode/issues/99) [#43](https://github.com/tonsky/FiraCode/issues/43) [#32](https://github.com/tonsky/FiraCode/issues/32)
|
||||||
|
|
||||||
|
* Ligatures in column 100 in VS Code [#403](https://github.com/tonsky/FiraCode/issues/403) [#397](https://github.com/tonsky/FiraCode/issues/397) [#372](https://github.com/tonsky/FiraCode/issues/372)
|
||||||
|
|
||||||
|
* Atom/VS Code are known to break certain ligatures in certain syntaxes [#361](https://github.com/tonsky/FiraCode/issues/361) [#353](https://github.com/tonsky/FiraCode/issues/353) [#348](https://github.com/tonsky/FiraCode/issues/348) [#328](https://github.com/tonsky/FiraCode/issues/328) [#326](https://github.com/tonsky/FiraCode/issues/326) [#235](https://github.com/tonsky/FiraCode/issues/235)
|
||||||
|
|
||||||
|
#### [](#corrupted-font-in-intellij-on-windows)Corrupted font in IntelliJ on Windows
|
||||||
|
|
||||||
|
Go to `C:\Windows\Fonts` with `cmd.exe`, find and delete everything having Fira in the file name. It’s important that you use terminal commands, not Explorer.
|
||||||
|
|
||||||
|
Issues: [#589](https://github.com/tonsky/FiraCode/issues/589) [#581](https://github.com/tonsky/FiraCode/issues/581) [#398](https://github.com/tonsky/FiraCode/issues/398) [IDEA-159901](https://youtrack.jetbrains.com/issue/IDEA-159901)
|
||||||
|
|
||||||
|
#### [](#anything-related-to-italics)Anything related to italics
|
||||||
|
|
||||||
|
Fira Code does not have italics at all. If you see italicized glyphs it means your editor is “faking” them.
|
||||||
|
|
||||||
|
Issues: [#375](https://github.com/tonsky/FiraCode/issues/375) [#320](https://github.com/tonsky/FiraCode/issues/320) [#281](https://github.com/tonsky/FiraCode/issues/281)
|
||||||
|
|
@ -0,0 +1,40 @@
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Fira Code';
|
||||||
|
src: url('woff2/FiraCode-Light.woff2') format('woff2'),
|
||||||
|
url("woff/FiraCode-Light.woff") format("woff");
|
||||||
|
font-weight: 300;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Fira Code';
|
||||||
|
src: url('woff2/FiraCode-Regular.woff2') format('woff2'),
|
||||||
|
url("woff/FiraCode-Regular.woff") format("woff");
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Fira Code';
|
||||||
|
src: url('woff2/FiraCode-Medium.woff2') format('woff2'),
|
||||||
|
url("woff/FiraCode-Medium.woff") format("woff");
|
||||||
|
font-weight: 500;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Fira Code';
|
||||||
|
src: url('woff2/FiraCode-Bold.woff2') format('woff2'),
|
||||||
|
url("woff/FiraCode-Bold.woff") format("woff");
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Fira Code VF';
|
||||||
|
src: url('woff2/FiraCode-VF.woff2') format('woff2-variations'),
|
||||||
|
url('woff/FiraCode-VF.woff') format('woff-variations');
|
||||||
|
/* font-weight requires a range: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide#Using_a_variable_font_font-face_changes */
|
||||||
|
font-weight: 300 700;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1,84 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
|
<title>Fira Code Specimen</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="fira_code.css">
|
||||||
|
<style>
|
||||||
|
body { font: 14px/1.5em "Fira Code"; }
|
||||||
|
.code {
|
||||||
|
font-feature-settings: "calt" 1; /* Enable ligatures for IE 10+, Edge */
|
||||||
|
text-rendering: optimizeLegibility; /* Force ligatures for Webkit, Blink, Gecko */
|
||||||
|
width: 30em;
|
||||||
|
margin: 5em auto;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
.light { font-weight: 300; }
|
||||||
|
.regular { font-weight: 400; }
|
||||||
|
.medium { font-weight: 500; }
|
||||||
|
.bold { font-weight: 700; }
|
||||||
|
.variable { font-family: 'Fira Code VF'; font-variation-settings: 'wght' 400; }
|
||||||
|
i { font-style: normal; color: #c33; }
|
||||||
|
b { font-weight: inherit; color: #c33; }
|
||||||
|
</style>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function onWeightChange(weight) {
|
||||||
|
// code_variable.style['font-weight'] = weight;
|
||||||
|
code_variable.style['font-variation-settings'] = "'wght' " + weight;
|
||||||
|
span_wght.innerText = weight;
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="code light"><b># Fira Code Light</b>
|
||||||
|
|
||||||
|
take = (n, [x, <i>...</i>xs]:list) <i>--></i>
|
||||||
|
| n <i><=</i> 0 <i>=></i> []
|
||||||
|
| empty list <i>=></i> []
|
||||||
|
| otherwise <i>=></i> [x] <i>++</i> take n-1, xs
|
||||||
|
|
||||||
|
last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="code regular"><b># Fira Code Regular</b>
|
||||||
|
|
||||||
|
take = (n, [x, <i>...</i>xs]:list) <i>--></i>
|
||||||
|
| n <i><=</i> 0 <i>=></i> []
|
||||||
|
| empty list <i>=></i> []
|
||||||
|
| otherwise <i>=></i> [x] <i>++</i> take n-1, xs
|
||||||
|
|
||||||
|
last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="code medium"><b># Fira Code Medium</b>
|
||||||
|
|
||||||
|
take = (n, [x, <i>...</i>xs]:list) <i>--></i>
|
||||||
|
| n <i><=</i> 0 <i>=></i> []
|
||||||
|
| empty list <i>=></i> []
|
||||||
|
| otherwise <i>=></i> [x] <i>++</i> take n-1, xs
|
||||||
|
|
||||||
|
last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="code bold"><b># Fira Code Bold</b>
|
||||||
|
|
||||||
|
take = (n, [x, <i>...</i>xs]:list) <i>--></i>
|
||||||
|
| n <i><=</i> 0 <i>=></i> []
|
||||||
|
| empty list <i>=></i> []
|
||||||
|
| otherwise <i>=></i> [x] <i>++</i> take n-1, xs
|
||||||
|
|
||||||
|
last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>
|
||||||
|
|
||||||
|
<div id="code_variable" class="code variable"><b># Fira Code Variable</b>
|
||||||
|
|
||||||
|
<input type="range" min="300" max="700" value="400" step="10" style="width: 300px;" oninput="onWeightChange(this.value)" onchange="onWeightChange(this.value)"> <span id="span_wght">400</span>
|
||||||
|
|
||||||
|
take = (n, [x, <i>...</i>xs]:list) <i>--></i>
|
||||||
|
| n <i><=</i> 0 <i>=></i> []
|
||||||
|
| empty list <i>=></i> []
|
||||||
|
| otherwise <i>=></i> [x] <i>++</i> take n-1, xs
|
||||||
|
|
||||||
|
last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue