ubantu | nvim | i3 | tmux | alacritty

 

================================================ubuntu=========================================== 
``` 
sudo apt install xclip // install this clipboard application
// this will create a config file in you setting to keep shortcut forever 
echo "alias cpy='xclip -selection clipboard'" >> ~/.bashrc && source ~/.bashrc 
// two example show that how you going to use this shortcut
e.g.1.    npm run dev |& cpy 
e.g.1.1    python3 filenae.py |& cpy
``` 
Ctrl + alt + t terminal
Windows icon = search bar
Windows + A = open app
Windows + D = to access desktop from any (files, folder, app)
Windows+ tab = switch between the tabs
Ctrl + alt + upper arrow or lower arrow = switching between work spaces
Ctrl + q = to close an application
Windows+ l = lock the screen
Ctrl + alt + del = logout from system
Shift+ Ctrl +alt +r = for start and stop the recording 
Print screen key  = screenshot 
bfn+f2  - rename you code or veriable

ctrl + K + d -

ctrl + shift+t - to reopen closed tabs

shift + tba - selecting a section of code

ctrl + shift + tab - reverse switching between tabs
ctrl + tab - forward switching between tabs


alt + shift + tab - reverse switching between windows
alt + tab - forward switching between windows

fn+f8 - move to current and previous error

ctrl + end or home - this will select start and end of the line behind code base your coursor

ctrl + p - use this key to go spefice file

ctrl + shift + s - to save all unsave file

ctrl + f - to search different things

ctrl + z to redo the change
ctrl + shifr + z - redo the change

win + shift+ s - to take screen shot
 
//first download pkg and then open terminal on that where you download file
then run this command 
sudo dpkg -i [Insomnia.Core-9.1.1.deb]
 
 //root access
sudo -i //to get access of root file in terminal
exit // to exit root file in terminal

 


==========================================================================

nvim

nvim ~/.config/nvim/init.vim //enter the envirment
 

#Change File Configration 
 


" =======================================
" 📦 Plugin Setup
" =======================================
call plug#begin('~/.vim/plugged')

" 🌈 Theme

" 📁 File Explorer
Plug 'preservim/nerdtree'

" 🔤 Auto pairs
Plug 'windwp/nvim-autopairs'

call plug#end()

" =======================================
" ⚙️ Basic Settings
" =======================================
set number
set relativenumber
set termguicolors        " Enable True Colors
syntax on

let NERDTreeShowHidden=1

" =======================================
" 🧠 Custom Keybindings
" =======================================

command! FormatPrettier execute '!prettier --write %' | edit!
nnoremap <leader>p :FormatPrettier<CR>
nnoremap <C-v> "+p:
nnoremap <C-n> :NERDTreeToggle<CR>
inoremap <A-b> <Esc>
inoremap <A-b> <Esc>
vnoremap <C-c> "+y
inoremap <C-v> <C-r>+
autocmd FileType nerdtree nnoremap <buffer> <C-r> :NERDTreeRefreshRoot<CR>


" =======================================
" ⚡ Lua Plugin Configs
" =======================================
lua << EOF
require("nvim-autopairs").setup {}
EOF

" =======================================
" 🌈 Enhanced Custom Comment Highlights (Anywhere in Line)
" =======================================

" Define custom highlight groups with bright, readable colors
highlight CommentExclamation guifg=#ff4d4d  ctermfg=Red           " ! → Red
highlight CommentQuestion    guifg=#1D19BF  ctermfg=Blue          " ? → Blue
highlight CommentStar        guifg=#FFF424  ctermfg=Yellow        " * → Yellow
highlight CommentTodo        guifg=#E86891  ctermfg=Magenta       " TODO: → Pink
highlight CommentLine        guifg=#7F34B3  ctermfg=Magenta       " // → Purple
highlight CommentNote        guifg=#00FFAA  ctermfg=Cyan          " NOTE: → Aqua
highlight CommentFixme       guifg=#FF8800  ctermfg=DarkYellow    " FIXME: → Orange
highlight CommentSuccess     guifg=#00FF00  ctermfg=Green         " DONE: → Green
highlight CommentIdea        guifg=#7FFF00  ctermfg=Green         " IDEA: → Lime
highlight CommentInfo        guifg=#33B5E5  ctermfg=Cyan          " INFO: → Sky Blue

function! s:SetupCommentHighlights()
  " Clear previous highlights to avoid duplication
  call clearmatches()

  " Match patterns anywhere in the line using \v (very nomagic)
  call matchadd('CommentExclamation', '\v!\s.*')
  call matchadd('CommentStar', '\v\*\s.*')
  call matchadd('CommentTodo', '\vTODO:\s?.*')
  call matchadd('CommentQuestion', '\v\?\s?.*')
  call matchadd('CommentLine', '\v//.*')
  call matchadd('CommentNote', '\vNOTE:\s?.*')
  call matchadd('CommentFixme', '\vFIXME:\s?.*')
  call matchadd('CommentSuccess', '\vDONE:\s?.*')
  call matchadd('CommentIdea', '\vIDEA:\s?.*')
  call matchadd('CommentInfo', '\vINFO:\s?.*')
