Browse Source

Single function to add/commit/push gists (gpsgst)

other aliases/functions:
- untar: extract .tar files
- ideb: install .deb files
- dum: display directory sizes in terminal
red-hat-laptop
Kevin Mok 6 years ago
parent
commit
6527184490
  1. 53
      aliases/zsh_aliases
  2. 7
      configs/NZXT/i3/config
  3. 8
      configs/NZXT/ranger/rc.conf
  4. 3
      dotfiles/Xresources
  5. 2
      dotfiles/vimrc

53
aliases/zsh_aliases

@ -13,6 +13,29 @@ zle -N zle-keymap-select
export KEYTIMEOUT=1
# }}} vim mode #
# command line related {{{ #
alias cs='printf "\033c"'
alias hst="history"
alias nf="neofetch"
alias rur="xrdb ~/.Xresources"
function gvx() { urxvt --help 2>&1 | grep $1 ; }
alias dum="du -B M"
# install deb files
function ideb() { sudo dpkg -i $1 ; }
function cld() { colordiff -y --suppress-common-lines $1 $2 ; }
alias grep='grep --color=auto'
# for finding files by name
function rfnd() { find . -name "$1" ; }
# find text inside files
function rgrp() { grep -r $1 * ; }
function cpd() { cp -avr $1 $2 ; }
# extract tar archive
function untar() { tar -xzvf $1 ; }
# }}} command line related #
# directory-related {{{ #
alias l='ls -a'
alias ll='ls -alF'
@ -27,26 +50,12 @@ fi
alias "f."="f .."
alias "f.2"="f ..."
alias dd="f ~/Downloads"
alias fd="f ~/Downloads"
alias doc="f ~/Documents"
alias cfg="f ~/.config"
# }}} directory-related #
# command line related {{{ #
alias cs='printf "\033c"'
alias hst="history"
alias nf="neofetch"
alias rur="xrdb ~/.Xresources"
function gvx() { urxvt --help 2>&1 | grep $1 ; }
function cld() { colordiff -y --suppress-common-lines $1 $2 ; }
alias grep='grep --color=auto'
function rfnd() { find . -name "$1" ; }
function rgrp() { grep -r $1 * ; }
function cpd() { cp -avr $1 $2 ; }
# }}} command line related #
# power options {{{ #
alias s="systemctl suspend"
alias sd="sudo shutdown 0"
@ -60,6 +69,8 @@ function aptr() { sudo apt remove $1 ; }
# config files {{{ #
alias lc="f ~/linux-config/"
alias lci="f ~/Documents/coding/ideas/"
alias vli="ni ~/Documents/coding/ideas/ideas.md"
alias lca="f ~/linux-config/aliases"
alias vv="ni ~/.vimrc"
@ -74,7 +85,7 @@ alias v3b="ni ~/.config/i3blocks/i3blocks.conf"
alias i3b="f ~/i3blocks"
alias pipes="pipes.sh -t 2"
alias bgs="nemo ~/Pictures/Backgrounds"
alias bg="f ~/Pictures/Backgrounds"
# }}} i3 #
# UltiSnips {{{ #
@ -96,7 +107,7 @@ function ni() { nvim $1 ; }
function mrk() { pandoc -o ${1%.*}.html $1 ; }
alias vbn="cvlc --loop --alsa-gain 1 ~/Downloads/brown-noise.mp3"
alias vlm="alsamixer -c 1"
alias vlm="alsamixer -c 2"
alias rmsw="rm .sw*"
function rs(){ redshift -O $(echo "scale=2;$1*1000" | bc) ; }
@ -173,6 +184,7 @@ if [ "$(hostname)" = "NZXT" ]; then
alias cv="f ~/Documents/resume/examples"
alias cvf="f ~/Documents/resume/examples/cv"
alias vcv="ni ~/Documents/resume/examples/cv.tex"
alias cvn="ni ~/Documents/resume/resume-notes.md"
alias okcv="ok ~/Documents/resume/examples/cv.pdf"
# https://stackoverflow.com/a/6605085/8811872
function pdftojpg() {
@ -247,6 +259,11 @@ alias gcam="git commit --amend"
# todo: fix
function gcm(){ echo git commit -m \""$1"\" ; }
function gpsgst() {
git add .
git commit -m '.'
git push
}
alias gps="git push"
alias gpsfrc="git push --force"
alias gdwip="git push -d origin wip && git branch -d wip"
@ -348,7 +365,7 @@ alias pr3="$cd_school/136/par/3"
cd_209="f ~/Documents/School/209";
alias 209="$cd_209"
alias 9r="$cd_209/mokkar"
alias l7="$cd_209/mokkar/lab7"
alias l8="$cd_209/mokkar/lab8"
alias 9a="$cd_209/mokkar/a3"
# }}}

7
configs/NZXT/i3/config

@ -142,6 +142,7 @@ bindsym $mod+F5 workspace $ws5; exec google-chrome
set $ws6 "6 "
workspace $ws6 output $samsung
bindsym Mod4+d workspace $ws6; exec discord
bindsym Mod4+l workspace $ws6; exec slack
assign [class="Slack"] $ws6
set $ws7 "7 "
@ -270,9 +271,9 @@ font pango:Hack 11
# }}} mod key/font #
# media keys {{{ #
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -c 1 sset Master 5+
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -c 1 sset Master 5-
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse set Master 1+ toggle
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -c 2 sset Master 3+
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -c 2 sset Master 3-
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse set Master 2+ toggle
# Media player controls
bindsym XF86AudioPlay exec "dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause"

8
configs/NZXT/ranger/rc.conf

@ -132,7 +132,7 @@ set draw_borders false
set dirname_in_tabs false
# Enable the mouse support?
set mouse_enabled true
set mouse_enabled false
# Display the file size in the main column or status bar?
set display_size_in_main_column true
@ -299,7 +299,7 @@ map ~ set viewmode!
map i display_file
map ? help
map W display_log
map w taskview_open
# map w taskview_open
map S shell $SHELL
map : console
@ -668,7 +668,9 @@ map rr source ~/.config/ranger/rc.conf
# backgrounds
map bg cd ~/Pictures/Backgrounds
map fb shell ~/.local/bin/wal -i %f
map w shell ~/.local/bin/wal -i %f
map md shell mv %f dim
map mb shell mv %f vibrant
# bulk rename
map cw eval fm.execute_console("bulkrename") if fm.thisdir.marked_items else fm.open_console("rename ")

3
dotfiles/Xresources

@ -4,7 +4,8 @@ URxvt.font: xft:hack:size=12
URxvt*inheritPixmap: true
URxvt*transparent: true
! URxvt*shading: 0 to 99 darkens, 101 to 200 lightens
URxvt*shading: 40
! URxvt*shading: 40
URxvt*shading: 20
/* }}} transparency */
URxvt.scrollBar: false

2
dotfiles/vimrc

@ -140,6 +140,8 @@ nnoremap <C-w> <C-W>|
" leader mappings {{{ "
let mapleader="\<Space>"
" replace vim-commentary Markdown comments with HTML
nnoremap <leader>cmt :%s/>\(.*\)>/<!---\1-->/g<CR>
" reload file
nnoremap <leader>e :e<CR>
" reload folds

Loading…
Cancel
Save