#!/usr/bin/env zsh

# Super cool keyboard stuffs.
# Required for x applications
setxkbmap -option caps:ctrl_modifier

export STOW_FOLDERS="bin,nvim,tmux,uwuntu,netflix,personal,i3,zsh,xkb"

startMongo() {
    sudo systemctl start mongod
    sudo systemctl enable mongod
}

increaseWatchers() {
    sudo sysctl fs.inotify.max_user_watches=65536
    sudo sysctl -p
}

change_background() {
    dconf write /org/mate/desktop/background/picture-filename "'$HOME/dotfiles/backgrounds/$(ls ~/dotfiles/backgrounds | fzf)'"
}


die () {
    echo >&2 "$@"
    exit 1
}

addToPath() {
    if [[ "$PATH" != *"$1"* ]]; then
        export PATH=$PATH:$1
    fi
}

addToPathFront() {
    if [[ "$PATH" != *"$1"* ]]; then
        export PATH=$1:$PATH
    fi
}

commitDotFiles() {
    pushd $DOTFILES
    pushd personal
    git add .
    git commit -m "automagic messaging from me in the past.  Have you checked up your butthole?"
    git push origin master
    popd
    git add .
    git commit -m "automagic messaging from me in the past.  Have you checked up your butthole?"
    git push origin master
    popd
}