endfunction

augroup CustomCommentHighlights
  autocmd!
  autocmd BufEnter,BufWritePost,TextChanged,TextChangedI * call s:SetupCommentHighlights()
augroup END


-------------------------------------------------Configuration end here-----------------------------------------------------

   after pasting configuration save file   :wq 
type this one nvim editor in normal mode for refresh:-   :source % 

------------------------------------------------------------------------------------------------------------------

//now install all plagins 

npm install -g prettier //before install plug install your code looks pretty

run this in nvim and check xclip is support on nvim or not
:echo has("clipboard")  // if you get 1 you are good other wise if you get 0 then need to fix issue
 

sudo apt install xclip //install this app first 

nvim +PlugInstall  //write this in bash to install plug

 

🧰 Summary of Uninstall Plugin 

Action Command / What to Do
Remove plugin line Delete or comment the Plug '...' line
Clean unused plugins :PlugClean
Reinstall current ones :PlugInstall
Switch color theme colorscheme new_theme_name

 


======================================================================

i3 

in this chat describe how to install the i3 application windows manager

https://chatgpt.com/share/68356fc4-9020-8013-97e0-c658f1f1aa57

 

//create a file and save this  

sudo brightnessctl set +10%  // run this in your bash to increase the brightness in i3

sudo brightnessctl set 10%-    // run this in your bash to decrease the brightness in i3

nano ~/.config/i3/my_status.sh

//give permission to run the file
chmod +x ~/.config/i3/my_status.sh
 

i3 my_status.sh  configration

 

#!/bin/bash

echo '{"version":1}'
echo '['
echo '[],'

while true; do
    battery=$(acpi -b | grep -o '[0-9]\+%' | head -n 1)
    [[ -z "$battery" ]] && battery="N/A"

    time_now=$(date "+%Y-%m-%d %H:%M:%S")

    # Format JSON correctly
    echo "[{\"name\":\"battery\", \"full_text\":\"🔋 Battery: $battery\"},"\
"{\"name\":\"time\", \"full_text\":\"🕒 $time_now\"}],"
    
    sleep 5
done

 

 //go this file

nano ~/.config/i3/config

 

// replace this with this similler line

bar {
    status_command ~/.config/i3/my_status.sh
}

 =========================================================================

tmux

 ctrl +b +% //horizontal new windows

ctrl+b+" //vertical new windows

ctrl + b + x + y//close the peny

ctrl + b + & + y // colse the windows of tmux 

ctrl + b + long press ctrl + use arrow to resize windows size

ctrl + b + arrow key to travel in windows 

for copy and paste

ctrl + b + [  //to enter the environment to move cursor

ctrl + space // to start select the variable or line you want to copy

ctrl + w // to copy those variables or line 

 ctrl + b + ]  //to paste the selected part in termnal 

 

 

 =============================Aaccritty=========================================

 create "alacritty"directory and "alacritty.yml"file

location should look like this

nvim ~/.config/alacritty/alacritty.yml

this is configuration file 👇

 # ============================================
#   Alacritty — Futuristic Minimal Look
# ============================================

window:
  padding:
    x: 10
    y: 10
  dynamic_title: true
  decorations: none     # No borders, clean look
  opacity: 0.94         # Slight transparency for futuristic feel
  blur: true            # Soft blur behind window (if supported)

font:
  normal:
    family: JetBrains Mono
    style: Regular
  bold:
    family: JetBrains Mono
    style: Bold
  italic:
    family: JetBrains Mono
    style: Italic
  size: 12.0
  offset:
    x: 0
    y: 1
  glyph_offset:
    x: 0
    y: 0
  builtin_box_drawing: true

scrolling:
  history: 10000
  multiplier: 3

cursor:
  style:
    shape: Beam     # Thin neon-like cursor
    blinking: Always
  blink_interval: 500

colors:
  primary:
    background: "#0A0A0F"     # Deep futuristic black
    foreground: "#E6E6E6"     # Soft bright white

  cursor:
    text: "#0A0A0F"
    cursor: "#6C63FF"         # Futuristic purple beam

  normal:
    black:   "#1A1A1E"
    red:     "#FF5C57"
    green:   "#5AF78E"
    yellow:  "#F3F99D"
    blue:    "#57C7FF"
    magenta: "#FF6AC1"
    cyan:    "#9AEDFE"
    white:   "#F1F1F0"

  bright:
    black:   "#282A36"
    red:     "#FF6E67"
    green:   "#5AF78E"
    yellow:  "#F4F99D"
    blue:    "#57C7FF"
    magenta: "#FF92D0"
    cyan:    "#A4FFFF"
    white:   "#FFFFFF"

selection:
  save_to_clipboard: true

live_config_reload: true

## now migrate the file
alacritty migrate

 

 

 

Comments

Popular posts from this blog

CyberSecurity

VERTICAL SCALING 💋

prisma using in project idx 13.3