general_configs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
general_configs [2021/12/30 16:51] – 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 162: | Line 183: | ||
deb http:// | deb http:// | ||
deb-src http:// | deb-src http:// | ||
- | |||
- | deb http:// | ||
- | deb-src http:// | ||
deb http:// | deb http:// | ||
deb-src http:// | deb-src http:// | ||
+ | |||
+ | # deb http:// | ||
+ | # deb-src http:// | ||
+ | |||
+ | deb http:// | ||
+ | deb-src http:// | ||
</ | </ | ||
- | **source.list for Bullseye (testing, for now): | + | **source.list for Bullseye (testing, for now--OUT OF DATE... needs some attention...):** |
< | < | ||
Line 192: | 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 209: | 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 220: | 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 233: | 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 248: | 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 257: | 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 | ||
</ | </ | ||
- | |||
- | ---- | ||
- | |||
- | ===== Reinstall GRUB ===== | ||
- | |||
- | I triple boot O/Ss... so once in a while one will update and over-write my MBR. To get the correct GRUB into the MBR, boot into the preferred O/S and run (as root): | ||
- | |||
- | < | ||
- | |||
- | Then: | ||
- | |||
- | < | ||
- | |||
- | Done. | ||
---- | ---- | ||
Line 320: | Line 399: | ||
---- | ---- | ||
- | ===== Kali: root ===== | + | ===== Kali ===== |
+ | |||
+ | ==== root ==== | ||
Kali made the spectacular decision to [[https:// | Kali made the spectacular decision to [[https:// | ||
Line 341: | Line 422: | ||
Ah... happiness again in the land of hacker [[https:// | Ah... happiness again in the land of hacker [[https:// | ||
+ | |||
+ | ==== os-prober ==== | ||
+ | |||
+ | After grub v2.06 '' | ||
+ | |||
+ | < | ||
+ | # file: / | ||
+ | |||
+ | GRUB_DISABLE_OS_PROBER=false | ||
+ | </ | ||
+ | |||
+ | Then run: '' | ||
+ | |||
+ | For more on grub: [[resources# | ||
---- | ---- |
general_configs.1640883116.txt.gz · Last modified: by gman