5 Commits abf2d772ae ... d4b6c0f572

Autore SHA1 Messaggio Data
  koreymacdougall d4b6c0f572 Various things 2 anni fa
  koreymacdougall 3ee51115ac Reboot vimrc 2 anni fa
  koreymacdougall 31f7b56626 Various updates 3 anni fa
  koreymacdougall 30e24b0bd0 Add explicit mod key to i3bar config - for vms 3 anni fa
  koreymacdougall 4a71bc4798 Various updates 3 anni fa
10 ha cambiato i file con 143 aggiunte e 91 eliminazioni
  1. 21 19
      .Xresources
  2. 7 10
      .bashrc
  3. 1 1
      compton.conf
  4. 8 6
      i3/i3_config
  5. 26 2
      notes/cheatsheet.md
  6. 25 14
      vim/.vimrc
  7. 14 0
      vim/.vimrc.old
  8. 38 36
      vim/plug.vim
  9. 3 3
      vim/settings.vim
  10. 0 0
      xthemes/gruvbox_theme

+ 21 - 19
.Xresources

@@ -15,22 +15,24 @@ XTerm.vt100.translations: #override \n\
   Ctrl <Key> minus: smaller-vt-font() \n\
   Ctrl <Key> plus: larger-vt-font() \n\
 
-! Dracula Xresources palette
-*.foreground: #F8F8F2
-*.background: #282A36
-*.color0:     #000000
-*.color8:     #4D4D4D
-*.color1:     #FF5555
-*.color9:     #FF6E67
-*.color2:     #50FA7B
-*.color10:    #5AF78E
-*.color3:     #F1FA8C
-*.color11:    #F4F99D
-*.color4:     #BD93F9
-*.color12:    #CAA9FA
-*.color5:     #FF79C6
-*.color13:    #FF92D0
-*.color6:     #8BE9FD
-*.color14:    #9AEDFE
-*.color7:     #BFBFBF
-*.color15:    #E6E6E6
+
+*.foreground:   #c7c8be
+*.background:   #231d20
+*.cursorColor:  #c7c8be
+*.color0:       #231d20
+*.color8:       #cfe2f3
+*.color1:       #c81c61
+*.color9:       #db0057
+*.color2:       #1ca6c8
+*.color10:      #22c8f1
+*.color3:       #1cc872
+*.color11:      #21e884
+*.color4:       #c8681c
+*.color12:      #e57720
+*.color5:       #c81ca3
+*.color13:      #df1fb5
+*.color6:       #b1c81c
+*.color14:      #d0eb21
+*.color7:       #c7c8be
+*.color15:      #ecede1
+

+ 7 - 10
.bashrc

@@ -30,16 +30,11 @@ alias l='ls --color=auto --group-directories-first'
 alias ll='ls -al --color=auto --group-directories-first'
 
 #Prompt options
-export PS1="\e[1;33m\u@\h \w $ \n--> \e[m"
-
-function cd_up(){
-    cd $(printf "%0.0s../" $(seq 1 $1));
-}
-alias 'cd..'='cd_up'
+#export PS1="\e[1;33m\u@\h \w $ \n--> \e[m"
 
 #set terminal colour; is overridden if using a terminal 
 #emulator such as terminator (useful for arch)
-setterm -foreground yellow --bold on --store
+# setterm -foreground yellow --bold on --store
 
 #git command tab completion
 if [ -f ~/.git-completion.bash ]; then
@@ -61,6 +56,8 @@ fi
 #export PATH="$PATH:$HOME/.rvm/bin"
 
 
