# colored GCC warnings and errors
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
-# syntax highlighting in less
-export LESSOPEN="| /mingw64/bin/src-hilite-lesspipe.sh %s"
-export LESS=' -R '
+# Enable syntax-highlighting in less.
+#export LESSOPEN="| /mingw64/bin/src-hilite-lesspipe.sh %s"
+export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s"
+export LESS=" -R "
# Load aliases, functions, etc
for file in ${HOME}/.config/bash/*; do
-alias sl=ls
-alias la='ls -A'
-alias ll='ls -l'
-alias l1='ls -1'
-alias l.='ls -d .[a-z]*'
-
+# ls with coloring
lsflags="-hF"
+
# Detect which `ls` flavor is in use
if [ -x "$(which dircolors 2>/dev/null)" ]; then # GNU `ls`
colorflag="--color=auto"
fi
alias ls="ls $colorflag $lsflags"
+alias sl=ls
+alias la='ls -A'
+alias ll='ls -l'
+alias l1='ls -1'
+alias l.='ls -d .[a-z]*'
-# grep and less color
+# grep and less with coloring
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
-alias less='less -RX' # raw control characters, don't clear the screen after quitting
-
-# Shortcuts
-alias info='info --vi-keys'
-alias open='xdg-open &>/dev/null'
-alias h='history'
-alias dit='git --git-dir=$HOME/.dit --work-tree=$HOME'
-alias ag='ag --path-to-ignore=$HOME/.ignore --skip-vcs-ignores'
-alias rg='rg --path-separator="//"'
+#alias less='less -RX' # raw control characters, don't clear the screen after quitting
+alias less='less -m -N -g -i -J --underline-special --SILENT -X'
+alias more='less'
# Secure settings
alias rm='rm -i'
alias md='mkdir -p'
alias rd='rmdir'
+# My shortcuts
+alias h='history'
+alias info='info --vi-keys'
+alias open='xdg-open &>/dev/null'
+alias dit='git --git-dir=$HOME/.dit --work-tree=$HOME'
+alias ag='ag --path-to-ignore=$HOME/.ignore --skip-vcs-ignores'
+alias rg='rg --path-separator="//"'
if [ ! -x "$(which tree 2>/dev/null)" ]
then
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
fi
-
# Enable aliases to be sudo'ed
alias sudo='sudo '
-alias _="sudo"
# Get week number
alias week='date +%V'
#
# Make it the same as vim command mode
# bindsym $mod+semicolon exec dmenu_run
-bindsym $mod+semicolon exec --no-startup-id i3-dmenu-desktop
+#bindsym $mod+semicolon exec --no-startup-id i3-dmenu-desktop
+bindsym $mod+semicolon exec --no-startup-id rofi -show run
# change focus
bindsym $mod+$left focus left
# screenlock
bindsym Control+$mod+l exec gnome-screensaver-command -l
-exec --no-startup-id dbus-send \
- --session \
- --print-reply=literal \
- --dest=org.gnome.SessionManager \
- "/org/gnome/SessionManager" \
- org.gnome.SessionManager.RegisterClient \
- "string:i3" \
- "string:$DESKTOP_AUTOSTART_ID"
-
# custom settings
exec --no-startup-id gnome-session # GNOME session
exec --no-startup-id gnome-settings-daemon # GNOME desktop settings