Personal Desktop Keybindings
Table of Contents
Hyprland Keybindings
My Hyprland setup has 4 workspaces on the main screen and 1 workspace on the side screen. This layout helps me stay focused on the main screen while keeping the side screen available for dedicated tasks.
Main modifier key: SUPER
Terminal & Apps
SUPER + f→ Open terminal (uwsm app -- $terminal)SUPER + m→ Open terminal with clipse class and runclipseSUPER + g→ Launch rofi app launcher with iconsSUPER + SHIFT + g→ Run rofi-next-empty-ws.sh script
The
rofi-next-empty-ws.shscript iterates through all workspaces and switches to the first empty one (a workspace with no open windows). This allows you to launch new applications on a clean workspace automatically, keeping your workflow organized and avoiding clutter.
System Utilities
SUPER + SHIFT + m→ Lock screen (hyprlock)SUPER + i→ Open color picker (hyprpicker)SUPER + o→ Take screenshot of a region (hyprshot)
Window Management
SUPER + d→ Kill active windowSUPER + n→ Toggle fullscreen for active windowSUPER + q→ Exit HyprlandSUPER + h→ Toggle split mode on active window
Window Navigation
SUPER + j→ Move focus leftSUPER + ;(semicolon) → Move focus rightSUPER + l→ Move focus upSUPER + k→ Move focus down
Workspace Switching
SUPER + e→ Switch to workspace 1SUPER + r→ Switch to workspace 2SUPER + t→ Switch to workspace 3SUPER + y→ Switch to workspace 4SUPER + u→ Switch to workspace 5
Move Active Window to Workspace
SUPER + SHIFT + e→ Move window to workspace 1SUPER + SHIFT + r→ Move window to workspace 2SUPER + SHIFT + t→ Move window to workspace 3SUPER + SHIFT + y→ Move window to workspace 4SUPER + SHIFT + u→ Move window to workspace 5
Resize Active Window
SUPER + SHIFT + j→ Resize active window by -15px horizontallySUPER + SHIFT + ;(semicolon) → Resize active window by +15px horizontallySUPER + SHIFT + l→ Resize active window by -15px verticallySUPER + SHIFT + k→ Resize active window by +15px vertically
Move Active Window Around
SUPER + ALT + j→ Move window leftSUPER + ALT + ;(semicolon) → Move window rightSUPER + ALT + l→ Move window upSUPER + ALT + k→ Move window down
Neovim Keybindings
Plugins
LSP and Diagnostics (must)
<leader>lgD→ Go to declaration<leader>lgd→ Go to definition<leader>lgr→ List references<leader>ln→ Rename symbol<C-o>→ Go back to the previous location in jump list (e.g. after a definition jump)<C-i>→ Go forward in the jump list (opposite of<C-o>)<leader>la→ Code action<leader>lgt→ Go to type<leader>lS→ List document symbols<leader>lgi→ List implementations<leader>lwl→ List workspace folders<leader>lws→ List workspace symbols<leader>lgn→ Go to next diagnostic<leader>lgp→ Go to previous diagnostic<leader>le→ Open diagnostic floatK→ Show hover information, including the function signature (when cursor is on the function name)<leader>ls→ Show signature help while typing function parameters (e.g. when cursor is inside the parenthesesfunctionName(|))
nvim-treesitter-textobjects
if/af→ Inner/around function selectionic/ac→ Inner/around class selectionia/aa→ Inner/around parameter selectionii/ai→ Inner/around conditional block selectionil/al→ Inner/around loop selectioni./a.→ Inner/around function call selectioni'/a'→ Inner/around code block selectionMust be used with operators like y (yank), d (delete), c (change), or v (visual mode)
]m/[m→ Go to next/previous function start]M/[M→ Go to next/previous function end]]/[[→ Go to next/previous class start][/[]→ Go to next/previous class endCan be used with operators as mentioned above
nvim/blink-cmp
<CR>→ Confirm the selected completion item<Tab>→ Select next item in the completion menu<S-Tab>→ Select previous item in the completion menu<C-e>→ Close the completion menu<C-Space>→ Trigger completion manually
Harpoon
<C-j>→ Jump to file 1<C-k>→ Jump to file 2<C-l>→ Jump to file 3<C-;>→ Jump to file 4<C-h>→ List marked files<C-m>→ Mark current file
Telescope
<leader>ff→ Find files in current directory<leader>fG→ Live grep in current directory<leader>fp→ Find projects<leader>fg→ Find files in git repository
Todo Comments
<leader>th→ Show all todo comments in Telescope<leader>tj→ Show fix-related comments (FIX, FIXME, BUG)<leader>tk→ Show note-related comments (NOTE, INFO)<leader>tl→ Show hack-related comments (HACK)<leader>t;→ Show only TODO comments
Neogen (Documentation Generator)
<leader>nd→ Generate general documentation<leader>nf→ Generate function documentation<leader>nc→ Generate class documentation
Comment-nvim
<C-c>→ Toggle comment for current line in normal mode<C-c>→ Toggle comment for selected lines in visual mode<C-v>→ Toggle comment for current block in normal mode<C-v>→ Toggle comment for selected block in visual mode
Copilot
<C-j>→ Accept Copilot suggestion<C-;>→ Accept single word from Copilot suggestion<C-CR>(Ctrl + Enter) → Accept entire line from Copilot suggestion<C-x>→ Dismiss Copilot suggestion<C-k>→ Next Copilot suggestion<C-l>→ Previous Copilot suggestion<leader>ap→ Open Copilot panel<CR>(Enter) → Accept suggestion in Copilot panel<C-n>→ Jump to next suggestion in Copilot panel<C-m>→ Jump to previous suggestion in Copilot panel
nvim-surround
ys{motion}{char}→ Surround text object with character (e.g.,ysiw"surrounds word with quotes)yss{char}→ Surround entire line with characterds{char}→ Delete surrounding characters (e.g.,ds"removes surrounding quotes)cs{target}{replacement}→ Change surrounding characters (e.g.,cs"'changes “ to ‘)S{char}→ In visual mode, surround selection with characterUse with text objects (w: word, s: sentence, p: paragraph) or motions
Utility
<leader>q→ Quit current buffer/window
Diffview
<leader>dh→ Open current file history<leader>dj→ Open file history for every file in the repo<leader>d;→ Close Diffview<leader>dk→ Navigate to next hunk/change<leader>dl→ Navigate to previous hunk/change<leader>df→ Switch between windows (hop between changes)
Debugging (nvim-dap)
<F5>→ Continue/Start debugging<F10>→ Step over<F11>→ Step into<F12>→ Step out<leader>db→ Toggle breakpoint<leader>dB→ Set conditional breakpoint
ThePrimeagen-inspired Keybindings
Text Movement and Manipulation
<leader>p(Visual mode) → Paste over selection without copying the deleted text<leader>d(Normal mode) → Delete without saving to register<leader>d(Visual mode) → Delete selection without saving to register
File Operations
<leader>x(Normal mode) → Make current file executable (chmod +x)
Basic
Modes
i→ Enter Insert mode at cursor positionI→ Enter Insert mode at beginning of linea→ Enter Insert mode after cursorA→ Enter Insert mode at end of lineo→ Insert new line below and enter Insert modeO→ Insert new line above and enter Insert modev→ Enter Visual mode (character selection)V→ Enter Visual Line mode (line selection)R→ Enter Replace modeEsc→ Return to Normal mode:→ Enter Command modeq:→ Open command history windowq/orq?→ Open search history window
Normal Mode Navigation
Basic Movement
j→ Move cursor leftk→ Move cursor downl→ Move cursor up;→ Move cursor right
Word Navigation
w→ Move to start of next wordW→ Move to start of next WORD (space-separated)e→ Move to end of current/next wordE→ Move to end of current/next WORDb→ Move to beginning of current/previous wordB→ Move to beginning of current/previous WORDge→ Move to end of previous wordgE→ Move to end of previous WORD
Line Navigation
0→ Move to start of line (first column)^→ Move to first non-blank character of line$→ Move to end of lineg_→ Move to last non-blank character of line{n}|→ Move to column n (prefix with number)f{char}→ Move to next occurrence of character {char} on current lineF{char}→ Move to previous occurrence of character {char} on current linet{char}→ Move to before next occurrence of character {char} on current lineT{char}→ Move to after previous occurrence of character {char} on current lineh→ Repeat last f, F, t, or T movement (NOTE: modified from;),→ Repeat last f, F, t, or T movement in opposite direction
Document Navigation
gg→ Go to first line of documentG→ Go to last line of document{number}Gor:{number}→ Go to line {number}Ctrl + o→ Jump to previous location in jump listCtrl + i→ Jump to next location in jump listH→ Move to top of screen (High)M→ Move to middle of screen (Middle)L→ Move to bottom of screen (Low)zz→ Center current line on screenzt→ Position current line at top of screenzb→ Position current line at bottom of screen
Scrolling
Ctrl + f→ Scroll forward one full screenCtrl + b→ Scroll backward one full screenCtrl + d→ Scroll down half a screenCtrl + u→ Scroll up half a screenCtrl + e→ Scroll down one lineCtrl + y→ Scroll up one line
Paragraph and Section Navigation
}→ Move to next paragraph/code block{→ Move to previous paragraph/code block]]→ Move to next section[[→ Move to previous section][→ Move to end of section[]→ Move to end of previous section
Marks
m{a-zA-Z}→ Set mark at current position'{a-zA-Z}→ Jump to line of mark- ```{a-zA-Z}` → Jump to position of mark
''→ Jump to position before last jump- ` `` ` → Jump to position before last jump
'.→ Jump to position of last change`.→ Jump to position of last change:marks→ List all marks
Pattern Searching
/{pattern}→ Search forward for pattern?{pattern}→ Search backward for patternn→ Repeat last search in same directionN→ Repeat last search in opposite direction*→ Search forward for word under cursor#→ Search backward for word under cursorg*→ Search forward for partial word under cursorg#→ Search backward for partial word under cursorgd→ Go to local declaration of word under cursorgD→ Go to global declaration of word under cursor
Text Objects
d, c, and y commands can be used with text objects to delete, change, or yank text within specific structures. Here are some common text objects:
iw→ Inner word (word without spaces)aw→ A word (word with spaces)is→ Inner sentenceas→ A sentenceip→ Inner paragraphap→ A paragraphi(ori)→ Inside parenthesesa(ora)→ Around parenthesesi{ori}→ Inside curly bracesa{ora}→ Around curly bracesi[ori]→ Inside square bracketsa[ora]→ Around square bracketsi<ori>→ Inside angle bracketsa<ora>→ Around angle bracketsi"→ Inside double quotesa"→ Around double quotesi'→ Inside single quotesa'→ Around single quotesi` → Inside backticksa` → Around backticksit→ Inside tags (HTML/XML)at→ Around tags (HTML/XML)
Editing in Normal Mode
Basic Editing
x→ Delete character under cursorX→ Delete character before cursorr{char}→ Replace character under cursor with {char}~→ Switch case of character under cursorJ→ Join current line with next linegJ→ Join current line with next line without space>>→ Indent current line<<→ Unindent current line
Deletion Commands
d{motion}→ Delete text covered by motiondd→ Delete current lineD→ Delete from cursor to end of line{number}dd→ Delete {number} lines{number}d{motion}→ Delete {number} of motion (e.g.3dw- delete 3 words)dw→ Delete from cursor to start of next worddiw→ Delete inner word (word without spaces)daw→ Delete a word (word with spaces)d0→ Delete from cursor to start of lined^→ Delete from cursor to first non-blank character of lined$orD→ Delete from cursor to end of linedG→ Delete from current line to end of filedgg→ Delete from current line to start of filedi{→ Delete text inside curly bracesda{→ Delete text including curly bracesdi(→ Delete text inside parenthesesda(→ Delete text including parenthesesdi[→ Delete text inside square bracketsda[→ Delete text including square bracketsdi"→ Delete text inside double quotesda"→ Delete text including double quotesdi'→ Delete text inside single quotesda'→ Delete text including single quotes
Changing Commands (Delete and Enter Insert Mode)
c{motion}→ Change text covered by motioncc→ Change current lineC→ Change from cursor to end of line{number}cc→ Change {number} linescw→ Change from cursor to start of next wordciw→ Change inner word (word without spaces)caw→ Change a word (word with spaces)c0→ Change from cursor to start of linec^→ Change from cursor to first non-blank character of linec$orC→ Change from cursor to end of lineci{→ Change text inside curly bracesca{→ Change text including curly bracesci(→ Change text inside parenthesesca(→ Change text including parenthesesci[→ Change text inside square bracketsca[→ Change text including square bracketsci"→ Change text inside double quotesca"→ Change text including double quotesci'→ Change text inside single quotesca'→ Change text including single quotes
Yanking (Copying) Commands
y{motion}→ Yank text covered by motionyyorY→ Yank current line{number}yy→ Yank {number} linesyw→ Yank from cursor to start of next wordyiw→ Yank inner word (word without spaces)yaw→ Yank a word (word with spaces)y0→ Yank from cursor to start of liney^→ Yank from cursor to first non-blank character of liney$→ Yank from cursor to end of lineyi{→ Yank text inside curly bracesya{→ Yank text including curly bracesyi(→ Yank text inside parenthesesya(→ Yank text including parenthesesyi[→ Yank text inside square bracketsya[→ Yank text including square bracketsyi"→ Yank text inside double quotesya"→ Yank text including double quotesyi'→ Yank text inside single quotesya'→ Yank text including single quotes
Putting (Pasting) Commands
p→ Put after cursorP→ Put before cursor]p→ Put after cursor and align with current line[p→ Put before cursor and align with current linegp→ Put after cursor and move cursor to end of pasted textgP→ Put before cursor and move cursor to end of pasted text
Undo and Redo
u→ Undo last changeU→ Undo all changes on current lineCtrl + r→ Redo last undone change
Repeating
.→ Repeat last change{number}.→ Repeat last change {number} times@:→ Repeat last command@@→ Repeat last macro{number}@{a-z}→ Execute macro {a-z} {number} times
Text Case Manipulation
~→ Toggle case of character under cursor and move to next characterg~{motion}→ Toggle case of text covered by motiong~iw→ Toggle case of current wordg~$→ Toggle case from cursor to end of lineg~~→ Toggle case of current linegU{motion}→ Make text covered by motion uppercasegUiw→ Make current word uppercasegU$→ Make text from cursor to end of line uppercasegUU→ Make current line uppercasegu{motion}→ Make text covered by motion lowercaseguiw→ Make current word lowercasegu$→ Make text from cursor to end of line lowercaseguu→ Make current line lowercase
Insert Mode
Esc→ Exit Insert modeCtrl + o→ Execute one Normal mode command, then return to Insert modeCtrl + t→ Indent lineCtrl + d→ Unindent lineCtrl + h→ Delete character before cursor (like Backspace)Ctrl + w→ Delete word before cursorCtrl + u→ Delete all characters before cursor in current lineCtrl + m→ Insert line break (same as Enter)Ctrl + n→ Insert next match of word before cursor (autocomplete)Ctrl + p→ Insert previous match of word before cursor (autocomplete)Ctrl + r {register}→ Insert content of {register}Ctrl + r =→ Insert result of expression (calculator)Ctrl + x Ctrl + l→ Insert whole line (completion)Ctrl + x Ctrl + f→ Insert filename (completion)Ctrl + x Ctrl + o→ Insert language-aware completion (omnicomplete)Ctrl + v {char}→ Insert character literallyCtrl + v {code}→ Insert character by decimal codeCtrl + v u{hex}→ Insert Unicode character by hex codeCtrl + k {char1} {char2}→ Insert digraph (special character)
Visual Mode
v→ Start Visual mode (character-wise)V→ Start Visual Line modeCtrl + v→ Start Visual Block modeo→ Move to other end of selectionO→ Move to other corner of blockaw→ Select a wordab→ Select a block with ()aB→ Select a block with {}at→ Select a block with tagsiw→ Select inner wordib→ Select inner block with ()iB→ Select inner block with {}it→ Select inner block with tagsEscorCtrl + [→ Exit Visual mode>→ Shift right<→ Shift lefty→ Yank (copy) selectiond→ Delete selectionc→ Change selection (delete and enter Insert mode)~→ Toggle caseu→ Make lowercaseU→ Make uppercaseJ→ Join selected linesr{char}→ Replace all selected characters with {char}gq→ Format selected text:→ Enter Command mode for selected rangeCtrl + a→ Increment number in selectionCtrl + x→ Decrement number in selectionI→ Insert text at start of each line in block (Visual Block mode)A→ Insert text at end of each line in block (Visual Block mode)$→ Move to end of line for all lines in selection (Visual Block mode)
File Operations
:w→ Write (save) file:w {file}→ Write to {file}:w! {file}→ Overwrite {file}:wqor:xorZZ→ Write and quit:q→ Quit:q!orZQ→ Quit without saving:wqa→ Write all buffers and quit:qa→ Quit all buffers:qa!→ Quit all buffers without saving
Search and Replace Flag Behavior
Without the g Flag:
:%s/old/new→ Replace only the first occurrence of “old” with “new” on each line:s/old/new→ Replace only the first occurrence of “old” on the current line:%s/old/new/c→ Replace the first occurrence on each line with confirmation
With the g Flag (global):
:%s/old/new/g→ Replace all occurrences of “old” with “new” in the entire file:s/old/new/g→ Replace all occurrences on the current line:%s/old/new/gc→ Replace all occurrences with confirmation
Other Useful Flags:
i→ Case-insensitive matching (:s/old/new/i)I→ Case-sensitive matching (explicitly override ‘ignorecase’ setting)c→ Confirm each replacemente→ Suppress error messages (useful in scripts)n→ Count matches without replacing
Fish Shell Aliases and Functions
Aliases
ns→sudo nixos-rebuild switch --flake .#desktopreboot→systemctl reboot..→cd .....→cd ../...3→cd ../../...4→cd ../../../...5→cd ../../../../..ls→eza -al --color=always --group-directories-firstla→eza -a --color=always --group-directories-firstll→eza -l --color=always --group-directories-firstlt→eza -T --color=always --group-directories-first --ignore-glob=".git/*"l.→eza -al --color=always --group-directories-first ../l..→eza -al --color=always --group-directories-first ../../l...→eza -al --color=always --group-directories-first ../../../df→df -hgrep→grep --color=autoc→clearcat→batga→git addgaa→git add --allgau→git add -ugc→git commit -mgcl→git clonegco→git checkoutgb→git branchgf→git fetchgp→git push origingpl→git pull origingt→git taggta→git tag -ags→git statusjctl→journalctl -p 3 -xb
Functions
__history_previous_command: Handles!!to replace it with the last command in history.__history_previous_command_arguments: Handles!$to replace it with the arguments of the last command.__my-ctrl-k: On Ctrl+k, moves down in history or paging mode.__my-ctrl-l: On Ctrl+l, moves up in history or paging mode.fj: Finds and jumps to a directory using fd and fzf with an interactive selector.fk: Selects and kills a process using fzf with an interactive process list.fl: Finds and opens a file in your default editor using fd and fzf.fh: Searches and executes a command from your shell history using fzf.