summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bash/.bashrc2
-rw-r--r--dunst/.config/dunst/dunstrc4
-rw-r--r--git/.gitconfig2
-rw-r--r--nvim/.config/nvim/init.vim137
-rw-r--r--picom/.config/picom.conf8
-rw-r--r--spectrwm/.config/spectrwm/spectrwm.conf49
-rw-r--r--x/.Xresources88
-rw-r--r--x/.xinitrc14
-rw-r--r--zsh/.zshrc78
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"
37alias vimrc="vim $HOME/.config/nvim/init.vim" 37alias vimrc="vim $HOME/.config/nvim/init.vim"
38alias v="nvim" 38alias v="nvim"
39alias vim="nvim" 39alias vim="nvim"
40alias sudo="doas " 40alias sudo="sudo "
41 41
42up() { 42up() {
43 curl -F "file=@$*" https://0x0.st | xclip -selection clipboard 43 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 @@
27 idle_threshold = 120 27 idle_threshold = 120
28 28
29 # Font and typography settings 29 # Font and typography settings
30 icon_path = /usr/share/icons/Adwaita/48x48/status/:/usr/share/icons/Adwaita/48x48/devices/:/usr/share/icons/Adwaita/48x48/apps 30 icon_path = /home/x/.icons/Blue-Maia/status/:/home/x/.icons/Blue-Maia/status/devices/:/home/x/.icons/Blue-Maia/status/apps
31 font = Hermit 10 31 font = JetBrains Mono Nerd Font Mono 10
32 alignment = center 32 alignment = center
33 show_age_threshold = 60 33 show_age_threshold = 60
34 ellipsize = middle 34 ellipsize = middle
diff --git a/git/.gitconfig b/git/.gitconfig
index 6f18776..3a0436d 100644
--- a/git/.gitconfig
+++ b/git/.gitconfig
@@ -1,3 +1,3 @@
1[user] 1[user]
2 email = shubham6405@pm.me 2 email = pryr@pryr.xyz
3 name = Shubham Saini 3 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'
5Plug 'deoplete-plugins/deoplete-jedi' 5Plug 'deoplete-plugins/deoplete-jedi'
6Plug 'Shougo/deol.nvim' 6Plug 'Shougo/deol.nvim'
7Plug 'ap/vim-css-color' 7Plug 'ap/vim-css-color'
8Plug 'luochen1990/rainbow'
9Plug 'tpope/vim-eunuch' 8Plug 'tpope/vim-eunuch'
10Plug 'tpope/vim-commentary' 9Plug 'tpope/vim-commentary'
11Plug 'scrooloose/nerdtree' 10Plug 'scrooloose/nerdtree'
@@ -20,7 +19,7 @@ call plug#end()
20set guicursor= 19set guicursor=
21set number relativenumber 20set number relativenumber
22set mouse=a 21set mouse=a
23set background=dark 22set background=light
24syntax enable 23syntax enable
25set cursorline 24set cursorline
26set ignorecase 25set ignorecase
@@ -35,7 +34,7 @@ set shiftwidth=4 " number of spaces to use for autoindent
35set expandtab " tabs are space 34set expandtab " tabs are space
36set autoindent 35set autoindent
37set copyindent " copy indent from the previous line 36set copyindent " copy indent from the previous line
38colorscheme bloodbath 37colorscheme pencil
39"hi Normal ctermbg=16 guibg=#000000 38"hi Normal ctermbg=16 guibg=#000000
40"hi LineNr ctermbg=16 guibg=#000000 39"hi LineNr ctermbg=16 guibg=#000000
41 40
@@ -56,9 +55,6 @@ let g:gitgutter_sign_removed = '-'
56let g:gitgutter_sign_removed_first_line = '^' 55let g:gitgutter_sign_removed_first_line = '^'
57let g:gitgutter_sign_modified_removed = '#' 56let g:gitgutter_sign_modified_removed = '#'
58 57
59" rainbow
60let g:rainbow_active = 1
61
62" vim-markdown 58" vim-markdown
63let g:vim_markdown_no_default_key_mappings=1 59let g:vim_markdown_no_default_key_mappings=1
64let g:vim_markdown_toml_frontmatter=1 60let g:vim_markdown_toml_frontmatter=1
@@ -92,6 +88,12 @@ hi Comment cterm=italic
92scriptencoding utf-8 88scriptencoding utf-8
93 89
94" statusline 90" statusline
91hi PrimaryBlock ctermbg=NONE ctermfg=8
92hi ModeBlock ctermbg=NONE ctermfg=2
93hi SecondaryBlock ctermbg=NONE ctermfg=8
94hi TeritaryBlock ctermbg=NONE ctermfg=9
95hi Blanks ctermbg=NONE
96hi statusline ctermbg=NONE
95let g:currentmode={ 97let g:currentmode={
96 \ 'n' : 'NORMAL ', 98 \ 'n' : 'NORMAL ',
97 \ 'no' : 'N·OPERATOR PENDING ', 99 \ 'no' : 'N·OPERATOR PENDING ',
@@ -112,114 +114,15 @@ let g:currentmode={
112 \ 'r?' : 'CONFIRM ', 114 \ 'r?' : 'CONFIRM ',
113 \ '!' : 'SHELL ', 115 \ '!' : 'SHELL ',
114 \ 't' : 'TERMINAL '} 116 \ 't' : 'TERMINAL '}
115 117set statusline=
116hi PrimaryBlock ctermfg=00 ctermbg=6 118set statusline+=%#ModeBlock#
117hi SecondaryBlock ctermfg=07 ctermbg=10 119set statusline+=\ %{g:currentmode[mode()]}
118hi Blanks ctermfg=00 ctermbg=11 120set statusline+=%#TeritaryBlock#
119 121set statusline+=\ %f\
120hi User1 ctermfg=01 ctermbg=0 122set statusline+=%M\
121hi User2 ctermfg=02 ctermbg=0 123set statusline+=%#Blanks#
122hi User3 ctermfg=03 ctermbg=0 124set statusline+=%=
123hi User4 ctermfg=04 ctermbg=0 125set statusline+=%#PrimaryBlock#
124hi User5 ctermfg=05 ctermbg=0 126set statusline+=\ %Y\
125hi User6 ctermfg=06 ctermbg=0 127set statusline+=%#SecondaryBlock#
126hi User7 ctermfg=07 ctermbg=0 128set statusline+=\ %P\
127hi User8 ctermfg=08 ctermbg=0
128hi User9 ctermfg=09 ctermbg=0
129
130highlight EndOfBuffer ctermfg=black ctermbg=black
131
132function! GitBranch()
133 return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
134endfunction
135
136function! StatuslineGit()
137 let l:branchname = GitBranch()
138 return strlen(l:branchname) > 0?'* '.l:branchname.' ':''
139endfunction
140
141function! ReadOnly() abort
142 if !&modifiable && &readonly
143 return ' RO'
144 elseif &modifiable && &readonly
145 return 'RO'
146 elseif !&modifiable && !&readonly
147 return ''
148 else
149 return ''
150 endif
151endfunction
152
153function! Filepath() abort
154 let l:basename = expand('%:h')
155 let l:filename = expand('%:t')
156 let l:extension = expand('%:e')
157 let l:prefix = (l:basename ==# '' || l:basename ==# '.') ?
158 \ '' : substitute(l:basename . '/', '\C^' . $HOME, '~', '')
159
160 if empty(l:prefix) && empty(l:filename)
161 return printf('%%8*%%f%%*%s %%m%%*', '%8*')
162 elseif empty(l:prefix)
163 return printf('%%8*%%f%%*%s %%m%%*', '%6*')
164 else
165 return printf('%%8*%s%%*%s%s%%*', l:prefix, &modified ? '%6*' : '%8*', l:filename)
166 endif
167endfunction
168
169function! LinterStatus() abort
170 let info = get(b:, 'coc_diagnostic_info', {})
171 if empty(info) | return '' | endif
172 let msgs = []
173 if get(info, 'error', 0)
174 call add(msgs, printf('%%5*%s×%%*', info['error']))
175 endif
176 if get(info, 'warning', 0)
177 call add(msgs, printf('%%3*%s!%%*', info['warning']))
178 endif
179 return join(msgs, ' ')
180endfunction
181
182function! StatusLine(mode) abort
183 let l:line=''
184
185 " help or man pages
186 if &filetype ==# 'help' || &filetype ==# 'man'
187 let l:line.=' %#StatusLineNC# ['. &filetype .'] %f '
188 return l:line
189 endif
190
191 " active
192 if a:mode ==# 'active'
193 let l:line.='%7*%{StatuslineGit()}'
194 let l:line.='%<'
195 let l:line.=Filepath()
196
197 let l:line.='%5*'
198 let l:line.=' %{ReadOnly()} %w%*'
199 let l:line.='%9* %=%*'
200
201 let l:line.='%7* %l,%c %*'
202 let l:line.='%8* %{g:currentmode[mode()]}%*'
203 let l:line.=' '
204 let l:line.=LinterStatus()
205 let l:line.=' '
206 let l:line.='%8*'. &filetype
207
208 else
209 " inactive
210 let l:line.='%#Blanks#'
211 let l:line.='%f %5*%m%*'
212 let l:line.='%#Blanks# %=%*'
213 endif
214
215 let l:line.='%*'
216
217 return l:line
218endfunction
219
220set statusline=%!StatusLine('active')
221augroup MyStatusLine
222 autocmd!
223 autocmd WinEnter * setl statusline=%!StatusLine('active')
224 autocmd WinLeave * setl statusline=%!StatusLine('inactive')
225augroup END
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 @@
1## SHADOWS 1## SHADOWS
2shadow = true; 2shadow = false;
3shadow-radius = 25; 3shadow-radius = 15;
4shadow-offset-x = -15; 4shadow-offset-x = -12;
5shadow-offset-y = -15; 5shadow-offset-y = -12;
6shadow-exclude = [ 6shadow-exclude = [
7 "name = 'Notification'", 7 "name = 'Notification'",
8 "class_g ?= 'Notify-osd'", 8 "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
13warp_pointer = 1 13warp_pointer = 1
14 14
15# Window Decoration 15# Window Decoration
16border_width = 0 16border_width = 3
17color_focus = red 17color_focus = rgb:88/88/88
18color_focus_maximized = yellow 18color_focus_maximized = rgb:f3/f4/f5
19color_unfocus = rgb:88/88/88 19color_unfocus = rgb:f3/f4/f5
20color_unfocus_maximized = rgb:88/88/00 20color_unfocus_maximized = rgb:88/88/00
21region_padding = 10 21region_padding = 10
22tile_gap = 10 22tile_gap = 10
@@ -34,11 +34,11 @@ bar_enabled = 1
34bar_border_width = 0 34bar_border_width = 0
35bar_border[1] = rgb:00/80/80 35bar_border[1] = rgb:00/80/80
36bar_border_unfocus[1] = rgb:00/40/40 36bar_border_unfocus[1] = rgb:00/40/40
37bar_color[1] = rgb:00/00/00 37bar_color[1] = rgb:f3/f4/f5
38bar_color_selected[1] = rgb:00/80/80 38bar_color_selected[1] = rgb:62/68/68
39bar_font_color[1] = rgb:ee/ff/ff, rgb:78/78/78 39bar_font_color[1] = rgb:2f/2f/2f, rgb:78/78/78
40bar_font_color_selected = black 40bar_font_color_selected = rgb:ff/ff/ff
41bar_font = Hermit:pixelsize=12.5:antialias=true:autohint=true:autohint=true:lcdfilter=lcddefault:rgba=rgb 41bar_font = JetBrains Mono Nerd Font Mono:style=medium:pixelsize=12.5:antialias=true:autohint=true:lcdfilter=lcddefault:rgba=rgb
42bar_action = ~/.config/spectrwm/statusbar 42bar_action = ~/.config/spectrwm/statusbar
43bar_action_expand = 1 43bar_action_expand = 1
44bar_justify = left 44bar_justify = left
@@ -66,12 +66,7 @@ urgent_enabled = 1
66# region = screen[1]:1280x1024+1280+0 66# region = screen[1]:1280x1024+1280+0
67 67
68# Launch applications in a workspace of choice 68# Launch applications in a workspace of choice
69autorun = ws[1]:~/.fehbg 69autorun = ws[2]:chromium
70autorun = ws[1]:~/bin/stst
71autorun = ws[1]:~/bin/pica
72autorun = ws[2]:~/bin/fireff
73autorun = ws[1]:~/bin/xss
74autorun = ws[1]:~/.local/bin/bat_check.sh
75 70
76# Customize workspace layout at start 71# Customize workspace layout at start
77# layout = ws[1]:4:0:0:0:vertical 72# layout = ws[1]:4:0:0:0:vertical
@@ -83,8 +78,8 @@ autorun = ws[1]:~/.local/bin/bat_check.sh
83# Set workspace name at start 78# Set workspace name at start
84name = ws[1]:term 79name = ws[1]:term
85name = ws[2]:web 80name = ws[2]:web
86name = ws[3]:music 81name = ws[3]:social
87name = ws[4]:file 82name = ws[4]:music
88name = ws[5]:code 83name = ws[5]:code
89name = ws[6]:virt 84name = ws[6]:virt
90name = ws[7]:game 85name = ws[7]:game
@@ -101,21 +96,21 @@ keyboard_mapping = ~/.config/spectrwm/keybindings.conf
101 96
102# Validated default programs: 97# Validated default programs:
103program[lock] = xset s activate 98program[lock] = xset s activate
104program[term] = ~/bin/stst 99program[term] = urxvtc
105program[menu] = ~/bin/menu 100#program[menu] = dmenu_run
106program[bup] = doas bash -c 'for f in /sys/class/backlight/*; do echo $(($(<$f/brightness)+5*$(<$f/max_brightness)/100)) > $f/brightness; done' 101program[bup] = sudo /home/x/bin/light u
107program[bdown] = doas bash -c 'for f in /sys/class/backlight/*; do echo $(($(<$f/brightness)-5*$(<$f/max_brightness)/100)) > $f/brightness; done' 102program[bdown] = sudo /home/x/bin/light d
108program[soundinc] = pulsemixer --change-volume +5 103program[soundinc] = pulsemixer --change-volume +5
109program[sounddec] = pulsemixer --change-volume -5 104program[sounddec] = pulsemixer --change-volume -5
110program[soundmute] = pulsemixer --toggle-mute 105program[soundmute] = pulsemixer --toggle-mute
111program[shut] = ~/.local/bin/shut 106#program[shut] = ~/.local/bin/shut
112program[pnext] = cmus-remote -n 107program[pnext] = cmus-remote -n
113program[pprev] = cmus-remote -r 108program[pprev] = cmus-remote -r
114program[pplay] = cmus-remote -u 109program[pplay] = cmus-remote -u
115program[notes] = st -e nvim /home/x/.cache/bujo/todo.md 110program[notes] = urxvtc -e nvim /home/x/.cache/bujo/todo.md
116program[files] = st -e ranger 111program[files] = urxvtc -e ranger
117program[pass] = passmenu 112program[pass] = passmenu -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 113program[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
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 114# 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
120 115
121# To disable validation of the above, free the respective binding(s): 116# To disable validation of the above, free the respective binding(s):
@@ -127,7 +122,7 @@ bind[bdown] = XF86MonBrightnessDown
127bind[soundinc] = XF86AudioRaiseVolume 122bind[soundinc] = XF86AudioRaiseVolume
128bind[sounddec] = XF86AudioLowerVolume 123bind[sounddec] = XF86AudioLowerVolume
129bind[soundmute] = XF86AudioMute 124bind[soundmute] = XF86AudioMute
130bind[shut] = MOD+x 125#bind[shut] = MOD+x
131bind[pnext] = XF86AudioNext 126bind[pnext] = XF86AudioNext
132bind[pprev] = XF86AudioPrev 127bind[pprev] = XF86AudioPrev
133bind[pplay] = XF86AudioPlay 128bind[pplay] = XF86AudioPlay
diff --git a/x/.Xresources b/x/.Xresources
index 2985bba..a03b684 100644
--- a/x/.Xresources
+++ b/x/.Xresources
@@ -1,60 +1,49 @@
1! ------------------------------------------------------------------------------ 1! special
2! Colors 2*.foreground: #2f2f2f
3! ------------------------------------------------------------------------------ 3*.background: #f3f4f5
4! 4*.cursorColor: #565e65
5!------------------------------------------------------------------------------
6 5
7#define base00 #000000 6! black
8#define base01 #303030 7*.color0: #1c2023
9#define base02 #353535 8*.color8: #747c84
10#define base03 #4A4A4A
11#define base04 #787878
12#define base05 #EEFFFF
13#define base06 #EEFFFF
14#define base07 #FFFFFF
15#define base08 #F07178
16#define base09 #F78C6C
17#define base0A #00fdb4
18#define base0B #13CA91
19#define base0C #79ffe1
20#define base0D #7898FB
21#define base0E #ff3299
22#define base0F #FF5370
23 9
24! URxvt 10! red
25! ------------------------------------------------------------------------------ 11*.color1: #c7ae95
12*.color9: #c7ae95
26 13
27*foreground: base05 14! green
28*background: base00 15*.color2: #95c7ae
29*cursorColor: base05 16*.color10: #95c7ae
30 17
31*color0: base00 18! yellow
32*color1: base08 19*.color3: #aec795
33*color2: base0B 20*.color11: #aec795
34*color3: base0A
35*color4: base0D
36*color5: base0E
37*color6: base0C
38*color7: base05
39 21
40*color8: base03 22! blue
41*color9: base09 23*.color4: #ae95c7
42*color10: base01 24*.color12: #ae95c7
43*color11: base02 25
44*color12: base04 26! magenta
45*color13: base06 27*.color5: #c795ae
46*color14: base0F 28*.color13: #c795ae
47*color15: base07 29
30! cyan
31*.color6: #95aec7
32*.color14: #95aec7
33
34! white
35*.color7: #c7ccd1
36*.color15: #f3f4f5
48 37
49URxvt.cursorBlink : 1 38URxvt.cursorBlink : 1
50URxvt.font :xft:Input Mono:pixelsize=12.5:style=Regular \ 39URxvt.font :xft:JetBrainsMono Nerd Font Mono:pixelsize=12.5:style=Regular \
51 xft:DejaVu Sans Mono:size=12.5:style=Medium 40 xft:DejaVu Sans Mono:size=12.5:style=Medium
52 41
53URxvt.italicFont :xft:Input Mono:pixelsize=12.5:style=Italic 42URxvt.italicFont :xft:JetBrainsMono Nerd Font Mono:pixelsize=12.5:style=Italic
54URxvt.boldFont :xft:Input Mono:pixelsize=12.5:style=Bold 43URxvt.boldFont :xft:JetBrainsMono Nerd Font Mono:pixelsize=12.5:style=Bold
55 44
56URxvt.lineSpace : 0 45URxvt.lineSpace : 0
57URxvt.letterSpace : -1 46URxvt.letterSpace : 0
58URxvt.scrollBar : false 47URxvt.scrollBar : false
59URxvt.internalBorder : 25 48URxvt.internalBorder : 25
60URxvt.cursorUnderline : false 49URxvt.cursorUnderline : false
@@ -65,12 +54,11 @@ URxvt.intensityStyles : false
65 54
66 55
67URxvt.perl-ext-common : default,matcher 56URxvt.perl-ext-common : default,matcher
68URxvt.url-launcher : firefox-bin 57URxvt.url-launcher : chromium
69URxvt.matcher.button : 1 58URxvt.matcher.button : 1
70 59
71Xft.autohint: 1 60Xft.autohint: true
72Xft.antialias: 1 61Xft.antialias: true
73Xft.lcdfilter: lcddefault 62Xft.lcdfilter: lcddefault
74Xft.hinting: true
75Xft.rgba: rgb 63Xft.rgba: rgb
76Xft.dpi: 96 64Xft.dpi: 96
diff --git a/x/.xinitrc b/x/.xinitrc
index 97028bf..f490477 100644
--- a/x/.xinitrc
+++ b/x/.xinitrc
@@ -1,5 +1,15 @@
1#!/bin/bash 1#!/bin/bash
2#.xinitrc 2#.xinitrc
3/usr/bin/prime-offload &
4xrdb -merge ~/.Xresources &
5xss-lock -- slock &
3xset b off & 6xset b off &
4xset s 600 & 7xset s 300 &
5exec dbus-launch --exit-with-session spectrwm 8# xrandr --setprovideroutputsource modesetting NVIDIA-0
9# xrandr --auto
10~/.fehbg &
11urxvtd &
12~/.local/bin/bat_check.sh &
13picom &
14dunst &
15exec 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
11export PATH=$PATH:$HOME/.local/bin:$HOME/bin 11export PATH=$PATH:$HOME/.local/bin:$HOME/bin
12export XDG_CURRENT_DESKTOP=spectrwm 12export XDG_CURRENT_DESKTOP=spectrwm
13 13
14setopt autocd extendedglob nomatch globdots correctall 14#aliases
15unsetopt beep
16bindkey -v
17
18# completions
19zstyle :compinstall filename '/home/x/.zshrc'
20autoload -U colors && colors
21autoload -Uz compinit && compinit
22zstyle ':completion:*' menu select
23zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
24#zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
25#zstyle ':completion:*:warnings' format '%BSorry, no matches for: %d%b'
26
27# sources
28source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
29source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
30
31# prompt
32PROMPT=$'\n'"%B%F{240}%m "$'\n'"%(?.%F{248}▲.%F{red}?%?)%f "
33git_branch() {
34 git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
35}
36setopt PROMPT_SUBST
37RPROMPT='%9c%{%F{green}%}$(git_branch)%{%F{none}%} $ '
38
39# aliases
40alias ls='ls --color=auto' 15alias ls='ls --color=auto'
41alias ll='ls --color=auto -al' 16alias ll='ls --color=auto -al'
42alias key="vim $HOME/.config/spectrwm/keybindings.conf" 17alias key="vim $HOME/.config/spectrwm/keybindings.conf"
@@ -52,7 +27,6 @@ alias vimrc="vim $HOME/.config/nvim/init.vim"
52alias v="nvim" 27alias v="nvim"
53alias vim="nvim" 28alias vim="nvim"
54alias sudo="sudo " 29alias sudo="sudo "
55alias parrot="VBoxManage startvm Parrot"
56 30
57up() { 31up() {
58 curl -F "file=@$*" https://0x0.st | xclip -selection clipboard 32 curl -F "file=@$*" https://0x0.st | xclip -selection clipboard
@@ -62,3 +36,53 @@ dict() {
62 curl dict://dict.org/d:$* 36 curl dict://dict.org/d:$*
63} 37}
64 38
39# Enable colors and change prompt:
40autoload -U colors && colors
41fpath+=$HOME/.zsh/pure
42autoload -U promptinit; promptinit
43prompt pure
44PURE_PROMPT_SYMBOL=$
45#PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
46
47# Basic auto/tab complete:
48autoload -U compinit
49zstyle ':completion:*' menu select
50zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
51zmodload zsh/complist
52compinit
53_comp_options+=(globdots) # Include hidden files.
54
55# vi mode
56bindkey -v
57export KEYTIMEOUT=1
58
59# Use vim keys in tab complete menu:
60bindkey -M menuselect 'h' vi-backward-char
61bindkey -M menuselect 'k' vi-up-line-or-history
62bindkey -M menuselect 'l' vi-forward-char
63bindkey -M menuselect 'j' vi-down-line-or-history
64bindkey -v '^?' backward-delete-char
65
66# Change cursor shape for different vi modes.
67function zle-keymap-select {
68 if [[ ${KEYMAP} == vicmd ]] ||
69 [[ $1 = 'block' ]]; then
70 echo -ne '\e[1 q'
71 elif [[ ${KEYMAP} == main ]] ||
72 [[ ${KEYMAP} == viins ]] ||
73 [[ ${KEYMAP} = '' ]] ||
74 [[ $1 = 'beam' ]]; then
75 echo -ne '\e[5 q'
76 fi
77}
78zle -N zle-keymap-select
79zle-line-init() {
80 zle -K viins # initiate `vi insert` as keymap (can be removed if `bindkey -V` has been set elsewhere)
81 echo -ne "\e[5 q"
82}
83zle -N zle-line-init
84echo -ne '\e[5 q' # Use beam shape cursor on startup.
85preexec() { echo -ne '\e[5 q' ;} # Use beam shape cursor for each new prompt.
86
87# Load zsh-syntax-highlighting; should be last.
88source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null