Skip to content

Commands & Aliases

Patrick Motard edited this page Aug 23, 2019 · 2 revisions

Aliases

All aliases are currently listed in ~/.zshrc. This list is not comprehensive.

alias Description
alias lists all aliases in your terminal
tools cd to ~/.local/bin/tools directory in terminal
sz source ~/.zshrc
ez edit ~/.zshrc
xrl reload changes to ~/.Xresources
bgf If you're in virtualbox and your desktop background is jank, this fixes it temporarily

Tool Commands

Tools are scripts included as part of this repo that are used either in config files (like polybar & i3), or you can use directly. Tools are located in ~/.local/bin/tools & ~/.local/bin/setup

Action Command Location Description
runs dot-ansible, updating your system update setup/update updates pacman and aur packages (there is an indicator in polybar that shows you if there are updates available)
take screenshot screenshot Places screenshot with data+time in ~/Dropbox/Screenshots/{YEAR}, pass -h flag for additional options. You can also press the printscreen button

Rofi Commands

Action Command Type Description
open rofi alt+d i3 key combo Opens rofi
open rofi lastpass alt+p i3 key combo Launches rofi in lastpass mode, allowing you to copy account username and passwords to your clipboard quickly
rofi switch view alt+n/p (next/previous) rofi key combo Switches between views in rofi when rofi is open. Views: run, ssh, windows

Spacemacs

Mode Action Command Description
* open .spacemacs SPC f e d spacemacs/find-dotfile : opens .spacemacs in buffer
reload .spacemacs SPC f e R dotspacemacs/sync-configuration-files : reloads .spacemacs config changes
view major mode commands , major mode leader key (quickest way to issue a major mode command)
Org toggle TODO t toggle TODO item between TODO & DONE state in .org file
insert TODO alt-shift-RET insert new TODO in .org file

Termite

using oh-my-zsh vi_mode plugin:

"fd" escape insert mode

"/" vi-history-search-backward

"?" vi-history-search-forward

"n" vi-repeat-search

"N" vi-rev-repeat-search

"lk" accept auto-suggestion

Firefox

https://addons.mozilla.org/en-US/firefox/addon/the-google-search-navigator/

Google Search Navigator

Keybindings

  • /j: Select next search result
  • /k: Select previous previous result
  • //Escape: Focus on input search box
  • Enter/Space: Navigate to selected result
  • Ctrl+Enter/⌘+Enter/Ctrl+Space: Open selected result in background tab
  • Ctrl+Shift+Enter/⌘+Shift+Enter/Ctrl+Shift+Space: Open selected result in new window/tab
  • /h: Navigate to previous search result page
  • /l: Navigate to next search result page
  • a/s: Navigate to All tab (= default search tab)
  • i: Navigate to images tab
  • v: Navigate to videos tab
  • m: Navigate to maps tab
  • n: Navigate to news tab

https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/?src=recommended Vimium-FF

Keyboard Bindings

Modifier keys are specified as , , and for ctrl+x, meta+x, and alt+x respectively. See the next section for how to customize these bindings.

Once you have Vimium installed, you can see this list of key bindings at any time by typing ?.

Navigating the current page:

? show the help dialog for a list of all available keys h scroll left j scroll down k scroll up l scroll right gg scroll to top of the page G scroll to bottom of the page d scroll down half a page u scroll up half a page f open a link in the current tab F open a link in a new tab r reload gs view source i enter insert mode -- all commands will be ignored until you hit Esc to exit yy copy the current url to the clipboard yf copy a link url to the clipboard gf cycle forward to the next frame gF focus the main/top frame

Navigating to new pages:

o Open URL, bookmark, or history entry O Open URL, bookmark, history entry in a new tab b Open bookmark B Open bookmark in a new tab

Using find:

/ enter find mode -- type your search query and hit enter to search, or Esc to cancel n cycle forward to the next find match N cycle backward to the previous find match

For advanced usage, see regular expressions on the wiki.

Navigating your history:

H go back in history L go forward in history

Manipulating tabs:

J, gT go one tab left K, gt go one tab right g0 go to the first tab g$ go to the last tab ^ visit the previously-visited tab t create tab yt duplicate current tab x close current tab X restore closed tab (i.e. unwind the 'x' command) T search through your open tabs pin/unpin current tab

Using marks:

ma, mA set local mark "a" (global mark "A") a, A jump to local mark "a" (global mark "A") `` jump back to the position before the previous jump -- that is, before the previous gg, G, n, N, / or `a

Additional advanced browsing commands:

]], [[ Follow the link labeled 'next' or '>' ('previous' or '<')

  • helpful for browsing paginated sites open multiple links in a new tab gi focus the first (or n-th) text input box on the page gu go up one level in the URL hierarchy gU go up to root of the URL hierarchy ge edit the current URL gE edit the current URL and open in a new tab zH scroll all the way left zL scroll all the way right v enter visual mode; use p/P to paste-and-go, use y to yank V enter visual line mode

Vimium supports command repetition so, for example, hitting 5t will open 5 tabs in rapid succession. (or <c-[>) will clear any partial commands in the queue and will also exit insert and find modes.

There are some advanced commands which aren't documented here; refer to the help dialog (type ?) for a full list.

Other 3rd Party Commands

Tool Command Description
xbindkeys xbindkeys -k Uses xbindkeys to output key code of pressed key or mouse button. Useful for mapping key codes to commands in i3 config
Clone this wiki locally