This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
read Mouse <<< $( xinput | grep Mouse ) | |
if [ "$Mouse" = "" ]; then | |
# No mouse found, so don't disable the TouchPad | |
exit | |
else | |
# Mouse found. Disable the TouchPad | |
read TPdevice <<< $( xinput | sed -nre '/TouchPad/s/.*id=([0-9]*).*/\1/p' ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script automatically updates the Last updated section of my resume | |
# First, stash whatever changes that are left in the tree and should not be | |
# committed | |
git stash &> /dev/null | |
# Now get today's date and replace that in resume.tex | |
DATE=`date "+%d %B, %Y"` | |
sed "s/{Last updated.*}/{Last updated $DATE}/" resume.tex >resume.tex.tmp && mv resume.tex.tmp resume.tex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )" | |
# PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} ' | |
# Change color of prompt to yellow if root | |
PROMPT='${ret_status} %{%(#~$fg[yellow]~$fg[cyan])%}%c%{$reset_color%} ' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Config ----------------------------------- | |
@syntax-hue: 220; | |
@syntax-saturation: 13%; | |
@syntax-brightness: 18%; | |
// Monochrome ----------------------------------- | |
@mono-1: hsl(214, 5%, 75%); // default text | |
@mono-2: hsl(@syntax-hue, 9%, 55%); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// buy binds generated by csgobuynds.com | |
bind "kp_end" "buy m4a1; buy ak47;" | |
bind "kp_downarrow" "buy vest;" | |
bind "kp_pgdn" "buy vesthelm;" | |
bind "kp_leftarrow" "buy flashbang;" | |
bind "kp_5" "buy smokegrenade;" | |
bind "kp_rightarrow" "buy hegrenade;" | |
bind "kp_home" "buy incgrenade; buy molotov;" | |
bind "kp_uparrow" "buy awp;" | |
bind "kp_pgup" "buy defuser;" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
xdg-screensaver lock | |
sleep 0.7 | |
xdotool key Ctrl |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/sh | |
. git-sh-setup | |
# Add a Signed-off-by by me when applying patches. Only do this for projects | |
# you are the maintainer of, and need to add your signoff before pushing out. | |
SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') | |
grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RED=$(tput setaf 1) | |
NORMAL=$(tput sgr0) | |
# FIXME: I am using porcelain commands to do plumbing work. Maybe fix it in the | |
# future. | |
AUTHOR=$(git --no-pager show -s --format='%aN <%aE>') | |
COMMIT_MSG=$(git --no-pager show -s --format='%B') | |
COMMIT_ID=$(git --no-pager show -s --format='%h') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script is used to save a list of emails from neomutt's pipe. Be sure to | |
# set pipe_split in neomutt. | |
# | |
# Pass the directory name as the first argument. The email content is expected | |
# to be in stdin. | |
# | |
# The second argument is optional. It can be used to force the patch version to | |
# be something else. For example, pass v3 as the second argument. Even if the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git stuff I want to do some time in the future: | |
[Git gui] | |
- Edit tools. | |
- Context menu on file list. | |
- Fix revert hunk and revert lines not working on added files (files that have | |
the flag A, not M). | |
- Add selective staging for added files. | |
- Add a newline in the commit editor on 80 cols. | |
- Configurable key bindings? |
OlderNewer