diff options
author | Shubham Saini <shubham6405@pm.me> | 2020-07-04 04:42:52 +0000 |
---|---|---|
committer | Shubham Saini <shubham6405@pm.me> | 2020-07-04 04:42:52 +0000 |
commit | bbbdafee9c0688cb9b22dc15ba9e1eef18c1045f (patch) | |
tree | 5d623a7b7bc54834a7edb7992ec3f4c5fe4002ae | |
parent | 93be688cb37fc2496efbd3d2113d4dcbe9fcec75 (diff) |
re tux
-rw-r--r-- | bash/.bashrc | 5 | ||||
-rwxr-xr-x | bin/.local/bin/fetch | 76 | ||||
-rw-r--r-- | nvim/.config/nvim/init.vim | 62 | ||||
-rw-r--r-- | spectrwm/.config/spectrwm/spectrwm.conf | 4 | ||||
-rw-r--r-- | tmux/.tmux.conf | 90 |
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" | |||
33 | alias weather="curl wttr.in" | 33 | alias weather="curl wttr.in" |
34 | alias py="/usr/bin/python" | 34 | alias py="/usr/bin/python" |
35 | alias pg="ping google.com" | 35 | alias pg="ping google.com" |
36 | alias pubip="curl ipinfo.io/ip" | ||
37 | alias m="cmus" | 36 | alias m="cmus" |
38 | alias vimrc="vim $HOME/.config/nvim/init.vim" | 37 | alias vimrc="vim $HOME/.config/nvim/init.vim" |
39 | alias v="nvim" | 38 | alias 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 | ||
50 | sip() { | ||
51 | curl https://ipinfo.io/$* | ||
52 | } | ||
53 | |||
51 | # prompt | 54 | # prompt |
52 | red="\e[31m" | 55 | red="\e[31m" |
53 | green="\e[32m" | 56 | green="\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 | ||
8 | host="$(hostname)" | ||
9 | os='Void Linux' | ||
10 | kernel="$(uname -sr)" | ||
11 | uptime="$(uptime -p | sed 's/up //')" | ||
12 | packages="$(xbps-query -l | wc -l)" | ||
13 | shell="$(basename "$SHELL")" | ||
14 | |||
15 | ## UI DETECTION | ||
16 | |||
17 | if [ -n "${DE}" ]; then | ||
18 | ui="${DE}" | ||
19 | uitype='DE' | ||
20 | elif [ -n "${WM}" ]; then | ||
21 | ui="${WM}" | ||
22 | uitype='WM' | ||
23 | elif [ -n "${XDG_CURRENT_DESKTOP}" ]; then | ||
24 | ui="${XDG_CURRENT_DESKTOP}" | ||
25 | uitype='DE' | ||
26 | elif [ -n "${DESKTOP_SESSION}" ]; then | ||
27 | ui="${DESKTOP_SESSION}" | ||
28 | uitype='DE' | ||
29 | elif [ -f "${HOME}/.xinitrc" ]; then | ||
30 | ui="$(tail -n 1 "${HOME}/.xinitrc" | cut -d ' ' -f 2)" | ||
31 | uitype='WM' | ||
32 | elif [ -f "${HOME}/.xsession" ]; then | ||
33 | ui="$(tail -n 1 "${HOME}/.xsession" | cut -d ' ' -f 2)" | ||
34 | uitype='WM' | ||
35 | else | ||
36 | ui='unknown' | ||
37 | uitype='UI' | ||
38 | fi | ||
39 | |||
40 | ## DEFINE COLORS | ||
41 | |||
42 | # probably don't change these | ||
43 | if [ -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)" | ||
54 | fi | ||
55 | |||
56 | # you can change these | ||
57 | lc="${reset}${bold}${green}" # labels | ||
58 | nc="${reset}${bold}${green}" # user and hostname | ||
59 | ic="${reset}" # info | ||
60 | c0="${reset}${bold}${green}" # first color | ||
61 | c1="${reset}${green}" # second color | ||
62 | |||
63 | ## OUTPUT | ||
64 | |||
65 | cat <<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 | |||
75 | EOF | ||
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 |
2 | call plug#begin() | 2 | call plug#begin() |
3 | Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | 3 | Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } |
4 | Plug 'Shougo/deoplete-clangx' | 4 | Plug 'Shougo/deoplete-clangx' |
@@ -16,11 +16,11 @@ Plug 'plasticboy/vim-markdown' | |||
16 | Plug 'vuciv/vim-bujo' | 16 | Plug 'vuciv/vim-bujo' |
17 | call plug#end() | 17 | call plug#end() |
18 | 18 | ||
19 | "sets | 19 | " sets |
20 | set guicursor= | 20 | set guicursor= |
21 | set number relativenumber | 21 | set number relativenumber |
22 | set mouse=a | 22 | set mouse=a |
23 | "set background=dark | 23 | set background=dark |
24 | syntax enable | 24 | syntax enable |
25 | set cursorline | 25 | set cursorline |
26 | set ignorecase | 26 | set 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 | ||
43 | nmap <C-N> <Plug>BujoAddnormal | ||
44 | imap <C-N> <Plug>BujoAddinsert | ||
45 | nmap <C-P> <Plug>BujoChecknormal | ||
46 | imap <C-P> <Plug>BujoCheckinsert | ||
47 | |||
42 | " deoplete | 48 | " deoplete |
43 | let g:deoplete#enable_at_startup = 1 | 49 | let g:deoplete#enable_at_startup = 1 |
44 | 50 | ||
@@ -50,72 +56,42 @@ let g:gitgutter_sign_removed = '-' | |||
50 | let g:gitgutter_sign_removed_first_line = '^' | 56 | let g:gitgutter_sign_removed_first_line = '^' |
51 | let g:gitgutter_sign_modified_removed = '#' | 57 | let g:gitgutter_sign_modified_removed = '#' |
52 | 58 | ||
53 | " markdown preview | ||
54 | let g:mkdp_auto_start = 0 | ||
55 | let g:mkdp_auto_close = 1 | ||
56 | let g:mkdp_refresh_slow = 0 | ||
57 | let g:mkdp_command_for_global = 0 | ||
58 | let g:mkdp_open_to_the_world = 0 | ||
59 | let g:mkdp_open_ip = '' | ||
60 | let g:mkdp_browser = 'firefox' | ||
61 | let g:mkdp_echo_preview_url = 0 | ||
62 | let g:mkdp_browserfunc = '' | ||
63 | let 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 | \ } | ||
73 | let g:mkdp_markdown_css = '' | ||
74 | let g:mkdp_highlight_css = '' | ||
75 | let g:mkdp_port = '' | ||
76 | let g:mkdp_page_title = '「${name}」' | ||
77 | |||
78 | " rainbow | 59 | " rainbow |
79 | let g:rainbow_active = 1 | 60 | let g:rainbow_active = 1 |
80 | 61 | ||
81 | " vim-markdown | 62 | " vim-markdown |
82 | let g:vim_markdown_no_default_key_mappings=1 | 63 | let g:vim_markdown_no_default_key_mappings=1 |
83 | let g:vim_markdown_toml_frontmatter=1 | 64 | let g:vim_markdown_toml_frontmatter=1 |
84 | let g:vim_markdown_yaml_fromtmatter=1 | 65 | let g:vim_markdown_yaml_frontmatter=1 |
85 | let g:vim_markdown_folding_disabled=1 | 66 | let g:vim_markdown_folding_disabled=1 |
86 | 67 | let g:vim_markdown_conceal=0 | |
87 | |||
88 | " keysound | ||
89 | let g:keysound_enable = 1 | ||
90 | let g:keysound_volume = 1000 | ||
91 | let g:keysound_py_version = 3 | ||
92 | let g:keysound_theme = 'default' | ||
93 | 68 | ||
94 | " nerdtree | 69 | " nerdtree |
95 | let g:NERDTreeWinPos = "right" | 70 | let g:NERDTreeWinPos = "right" |
96 | map <C-n> :NERDTreeToggle<CR> | 71 | map <C-i> :NERDTreeToggle<CR> |
97 | nnoremap <c-p> :FZF<CR> | ||
98 | autocmd StdinReadPre * let s:std_in=1 | 72 | autocmd StdinReadPre * let s:std_in=1 |
99 | autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | 73 | autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif |
100 | autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | 74 | autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif |
101 | 75 | ||
102 | "insert centered | 76 | " insert centered |
103 | autocmd InsertEnter * norm zz | 77 | autocmd InsertEnter * norm zz |
104 | 78 | ||
105 | "shortcut split navigation | 79 | " shortcut split navigation |
106 | map <C-h> <C-w>h | 80 | map <C-h> <C-w>h |
107 | map <C-j> <C-w>j | 81 | map <C-j> <C-w>j |
108 | map <C-k> <C-w>k | 82 | map <C-k> <C-w>k |
109 | map <C-l> <C-w>l | 83 | map <C-l> <C-w>l |
110 | 84 | ||
111 | "replace all using S | 85 | " replace all using S |
112 | nnoremap S :%s//gI<Left><Left><Left> | 86 | nnoremap S :%s//gI<Left><Left><Left> |
113 | 87 | ||
114 | "statusbar | 88 | " italic comments |
89 | hi Comment cterm=italic | ||
90 | |||
91 | " statusbar | ||
115 | scriptencoding utf-8 | 92 | scriptencoding utf-8 |
116 | 93 | ||
117 | " statusline | 94 | " statusline |
118 | |||
119 | let g:currentmode={ | 95 | let 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 | |||
112 | program[pnext] = cmus-remote -n | 112 | program[pnext] = cmus-remote -n |
113 | program[pprev] = cmus-remote -r | 113 | program[pprev] = cmus-remote -r |
114 | program[pplay] = cmus-remote -u | 114 | program[pplay] = cmus-remote -u |
115 | program[notes] = st -e nvim /home/x/todo | 115 | program[notes] = st -e nvim /home/x/.cache/bujo/todo.md |
116 | program[files] = st -e ranger | 116 | program[files] = st -e ranger |
117 | program[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 | |||
132 | bind[pplay] = XF86AudioPlay | 133 | bind[pplay] = XF86AudioPlay |
133 | bind[notes] = MOD+n | 134 | bind[notes] = MOD+n |
134 | bind[files] = MOD+Shift+f | 135 | bind[files] = MOD+Shift+f |
136 | bind[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: |
137 | program[screenshot_all] = ~/.local/bin/screenshot full # optional | 139 | program[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 @@ | |||
1 | set-option -g allow-rename off | 1 | set -g prefix C-a |
2 | 2 | unbind-key C-b | |
3 | # remap prefix from 'C-b' to 'C-a' | ||
4 | unbind C-b | ||
5 | set-option -g prefix C-a | ||
6 | bind-key C-a send-prefix | 3 | bind-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) |
9 | bind r source-file ~/.tmux.conf \; display-message "config reloaded!" | 6 | set -g base-index 1 |
10 | 7 | ||
11 | # switch panes using Alt-arrow without prefix | 8 | # start with pane 1 |
12 | bind -n M-Left select-pane -L | 9 | set -g pane-base-index 1 |
13 | bind -n M-Right select-pane -R | ||
14 | bind -n M-Up select-pane -U | ||
15 | bind -n M-Down select-pane -D | ||
16 | 10 | ||
17 | # also can use vim like movement hjkl pane traversal | 11 | # history |
18 | bind -n M-h select-pane -L | 12 | set -g history-limit 4096 |
19 | bind -n M-j select-pane -D | ||
20 | bind -n M-k select-pane -U | ||
21 | bind -n M-l select-pane -R | ||
22 | 13 | ||
23 | # in case want to use mouse | 14 | # mouse |
24 | set -g mouse on | 15 | set -g mouse on |
25 | 16 | ||
26 | #setw -g monitor-activity on | 17 | # allow terminal scrolling |
27 | #set -g visual-activity on | 18 | set-option -g terminal-overrides 'xterm*:smcup@:rmcup@' |
28 | |||
29 | ###################### | ||
30 | ### DESIGN CHANGES ### | ||
31 | ###################### | ||
32 | 19 | ||
33 | ## Status bar design | 20 | # resizing |
34 | # status line | 21 | setw -g aggressive-resize on |
35 | set -g status-justify left | ||
36 | set -g status-bg default | ||
37 | set -g status-fg colour12 | ||
38 | set -g status-interval 2 | ||
39 | 22 | ||
40 | # window status | 23 | # window status |
41 | setw -g window-status-format " #F#I:#W#F " | 24 | set-option -g status-position bottom |
42 | setw -g window-status-current-format " #F#I:#W#F " | 25 | set -g status-bg default |
43 | setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W " | ||
44 | setw -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) | ||
47 | set -g status-left '' | ||
48 | |||
49 | # loud or quiet? | ||
50 | set-option -g visual-activity off | ||
51 | set-option -g visual-bell off | ||
52 | set-option -g visual-silence off | ||
53 | set-window-option -g monitor-activity off | ||
54 | set-option -g bell-action none | ||
55 | |||
56 | set -g default-terminal "screen-256color" | ||
57 | |||
58 | # The modes { | ||
59 | setw -g clock-mode-colour colour135 | ||
60 | 26 | ||
61 | # } | 27 | # info on right (no session display) |
62 | # The statusbar { | 28 | set-option -g status-right "" |
29 | set-option -g status-left "" | ||
63 | 30 | ||
64 | set -g status-position bottom | 31 | # toggle status bar visibility |
65 | set -g status-bg colour234 | 32 | bind t set status |
66 | set -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]' | ||
68 | set -g status-left '' | ||
69 | set -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 ' | ||
70 | set -g status-right-length 50 | ||
71 | set -g status-left-length 50 | ||
72 | 33 | ||
73 | set-option -g @cpu_icon "💪" | 34 | # navigate throught windows |
35 | bind-key -n S-Left previous-window | ||
36 | bind-key -n S-Right next-window | ||
74 | 37 | ||
75 | setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F ' | 38 | # colors |
39 | setw -g window-status-format "#[fg=colour8]#W " | ||
40 | setw -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 | ||
77 | setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F ' | ||