hyprland #4
163
bashrc/.bashrc
163
bashrc/.bashrc
|
@ -2,99 +2,32 @@
|
||||||
# ~/.bashrc
|
# ~/.bashrc
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
[[ $- != *i* ]] && return
|
[[ $- != *i* ]] && return
|
||||||
|
|
||||||
colors() {
|
# that ain't vimlike
|
||||||
local fgc bgc vals seq0
|
set -o vi
|
||||||
|
bind -m vi-command 'Control-l: clear-screen'
|
||||||
|
bind -m vi-insert 'Control-l: clear-screen'
|
||||||
|
|
||||||
printf "Color escapes are %s\n" '\e[${value};...;${value}m'
|
# prompt
|
||||||
printf "Values 30..37 are \e[33mforeground colors\e[m\n"
|
PS1='\[\e[32m\]\u@\h\[\e[0m\]:\[\e[34m\]\w\[\e[0m\] \$ '
|
||||||
printf "Values 40..47 are \e[43mbackground colors\e[m\n"
|
|
||||||
printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n"
|
|
||||||
|
|
||||||
# foreground colors
|
# Source this file from git that expands PS1 stuff
|
||||||
for fgc in {30..37}; do
|
GIT_PS1_SHOWUPSTREAM=git
|
||||||
# background colors
|
GIT_PS1_SHOWDIRTYSTATE=true
|
||||||
for bgc in {40..47}; do
|
GIT_PS1_SHOWUNTRACKEDFILES=true
|
||||||
fgc=${fgc#37} # white
|
source /etc/bash_completion.d/git-prompt.sh
|
||||||
bgc=${bgc#40} # black
|
PS1='\[\e[01;32m\]\u@\h\[\e[0m\]:\[\e[01;34m\]\w\[\e[0m\]$(__git_ps1 " (%s)")\[\e[0m\]\$ '
|
||||||
|
|
||||||
vals="${fgc:+$fgc;}${bgc}"
|
# History settings: no duplicates, decent size
|
||||||
vals=${vals%%;}
|
HISTSIZE=10000
|
||||||
|
HISTFILESIZE=2000
|
||||||
seq0="${vals:+\e[${vals}m}"
|
HISTCONTROL=ignoredups
|
||||||
printf " %-9s" "${seq0:-(default)}"
|
|
||||||
printf " ${seq0}TEXT\e[m"
|
|
||||||
printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
|
|
||||||
done
|
|
||||||
echo; echo
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
|
|
||||||
|
|
||||||
# Change the window title of X terminals
|
|
||||||
case ${TERM} in
|
|
||||||
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*)
|
|
||||||
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
|
|
||||||
;;
|
|
||||||
screen*)
|
|
||||||
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
use_color=true
|
|
||||||
|
|
||||||
# Set colorful PS1 only on colorful terminals.
|
|
||||||
# dircolors --print-database uses its own built-in database
|
|
||||||
# instead of using /etc/DIR_COLORS. Try to use the external file
|
|
||||||
# first to take advantage of user additions. Use internal bash
|
|
||||||
# globbing instead of external grep binary.
|
|
||||||
safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
|
|
||||||
match_lhs=""
|
|
||||||
[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
|
|
||||||
[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
|
|
||||||
[[ -z ${match_lhs} ]] \
|
|
||||||
&& type -P dircolors >/dev/null \
|
|
||||||
&& match_lhs=$(dircolors --print-database)
|
|
||||||
[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
|
|
||||||
|
|
||||||
if ${use_color} ; then
|
|
||||||
# Enable colors for ls, etc. Prefer ~/.dir_colors #64489
|
|
||||||
if type -P dircolors >/dev/null ; then
|
|
||||||
if [[ -f ~/.dir_colors ]] ; then
|
|
||||||
eval $(dircolors -b ~/.dir_colors)
|
|
||||||
elif [[ -f /etc/DIR_COLORS ]] ; then
|
|
||||||
eval $(dircolors -b /etc/DIR_COLORS)
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${EUID} == 0 ]] ; then
|
|
||||||
PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] '
|
|
||||||
else
|
|
||||||
PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] '
|
|
||||||
fi
|
|
||||||
|
|
||||||
alias ls='eza -al --color=always --group-directories-first'
|
|
||||||
alias grep='grep --colour=auto'
|
|
||||||
alias egrep='egrep --colour=auto'
|
|
||||||
alias fgrep='fgrep --colour=auto'
|
|
||||||
else
|
|
||||||
if [[ ${EUID} == 0 ]] ; then
|
|
||||||
# show root@ when we don't have colors
|
|
||||||
PS1='\u@\h \W \$ '
|
|
||||||
else
|
|
||||||
PS1='\u@\h \w \$ '
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
unset use_color safe_term match_lhs sh
|
|
||||||
|
|
||||||
# aliases
|
# aliases
|
||||||
alias python="python3"
|
alias python="python3"
|
||||||
alias cp="cp -i" # confirm before overwriting something
|
alias cp="cp -i" # confirm before overwriting something
|
||||||
alias df='df -h' # human-readable sizes
|
|
||||||
alias free='free -m' # show sizes in MB
|
|
||||||
alias np='nano -w PKGBUILD'
|
alias np='nano -w PKGBUILD'
|
||||||
alias more="less"
|
alias more="less"
|
||||||
alias rofi='rofi -m 1'
|
alias rofi='rofi -m 1'
|
||||||
|
@ -104,52 +37,26 @@ alias ll="exa -lhga --group-directories-first"
|
||||||
alias vim="nvim"
|
alias vim="nvim"
|
||||||
alias docs="python ~/scripts/stock_price.py -s docs"
|
alias docs="python ~/scripts/stock_price.py -s docs"
|
||||||
alias stock="python ~/scripts/stock_price.py -s "
|
alias stock="python ~/scripts/stock_price.py -s "
|
||||||
alias cls="clear & ls"
|
|
||||||
alias r="ranger"
|
alias r="ranger"
|
||||||
|
alias grep='grep --colour=auto'
|
||||||
|
|
||||||
xhost +local:root > /dev/null 2>&1
|
# expand path
|
||||||
|
|
||||||
complete -cf sudo
|
|
||||||
|
|
||||||
# Bash won't get SIGWINCH if another process is in the foreground.
|
|
||||||
# Enable checkwinsize so that bash will check the terminal size when
|
|
||||||
# it regains control. #65623
|
|
||||||
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
|
|
||||||
shopt -s checkwinsize
|
|
||||||
|
|
||||||
shopt -s expand_aliases
|
|
||||||
|
|
||||||
# export QT_SELECT=4
|
|
||||||
|
|
||||||
# Enable history appending instead of overwriting. #139609
|
|
||||||
shopt -s histappend
|
|
||||||
|
|
||||||
#
|
|
||||||
# # ex - archive extractor
|
|
||||||
# # usage: ex <file>
|
|
||||||
ex ()
|
|
||||||
{
|
|
||||||
if [ -f $1 ] ; then
|
|
||||||
case $1 in
|
|
||||||
*.tar.bz2) tar xjf $1 ;;
|
|
||||||
*.tar.gz) tar xzf $1 ;;
|
|
||||||
*.bz2) bunzip2 $1 ;;
|
|
||||||
*.rar) unrar x $1 ;;
|
|
||||||
*.gz) gunzip $1 ;;
|
|
||||||
*.tar) tar xf $1 ;;
|
|
||||||
*.tbz2) tar xjf $1 ;;
|
|
||||||
*.tgz) tar xzf $1 ;;
|
|
||||||
*.zip) unzip $1 ;;
|
|
||||||
*.Z) uncompress $1;;
|
|
||||||
*.7z) 7z x $1 ;;
|
|
||||||
*) echo "'$1' cannot be extracted via ex()" ;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
echo "'$1' is not a valid file"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
PATH=$PATH:/usr/local/bin
|
PATH=$PATH:/usr/local/bin
|
||||||
export EDITOR=/usr/bin/nvim
|
|
||||||
|
|
||||||
|
# exports
|
||||||
|
export EDITOR=/usr/bin/nvim
|
||||||
|
export BROWSER=firefox
|
||||||
|
|
||||||
|
# fzf
|
||||||
|
export FZF_DEFAULT_OPTS='--layout=reverse --height=50% --preview-window=right:50%:border-sharp --border-label=" command preview " --border=double'
|
||||||
|
|
||||||
|
# Set up fzf key bindings and fuzzy completion
|
||||||
|
# Ctrl+R override for bash history
|
||||||
|
# Alt-C overried to cd into selected directory
|
||||||
|
eval "$(fzf --bash)"
|
||||||
|
|
||||||
|
# Quick file finder with preview and open with vim (Ctrl+T override)
|
||||||
|
bind '"\C-t": "fzf --preview \"cat {}\" < <(find . -type f) | xargs $EDITOR\n"'
|
||||||
|
|
||||||
|
# kinda annoying tbh
|
||||||
# pfetch || neofetch || fastfetch
|
# pfetch || neofetch || fastfetch
|
||||||
|
|
|
@ -73,9 +73,9 @@ decoration {
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||||
blur {
|
blur {
|
||||||
enabled = true
|
enabled = true
|
||||||
size = 3
|
size = 8
|
||||||
passes = 1
|
passes = 2
|
||||||
vibrancy = 0.1696
|
#vibrancy = 0.1696
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,6 +202,17 @@ bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
|
# idk fixing workspace locations
|
||||||
|
workspace = 1,monitor:HDMI-A-1
|
||||||
|
workspace = 3,monitor:HDMI-A-1
|
||||||
|
workspace = 5,monitor:HDMI-A-1
|
||||||
|
workspace = 7,monitor:HDMI-A-1
|
||||||
|
|
||||||
|
workspace = 2,monitor:DP-2
|
||||||
|
workspace = 4,monitor:DP-2
|
||||||
|
workspace = 6,monitor:DP-2
|
||||||
|
workspace = 8,monitor:DP-2
|
||||||
|
|
||||||
# Example special workspace (scratchpad)
|
# Example special workspace (scratchpad)
|
||||||
bind = $mainMod, S, togglespecialworkspace, magic
|
bind = $mainMod, S, togglespecialworkspace, magic
|
||||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# BACKGROUND
|
# BACKGROUND
|
||||||
background {
|
background {
|
||||||
monitor =
|
monitor =
|
||||||
path = /home/clint/Pictures/wallpapers/green_hut.jpg
|
path = /home/clint/Pictures/wallpapers/castle2.jpg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
preload = /home/clint/Pictures/wallpapers/trees.jpg
|
preload = /home/clint/Pictures/wallpapers/castle_view.jpg
|
||||||
wallpaper = HDMI-A-1, /home/clint/Pictures/wallpapers/trees.jpg
|
wallpaper = HDMI-A-1, /home/clint/Pictures/wallpapers/castle_view.jpg
|
||||||
wallpaper = DP-2, /home/clint/Pictures/wallpapers/trees.jpg
|
wallpaper = DP-2, /home/clint/Pictures/wallpapers/castle_view.jpg
|
||||||
|
|
||||||
#enable splash text rendering over the wallpaper
|
#enable splash text rendering over the wallpaper
|
||||||
splash = false
|
splash = false
|
||||||
|
|
|
@ -81,7 +81,8 @@ set -g @continuum-restore 'on'
|
||||||
# testing this idk lol
|
# testing this idk lol
|
||||||
set -g pane-active-border-style bg=terminal
|
set -g pane-active-border-style bg=terminal
|
||||||
set -g pane-border-style bg=terminal
|
set -g pane-border-style bg=terminal
|
||||||
set-window-option -g window-active-style bg=black
|
#set-window-option -g window-active-style bg=black
|
||||||
|
set-window-option -g window-active-style bg=terminal
|
||||||
set-window-option -g window-style bg=terminal
|
set-window-option -g window-style bg=terminal
|
||||||
|
|
||||||
# adding ssh support
|
# adding ssh support
|
||||||
|
|
Loading…
Reference in New Issue