Squashed
This commit is contained in:
commit
a45a0e8685
12 changed files with 311 additions and 0 deletions
74
.aliases.sh
Normal file
74
.aliases.sh
Normal file
|
@ -0,0 +1,74 @@
|
|||
# Common aliases.
|
||||
# Add `source ~/.aliases.sh` to your shell cfg.
|
||||
|
||||
export PATH=$PATH:$HOME/bin:$HOME/.cargo/bin
|
||||
export HISTSIZE=100
|
||||
|
||||
# jump 1 word with ctrl-arrow in some terminals
|
||||
bindkey "^[[1;5C" forward-word
|
||||
bindkey "^[[1;5D" backward-word
|
||||
|
||||
function screen_brightness() {
|
||||
redshift -x
|
||||
|
||||
brightness="${1:-1}"
|
||||
temp="${2:-6500}"
|
||||
|
||||
xrandr --output DP-1 --brightness "$brightness"
|
||||
xrandr --output DP-3 --brightness "$brightness"
|
||||
|
||||
redshift -O "$temp"
|
||||
}
|
||||
alias sb=screen_brightness
|
||||
|
||||
function upload() {
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "Invalid number of parameters"
|
||||
echo "usage: upload <target_dir> <file>"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "$FILE_STORAGE_API_KEY" ]; then
|
||||
echo "No API key set, did you forget to 'source ~/.tokens'?"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Uploading to $1/$2"
|
||||
|
||||
curl --request PUT \
|
||||
--url "$FILE_STORAGE_API_URL/$1/$2" \
|
||||
--header "AccessKey: 0$FILE_STORAGE_API_KEY" \
|
||||
--header "Content-Type: application/octet-stream" \
|
||||
--header "accept: application/json" \
|
||||
--data-binary "@$2"
|
||||
|
||||
echo ""
|
||||
echo "$FILE_STORAGE_EXTERNAL_URL/$1/$2 (copied to clipboard)"
|
||||
echo "$FILE_STORAGE_EXTERNAL_URL/$1/$2" | xclip -sel clip
|
||||
}
|
||||
|
||||
function upload_all() {
|
||||
for X in *; do
|
||||
upload $1 $X
|
||||
done
|
||||
}
|
||||
|
||||
alias remove_exif="mogrify -verbose -strip *.jpg"
|
||||
|
||||
alias tf2="steam -applaunch 440 -noborder -windowed -w 1920 -h 1080 +fps_max 240"
|
||||
|
||||
alias ga="git add"
|
||||
alias gts="git status"
|
||||
alias gd="git diff"
|
||||
alias gp="git push"
|
||||
alias gpf="git push --force-with-lease"
|
||||
alias gpl="git pull"
|
||||
alias gc="git commit"
|
||||
alias gup="git fetch && git pull && git submodule update --recursive"
|
||||
alias greb="git fetch && git pull && git rebase origin/master"
|
||||
|
||||
alias ls="eza --long --all --header --group --icons=always"
|
||||
alias mkdir="mkdir -p"
|
||||
|
||||
alias disc="firejail discord --ignore-gpu-blocklist --disable-features=UseOzonePlatform --enable-features=VaapiVideoDecoder --use-gl=desktop --enable-gpu-rasterization --enable-zero-copy"
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue