diff --git a/.NERDTreeBookmarks b/.NERDTreeBookmarks deleted file mode 100644 index f935064..0000000 --- a/.NERDTreeBookmarks +++ /dev/null @@ -1,5 +0,0 @@ -Downloads ~/Downloads -Go ~/projects/go/src/github.com -Home ~/ -Work ~/projects/work -Projects ~/projects diff --git a/.bash_aliases b/.bash_aliases deleted file mode 100644 index 4098829..0000000 --- a/.bash_aliases +++ /dev/null @@ -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'" diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..750f835 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +tools/ +.git/ +.gitmodules +Dockerfile* +LICENSE +README.md diff --git a/.extensions/functions.sh b/.extensions/functions.sh deleted file mode 100644 index 997b069..0000000 --- a/.extensions/functions.sh +++ /dev/null @@ -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 " >&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 " - 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 -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')"; -} diff --git a/.github/workflows/build_image.yml b/.github/workflows/build_image.yml new file mode 100644 index 0000000..636d0c4 --- /dev/null +++ b/.github/workflows/build_image.yml @@ -0,0 +1,16 @@ +name: Docker Image CI + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Build the Docker image + env: + DOCKER_USER: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASS: ${{ secrets.DOCKER_PASSWORD }} + run: | + docker login -u ${DOCKER_USER} -p ${DOCKER_PASS} + VERSION=${GITHUB_REF#"refs/heads/"} COMMIT_SHA=${GITHUB_SHA} INITIATOR=${GITHUB_ACTOR} make publish diff --git a/.gitmodules b/.gitmodules index df2487f..0882fe9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,21 @@ -[submodule "tools/modules/tmux-MacOSX-pasteboard"] - path = tools/modules/tmux-MacOSX-pasteboard - 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 +[submodule "tmux-MacOSX-pasteboard"] + path = tools/osx/iTerm2-Color-Schemes + url = git://github.com/mbadolato/iTerm2-Color-Schemes.git +[submodule "iTerm2-Color-Schemes"] + path = tools/osx/iTerm2-Color-Schemes url = git://github.com/mbadolato/iTerm2-Color-Schemes.git -[submodule "tools/modules/powerline"] - path = tools/modules/powerline +[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 +[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 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f49dfbc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM debian:bullseye + +ARG version=dev +ARG commit=dev +ARG created=never + +LABEL maintainer="Adam Veldhousen " +LABEL net.veldhousen.version=${version} +LABEL net.veldhousen.commit=${commit} +LABEL net.veldhousen.created=${created} + +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 \ + && rm -rf /home/dev/.bashrc \ + && 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 /home/dev/Projects/dotfiles/install dev \ + && sudo rm -rf /tmp/* + +ENTRYPOINT ["/bin/bash", "--login"] + + diff --git a/Dockerfile.arch b/Dockerfile.arch new file mode 100644 index 0000000..833add9 --- /dev/null +++ b/Dockerfile.arch @@ -0,0 +1 @@ +from archlinux/base diff --git a/Dockerfile.debian b/Dockerfile.debian new file mode 100644 index 0000000..8bfb9a4 --- /dev/null +++ b/Dockerfile.debian @@ -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" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..39d5c7f --- /dev/null +++ b/LICENSE @@ -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. diff --git a/README.md b/README.md index 987f7ad..cc135a4 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,39 @@ -laughing-hipster +Dotfiles ================ +![GitHub](https://img.shields.io/github/license/adamveld12/laughing-hipster) +![Platform](https://img.shields.io/badge/platform-Debian%2C%20Ubuntu%2C%20OSX-lightgrey) + My dot files ## 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. -Installs Brew when run on OSX, along with several utilities I commonly use. - Comes with an uninstall script. Themes for vim, iterm2 and for cmder when ran on windows. -Tmux and vim configurations - -## Install - -1. cd into `~` -3. run `laughing-hipster/bootstrap.sh` +Tmux and vim configurations. -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. +i3 (sway if using wayland), compton, polybar, dunst, nitrogen for linux window management. -Because everything is symlinked, all you have to do for most updates is just `git pull`. +## Install -## Uninstall - -1. cd into `~` -2. run `./laughing-hipster/remove.sh` +1. Run `./install ` and everything is automatically installed: + - symlinks `.vimrc`, `.tmux.conf`, `.gitconfig`, `.motd`, `.profile`, `.shell_extensions`, `.config`, `.ssh/config` to home directory + - backups existing copies of all files to `.dotfiles_backup_/` + - installs rvm, gvm, nvm, rustup + - compton, dunst, nitrogen, polybar if x is detected -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. +## Extending with custom scripts -Basically you end up back where you started (or close to) without anything destructive happening. +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. -## 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. +## LICENSE +MIT diff --git a/bootstrap.sh b/bootstrap.sh deleted file mode 100755 index d4b68d5..0000000 --- a/bootstrap.sh +++ /dev/null @@ -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 <~/.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!" diff --git a/config/Code/User/keybindings.json b/config/Code/User/keybindings.json deleted file mode 100644 index b2c6171..0000000 --- a/config/Code/User/keybindings.json +++ /dev/null @@ -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 && !inDebugRepl" - }, - { - "key": "ctrl+y", - "command": "-extension.vim_ctrl+y", - "when": "editorTextFocus && vim.active && vim.use && !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 && !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" - } -] \ No newline at end of file diff --git a/config/Code/User/settings.json b/config/Code/User/settings.json deleted file mode 100644 index 0e5cded..0000000 --- a/config/Code/User/settings.json +++ /dev/null @@ -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", -} \ No newline at end of file diff --git a/config/i3/polybar.sh b/config/i3/polybar.sh deleted file mode 100755 index fcf68dc..0000000 --- a/config/i3/polybar.sh +++ /dev/null @@ -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 & diff --git a/config/nigtrogen/bg-saved.cfg b/config/nigtrogen/bg-saved.cfg deleted file mode 100644 index 091f6d9..0000000 --- a/config/nigtrogen/bg-saved.cfg +++ /dev/null @@ -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 diff --git a/install b/install new file mode 100755 index 0000000..fbb0ec7 --- /dev/null +++ b/install @@ -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 diff --git a/install/debian.sh b/install/debian.sh deleted file mode 100755 index 22d2ac3..0000000 --- a/install/debian.sh +++ /dev/null @@ -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} diff --git a/install/windows.sh b/install/windows.sh deleted file mode 100755 index a9bf588..0000000 --- a/install/windows.sh +++ /dev/null @@ -1 +0,0 @@ -#!/bin/bash diff --git a/installers/base.sh b/installers/base.sh new file mode 100755 index 0000000..d7f08ef --- /dev/null +++ b/installers/base.sh @@ -0,0 +1,144 @@ +#!/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 +#------------------------------------------------------------------ + +if [ -f "${BASE_DIR}/tools" ]; then + git submodule init && git submodule --progress update; + linkDirectory ${TOOLS_DIR} ${HOME_DIR}/tools; +else + echo "skipping tools..." +fi + + +#------------------------------------------------------------------ +# 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; + gvm 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 $@ {}; diff --git a/installers/linux.sh b/installers/linux.sh new file mode 100755 index 0000000..057d504 --- /dev/null +++ b/installers/linux.sh @@ -0,0 +1,98 @@ +#!/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/build + cmake .. + make -j$(nproc) + sudo make install + cd ../.. + rm -rf ./polybar + + 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 " \ + --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 .. +rm -rf ./vim + + +cd ${HOME} diff --git a/install/osx.sh b/installers/osx.sh similarity index 100% rename from install/osx.sh rename to installers/osx.sh diff --git a/makefile b/makefile new file mode 100644 index 0000000..3091f24 --- /dev/null +++ b/makefile @@ -0,0 +1,35 @@ +.PHONY: build build-test deb-test dev + +./tools: + git submodule init && git submodule update + +build: ./tools + docker build -t vdhsn/dotfiles:$${VERSION:-latest} \ + --build-arg version=$${VERSION} \ + --build-arg commit=$${COMMIT_SHA:-$${CIRCLE_SHA1}} \ + --build-arg initiator=$${INITIATOR:-$${CIRCLE_USERNAME}} \ + --build-arg created=$${CREATED_TS:-$$(date +%s)} \ + -f ./Dockerfile . + +publish: build + docker push vdhsn/dotfiles:$${VERSION} + docker tag vdhsn/dotfiles:$${VERSION} vdhsn/dotfiles:$$(echo $${COMMIT_SHA} | sed -E 's/^(.{10}).*$$/\1/') + docker push vdhsn/dotfiles:$$(echo $${COMMIT_SHA} | sed -E 's/^(.{10}).*$$/\1/') + +build-test: ./tools + docker build -t vdhsn/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 \ + vdhsn/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 \ + vdhsn/dotfiles:$${VERSION:-latest} + diff --git a/motd b/motd deleted file mode 100644 index e69de29..0000000 diff --git a/remove.sh b/remove.sh deleted file mode 100755 index d7f6ff5..0000000 --- a/remove.sh +++ /dev/null @@ -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 diff --git a/src/.bash_logout b/src/.bash_logout new file mode 100644 index 0000000..09df5b1 --- /dev/null +++ b/src/.bash_logout @@ -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 diff --git a/src/.config/alacritty/alacritty.yml b/src/.config/alacritty/alacritty.yml new file mode 100644 index 0000000..69fdef5 --- /dev/null +++ b/src/.config/alacritty/alacritty.yml @@ -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 diff --git a/config/compton/compton.conf b/src/.config/compton/compton.conf similarity index 95% rename from config/compton/compton.conf rename to src/.config/compton/compton.conf index 8c94427..41ebb50 100644 --- a/config/compton/compton.conf +++ b/src/.config/compton/compton.conf @@ -1,8 +1,8 @@ -#vim: set ft=sh - # basic configuration -backend = "glx"; -vsync = "opengl-swc"; +#backend = "glx"; +#vsync = "opengl-swc"; +backend = "xrender"; +vsync = "opengl"; # GLX backend: GLX buffer swap method we assume. # 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. @@ -13,10 +13,10 @@ vsync = "opengl-swc"; # Useless with --glx-use-copysubbuffermesa. # Partially breaks --resize-damage. # Defaults to undefined. -glx-swap-method = "3"; +glx-swap-method = "2"; +#glx-swap-method = "3"; glx-no-stencil = true; - glx-copy-from-front = false; xrender-sync = true; xrender-sync-fence = true; @@ -24,7 +24,9 @@ paint-on-overlay = true; detect-rounded-corners = true; ################################# +# # Shadows +# ################################# # Enabled client-side shadows on windows. @@ -88,7 +90,7 @@ inactive-opacity-override = false; alpha-step = 0.06; # Dim inactive windows. (0.0 - 1.0) -# inactive-dim = 0.2; +inactive-dim = 0.2; # Do not let dimness adjust based on window opacity. # inactive-dim-fixed = true; # Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred. diff --git a/config/dunst/dunstrc b/src/.config/dunst/dunstrc similarity index 99% rename from config/dunst/dunstrc rename to src/.config/dunst/dunstrc index c1c6d32..39df8dd 100644 --- a/config/dunst/dunstrc +++ b/src/.config/dunst/dunstrc @@ -1,3 +1,4 @@ + [global] ### Display ### @@ -41,7 +42,7 @@ # The transparency of the window. Range: [0; 100]. # This option will only work if a compositing window manager is # present (e.g. xcompmgr, compiz, etc.). - transparency = 0 + transparency = 25 # The height of the entire notification. If the height is smaller # than the font height and padding combined, it will be raised diff --git a/config/i3/config b/src/.config/i3/config similarity index 89% rename from config/i3/config rename to src/.config/i3/config index 37f68f1..d104cba 100644 --- a/config/i3/config +++ b/src/.config/i3/config @@ -15,11 +15,19 @@ font pango:DejaVu Sans Mono 12 # set dpi settings 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 -# startup gnome -exec --no-startup-id /usr/lib/gnome-setting-daemon/gsd-xsettings -exec_always --no-startup-id gnome-power-manager +# start polybar +exec_always --no-startup-id ~/.config/i3/polybar.sh & + +# start dunst for custom notification popups +exec --no-startup-id dunst -config ~/.config/dunst/dunstrc & # startup pulse audio controls 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=2 --save --set-centered ~/Pictures/Wallpapers/landscapes/03886_paintedplains_3840x2160.jpg & -# start polybar -exec_always --no-startup-id ~/.config/i3/polybar.sh & +# save power +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 @@ -53,14 +58,14 @@ bindsym XF86AudioPlay exec qdbus org.mpris.clementine /Player Pause # start a terminal bindsym Mod1+Return exec terminator -bindsym Mod1+Shift+i exec sudo insomnia +bindsym Mod1+Shift+i exec insomnia # start chrome with correct DPI settings 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 -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+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+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-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 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 # 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 bindsym Mod1+Shift+v exec pritunl-client start 65adf618f9dc44b9818b558d1b84bdba diff --git a/src/.config/i3/polybar.sh b/src/.config/i3/polybar.sh new file mode 100644 index 0000000..acdb55e --- /dev/null +++ b/src/.config/i3/polybar.sh @@ -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 & diff --git a/src/.config/irssi/config b/src/.config/irssi/config new file mode 100644 index 0000000..843e57c --- /dev/null +++ b/src/.config/irssi/config @@ -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"; }; }; diff --git a/default.itermcolors b/src/.config/iterm/default.itermcolors similarity index 100% rename from default.itermcolors rename to src/.config/iterm/default.itermcolors diff --git a/itermprefs/com.googlecode.iterm2.plist b/src/.config/iterm/itermprefs/com.googlecode.iterm2.plist similarity index 100% rename from itermprefs/com.googlecode.iterm2.plist rename to src/.config/iterm/itermprefs/com.googlecode.iterm2.plist diff --git a/src/.config/nitrogen/bg-saved.cfg b/src/.config/nitrogen/bg-saved.cfg new file mode 100644 index 0000000..3e7ace8 --- /dev/null +++ b/src/.config/nitrogen/bg-saved.cfg @@ -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 diff --git a/config/nigtrogen/nitrogen.cfg b/src/.config/nitrogen/nitrogen.cfg similarity index 78% rename from config/nigtrogen/nitrogen.cfg rename to src/.config/nitrogen/nitrogen.cfg index 2bc3160..8927941 100644 --- a/config/nigtrogen/nitrogen.cfg +++ b/src/.config/nitrogen/nitrogen.cfg @@ -1,8 +1,8 @@ [geometry] -posx=0 +posx=3840 posy=24 -sizex=1916 -sizey=2134 +sizex=3836 +sizey=2089 [nitrogen] view=icon diff --git a/src/.config/nitrogen/painted_plains_3840x2160.jpg b/src/.config/nitrogen/painted_plains_3840x2160.jpg new file mode 100644 index 0000000..d119c45 Binary files /dev/null and b/src/.config/nitrogen/painted_plains_3840x2160.jpg differ diff --git a/config/polybar/config b/src/.config/polybar/config similarity index 61% rename from config/polybar/config rename to src/.config/polybar/config index fc8fce6..ebc9dab 100644 --- a/config/polybar/config +++ b/src/.config/polybar/config @@ -19,12 +19,14 @@ secondary = #e60053 alert = #bd2c40 [bar/bar1] -monitor = ${env:MONITOR:eDP-1-1} +;remove padding around bar +;override-redirect = true +monitor = ${env:MONITOR:DP-0} width = 100% -height = 45 +height = 50 ;offset-x = 1% -;offset-y = 1% +;offset-y = 0% - 10 radius = 0 fixed-center = false @@ -34,39 +36,76 @@ foreground = ${colors.foreground} line-size = 3 line-color = #f00 -border-size = 0 +border-size = 5 border-color = #00000000 -padding-left = 5 -padding-right = 5 +padding-left = 3 +padding-right = 3 module-margin-left = 1 -module-margin-right = 2 +module-margin-right = 1 -font-0 = fixed:pixelsize=18;1 -font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 -font-2 = siji:pixelsize=18;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 = bspwm i3 powermenu -modules-center = mpd -modules-right = filesystem volume cpu memory temperature battery wlan eth date +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 -;wm-restack = bspwm -;wm-restack = i3 +cursor-click = pointer +cursor-scroll = ns-resize +dpi-y = 125 +dpi-x = 125 -;override-redirect = true +[bar/bar2] +monitor = ${env:MONITOR:DP-0} +width = 100% +height = 50 -;scroll-up = bspwm-desknext -;scroll-down = bspwm-deskprev +;offset-x = 1% +;offset-y = 1% +radius = 0 +fixed-center = false -;scroll-up = i3wm-wsnext -;scroll-down = i3wm-wsprev +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=20;1" +font-1 = "Symbola:size=25:antialias=true" +font-2 = "OpenSymbol:style=bold:size=26;antialias=false" +font-3 = "nanumbarungothic:style=bold:size=26;antialias=false" + +modules-left = i3 xwindow +modules-center = mpd +modules-right = xkeyboard volume filesystem temperature cpu memory wlan eth battery date powermenu + +bottom = false +top = true +tray-position = right +tray-padding = 4 +tray-transparent = false +;tray-background = #0063ff cursor-click = pointer cursor-scroll = ns-resize @@ -101,24 +140,25 @@ label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% label-unmounted = %mountpoint% not mounted label-unmounted-foreground = ${colors.foreground-alt} +; https://github.com/polybar/polybar/wiki/Module:-bspwm [module/bspwm] type = internal/bspwm -label-focused = %index% +label-focused = %icon% %index% %name% label-focused-background = ${colors.background-alt} label-focused-underline= ${colors.primary} label-focused-padding = 2 -label-occupied = %index% -label-occupied-padding = 2 +label-occupied = %index% %name% +label-occupied-padding = 1 label-urgent = %index%! 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-padding = 2 +label-empty-padding = 1 [module/i3] type = internal/i3 @@ -167,32 +207,29 @@ icon-next =  label-song-maxlen = 25 label-song-ellipsis = true -[module/xbacklight] -type = internal/xbacklight - -format =