diff --git a/.Xresources b/.Xresources index 27e4da0..7ec57e0 100644 --- a/.Xresources +++ b/.Xresources @@ -1,38 +1,76 @@ +!! special +!*.foreground: #cee3eb +!*.background: #010202 +!*.cursorColor: #cee3eb +!! *.font: TerminessTTF Nerd Font Mono +! +!! black +!*.color0: #020405 +!*.color8: #51a285 +! +!! red +!*.color1: #0e1416 +!*.color9: #E36441 +! +!! green +!*.color2: #1d272a +!*.color10: #93a350 +! +!! yellow +!*.color3: #314045 +!*.color11: #e38c41 +! +!! blue +!*.color4: #4c6067 +!*.color12: #5ac9e6 +! +!! magenta +!*.color5: #6c8791 +!*.color13: #f947b5 +! +!! cyan +!*.color6: #91b5c2 +!*.color14: #52d4a9 +! +!! white +!*.color7: #d3e6ed +!*.color15: #9fb52e + + ! special -*.foreground: #cee3eb -*.background: #010202 -*.cursorColor: #cee3eb -! *.font: TerminessTTF Nerd Font Mono +*.foreground: #e7d5e2 +*.background: #0a0408 +*.cursorColor: #e7d5e2 ! black -*.color0: #020405 -*.color8: #51a285 +*.color0: #12080f +*.color8: #e2b3ab ! red -*.color1: #0e1416 -*.color9: #E36441 +*.color1: #21121d +*.color9: #e6c6dc ! green -*.color2: #1d272a -*.color10: #93a350 +*.color2: #382132 +*.color10: #cbc687 ! yellow -*.color3: #314045 -*.color11: #e38c41 +*.color3: #57364f +*.color11: #e1b0a8 ! blue -*.color4: #4c6067 -*.color12: #5ac9e6 +*.color4: #7f5173 +*.color12: #b1b6df ! magenta -*.color5: #6c8791 -*.color13: #f947b5 +*.color5: #af719f +*.color13: #eecae3 ! cyan -*.color6: #91b5c2 -*.color14: #52d4a9 +*.color6: #cea4c2 +*.color14: #65c4cd ! white -*.color7: #d3e6ed -*.color15: #9fb52e +*.color7: #eddfe8 +*.color15: #f0c1b9 diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc index 0422880..3aa6cb1 100755 --- a/bspwm/bspwmrc +++ b/bspwm/bspwmrc @@ -14,18 +14,26 @@ nm-applet & blueman-applet & xfce4-power-manager & numlockx on & -#/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & /usr/bin/lxqt-policykit-agent & ### # MONITORS ### if [ "`hostname`" = "beef-book" ]; then - bspc monitor "DP-1" -d 1 2 3 4 5 6 - bspc monitor "DP-4" -d 1 2 3 4 5 6 7 8 9 - bspc monitor "LVDS1" -d 1 2 3 4 5 6 7 8 9 - bspc monitor "LVDS-1-1" -d 1 2 3 4 5 6 7 8 9 - bspc monitor "VGA-0" 7 8 9 + if [ -n "`polybar -m | grep "DP-4"`" ]; then + # for docked desktop use: assign 2 workspaces to the second VGA monitor accordingly if it is connected + if [ -n "`polybar -m | grep "VGA-0"`" ]; then + bspc monitor "DP-4" -d 1 2 3 4 5 6 7 + bspc monitor "VGA-0" -d 8 9 + else + bspc monitor "DP-4" -d 1 2 3 4 5 6 7 8 9 + fi + else + bspc monitor -d 1 2 3 4 5 6 7 8 9 + #bspc monitor "DP-1" -d 1 2 3 4 5 6 7 8 9 + #bspc monitor "LVDS1" -d 1 2 3 4 5 6 7 8 9 + #bspc monitor "LVDS-1-1" -d 1 2 3 4 5 6 7 8 9 + fi elif [ "`hostname`" = "salad-book" ]; then bspc monitor "eDP-1" -d 1 2 3 4 5 6 7 8 9 bspc monitor "HDMI-0" -d 1 2 3 4 5 6 7 8 9 @@ -40,6 +48,7 @@ bspc config remove_disabled_monitors true bspc config remove_unplugged_monitors true bspc config merge_overlapping_monitors true bspc config pointer_follows_monitor true +bspc config center_pseudo_tiled false #bspc config bottom_padding 25 #bspc config top_monocle_padding 0 @@ -97,10 +106,11 @@ bspc rule -a Pavucontrol state=floating bspc rule -a copyq state=floating bspc rule -a Blueman-manager state=floating bspc rule -a Arandr state=floating -bspc rule -a galculator state=floating +bspc rule -a Galculator state=floating bspc rule -a Screenkey manage=off bspc rule -a Navigator desktop='^1' bspc rule -a discord desktop='^4' +bspc rule -a dosbox state=pseudo_tiled bspc rule -a AlarmWindow state=floating bspc rule -a pop-up state=floating bspc rule -a setup state=floating diff --git a/bspwm/wacom.sh b/bspwm/wacom.sh index daefb96..78459c9 100755 --- a/bspwm/wacom.sh +++ b/bspwm/wacom.sh @@ -3,7 +3,7 @@ choices="4:3\nMain screen\nSecond screen" -chosen=$(echo -e "$choices" | dmenu -i) +chosen=$(echo "$choices" | dmenu -i) case "$chosen" in 4:3) xsetwacom set "Wacom Intuos S 2 Pen stylus" Area 0 0 11400 8550 ;; diff --git a/nvim/init.vim b/nvim/init.vim index ce0b8c9..c7c425b 100644 --- a/nvim/init.vim +++ b/nvim/init.vim @@ -13,6 +13,10 @@ set splitbelow splitright set cursorline +" Netrw settings +let g:netrw_liststyle = 0 +let g:netrw_banner = 0 + " restore cursor to the last position after reopening a file autocmd BufReadPost * \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' @@ -28,10 +32,15 @@ map sr :setlocal spell! spelllang=ro " ### call plug#begin('~/.local/share/nvim/plugged') -" REMINDER - on a new system install go for hexokinase (color preview) +" REMINDER - some plugins have the following external dependencies +" hexokinase(color preview): go +" coc(code completion): nodejs, yarn Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } Plug 'vimwiki/vimwiki' Plug 'franbach/miramare' +Plug 'antoinemadec/FixCursorHold.nvim' +Plug 'lambdalisue/fern.vim' +Plug 'neoclide/coc.nvim', {'branch': 'release'} call plug#end() @@ -44,6 +53,45 @@ let g:Hexokinase_highlighters = ['backgroundfull'] autocmd VimEnter * HexokinaseTurnOn +" ### +" # Fern -- sidebar file manager +" ### + +let g:fern#drawer_width = 30 +let g:fern#default_hidden = 1 +let g:fern#disable_drawer_auto_quit = 1 + +""" KEYBIND TO TOGGLE FERN +noremap f :Fern . -drawer -toggle + +function! s:init_fern() abort + nmap H (fern-action-open:split) + nmap V (fern-action-open:vsplit) + nmap R (fern-action-rename) + nmap M (fern-action-move) + nmap C (fern-action-copy) + "nmap N (fern-action-new-path) + nmap T (fern-action-new-file) + nmap D (fern-action-new-dir) + nmap S (fern-action-hidden-toggle) + nmap dd (fern-action-trash) + nmap m (fern-action-mark) +endfunction + +augroup fern-custom + autocmd! * + autocmd FileType fern call s:init_fern() +augroup END + + +""" C Compiler! +function! TermWrapper(command) abort + exec '20sp ' + exec 'term ' . a:command + exec 'startinsert' +endfunction +command! -nargs=0 CompileAndRun call TermWrapper(printf('gcc -lm %s && ./a.out', expand('%'), )) + " ### " # Key Remapping " ### @@ -53,7 +101,8 @@ map :source ~/.config/nvim/init.vim nnoremap e :Ex " Easier Write and Quit aliases -nnoremap q :q +"nnoremap q :CocCommand cord.disconnect:q +nnoremap q :q nnoremap Q :wq nnoremap w :w @@ -64,16 +113,29 @@ nnoremap k k nnoremap l l " Make adjusing split sizes a bit more friendly -noremap :vertical resize +3 -noremap :vertical resize -3 -noremap :resize +3 -noremap :resize -3 +noremap :vertical resize +3 +noremap :vertical resize -3 +noremap :resize +3 +noremap :resize -3 " New splits nnoremap sv :Vex nnoremap sh :Sex nnoremap t :24sp:term:startinsert +nnoremap cc :CompileAndRun + " exit insert mode in terminal easier tnoremap -tnoremap k +tnoremap h +tnoremap j +tnoremap k +tnoremap l +inoremap h +inoremap j +inoremap k +inoremap l +nnoremap h +nnoremap j +nnoremap k +nnoremap l diff --git a/polybar/config.ini b/polybar/config.ini index fec3b11..1545a7e 100644 --- a/polybar/config.ini +++ b/polybar/config.ini @@ -356,7 +356,7 @@ icon-next =  [module/workspaces] type = internal/bspwm -pin-workspaces = true +pin-workspaces = false enable-click = true enable-scroll = true @@ -373,6 +373,7 @@ ws-icon-5 = 6;VI ws-icon-6 = 7;VII ws-icon-7 = 8;VIII ws-icon-8 = 9;IX +ws-icon-9 = 0;X ws-icon-default = o label-monitor = %name% @@ -429,7 +430,7 @@ format-foreground = ${color.fg} format-padding = 4 label = %title% -label-maxlen = 50 +label-maxlen = 100 ; Used instead of label when there is no window title ; Available tokens: diff --git a/polybar/launch.sh b/polybar/launch.sh index 34d4017..bbee3fb 100755 --- a/polybar/launch.sh +++ b/polybar/launch.sh @@ -16,7 +16,7 @@ if [ -z "`pgrep -x polybar`" ]; then BAR="main" #Detect if DP or internal laptop displays are connected and show a polybar for them #TODO look at the other laptop for the name of the HDMI output - for m in $(polybar -m | grep "\(DP\|LVDS\|eDP\|DisplayPort\)" | cut -d ':' -f1); do + for m in $(polybar -m | grep "\(HDMI\|DP\|LVDS\|eDP\|DisplayPort\)" | cut -d ':' -f1); do MONITOR=$m polybar --reload $BAR -c ~/.config/polybar/config.ini & sleep 1