From 75c1e74fb93fd428aff03f9ffc2a80e19954a351 Mon Sep 17 00:00:00 2001 From: Pratyush Desai Date: Sat, 30 Apr 2022 02:05:23 +0530 Subject: [PATCH] separate aliases --- .bash_aliases | 52 ++++++++++++++++++++++++++++++++++++++++ .config/kitty/kitty.conf | 36 ++++++++++++++-------------- 2 files changed, 70 insertions(+), 18 deletions(-) create mode 100644 .bash_aliases diff --git a/.bash_aliases b/.bash_aliases new file mode 100644 index 0000000..7412951 --- /dev/null +++ b/.bash_aliases @@ -0,0 +1,52 @@ +# +# ~/.bash_aliases +# + + + +# dotfiles +alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' + +# Assumes `exa` package is installed +alias ll='exa -l' +alias la='exa -la' +alias lh='exa -lha' +alias ltnew='exa -lrah --sort=newest --git' +alias lg='exa -Ga' +alias ltr='exa --tree --level=3 --long' + +# Add a function to open ranger in either a new tmux +# or a new window if already in a tmux. +# Note: Refuse to Nest!!! + +alias rn='ranger' +alias cpv='rsync -ah --info=progress2' +alias gh='history|grep' +# count files in directory +alias count='find . -type f | wc -l' + +# shareutils + +alias uploadhgz='curl -sT - https://hugz.io/' # upload +alias ixio="curl -F 'f:1=<-' ix.io" # pipe output to ix.io +alias termbin="nc termbin.com 9999" # needs netcat + +## commit faster, you git! +alias gconsolidate="git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done" +alias gad='git add' +alias gst='git status' +alias gfa='git fetch --all --prune' +alias gpp='git pull --ff-only --prune' +alias gsl='git stash list' +alias gls='git ls-files' +alias gss='git stash show -p' +alias gsd='git stash drop' +alias gcam='git commit -am' +alias gcsm='git commit -sm' +alias gdb='git branch -d' +alias glb='git branch' +alias gck='git checkout' +alias gckb='git checkout -b' +alias gvrf='git rev-parse --verify HEAD' +alias gscm='git commit -S -m' +~ diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 04f7d60..b802780 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -7,10 +7,10 @@ #: individual font faces and even specify special fonts for particular #: characters. -#font_family Sauce Code Pro Nerd Font Complete Mono -#bold_font Sauce Code Pro Bold Nerd Font Complete Mono -#italic_font Sauce Code Pro Italic Nerd Font Complete Mono -#bold_italic_font Sauce Code Pro Bold Italic Nerd Font Complete Mono +font_family Sauce Code Pro Nerd Font Complete Mono +bold_font Sauce Code Pro Bold Nerd Font Complete Mono +italic_font Sauce Code Pro Italic Nerd Font Complete Mono +bold_italic_font Sauce Code Pro Bold Italic Nerd Font Complete Mono # font_family Anonymous Pro @@ -19,10 +19,10 @@ # bold_italic_font Anonymous Pro Bold Italic -font_family Fira Code Retina -bold_font Fira Code Retina Bold -italic_font Fira Code Retina Italic -bold_italic_font Fira Code Retina Bold Italic +# font_family Fira Code Retina +# bold_font Fira Code Retina Bold +# italic_font Fira Code Retina Italic +# bold_italic_font Fira Code Retina Bold Italic #: You can specify different fonts for the bold/italic/bold-italic #: variants. To get a full list of supported fonts use the `kitty @@ -192,7 +192,7 @@ cursor_beam_thickness 1.5 #: Scrollback {{{ -scrollback_lines 3000 +scrollback_lines 10000 #: Number of lines of history to keep in memory for scrolling back. #: Memory is allocated on demand. Negative numbers are (effectively) @@ -335,7 +335,7 @@ scrollback_lines 3000 #: rate. Also, to minimize latency when there is pending input to be #: processed, repaint_delay is ignored. -# input_delay 3 +input_delay 2 #: Delay (in milliseconds) before input from the program running in #: the terminal is processed. Note that decreasing it will increase @@ -469,7 +469,7 @@ enable_audio_bell no #: Fade the text in inactive windows by the specified amount (a number #: between zero and one, with zero being fully faded). -# hide_window_decorations no +hide_window_decorations yes #: Hide the window decorations (title-bar and window borders) with #: yes. On macOS, titlebar-only can be used to only hide the titlebar. @@ -1132,37 +1132,37 @@ color15 #ffffff #: external program or insert it into the terminal or copy it to the #: clipboard. -# map kitty_mod+e kitten hints +map kitty_mod+e kitten hints #: Open a currently visible URL using the keyboard. The program used #: to open the URL is specified in open_url_with. -# map kitty_mod+p>f kitten hints --type path --program - +map kitty_mod+p>f kitten hints --type path --program - #: Select a path/filename and insert it into the terminal. Useful, for #: instance to run git commands on a filename output from a previous #: git command. -# map kitty_mod+p>shift+f kitten hints --type path +map kitty_mod+p>shift+f kitten hints --type path #: Select a path/filename and open it with the default open program. -# map kitty_mod+p>l kitten hints --type line --program - +map kitty_mod+p>l kitten hints --type line --program - #: Select a line of text and insert it into the terminal. Use for the #: output of things like: ls -1 -# map kitty_mod+p>w kitten hints --type word --program - +map kitty_mod+p>w kitten hints --type word --program - #: Select words and insert into terminal. -# map kitty_mod+p>h kitten hints --type hash --program - +map kitty_mod+p>h kitten hints --type hash --program - #: Select something that looks like a hash and insert it into the #: terminal. Useful with git, which uses sha1 hashes to identify #: commits -# map kitty_mod+p>n kitten hints --type linenum +map kitty_mod+p>n kitten hints --type linenum #: Select something that looks like filename:linenum and open it in #: vim at the specified line number.