summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShubham Saini <shubham6405@pm.me>2020-07-04 04:42:52 +0000
committerShubham Saini <shubham6405@pm.me>2020-07-04 04:42:52 +0000
commitbbbdafee9c0688cb9b22dc15ba9e1eef18c1045f (patch)
tree5d623a7b7bc54834a7edb7992ec3f4c5fe4002ae
parent93be688cb37fc2496efbd3d2113d4dcbe9fcec75 (diff)
re tux
-rw-r--r--bash/.bashrc5
-rwxr-xr-xbin/.local/bin/fetch76
-rw-r--r--nvim/.config/nvim/init.vim62
-rw-r--r--spectrwm/.config/spectrwm/spectrwm.conf4
-rw-r--r--tmux/.tmux.conf90
5 files changed, 54 insertions, 183 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index 4f6c961..3e0bccb 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -33,7 +33,6 @@ alias f="ranger"
33alias weather="curl wttr.in" 33alias weather="curl wttr.in"
34alias py="/usr/bin/python" 34alias py="/usr/bin/python"
35alias pg="ping google.com" 35alias pg="ping google.com"
36alias pubip="curl ipinfo.io/ip"
37alias m="cmus" 36alias m="cmus"
38alias vimrc="vim $HOME/.config/nvim/init.vim" 37alias vimrc="vim $HOME/.config/nvim/init.vim"
39alias v="nvim" 38alias v="nvim"
@@ -48,6 +47,10 @@ dict() {
48 curl dict://dict.org/d:$* | less 47 curl dict://dict.org/d:$* | less
49} 48}
50 49
50sip() {
51 curl https://ipinfo.io/$*
52}
53
51# prompt 54# prompt
52red="\e[31m" 55red="\e[31m"
53green="\e[32m" 56green="\e[32m"
diff --git a/bin/.local/bin/fetch b/bin/.local/bin/fetch
deleted file mode 100755
index 05cb71e..0000000
--- a/bin/.local/bin/fetch
+++ /dev/null
@@ -1,76 +0,0 @@
1#!/bin/sh
2#
3# ufetch-void - tiny system info for void
4
5## INFO
6
7# user is already defined
8host="$(hostname)"
9os='Void Linux'
10kernel="$(uname -sr)"
11uptime="$(uptime -p | sed 's/up //')"
12packages="$(xbps-query -l | wc -l)"
13shell="$(basename "$SHELL")"
14
15## UI DETECTION
16
17if [ -n "${DE}" ]; then
18 ui="${DE}"
19 uitype='DE'
20elif [ -n "${WM}" ]; then
21 ui="${WM}"
22 uitype='WM'
23elif [ -n "${XDG_CURRENT_DESKTOP}" ]; then
24 ui="${XDG_CURRENT_DESKTOP}"
25 uitype='DE'
26elif [ -n "${DESKTOP_SESSION}" ]; then
27 ui="${DESKTOP_SESSION}"
28 uitype='DE'
29elif [ -f "${HOME}/.xinitrc" ]; then
30 ui="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)"
31 uitype='WM'
32elif [ -f "${HOME}/.xsession" ]; then
33 ui="$(tail -n 1 "${HOME}/.xsession" | cut -d ' ' -f 2)"
34 uitype='WM'
35else
36 ui='unknown'
37 uitype='UI'
38fi
39
40## DEFINE COLORS
41
42# probably don't change these
43if [ -x "$(command -v tput)" ]; then
44 bold="$(tput bold)"
45 black="$(tput setaf 0)"
46 red="$(tput setaf 1)"
47 green="$(tput setaf 2)"
48 yellow="$(tput setaf 3)"
49 blue="$(tput setaf 4)"
50 magenta="$(tput setaf 5)"
51 cyan="$(tput setaf 6)"
52 white="$(tput setaf 7)"
53 reset="$(tput sgr0)"
54fi
55
56# you can change these
57lc="${reset}${bold}${green}" # labels
58nc="${reset}${bold}${green}" # user and hostname
59ic="${reset}" # info
60c0="${reset}${bold}${green}" # first color
61c1="${reset}${green}" # second color
62
63## OUTPUT
64
65cat <<EOF
66
67${c0} _______ ${nc}${USER}${ic}@${nc}${host}${reset}
68${c1} ${c0}\_____ \`- ${lc}OS: ${ic}${os}${reset}
69${c1} /\ ${c0}___ \`- \ ${lc}KERNEL: ${ic}${kernel}${reset}
70${c1} | | ${c0}/ \ | | ${lc}UPTIME: ${ic}${uptime}${reset}
71${c1} | | ${c0}\___/ | | ${lc}PACKAGES: ${ic}${packages}${reset}
72${c1} \ \`-_____ ${c0}\/ ${lc}SHELL: ${ic}${shell}${reset}
73${c1} \`-______\ ${lc}${uitype}: ${ic}${ui}${reset}
74
75EOF
76
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim
index e4fbcc5..d071c83 100644
--- a/nvim/.config/nvim/init.vim
+++ b/nvim/.config/nvim/init.vim
@@ -1,4 +1,4 @@
1"vimplug 1" vimplug
2call plug#begin() 2call plug#begin()
3Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } 3Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
4Plug 'Shougo/deoplete-clangx' 4Plug 'Shougo/deoplete-clangx'
@@ -16,11 +16,11 @@ Plug 'plasticboy/vim-markdown'
16Plug 'vuciv/vim-bujo' 16Plug 'vuciv/vim-bujo'
17call plug#end() 17call plug#end()
18 18
19"sets 19" sets
20set guicursor= 20set guicursor=
21set number relativenumber 21set number relativenumber
22set mouse=a 22set mouse=a
23"set background=dark 23set background=dark
24syntax enable 24syntax enable
25set cursorline 25set cursorline
26set ignorecase 26set ignorecase
@@ -39,6 +39,12 @@ colorscheme bloodbath
39"hi Normal ctermbg=16 guibg=#000000 39"hi Normal ctermbg=16 guibg=#000000
40"hi LineNr ctermbg=16 guibg=#000000 40"hi LineNr ctermbg=16 guibg=#000000
41 41
42" vim-bujo
43nmap <C-N> <Plug>BujoAddnormal
44imap <C-N> <Plug>BujoAddinsert
45nmap <C-P> <Plug>BujoChecknormal
46imap <C-P> <Plug>BujoCheckinsert
47
42" deoplete 48" deoplete
43let g:deoplete#enable_at_startup = 1 49let g:deoplete#enable_at_startup = 1
44 50
@@ -50,72 +56,42 @@ let g:gitgutter_sign_removed = '-'
50let g:gitgutter_sign_removed_first_line = '^' 56let g:gitgutter_sign_removed_first_line = '^'
51let g:gitgutter_sign_modified_removed = '#' 57let g:gitgutter_sign_modified_removed = '#'
52 58
53" markdown preview
54let g:mkdp_auto_start = 0
55let g:mkdp_auto_close = 1
56let g:mkdp_refresh_slow = 0
57let g:mkdp_command_for_global = 0
58let g:mkdp_open_to_the_world = 0
59let g:mkdp_open_ip = ''
60let g:mkdp_browser = 'firefox'
61let g:mkdp_echo_preview_url = 0
62let g:mkdp_browserfunc = ''
63let g:mkdp_preview_options = {
64 \ 'mkit': {},
65 \ 'katex': {},
66 \ 'uml': {},
67 \ 'maid': {},
68 \ 'disable_sync_scroll': 0,
69 \ 'sync_scroll_type': 'middle',
70 \ 'hide_yaml_meta': 1,
71 \ 'sequence_diagrams': {}
72 \ }
73let g:mkdp_markdown_css = ''
74let g:mkdp_highlight_css = ''
75let g:mkdp_port = ''
76let g:mkdp_page_title = '「${name}」'
77
78" rainbow 59" rainbow
79let g:rainbow_active = 1 60let g:rainbow_active = 1
80 61
81" vim-markdown 62" vim-markdown
82let g:vim_markdown_no_default_key_mappings=1 63let g:vim_markdown_no_default_key_mappings=1
83let g:vim_markdown_toml_frontmatter=1 64let g:vim_markdown_toml_frontmatter=1
84let g:vim_markdown_yaml_fromtmatter=1 65let g:vim_markdown_yaml_frontmatter=1
85let g:vim_markdown_folding_disabled=1 66let g:vim_markdown_folding_disabled=1
86 67let g:vim_markdown_conceal=0
87
88" keysound
89let g:keysound_enable = 1
90let g:keysound_volume = 1000
91let g:keysound_py_version = 3
92let g:keysound_theme = 'default'
93 68
94" nerdtree 69" nerdtree
95let g:NERDTreeWinPos = "right" 70let g:NERDTreeWinPos = "right"
96map <C-n> :NERDTreeToggle<CR> 71map <C-i> :NERDTreeToggle<CR>
97nnoremap <c-p> :FZF<CR>
98autocmd StdinReadPre * let s:std_in=1 72autocmd StdinReadPre * let s:std_in=1
99autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif 73autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
100autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif 74autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
101 75
102"insert centered 76" insert centered
103autocmd InsertEnter * norm zz 77autocmd InsertEnter * norm zz
104 78
105"shortcut split navigation 79" shortcut split navigation
106map <C-h> <C-w>h 80map <C-h> <C-w>h
107map <C-j> <C-w>j 81map <C-j> <C-w>j
108map <C-k> <C-w>k 82map <C-k> <C-w>k
109map <C-l> <C-w>l 83map <C-l> <C-w>l
110 84
111"replace all using S 85" replace all using S
112nnoremap S :%s//gI<Left><Left><Left> 86nnoremap S :%s//gI<Left><Left><Left>
113 87
114"statusbar 88" italic comments
89hi Comment cterm=italic
90
91" statusbar
115scriptencoding utf-8 92scriptencoding utf-8
116 93
117" statusline 94" statusline
118
119let g:currentmode={ 95let g:currentmode={
120 \ 'n' : 'NORMAL ', 96 \ 'n' : 'NORMAL ',
121 \ 'no' : 'N·OPERATOR PENDING ', 97 \ 'no' : 'N·OPERATOR PENDING ',
diff --git a/spectrwm/.config/spectrwm/spectrwm.conf b/spectrwm/.config/spectrwm/spectrwm.conf
index 5ccdd54..b4716e3 100644
--- a/spectrwm/.config/spectrwm/spectrwm.conf
+++ b/spectrwm/.config/spectrwm/spectrwm.conf
@@ -112,8 +112,9 @@ program[shut] = ~/.local/bin/shut
112program[pnext] = cmus-remote -n 112program[pnext] = cmus-remote -n
113program[pprev] = cmus-remote -r 113program[pprev] = cmus-remote -r
114program[pplay] = cmus-remote -u 114program[pplay] = cmus-remote -u
115program[notes] = st -e nvim /home/x/todo 115program[notes] = st -e nvim /home/x/.cache/bujo/todo.md
116program[files] = st -e ranger 116program[files] = st -e ranger
117program[pass] = passmenu
117# 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 118# 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
118# 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 119# 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
119 120
@@ -132,6 +133,7 @@ bind[pprev] = XF86AudioPrev
132bind[pplay] = XF86AudioPlay 133bind[pplay] = XF86AudioPlay
133bind[notes] = MOD+n 134bind[notes] = MOD+n
134bind[files] = MOD+Shift+f 135bind[files] = MOD+Shift+f
136bind[pass] = MOD+Shift+p
135 137
136# Optional default programs that will only be validated if you override: 138# Optional default programs that will only be validated if you override:
137program[screenshot_all] = ~/.local/bin/screenshot full # optional 139program[screenshot_all] = ~/.local/bin/screenshot full # optional
diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf
index fadd29e..f2c781a 100644
--- a/tmux/.tmux.conf
+++ b/tmux/.tmux.conf
@@ -1,77 +1,43 @@
1set-option -g allow-rename off 1set -g prefix C-a
2 2unbind-key C-b
3# remap prefix from 'C-b' to 'C-a'
4unbind C-b
5set-option -g prefix C-a
6bind-key C-a send-prefix 3bind-key C-a send-prefix
7 4
8# reload config file (change file location to your the tmux.conf you want to use) 5# start with window 1 (instead of 0)
9bind r source-file ~/.tmux.conf \; display-message "config reloaded!" 6set -g base-index 1
10 7
11# switch panes using Alt-arrow without prefix 8# start with pane 1
12bind -n M-Left select-pane -L 9set -g pane-base-index 1
13bind -n M-Right select-pane -R
14bind -n M-Up select-pane -U
15bind -n M-Down select-pane -D
16 10
17# also can use vim like movement hjkl pane traversal 11# history
18bind -n M-h select-pane -L 12set -g history-limit 4096
19bind -n M-j select-pane -D
20bind -n M-k select-pane -U
21bind -n M-l select-pane -R
22 13
23# in case want to use mouse 14# mouse
24set -g mouse on 15set -g mouse on
25 16
26#setw -g monitor-activity on 17# allow terminal scrolling
27#set -g visual-activity on 18set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'
28
29######################
30### DESIGN CHANGES ###
31######################
32 19
33## Status bar design 20# resizing
34# status line 21setw -g aggressive-resize on
35set -g status-justify left
36set -g status-bg default
37set -g status-fg colour12
38set -g status-interval 2
39 22
40# window status 23# window status
41setw -g window-status-format " #F#I:#W#F " 24set-option -g status-position bottom
42setw -g window-status-current-format " #F#I:#W#F " 25set -g status-bg default
43setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
44setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
45
46# Info on left (I don't have a session display for now)
47set -g status-left ''
48
49# loud or quiet?
50set-option -g visual-activity off
51set-option -g visual-bell off
52set-option -g visual-silence off
53set-window-option -g monitor-activity off
54set-option -g bell-action none
55
56set -g default-terminal "screen-256color"
57
58# The modes {
59setw -g clock-mode-colour colour135
60 26
61# } 27# info on right (no session display)
62# The statusbar { 28set-option -g status-right ""
29set-option -g status-left ""
63 30
64set -g status-position bottom 31# toggle status bar visibility
65set -g status-bg colour234 32bind t set status
66set -g status-fg colour137
67#set -g status-left '#[fg=green]#($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --colors --powerline-right --interval 2)#[default]'
68set -g status-left ''
69set -g status-right '#[fg=colour233,bg=colour238] #{battery_icon} #{battery_percentage} #[fg=colour233,bg=colour241] online #{online_status} #[fg=colour233,bg=colour244] #{cpu_icon}#{cpu_percentage} #[fg=colour233,bg=colour247,bold] %a %d/%h #[fg=colour233,bg=colour250,bold] %H:%M:%S '
70set -g status-right-length 50
71set -g status-left-length 50
72 33
73set-option -g @cpu_icon "💪" 34# navigate throught windows
35bind-key -n S-Left previous-window
36bind-key -n S-Right next-window
74 37
75setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' 38# colors
39setw -g window-status-format "#[fg=colour8]#W "
40setw -g window-status-current-format "#[fg=colour6]#W "
41# set -g pane-border-fg colour0
42# set -g pane-active-border-fg colour0
76 43
77setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '