From a282280614117d85378aab776543e967e8160376 Mon Sep 17 00:00:00 2001 From: Shubham Saini Date: Sun, 12 Jul 2020 22:30:55 +0530 Subject: rolling a light theme --- bash/.bashrc | 2 +- dunst/.config/dunst/dunstrc | 4 +- git/.gitconfig | 2 +- nvim/.config/nvim/init.vim | 137 +++++--------------------------- picom/.config/picom.conf | 8 +- spectrwm/.config/spectrwm/spectrwm.conf | 49 +++++------- x/.Xresources | 88 +++++++++----------- x/.xinitrc | 14 +++- zsh/.zshrc | 78 +++++++++++------- 9 files changed, 151 insertions(+), 231 deletions(-) diff --git a/bash/.bashrc b/bash/.bashrc index 3e0bccb..37a4fe6 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -37,7 +37,7 @@ alias m="cmus" alias vimrc="vim $HOME/.config/nvim/init.vim" alias v="nvim" alias vim="nvim" -alias sudo="doas " +alias sudo="sudo " up() { curl -F "file=@$*" https://0x0.st | xclip -selection clipboard diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc index 4cf3972..a016753 100644 --- a/dunst/.config/dunst/dunstrc +++ b/dunst/.config/dunst/dunstrc @@ -27,8 +27,8 @@ idle_threshold = 120 # Font and typography settings - icon_path = /usr/share/icons/Adwaita/48x48/status/:/usr/share/icons/Adwaita/48x48/devices/:/usr/share/icons/Adwaita/48x48/apps - font = Hermit 10 + icon_path = /home/x/.icons/Blue-Maia/status/:/home/x/.icons/Blue-Maia/status/devices/:/home/x/.icons/Blue-Maia/status/apps + font = JetBrains Mono Nerd Font Mono 10 alignment = center show_age_threshold = 60 ellipsize = middle diff --git a/git/.gitconfig b/git/.gitconfig index 6f18776..3a0436d 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -1,3 +1,3 @@ [user] - email = shubham6405@pm.me + email = pryr@pryr.xyz name = Shubham Saini diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim index d071c83..26e74cf 100644 --- a/nvim/.config/nvim/init.vim +++ b/nvim/.config/nvim/init.vim @@ -5,7 +5,6 @@ Plug 'Shougo/deoplete-clangx' Plug 'deoplete-plugins/deoplete-jedi' Plug 'Shougo/deol.nvim' Plug 'ap/vim-css-color' -Plug 'luochen1990/rainbow' Plug 'tpope/vim-eunuch' Plug 'tpope/vim-commentary' Plug 'scrooloose/nerdtree' @@ -20,7 +19,7 @@ call plug#end() set guicursor= set number relativenumber set mouse=a -set background=dark +set background=light syntax enable set cursorline set ignorecase @@ -35,7 +34,7 @@ set shiftwidth=4 " number of spaces to use for autoindent set expandtab " tabs are space set autoindent set copyindent " copy indent from the previous line -colorscheme bloodbath +colorscheme pencil "hi Normal ctermbg=16 guibg=#000000 "hi LineNr ctermbg=16 guibg=#000000 @@ -56,9 +55,6 @@ let g:gitgutter_sign_removed = '-' let g:gitgutter_sign_removed_first_line = '^' let g:gitgutter_sign_modified_removed = '#' -" rainbow -let g:rainbow_active = 1 - " vim-markdown let g:vim_markdown_no_default_key_mappings=1 let g:vim_markdown_toml_frontmatter=1 @@ -92,6 +88,12 @@ hi Comment cterm=italic scriptencoding utf-8 " statusline +hi PrimaryBlock ctermbg=NONE ctermfg=8 +hi ModeBlock ctermbg=NONE ctermfg=2 +hi SecondaryBlock ctermbg=NONE ctermfg=8 +hi TeritaryBlock ctermbg=NONE ctermfg=9 +hi Blanks ctermbg=NONE +hi statusline ctermbg=NONE let g:currentmode={ \ 'n' : 'NORMAL ', \ 'no' : 'N·OPERATOR PENDING ', @@ -112,114 +114,15 @@ let g:currentmode={ \ 'r?' : 'CONFIRM ', \ '!' : 'SHELL ', \ 't' : 'TERMINAL '} - -hi PrimaryBlock ctermfg=00 ctermbg=6 -hi SecondaryBlock ctermfg=07 ctermbg=10 -hi Blanks ctermfg=00 ctermbg=11 - -hi User1 ctermfg=01 ctermbg=0 -hi User2 ctermfg=02 ctermbg=0 -hi User3 ctermfg=03 ctermbg=0 -hi User4 ctermfg=04 ctermbg=0 -hi User5 ctermfg=05 ctermbg=0 -hi User6 ctermfg=06 ctermbg=0 -hi User7 ctermfg=07 ctermbg=0 -hi User8 ctermfg=08 ctermbg=0 -hi User9 ctermfg=09 ctermbg=0 - -highlight EndOfBuffer ctermfg=black ctermbg=black - -function! GitBranch() - return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") -endfunction - -function! StatuslineGit() - let l:branchname = GitBranch() - return strlen(l:branchname) > 0?'* '.l:branchname.' ':'' -endfunction - -function! ReadOnly() abort - if !&modifiable && &readonly - return ' RO' - elseif &modifiable && &readonly - return 'RO' - elseif !&modifiable && !&readonly - return '' - else - return '' - endif -endfunction - -function! Filepath() abort - let l:basename = expand('%:h') - let l:filename = expand('%:t') - let l:extension = expand('%:e') - let l:prefix = (l:basename ==# '' || l:basename ==# '.') ? - \ '' : substitute(l:basename . '/', '\C^' . $HOME, '~', '') - - if empty(l:prefix) && empty(l:filename) - return printf('%%8*%%f%%*%s %%m%%*', '%8*') - elseif empty(l:prefix) - return printf('%%8*%%f%%*%s %%m%%*', '%6*') - else - return printf('%%8*%s%%*%s%s%%*', l:prefix, &modified ? '%6*' : '%8*', l:filename) - endif -endfunction - -function! LinterStatus() abort - let info = get(b:, 'coc_diagnostic_info', {}) - if empty(info) | return '' | endif - let msgs = [] - if get(info, 'error', 0) - call add(msgs, printf('%%5*%s×%%*', info['error'])) - endif - if get(info, 'warning', 0) - call add(msgs, printf('%%3*%s!%%*', info['warning'])) - endif - return join(msgs, ' ') -endfunction - -function! StatusLine(mode) abort - let l:line='' - - " help or man pages - if &filetype ==# 'help' || &filetype ==# 'man' - let l:line.=' %#StatusLineNC# ['. &filetype .'] %f ' - return l:line - endif - - " active - if a:mode ==# 'active' - let l:line.='%7*%{StatuslineGit()}' - let l:line.='%<' - let l:line.=Filepath() - - let l:line.='%5*' - let l:line.=' %{ReadOnly()} %w%*' - let l:line.='%9* %=%*' - - let l:line.='%7* %l,%c %*' - let l:line.='%8* %{g:currentmode[mode()]}%*' - let l:line.=' ' - let l:line.=LinterStatus() - let l:line.=' ' - let l:line.='%8*'. &filetype - - else - " inactive - let l:line.='%#Blanks#' - let l:line.='%f %5*%m%*' - let l:line.='%#Blanks# %=%*' - endif - - let l:line.='%*' - - return l:line -endfunction - -set statusline=%!StatusLine('active') -augroup MyStatusLine - autocmd! - autocmd WinEnter * setl statusline=%!StatusLine('active') - autocmd WinLeave * setl statusline=%!StatusLine('inactive') -augroup END +set statusline= +set statusline+=%#ModeBlock# +set statusline+=\ %{g:currentmode[mode()]} +set statusline+=%#TeritaryBlock# +set statusline+=\ %f\ +set statusline+=%M\ +set statusline+=%#Blanks# +set statusline+=%= +set statusline+=%#PrimaryBlock# +set statusline+=\ %Y\ +set statusline+=%#SecondaryBlock# +set statusline+=\ %P\ diff --git a/picom/.config/picom.conf b/picom/.config/picom.conf index 8d5a0f9..319bbfa 100644 --- a/picom/.config/picom.conf +++ b/picom/.config/picom.conf @@ -1,8 +1,8 @@ ## SHADOWS -shadow = true; -shadow-radius = 25; -shadow-offset-x = -15; -shadow-offset-y = -15; +shadow = false; +shadow-radius = 15; +shadow-offset-x = -12; +shadow-offset-y = -12; shadow-exclude = [ "name = 'Notification'", "class_g ?= 'Notify-osd'", diff --git a/spectrwm/.config/spectrwm/spectrwm.conf b/spectrwm/.config/spectrwm/spectrwm.conf index b4716e3..0b46597 100644 --- a/spectrwm/.config/spectrwm/spectrwm.conf +++ b/spectrwm/.config/spectrwm/spectrwm.conf @@ -13,10 +13,10 @@ warp_focus = 1 warp_pointer = 1 # Window Decoration -border_width = 0 -color_focus = red -color_focus_maximized = yellow -color_unfocus = rgb:88/88/88 +border_width = 3 +color_focus = rgb:88/88/88 +color_focus_maximized = rgb:f3/f4/f5 +color_unfocus = rgb:f3/f4/f5 color_unfocus_maximized = rgb:88/88/00 region_padding = 10 tile_gap = 10 @@ -34,11 +34,11 @@ bar_enabled = 1 bar_border_width = 0 bar_border[1] = rgb:00/80/80 bar_border_unfocus[1] = rgb:00/40/40 -bar_color[1] = rgb:00/00/00 -bar_color_selected[1] = rgb:00/80/80 -bar_font_color[1] = rgb:ee/ff/ff, rgb:78/78/78 -bar_font_color_selected = black -bar_font = Hermit:pixelsize=12.5:antialias=true:autohint=true:autohint=true:lcdfilter=lcddefault:rgba=rgb +bar_color[1] = rgb:f3/f4/f5 +bar_color_selected[1] = rgb:62/68/68 +bar_font_color[1] = rgb:2f/2f/2f, rgb:78/78/78 +bar_font_color_selected = rgb:ff/ff/ff +bar_font = JetBrains Mono Nerd Font Mono:style=medium:pixelsize=12.5:antialias=true:autohint=true:lcdfilter=lcddefault:rgba=rgb bar_action = ~/.config/spectrwm/statusbar bar_action_expand = 1 bar_justify = left @@ -66,12 +66,7 @@ urgent_enabled = 1 # region = screen[1]:1280x1024+1280+0 # Launch applications in a workspace of choice -autorun = ws[1]:~/.fehbg -autorun = ws[1]:~/bin/stst -autorun = ws[1]:~/bin/pica -autorun = ws[2]:~/bin/fireff -autorun = ws[1]:~/bin/xss -autorun = ws[1]:~/.local/bin/bat_check.sh +autorun = ws[2]:chromium # Customize workspace layout at start # layout = ws[1]:4:0:0:0:vertical @@ -83,8 +78,8 @@ autorun = ws[1]:~/.local/bin/bat_check.sh # Set workspace name at start name = ws[1]:term name = ws[2]:web -name = ws[3]:music -name = ws[4]:file +name = ws[3]:social +name = ws[4]:music name = ws[5]:code name = ws[6]:virt name = ws[7]:game @@ -101,21 +96,21 @@ keyboard_mapping = ~/.config/spectrwm/keybindings.conf # Validated default programs: program[lock] = xset s activate -program[term] = ~/bin/stst -program[menu] = ~/bin/menu -program[bup] = doas bash -c 'for f in /sys/class/backlight/*; do echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness; done' -program[bdown] = doas bash -c 'for f in /sys/class/backlight/*; do echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness; done' +program[term] = urxvtc +#program[menu] = dmenu_run +program[bup] = sudo /home/x/bin/light u +program[bdown] = sudo /home/x/bin/light d program[soundinc] = pulsemixer --change-volume +5 program[sounddec] = pulsemixer --change-volume -5 program[soundmute] = pulsemixer --toggle-mute -program[shut] = ~/.local/bin/shut +#program[shut] = ~/.local/bin/shut program[pnext] = cmus-remote -n program[pprev] = cmus-remote -r program[pplay] = cmus-remote -u -program[notes] = st -e nvim /home/x/.cache/bujo/todo.md -program[files] = st -e ranger -program[pass] = passmenu -# program[search] = dmenu $dmenu_bottom -i -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected +program[notes] = urxvtc -e nvim /home/x/.cache/bujo/todo.md +program[files] = urxvtc -e ranger +program[pass] = passmenu -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected +program[menu] = dmenu_run $dmenu_bottom -i -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected # program[name_workspace] = dmenu $dmenu_bottom -p Workspace -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_color_selected -sf $bar_font_color_selected # To disable validation of the above, free the respective binding(s): @@ -127,7 +122,7 @@ bind[bdown] = XF86MonBrightnessDown bind[soundinc] = XF86AudioRaiseVolume bind[sounddec] = XF86AudioLowerVolume bind[soundmute] = XF86AudioMute -bind[shut] = MOD+x +#bind[shut] = MOD+x bind[pnext] = XF86AudioNext bind[pprev] = XF86AudioPrev bind[pplay] = XF86AudioPlay diff --git a/x/.Xresources b/x/.Xresources index 2985bba..a03b684 100644 --- a/x/.Xresources +++ b/x/.Xresources @@ -1,60 +1,49 @@ -! ------------------------------------------------------------------------------ -! Colors -! ------------------------------------------------------------------------------ -! -!------------------------------------------------------------------------------ +! special +*.foreground: #2f2f2f +*.background: #f3f4f5 +*.cursorColor: #565e65 -#define base00 #000000 -#define base01 #303030 -#define base02 #353535 -#define base03 #4A4A4A -#define base04 #787878 -#define base05 #EEFFFF -#define base06 #EEFFFF -#define base07 #FFFFFF -#define base08 #F07178 -#define base09 #F78C6C -#define base0A #00fdb4 -#define base0B #13CA91 -#define base0C #79ffe1 -#define base0D #7898FB -#define base0E #ff3299 -#define base0F #FF5370 +! black +*.color0: #1c2023 +*.color8: #747c84 -! URxvt -! ------------------------------------------------------------------------------ +! red +*.color1: #c7ae95 +*.color9: #c7ae95 -*foreground: base05 -*background: base00 -*cursorColor: base05 +! green +*.color2: #95c7ae +*.color10: #95c7ae -*color0: base00 -*color1: base08 -*color2: base0B -*color3: base0A -*color4: base0D -*color5: base0E -*color6: base0C -*color7: base05 +! yellow +*.color3: #aec795 +*.color11: #aec795 -*color8: base03 -*color9: base09 -*color10: base01 -*color11: base02 -*color12: base04 -*color13: base06 -*color14: base0F -*color15: base07 +! blue +*.color4: #ae95c7 +*.color12: #ae95c7 + +! magenta +*.color5: #c795ae +*.color13: #c795ae + +! cyan +*.color6: #95aec7 +*.color14: #95aec7 + +! white +*.color7: #c7ccd1 +*.color15: #f3f4f5 URxvt.cursorBlink : 1 -URxvt.font :xft:Input Mono:pixelsize=12.5:style=Regular \ +URxvt.font :xft:JetBrainsMono Nerd Font Mono:pixelsize=12.5:style=Regular \ xft:DejaVu Sans Mono:size=12.5:style=Medium -URxvt.italicFont :xft:Input Mono:pixelsize=12.5:style=Italic -URxvt.boldFont :xft:Input Mono:pixelsize=12.5:style=Bold +URxvt.italicFont :xft:JetBrainsMono Nerd Font Mono:pixelsize=12.5:style=Italic +URxvt.boldFont :xft:JetBrainsMono Nerd Font Mono:pixelsize=12.5:style=Bold URxvt.lineSpace : 0 -URxvt.letterSpace : -1 +URxvt.letterSpace : 0 URxvt.scrollBar : false URxvt.internalBorder : 25 URxvt.cursorUnderline : false @@ -65,12 +54,11 @@ URxvt.intensityStyles : false URxvt.perl-ext-common : default,matcher -URxvt.url-launcher : firefox-bin +URxvt.url-launcher : chromium URxvt.matcher.button : 1 -Xft.autohint: 1 -Xft.antialias: 1 +Xft.autohint: true +Xft.antialias: true Xft.lcdfilter: lcddefault -Xft.hinting: true Xft.rgba: rgb Xft.dpi: 96 diff --git a/x/.xinitrc b/x/.xinitrc index 97028bf..f490477 100644 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -1,5 +1,15 @@ #!/bin/bash #.xinitrc +/usr/bin/prime-offload & +xrdb -merge ~/.Xresources & +xss-lock -- slock & xset b off & -xset s 600 & -exec dbus-launch --exit-with-session spectrwm +xset s 300 & +# xrandr --setprovideroutputsource modesetting NVIDIA-0 +# xrandr --auto +~/.fehbg & +urxvtd & +~/.local/bin/bat_check.sh & +picom & +dunst & +exec spectrwm diff --git a/zsh/.zshrc b/zsh/.zshrc index eb0636d..34f59ae 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -11,32 +11,7 @@ export BROWSER=firefox export PATH=$PATH:$HOME/.local/bin:$HOME/bin export XDG_CURRENT_DESKTOP=spectrwm -setopt autocd extendedglob nomatch globdots correctall -unsetopt beep -bindkey -v - -# completions -zstyle :compinstall filename '/home/x/.zshrc' -autoload -U colors && colors -autoload -Uz compinit && compinit -zstyle ':completion:*' menu select -zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' -#zstyle ':completion:*:descriptions' format '%U%B%d%b%u' -#zstyle ':completion:*:warnings' format '%BSorry, no matches for: %d%b' - -# sources -source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh - -# prompt -PROMPT=$'\n'"%B%F{240}%m "$'\n'"%(?.%F{248}▲.%F{red}?%?)%f " -git_branch() { - git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' -} -setopt PROMPT_SUBST -RPROMPT='%9c%{%F{green}%}$(git_branch)%{%F{none}%} $ ' - -# aliases +#aliases alias ls='ls --color=auto' alias ll='ls --color=auto -al' alias key="vim $HOME/.config/spectrwm/keybindings.conf" @@ -52,7 +27,6 @@ alias vimrc="vim $HOME/.config/nvim/init.vim" alias v="nvim" alias vim="nvim" alias sudo="sudo " -alias parrot="VBoxManage startvm Parrot" up() { curl -F "file=@$*" https://0x0.st | xclip -selection clipboard @@ -62,3 +36,53 @@ dict() { curl dict://dict.org/d:$* } +# Enable colors and change prompt: +autoload -U colors && colors +fpath+=$HOME/.zsh/pure +autoload -U promptinit; promptinit +prompt pure +PURE_PROMPT_SYMBOL=$ +#PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " + +# Basic auto/tab complete: +autoload -U compinit +zstyle ':completion:*' menu select +zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' +zmodload zsh/complist +compinit +_comp_options+=(globdots) # Include hidden files. + +# vi mode +bindkey -v +export KEYTIMEOUT=1 + +# Use vim keys in tab complete menu: +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect 'j' vi-down-line-or-history +bindkey -v '^?' backward-delete-char + +# Change cursor shape for different vi modes. +function zle-keymap-select { + if [[ ${KEYMAP} == vicmd ]] || + [[ $1 = 'block' ]]; then + echo -ne '\e[1 q' + elif [[ ${KEYMAP} == main ]] || + [[ ${KEYMAP} == viins ]] || + [[ ${KEYMAP} = '' ]] || + [[ $1 = 'beam' ]]; then + echo -ne '\e[5 q' + fi +} +zle -N zle-keymap-select +zle-line-init() { + zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere) + echo -ne "\e[5 q" +} +zle -N zle-line-init +echo -ne '\e[5 q' # Use beam shape cursor on startup. +preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt. + +# Load zsh-syntax-highlighting; should be last. +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null -- cgit v1.2.3