-export NVM_DIR="$HOME/.nvm"
-[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
-[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
+# (2021-10-28) Below has been long inactive
+#export NVM_DIR="$HOME/.nvm"
+#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
+#[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
+#

+ 1 - 1
compton.conf

@@ -113,7 +113,7 @@ frame-opacity = 1;
 #inactive-opacity-override = true;
 alpha-step = 0.06;
 # note that WM class name can be found with 'xprop WM_CLASS'
-opacity-rule = [ "95:class_g = 'XTerm'"];
+opacity-rule = [ "90:class_g = 'XTerm'"];
 
 # give terminal opacity
 # opacity-rule = [ "80:name  *= 'xterm, vlc'" ];

+ 8 - 6
i3/i3_config

@@ -1,5 +1,7 @@
 # met modifier key to windoze key
+# Mod4 is windows, Mod1 is alt
 set $mod Mod4
+#set $mod Mod1
 
 #font pango:monospace 8
 font pango:DejaVu Sans Mono 8
@@ -8,7 +10,7 @@ font pango:DejaVu Sans Mono 8
 floating_modifier $mod
 
 # kill focused window
-bindsym $mod+q kill
+bindsym $mod+Shift+q kill
 
 ####################
 #### LAUNCHERS ####
@@ -27,12 +29,10 @@ bindsym $mod+r                          exec /usr/bin/xterm -e ranger
 bindsym $mod+t                          exec /usr/bin/thunderbird
 
 # browser
-set $browser "firejail firefox"
-bindsym $mod+w                          exec $browser
-
 # set $browser "firejail brave-browser --incognito"
+# set $browser "firejail firefox"
 set $browser "firejail brave-browser"
-bindsym $mod+b                          exec $browser
+bindsym $mod+w                          exec $browser
 
 # emacs
 bindsym $mod+e                          exec /usr/bin/emacs
@@ -52,8 +52,9 @@ bindsym $mod+p                          exec ~/source_packages/kalendar-master/s
 # run display select script
 bindsym $mod+F5                         exec --no-startup-id ~/config_files/dmenu_scripts/display_select.sh
 
-# take a screenshot with scrot
+# take a screenshot of selection with scrot
 bindsym --release Print exec scrot '%T_%d-%m-%Y'.png -s -e 'mv -n $f ~/screenshots/'
+# take a screenshot of screen with scrot
 bindsym $mod+Print exec scrot '%T_%d-%m-%Y'.png -e 'mv -n $f ~/screenshots/'
 
 ####################
@@ -191,6 +192,7 @@ bar {
     status_command i3status
     #mode dock
     mode hide
+    modifier $mod
 }
 
 # ALSA audio controls

+ 26 - 2
notes/cheatsheet.md

@@ -26,6 +26,8 @@ https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=837637
     - alsactl -h  / shows commands
     - help screen showed that alsactl init returns driver to a default state
 # AWS
+## list instances, compact
+- aws ec2 describe-instances --query "Reservations[*].Instances[*].{PublicIP:PublicIpAddress,Name:Tags[?Key=='Name']|[0].Value,Status:State.Name,InstanceType:InstanceType, ID: InstanceId}"
 ## enabling https on EC2 Amazon Linux AMI
 - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/SSL-on-amazon-linux-2.html
     - important: need to install mod24_ssl, not mod_ssl
@@ -92,6 +94,8 @@ sudo chown -R apache:apache path/to/wordpress
         - I think 'file://' is needed to indicate a fileread, rather than
           reading a string from stdin
 
+# Bluetooth
+blueman applet - will launch gui in taskbar
 # CALCURSE
 ## to move date of appt:
     -specify date as month/day (e.g., 1/1 for jan 1)
@@ -126,7 +130,7 @@ sudo chown -R apache:apache path/to/wordpress
 ## detach from running container
     - ^P ^Q
 ## clean up / remove dangling images
-    - docker prune  (prune -a; for more deletion)
+    - sudo docker image prune  (prune -a; for more deletion)
     - WARNING! This will remove:
       - all stopped containers
       - all networks not used by at least one container
@@ -550,6 +554,7 @@ sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-po
 ## change user/role pw:
     - \password {username}
 # PYTHON
+## pip install --no-cache-dir - when memory constrained
 ## super simple http server (!!)
 python3 -m http.server 1337
 - 1337 = port, optional
@@ -781,6 +786,9 @@ python3.8 --version
         - will list all available man pages
     - man -a {command}
         - will show all available man pages
+## grep and cut/exclude long lines of output
+grep -r pattern . | cut -c1-"$COLUMNS"
+
 ## grep with context
     - -C [n] switch
     - e.g., grep -C 2 cool_phrase cool_file
@@ -854,6 +862,16 @@ su -
 ## list files in a tarball
     - -t
 # TMUX
+## Change directory for new windows
+- :attach -c desired/directory/path
+## view pane nums
+- Ctrl-q
+# Switch to pane nume
+- Ctrl-
+## change sessions name
+- leader + $  (i.e., ctrl_space, $)
+- or, leader + :, type 'rename-sessions [-t current name] [new name]'
+    - if ommitting [-t current name], renames current session
 ## to get true color support working
 - tmux set-option -ga terminal-overrides ",xterm-256color:Tc"
     - detach then reattach
@@ -872,7 +890,8 @@ su -
     !   -   break pane into its own window
     V   -   horizontal stack / vert split
     S   -   vertical stack /horizontal split
-    q   -   show pane numbers
+    q   -   show pane numbers / view pane nums
+            - press number of pane to go there when its showing
 space   -   next layout
  UDLR   -   move to pane, up/down/left/right
 ## change bg color
@@ -942,6 +961,10 @@ prefix M-5  = tile, new panes on bottom, same height before same width
         - migrate will run compile first (saving a step)
         - after running this, may need to restart console session
 # VIM
+## Zoom split (like tmux leader-z)
+- Ctrl-w |  (makes current vert split expand)
+- Ctrl-w _  (makes current horiz split expand)
+- Ctrl-w =  (restore splits)
 ## view where a binding came from - :map
 - :nmap {command of interest}
 - :imap
@@ -950,6 +973,7 @@ prefix M-5  = tile, new panes on bottom, same height before same width
 - ensure :echo has('clipboard') returns 1
     - can do this with vim-gtk3
 - use "+yG  (for example) to yank into + register
+    - or "+y for visual selection
 - can paste normally from there
 
 ## sessions  - save and restore:

+ 25 - 14
vim/.vimrc

@@ -1,14 +1,25 @@
-source ~/config_files/vim/plug.vim
-source ~/config_files/vim/functions.vim
-source ~/config_files/vim/settings.vim
-source ~/config_files/vim/mappings.vim
-source ~/config_files/vim/autocmds.vim
-syntax on|                                           "turn on syntax completion - C-x C-o
-filetype plugin indent on|                           "enable filetype detection, load plugins and indent files
-
-" these 2 need to be set after colorscheme;
-" they don't seem to register if called immediately after (in settings.vim)
-highlight CursorLine gui=underline guibg=NONE cterm=underline ctermbg=NONE
-"don't highlight the git gutter
-highlight clear SignColumn
-" colorscheme default
+filetype plugin indent on
+syntax on
+
+" Display settings
+set term=xterm-256color
+set bg=dark
+
+" spacing settings
+set expandtab
+set shiftwidth=4
+set tabstop=4
+
+" netrw settings  
+let g:netrw_banner = 0
+let g:netrw_browse_split = 4
+let g:netrw_altv = 1
+let g:netrw_winsize = 20
+let g:netrw_liststyle=3
+
+nnoremap <leader>f :Vex<cr>
+nnoremap <leader>t :tabnew<cr>
+
+augroup filetypedetect
+  au BufNewFile,BufRead *.svelte setl ft=html
+augroup END

+ 14 - 0
vim/.vimrc.old

@@ -0,0 +1,14 @@
+source ~/config_files/vim/plug.vim
+source ~/config_files/vim/functions.vim
+source ~/config_files/vim/settings.vim
+source ~/config_files/vim/mappings.vim
+source ~/config_files/vim/autocmds.vim
+syntax on|                                           "turn on syntax completion - C-x C-o
+filetype plugin indent on|                           "enable filetype detection, load plugins and indent files
+
+" these 2 need to be set after colorscheme;
+" they don't seem to register if called immediately after (in settings.vim)
+highlight CursorLine gui=underline guibg=NONE cterm=underline ctermbg=NONE
+"don't highlight the git gutter
+highlight clear SignColumn
+" colorscheme default

+ 38 - 36
vim/plug.vim

@@ -7,63 +7,68 @@ endif
 
 "load plugings at runtime
 call plug#begin()
-    " List of Plugins"
-    " note that { 'on': []}  is syntax for lazy loading
-
+    " Syntax support for multiple language
     Plug 'sheerun/vim-polyglot'
 
+    " Tracks lines that have been added/removed/changed
+    Plug 'airblade/vim-gitgutter'
+
+    " fuzzyfinds files and buffers
+    Plug 'ctrlpvim/ctrlp.vim'
+
+    " Svelete syntax highlighting
+    Plug 'evanleck/vim-svelte', {'branch': 'main'}
 
+    " NERDtree (sorry netrw. ghost buffer trees RIP)
+    Plug 'preservim/nerdtree'
+
+    " helpers for editing html/xml
+    Plug 'vim-scripts/xmledit'
 
     " For JSX highlighting
-    Plug 'maxmellon/vim-jsx-pretty'
+    "Plug 'maxmellon/vim-jsx-pretty'
 
     Plug 'tpope/vim-surround'
 
     " repeat mainly for vim-surround
-    Plug 'tpope/vim-repeat'
+    "Plug 'tpope/vim-repeat'
 
+    " note that { 'on': []}  is syntax for lazy loading
     " Plug 'tpope/vim-rails', { 'on': [] }
+
     " Plug 'tpope/vim-rails', { 'for': ['rails', 'ruby']}
-    Plug 'tpope/vim-rails'
+    "Plug 'tpope/vim-rails'
 
-    Plug 'vim-ruby/vim-ruby'
+    "Plug 'vim-ruby/vim-ruby'
 
     " rhubarb provides support for fugitive's Gbrowse for github
-    Plug 'tpope/vim-rhubarb'
+    "Plug 'tpope/vim-rhubarb'
 
     " fugitive is a git wrapper
-    Plug 'tpope/vim-fugitive'
+    "Plug 'tpope/vim-fugitive'
 
-    " obsolete? need to simlink to /.vim/plugged/xmledit/ftplugin, ln -s xml.vim html.vim
-    Plug 'vim-scripts/xmledit'
-
-    " gitgutter tracks lines that have been added/removed/changed
-    Plug 'airblade/vim-gitgutter'
 
     " autoclose completes brackets, quotes, etc
     Plug 'vim-scripts/AutoClose'
     "
     " Goyo and limelight are for minimalist writing views
-    Plug 'junegunn/goyo.vim'
-    Plug 'junegunn/limelight.vim'
+    "Plug 'junegunn/goyo.vim'
+    "Plug 'junegunn/limelight.vim'
 
     " Provide some functionality for markdown editing
-    Plug 'plasticboy/vim-markdown'
+    "Plug 'plasticboy/vim-markdown'
 
     " tcomment toggles comments (gcc)
-    Plug 'tomtom/tcomment_vim'
+    "Plug 'tomtom/tcomment_vim'
 
     "vim-latex-live-preview allows realtime preview of latex files
-    Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
+    "Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
 
     " vimtex for compiling latex in vim
-    Plug 'lervag/vimtex'
-
-    " ctrl-p fuzzyfinds files and buffers
-    Plug 'ctrlpvim/ctrlp.vim'
+    "Plug 'lervag/vimtex'
 
     " ultisnips inserts snippets, i.e., predefined chunks
-    Plug 'SirVer/ultisnips'
+    "Plug 'SirVer/ultisnips'
 
     " TableMode for easily generating tables
     " Plug 'dhruvasagar/vim-table-mode'
@@ -72,38 +77,35 @@ call plug#begin()
     " Plug 'tomlion/vim-solidity'
 
     " generate markdown table of contents
-    Plug 'mzlogin/vim-markdown-toc'
+    "Plug 'mzlogin/vim-markdown-toc'
 
     "----- Colors / themes -----"
     " gruvbox colortheme
-    Plug 'morhetz/gruvbox'
+    "Plug 'morhetz/gruvbox'
 
     " dracula colortheme
-    Plug 'koreymacdougall/dracula'
+    "Plug 'koreymacdougall/dracula'
 
     " molokai colortheme
-    Plug 'koreymacdougall/molokai'
+    "Plug 'koreymacdougall/molokai'
 
     " solarized colortheme
-    Plug 'altercation/vim-colors-solarized'
+    "Plug 'altercation/vim-colors-solarized'
     
     " Calendar mode
     " Plug 'mattn/calendar-vim'
 
     " speed up folding
-    Plug 'Konfekt/FastFold'
-
-    " NERDtree (sorry netrw. ghost buffer trees RIP)
-    Plug 'preservim/nerdtree'
+    "Plug 'Konfekt/FastFold'
 
     " NERDtree plugin to show git status flags - 2020-05-06
-    Plug 'Xuyuanp/nerdtree-git-plugin'
+    "Plug 'Xuyuanp/nerdtree-git-plugin'
 
     "  vim-indent-guides to show indentation levels - 2020-06-04 
     " Plug 'nathanaelkane/vim-indent-guides'
     "
     "Indentline for showing bars where code is indented
-    Plug 'Yggdroot/indentLine'
+    "Plug 'Yggdroot/indentLine'
 
     " autocompletion
     " Plug 'ycm-core/YouCompleteMe'
@@ -119,7 +121,7 @@ call plug#begin()
     " post install (yarn install | npm install)
     " Plug 'prettier/vim-prettier', { 'do': 'npm install' }
     " Ale - Asynchronous Linting Engine
-    Plug 'w0rp/ale', { 'do': 'npm install' }
+    "Plug 'w0rp/ale', { 'do': 'npm install' }
 
 call plug#end()
 

+ 3 - 3
vim/settings.vim

@@ -17,8 +17,8 @@ set wrap linebreak tw=80    "window wrap, linebreak, textwidth
 ""set breakindent             "indent multi-line wrapped lines
 
 " note that light themes don't work well if xresources not using a light theme
-colorscheme dracula
-" set background=default
+colorscheme default
+set background=dark
 
 set nocursorcolumn
 set cursorline
@@ -31,7 +31,7 @@ let g:vim_markdown_conceal_code_blocks = 0
 " add parent dir for tags
 set tags+=../tags
 
-set statusline=%t\ [%n]\ (%F)\ %{fugitive#statusline()[4:-2]}\ %h%w%m%r%y%=%-16(\ %l,%c-%v\ %)%P  "apapted from tpope
+"set statusline=%t\ [%n]\ (%F)\ %{fugitive#statusline()[4:-2]}\ %h%w%m%r%y%=%-16(\ %l,%c-%v\ %)%P  "apapted from tpope
 " set statusline=[%n]\ %<%.99f\ %{fugitive#statusline()[4:-2]}\ %h%w%m%r%y%=%-16(\ %l,%c-%v\ %)%P  "apapted from tpope
 set laststatus=2            "always show statusline
 set showcmd                 "show command while typing it

+ 0 - 0
xthemes/gruvbox_theme


Some files were not shown because too many files changed in this diff