general_configs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
general_configs [2022/10/17 14:46] – [Kali: root] gman | general_configs [2023/01/07 22:46] (current) – gman | ||
---|---|---|---|
Line 127: | Line 127: | ||
systemctl set-default multi-user.target # boot to cli (runlevels 2,3,4) | systemctl set-default multi-user.target # boot to cli (runlevels 2,3,4) | ||
systemctl set-default graphical.target | systemctl set-default graphical.target | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== GenMon ===== | ||
+ | |||
+ | **XFCE General Monitor Panel App** | ||
+ | |||
+ | I wanted to get my VPN address on the panel so I could easily see it to work on some TryHackMe rooms. | ||
+ | * I wrote the following shell script and did a '' | ||
+ | * Works so far. | ||
+ | |||
+ | < | ||
+ | # | ||
+ | |||
+ | if [ -e / | ||
+ | then | ||
+ | hostname -I | awk ' | ||
+ | else | ||
+ | echo "Not Connected" | ||
+ | fi | ||
</ | </ | ||
Line 195: | Line 216: | ||
---- | ---- | ||
- | ===== .vimrc ===== | + | ===== VIM ===== |
+ | |||
+ | ==== Column Indicators ==== | ||
+ | |||
+ | If you have Vim >= v7.3, add this to your .vimrc | ||
+ | |||
+ | < | ||
+ | |||
+ | You need to set the ColorColumn highlight (shorthand: '' | ||
+ | |||
+ | < | ||
+ | hi ColorColumn ctermbg=233 | ||
+ | |||
+ | ## The following line includes a setting for the vim GUI: | ||
+ | # hi ColorColumn ctermbg=233 guibg=# | ||
+ | </ | ||
+ | |||
+ | You can find your colorschemes here: | ||
+ | |||
+ | < | ||
+ | |||
+ | If you don't know which colorscheme vim is currently using, open up vim, type ":" | ||
+ | |||
+ | If you want to see what colorschemes are available, after entering '' | ||
+ | |||
+ | < | ||
+ | " Change the color scheme | ||
+ | " install color scheme in / | ||
+ | colorscheme gman1 | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== .vimrc | ||
< | < | ||
Line 212: | Line 265: | ||
" Display line numbers on the left | " Display line numbers on the left | ||
set number | set number | ||
+ | |||
+ | " Display line numbers above and below, relative to current | ||
+ | " Makes yanking a bunch of lines that much easier. | ||
+ | " set relativenumber | ||
+ | |||
+ | " Hybrid line numbers | ||
+ | " https:// | ||
+ | augroup numbertoggle | ||
+ | autocmd! | ||
+ | autocmd BufEnter, | ||
+ | autocmd BufLeave, | ||
+ | augroup END | ||
" Enable smart handling of the tab key | " Enable smart handling of the tab key | ||
Line 223: | Line 288: | ||
set tabstop=4 | set tabstop=4 | ||
- | " | + | " |
- | " install color scheme in / | + | " install color scheme in / |
+ | " The t_Co=256 line should not be needed unles... | ||
+ | " | ||
+ | " | ||
set t_Co=256 | set t_Co=256 | ||
+ | " Choose the color scheme loaded by default | ||
colorscheme gman1 | colorscheme gman1 | ||
" Disable autocomment character insertion | " Disable autocomment character insertion | ||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o | autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o | ||
+ | |||
+ | " Set a column marker at 72 -- comments <= 72 char | ||
+ | " Set a different color for column 80 and beyond -- code lines <= 79 char | ||
+ | " Color for column markers is set in the colorscheme | ||
+ | let & | ||
+ | |||
+ | " Settings for a different colored current line number | ||
+ | " Color for the line number is set in the colorscheme: | ||
+ | set cursorline | ||
+ | set cursorlineopt=number | ||
" End | " End | ||
Line 236: | Line 315: | ||
---- | ---- | ||
- | ===== vim colorscheme | + | ==== vim colorscheme ==== |
Create a text file named gman1.vim (for example) and paste in the text below. | Create a text file named gman1.vim (for example) and paste in the text below. | ||
Line 251: | Line 330: | ||
" background provided by terminal and supports 256 color terminals | " background provided by terminal and supports 256 color terminals | ||
" Tip -- add < | " Tip -- add < | ||
+ | |||
+ | " ctermfg (for setting the foreground) | ||
+ | " ctermbg (for setting the background) | ||
+ | " cterm (for additional properties) | ||
+ | |||
+ | " 256 Color Cheat Sheet: | ||
+ | " https:// | ||
let g: | let g: | ||
Line 260: | Line 346: | ||
" All the Python related stuff | " All the Python related stuff | ||
- | hi Number | + | hi Number |
- | hi Float | + | hi Float ctermfg=141 |
- | hi Statement | + | hi Statement |
- | hi Function | + | hi Function |
- | hi Conditional ctermfg=208 | + | hi Conditional |
- | hi Operator | + | hi Operator |
- | hi Todo ctermfg=253 | + | hi Todo |
- | hi Comment | + | hi Comment |
- | hi Special | + | hi Special |
- | hi String | + | hi String |
- | hi Include | + | hi Include |
- | hi Constant | + | hi Constant |
- | hi Error | + | hi Error ctermfg=88 |
- | hi PreProc | + | hi PreProc |
- | hi Boolean | + | hi Boolean |
- | hi Character | + | hi Character |
"Vim Stuff | "Vim Stuff | ||
- | hi Visual | + | hi Visual |
- | hi VertSplit | + | hi VertSplit |
- | hi ErrorMsg | + | hi ErrorMsg |
- | hi MatchParen | + | hi MatchParen |
- | hi Folded | + | hi Folded |
- | hi FoldColumn | + | hi FoldColumn |
- | hi LineNr | + | hi LineNr |
- | hi NonText | + | hi CursorLineNR ctermfg=202 |
- | hi Pmenu | + | hi NonText |
- | hi PmenuSel | + | hi Pmenu ctermfg=81 |
- | hi PmenuSbar | + | hi PmenuSel |
- | hi PmenuThumb | + | hi PmenuSbar |
- | hi Search | + | hi PmenuThumb |
- | hi IncSearch | + | hi Search |
- | hi TabLine | + | hi IncSearch |
- | hi TabLineSel | + | hi TabLine |
- | hi TabLineFill ctermfg=46 | + | hi TabLineSel |
+ | hi TabLineFill | ||
+ | |||
+ | " Set column markers at colomn 72 and 80ff | ||
+ | hi ColorColumn | ||
</ | </ | ||
Line 335: | Line 425: | ||
==== os-prober ==== | ==== os-prober ==== | ||
- | After grub v2.06 ``os-prober`` is disabled by default, therefore your fresh, shiny, new Kali install will not recognize other operating systems (like Windoze). If this happens, then add this to your ``/ | + | After grub v2.06 '' |
< | < | ||
Line 343: | Line 433: | ||
</ | </ | ||
- | Then run: ``grub-mkconfig'' | + | Then run: '' |
+ | |||
+ | For more on grub: [[resources# | ||
---- | ---- |
general_configs.1666018006.txt.gz · Last modified: by gman