aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/.bash_aliases36
-rw-r--r--shell/.bashrc85
2 files changed, 121 insertions, 0 deletions
diff --git a/shell/.bash_aliases b/shell/.bash_aliases
new file mode 100644
index 0000000..dea4234
--- /dev/null
+++ b/shell/.bash_aliases
@@ -0,0 +1,36 @@
+# -*- mode:sh; -*-
+
+alias pyenv="source /home/bard/.pyvenv/bin/activate"
+alias mf='mpv "$(fzf)"'
+alias comp="picom --experimental-backends --daemon"
+alias killcomp="killall picom"
+alias kd="killall Discord"
+
+# directory aliases
+# cd into the previous working directory by omitting `cd`.
+alias ..='cd ..'
+alias ...='cd ../..'
+alias ....='cd ../../..'
+
+# Safer default for cp, mv, rm. These will print a verbose output of
+# the operations. If an existing file is affected, they will ask for
+# confirmation. This can make things a bit more cumbersome, but is a
+# generally safer option.
+alias cp='cp -iv'
+alias mv='mv -iv'
+alias rm='rm -Iv'
+
+# Make ls a bit easier to read. Note that the -A is the same as -a but
+# does not include implied paths (the current dir denoted by a dot and
+# the previous dir denoted by two dots). I would also like to use the
+# -p option, which prepends a forward slash to directories, but it does
+# not seem to work with symlinked directories. For more, see `man ls`.
+alias ls='ls -pv --color=auto --group-directories-first'
+alias lsa='ls -pvA --color=auto --group-directories-first'
+alias lsl='ls -lhpv --color=auto --group-directories-first'
+alias lsla='ls -lhpvA --color=auto --group-directories-first'
+
+# emacs stuff
+# change daemon permissions for script
+alias ep="chmod 700 /run/user/1000/emacs/"
+alias en="emacsclient -c -nw"
diff --git a/shell/.bashrc b/shell/.bashrc
new file mode 100644
index 0000000..12feb0d
--- /dev/null
+++ b/shell/.bashrc
@@ -0,0 +1,85 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
+# for examples
+export TERMINAL="/usr/local/bin/st"
+export PATH="/home/bard/.local/bin:$PATH"
+export PATH="/home/bard/.local/scripts/bin:$PATH"
+export PATH="$HOME/opt/:$PATH"
+export PKG_CONFIG_PATH="$HOME/opt/raylib/lib/pkgconfig/:$PKG_CONFIG_PATH"
+export PATH="$HOME/.nimble/bin":$PATH
+
+# HISTORY
+# don't put duplicate lines or lines starting with space in the history.
+HISTCONTROL=ignoreboth
+
+# append to the history file, don't overwrite it
+shopt -s histappend
+
+# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
+HISTSIZE=50
+HISTFILESIZE=200
+
+# check the window size after each command and, if necessary,
+# update the values of LINES and COLUMNS.
+shopt -s checkwinsize
+
+# enable color support of ls and also add handy aliases
+if [ -x /usr/bin/dircolors ]; then
+ test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
+ alias ls='ls --color=auto'
+ alias dir='dir --color=auto'
+ alias vdir='vdir --color=auto'
+
+ alias grep='grep --color=auto'
+ alias fgrep='fgrep --color=auto'
+ alias egrep='egrep --color=auto'
+fi
+
+if [ -f ~/.bash_aliases ]; then
+ . ~/.bash_aliases
+fi
+
+# simple function to check if installed
+_checkexec ()
+{
+ command -v "$1" > /dev/null
+}
+# editors
+# Default editor.
+if pgrep -x emacs > /dev/null
+then
+ export VISUAL="emacsclient -c"
+ export EDITOR="emacsclient -t"
+elif _checkexec gvim
+then
+ export VISUAL="gvim"
+ export EDITOR=vim
+else
+ export VISUAL=vim
+ export EDITOR=$VISUAL
+fi
+
+# function for count number of certain filetype
+countype()
+{
+ ls -a *.$1 | wc -l
+}
+
+# Default browser. This leverages the MIME list.
+export BROWSER=/usr/bin/xdg-open
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if ! shopt -oq posix; then
+ if [ -f /usr/share/bash-completion/bash_completion ]; then
+ . /usr/share/bash-completion/bash_completion
+ elif [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+ fi
+fi
+
+export PS1='[\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]]\[\033[01;35m\] λ\[\033[00m\] '
+
+[ -f "/home/bard/.ghcup/env" ] && source "/home/bard/.ghcup/env" # ghcup-env
+. "$HOME/.cargo/env"