From 4186d162bd2cc3b9b45851c12462f1acba090852 Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Sun, 23 Feb 2020 18:20:14 +0530 Subject: gentoo:time wasted --- README.md | 13 ++ alacritty/.config/alacritty/alacritty.yml | 2 +- arch.png | Bin 0 -> 754559 bytes bin/.local/bin/dotstow | 21 +++ bin/.local/bin/fetch | 63 +++++++++ bin/.local/bin/gitit | 10 ++ bin/.local/bin/unblock | 9 ++ bspwm/.config/bspwm/bspwmrc | 11 +- compton/.config/compton.conf | 228 ++++++++++++++++++++++++++---- nvim/.config/nvim/init.vim | 40 +++--- polybar/.config/polybar/config | 5 +- rofi/.config/rofi/config | 51 ++----- rofi/.config/rofi/rofi-power.sh | 2 +- sxhkd/.config/sxhkd/sxhkdrc | 6 +- x/.Xresources | 18 +-- x/.xinitrc | 23 ++- zsh/.zshrc | 10 +- 17 files changed, 394 insertions(+), 118 deletions(-) create mode 100644 README.md create mode 100644 arch.png create mode 100755 bin/.local/bin/dotstow create mode 100755 bin/.local/bin/fetch create mode 100755 bin/.local/bin/gitit create mode 100755 bin/.local/bin/unblock diff --git a/README.md b/README.md new file mode 100644 index 0000000..04999ab --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# dot-files +Dot files for my setup (bspwm, rofi, compton, neovim, i3blocks, polybar, lockscreen, i3[not using anymore]) + +![alt text](arch.png) + +# To replicate +```shell +$ git clone https://github.com/anon6405/dotfiles.git +$ sudo pacman -S stow (use your choice of package manager) +$ cd dotfiles +$ stow * +``` +That's all diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index c76c7d5..21ee0f5 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -42,7 +42,7 @@ font: style: Regular # Point size - size: 9 + size: 8.5 offset: x: 0 diff --git a/arch.png b/arch.png new file mode 100644 index 0000000..c7f54c2 Binary files /dev/null and b/arch.png differ diff --git a/bin/.local/bin/dotstow b/bin/.local/bin/dotstow new file mode 100755 index 0000000..bcadc5e --- /dev/null +++ b/bin/.local/bin/dotstow @@ -0,0 +1,21 @@ +#!/bin/bash + +# This script will Stow all the dotfiles located in the ~/dotfiles folder. +# The -R flag is used to force a 'restow' which will remove any existing symlinks before attempting to Stow. + +echo "Stowing Dotfiles..."; + +cd ~/dotfiles +for file in ~/dotfiles/*; do + # Only run Stow on the directories in the dotfiles folder and not the individual files. + # Using 'basename' strips the filepath from the directory name. + if [ -d ${file} ]; then + stow -R $(basename $file) + echo "$(basename $file) stowed."; + fi +done + +# Return back to the your PWD from before you ran the script +cd ~- + +echo 'All stowed'; diff --git a/bin/.local/bin/fetch b/bin/.local/bin/fetch new file mode 100755 index 0000000..609850c --- /dev/null +++ b/bin/.local/bin/fetch @@ -0,0 +1,63 @@ +#!/bin/sh +# +# ufetch-arch - tiny system info for arch + +## INFO + +# user is already defined +host="$(hostname)" +os='Arch Linux' +kernel="$(uname -sr)" +uptime="$(uptime -p | sed 's/up //')" +packages="$(pacman -Q | wc -l)" +shell="$(basename ${SHELL})" + +if [ -z "${WM}" ]; then + if [ "${XDG_CURRENT_DESKTOP}" ]; then + envtype='DE' + WM="${XDG_CURRENT_DESKTOP}" + elif [ "${DESKTOP_SESSION}" ]; then + envtype='DE' + WM="${DESKTOP_SESSION}" + else + envtype='WM' + WM="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" + fi +else + envtype='WM' +fi + +## DEFINE COLORS + +# probably don't change these +bold="$(tput bold)" +black="$(tput setaf 0)" +red="$(tput setaf 1)" +green="$(tput setaf 2)" +yellow="$(tput setaf 3)" +blue="$(tput setaf 4)" +magenta="$(tput setaf 5)" +cyan="$(tput setaf 6)" +white="$(tput setaf 7)" +reset="$(tput sgr0)" + +# you can change these +lc="${reset}${bold}${cyan}" # labels +nc="${reset}${bold}${cyan}" # user and hostname +ic="${reset}${bold}${white}" # info +c0="${reset}${bold}${cyan}" # first color +c1="${reset}${cyan}" # second color + +## OUTPUT + +cat < +format-discharging = format-full = format-charging =  ramp-capacity-0 =  diff --git a/rofi/.config/rofi/config b/rofi/.config/rofi/config index 499f20f..5d6b73f 100644 --- a/rofi/.config/rofi/config +++ b/rofi/.config/rofi/config @@ -1,42 +1,11 @@ -rofi.modi: ssh,drun,run -rofi.sidebar-mode: true -rofi.terminal: termite -rofi.ssh-client: ssh -rofi.ssh-command: {terminal} -e "{ssh-client} {host}" -rofi.opacity: 100 -rofi.width: 50 -rofi.lines: 8 -rofi.columns: 1 -rofi.font: Hermit 12 -rofi.fg: #5294E2 -rofi.bg: #5d729f -rofi.fg-active: #34405a -rofi.fg-urgent: #34405a -rofi.hlfg-active: #5e73a0 -rofi.hlfg-urgent: #5e73a0 -rofi.bg-active: #34405a -rofi.bg-urgent: #34405a -rofi.hlbg-active: #5d729f -rofi.hlbg-urgent: #5d729f -rofi.bgalt: #5671a0 -rofi.hlfg: #34405a -rofi.hlbg: #34405a -rofi.bc: #789ee1 -! State: 'bg', 'fg', 'bgalt', 'hlbg', 'hlfg' -rofi.color-normal: #353944, #FFFFFF, #353944, #5294E2, #FFFFFF -rofi.color-normal: #353944, #FFFFFF, #353944, #5294E2, #FFFFFF -rofi.color-normal: #353944, #FFFFFF, #353944, #5294E2, #FFFFFF +!rofi.theme: ~/.cache/wal/colors-rofi-dark.rasi +rofi.lines: 6 +!rofi.separator-style: none +!rofi.columns: 1 +rofi.font: Hermit 12 +!rofi.bw: 0 +!rofi.eh: 2 +!rofi.hide-scrollbar: true +rofi.auto-select: false +!rofi.display-drun:? -! 'background', 'border' -rofi.color-window: #353944, #404552 -rofi.bw: 10 -rofi.location: 0 -rofi.padding: 20 -rofi.levenshtein-sort: true -rofi.case-sensitive: false -rofi.fuzzy: false -rofi.line-margin: 2 -rofi.separator-style: solid -rofi.hide-scrollbar: true -rofi.markup-rows: false -rofi.scrollbar-width: 8 diff --git a/rofi/.config/rofi/rofi-power.sh b/rofi/.config/rofi/rofi-power.sh index 4cc4080..6aecdbb 100755 --- a/rofi/.config/rofi/rofi-power.sh +++ b/rofi/.config/rofi/rofi-power.sh @@ -30,7 +30,7 @@ then suspend ;; Lock) - /home/ssaini/.local/bin/lock + light-locker-command -l ;; *) ;; diff --git a/sxhkd/.config/sxhkd/sxhkdrc b/sxhkd/.config/sxhkd/sxhkdrc index 63ca260..7e91465 100644 --- a/sxhkd/.config/sxhkd/sxhkdrc +++ b/sxhkd/.config/sxhkd/sxhkdrc @@ -1,9 +1,9 @@ # wm independent hotkeys ## terminal emulator super + Return - alacritty + urxvtc super + shift + Return - bspc rule -a \* -o state=floating && alacritty + bspc rule -a \* -o state=floating && urxvtc # program launcher super + @space @@ -30,7 +30,7 @@ super + Escape super + shift + w firefox control + alt + l - ~/.local/bin/lock + light-locker-command -l super + shift + f pcmanfm Print diff --git a/x/.Xresources b/x/.Xresources index 63035d7..d58b278 100644 --- a/x/.Xresources +++ b/x/.Xresources @@ -57,14 +57,14 @@ URxvt*inheritPixmap: False *color15: #e0dede ! Perls -!URxvt.perl-ext-common : default,matcher,keyboard-select,url-select -!URxvt.resize-font.step: 1 -!URxvt.keysym.M-Escape : perl:keyboard-select:activate -!URxvt.keysym.M-u : perl:url-select:select_next -!URxvt.keysym.M-s : perl:keyboard-select:search +URxvt.perl-ext-common : default,matcher,keyboard-select,url-select +URxvt.resize-font.step: 1 +URxvt.keysym.M-Escape : perl:keyboard-select:activate +URxvt.keysym.M-u : perl:url-select:select_next +URxvt.keysym.M-s : perl:keyboard-select:search !URxvt.perl-ext-common : tabbed,default,matcher !Urxvt.perl-lib : /usr/lib/urxvt/perl/ -!URxvt.url-select.launcher : firefox -!URxvt.url-select.autocopy : true -!URxvt.url-select.underline : true -!URxvt.url-select.button: 1 +URxvt.url-select.launcher : firefox +URxvt.url-select.autocopy : true +URxvt.url-select.underline : true +URxvt.url-select.button: 1 diff --git a/x/.xinitrc b/x/.xinitrc index 79d2232..8626b1b 100644 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -40,6 +40,25 @@ if [ -n "$DISPLAY" ]; then xset b off fi -xsetroot -cursor_name left_ptr -xset +fp /usr/share/fonts/liberation-fonts +# load additional configs +if [ "$2" = "nvidia" ]; then + XINIT_D="/etc/X11/nvidia/xinit/xinitrc.d" +else + XINIT_D="/etc/X11/xinit/xinitrc.d" +fi + +if [ -d "$XINIT_D" ]; then + for f in "$XINIT_D/?*.sh" ; do + [ -x "$f" ] && . "$f" + done + unset f +fi +unset XINIT_D + +# additional nvidia specific settings +if [ "$2" = "nvidia" ]; then + xrandr --setprovideroutputsource modesetting NVIDIA-0 + xrandr --auto +fi + exec bspwm diff --git a/zsh/.zshrc b/zsh/.zshrc index 0af2d92..5737f94 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -2,11 +2,11 @@ # export PATH=$HOME/bin:/usr/local/bin:$PATH # Path to your oh-my-zsh installation. -export ZSH="/home/ssaini/.oh-my-zsh" +export ZSH="/home/fd0e/.oh-my-zsh" export VISUAL=nvim export EDITOR="$VISUAL" export BROWSER=firefox -export PATH=$PATH:$HOME/bin +export PATH=$PATH:$HOME/.local/bin:$HOME/bin export XDG_CURRENT_DESKTOP=bspwm # Set name of the theme to load --- if set to "random", it will @@ -73,7 +73,7 @@ ZSH_THEME="mh" # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(git sudo extract python common-aliases archlinux fzf autojump) +plugins=(git sudo archlinux extract python common-aliases autojump fzf) source $ZSH/oh-my-zsh.sh @@ -114,6 +114,7 @@ alias weather="curl wttr.in" alias py="/bin/python" alias py2="/bin/python2" alias pubip="curl ipinfo.io/ip" +alias mirror="sudo reflector --verbose --latest 5 --sort rate --save /etc/pacman.d/mirrorlist" alias k="pkill " alias m="cmus" alias vimrc="vim $HOME/.config/nvim/init.vim" @@ -122,8 +123,6 @@ alias z="zathura" alias v="/usr/bin/nvim" alias vim="/usr/bin/nvim" alias sudo="sudo " -alias drctf="docker run --rm -v $PWD:/ctf --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -d --name ctf -i ctf" -alias dectf="docker exec -it ctf /bin/bash" source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh @@ -139,4 +138,3 @@ source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zs # To add support for TTYs this line can be optionally added. #source ~/.cache/wal/colors-tty.sh - -- cgit v1.2.3