From 645cfab20016bc8a443e880adfc1c5e7fea92cf6 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Tue, 16 Nov 2021 16:40:58 -0700 Subject: forgot to update these in a while --- alacritty/.alacritty.yml | 76 ++++++++++++++++++++++++++++++ bash/.bash_profile | 12 +++++ bash/.bashrc | 118 +++++++++++++++++++++++++++++++++++++++++++++++ bash/bash_profile | 12 ----- bash/bashrc | 95 -------------------------------------- fonts/README.md | 1 + vim/.vimrc | 59 +++++++++++++++++++++++- x/.Xresources | 2 +- x/.xinitrc | 16 ++++++- x/.xinitrc-not-docked | 11 ++++- 10 files changed, 290 insertions(+), 112 deletions(-) create mode 100644 alacritty/.alacritty.yml create mode 100644 bash/.bash_profile create mode 100644 bash/.bashrc delete mode 100644 bash/bash_profile delete mode 100644 bash/bashrc create mode 100644 fonts/README.md mode change 120000 => 100644 vim/.vimrc diff --git a/alacritty/.alacritty.yml b/alacritty/.alacritty.yml new file mode 100644 index 0000000..e14eb3a --- /dev/null +++ b/alacritty/.alacritty.yml @@ -0,0 +1,76 @@ +font: + normal: + family: JetBrains Mono + style: Regular + bold: + family: JetBrains Mono + style: Bold + italic: + family: JetBrains Mono + style: Italic + bold_italic: + family: JetBrains Mono + style: Bold Italic + + size: 15 + +background_opacity: 1 + +window: + padding: + x: 10 + y: 10 + +colors: + primary: + background: '#121212' + + normal: + black: '#1D1F21' + red: '#C60D0B' + green: '#1B8D20' + yellow: '#F0E100' + blue: '#1F7AFF' + magenta: '#980AE0' + cyan: '#34D9FF' + white: '#A8A8A8' + + bright: + black: '#434343' + red: '#F77021' + green: '#2EFF25' + yellow: '#FDF259' + blue: '#4F9BFF' + magenta: '#EE3AD8' + cyan: '#56FFFB' + white: '#FFFFFF' + +# Colors (Nord) +#colors: + # Default colors +# primary: +# background: '#2E3440' +# foreground: '#D8DEE9' + + # Normal colors +# normal: +# black: '#3B4252' +# red: '#BF616A' +# green: '#A3BE8C' +# yellow: '#EBCB8B' +# blue: '#81A1C1' +# magenta: '#B48EAD' +# cyan: '#88C0D0' +# white: '#E5E9F0' + +# # Bright colors +# bright: +# black: '#4C566A' +# red: '#BF616A' +# green: '#A3BE8C' +# yellow: '#EBCB8B' +# blue: '#81A1C1' +# magenta: '#B48EAD' +# cyan: '#8FBCBB' +# white: '#ECEFF4' + diff --git a/bash/.bash_profile b/bash/.bash_profile new file mode 100644 index 0000000..031ab84 --- /dev/null +++ b/bash/.bash_profile @@ -0,0 +1,12 @@ +# .bash_profile + +# Get the aliases and functions +if [ -f ~/.bashrc ]; then + . ~/.bashrc +fi + +# User specific environment and startup programs + +PATH=$PATH:$HOME/.local/bin:$HOME/bin + +export PATH diff --git a/bash/.bashrc b/bash/.bashrc new file mode 100644 index 0000000..4be0c89 --- /dev/null +++ b/bash/.bashrc @@ -0,0 +1,118 @@ +# .bashrc + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi + +# Uncomment the following line if you don't like systemctl's auto-paging feature: +# export SYSTEMD_PAGER= + +# User specific aliases and functions + +# Alias stuffs +shopt -s expand_aliases + +alias grep='grep --color=auto' +alias fgrep='fgrep --color=auto' +alias egrep='egrep --color=auto' + +alias ls='ls --color=auto' +alias la='ls -a' +alias lsd='ls -lh' + +alias record-audio='ffmpeg -f pulse -i default' +alias python='python3' +alias alsamixer='alsamixer -c 1' +#discord_gpu() { +# ~/bin/discord "$@" +#} +#export -f discord_gpu +alias discord='discord --ignore-gpu-blocklist --disable-features=UseOzonePlatform --enable-features=VaapiVideoDecoder --use-gl=desktop --enable-gpu-rasterization --enable-zero-copy' + +#alias current-command='echo $BASH_COMMAND' + +#echo -en "\033]0;\u@\h - $(history | cut -c 8-)\a" + +TITLEBAR='\[\033]0;\u at \h in \w ($(history 1 | cut -c 8-))\]' + +#set-window-title() { +# echo -en "\033]0;\u@\h - $(history | cut -c 8-)\a" +#} + +#if [[ "$PROMPT_COMMAND" ]]; then +# export PROMPT_COMMAND="$PROMPT_COMMAND;set-window-title" +#else +# export PROMPT_COMMAND=set-window-title +#fi + +# +# Define some colors first: Capitals denote bold +# +black='\e[0;30m' +BLACK='\e[1;30m' +dgray='\e[0;90m' +DGRAY='\e[1;90m' +red='\e[0;31m' +RED='\e[1;31m' +lred='\e[0;91m' +LRED='\e[1;91m' +green='\e[0;32m' +GREEN='\e[1;32m' +lgreen='\e[0;92m' +LGREEN='\e[1;92m' +yellow='\e[0;33m' +YELLOW='\e[1;33m' +lyellow='\e[0;93m' +LYELLOW='\e[1;93m' +blue='\e[0;34m' +BLUE='\e[1;34m' +lblue='\e[0;94m' +LBLUE='\e[1;94m' +magenta='\e[0;35m' +MAGENTA='\e[1;35m' +lmagenta='\e[0;95m' +LMAGENTA='\e[1;95m' +cyan='\e[0;36m' +CYAN='\e[1;36m' +lcyan='\e[0;96m' +LCYAN='\e[1;96m' +lgray='\e[0;37m' +LGRAY='\e[1;37m' +NC='\e[0m' # No Color + +# Taken from http://www.opinionatedprogrammer.com/2011/01/colorful-bash-prompt-reflecting-git-status/ +function _git_prompt() { + local git_status="`git status -unormal 2>&1`" + if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then + if [[ "$git_status" =~ nothing\ to\ commit ]]; then + local ansi=$GREEN + elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then + local ansi=$RED + else + local ansi=$YELLOW + fi + if [[ "$git_status" =~ On\ branch\ ([^[:space:]]+) ]]; then + branch=${BASH_REMATCH[1]} + #test "$branch" != master || branch=' ' + else + # Detached HEAD. (branch=HEAD is a faster alternative.) + branch="`git describe --all --contains --abbrev=4 HEAD 2> /dev/null || + echo local`" + fi + if ! [[ "$branch" =~ local ]]; then + echo -n '\['"$ansi"'\](in git branch '"$branch"') ' + fi + fi +} + +function report_status() { + RET_CODE=$? + if [[ $RET_CODE -ne 0 ]] ; then + echo -ne "[\[$RED\]$RET_CODE\[$NC\]]" + fi +} + +#export _PS1="\[$RED\]\u\[$NC\]@\[$YELLOW\]\h \[$yellow\]\w | \[$GREEN\]\V\s \[$BLUE\]\d \@ \[$NC\]" +export _PS1="\[$LGREEN\]\u \[$dgray\]at \[$YELLOW\]\h \[$dgray\]in \[$LMAGENTA\]\w " +export PROMPT_COMMAND='export PS1="$TITLEBAR${_status}${_PS1}$(_git_prompt)\[$NC\]\$ "' diff --git a/bash/bash_profile b/bash/bash_profile deleted file mode 100644 index 031ab84..0000000 --- a/bash/bash_profile +++ /dev/null @@ -1,12 +0,0 @@ -# .bash_profile - -# Get the aliases and functions -if [ -f ~/.bashrc ]; then - . ~/.bashrc -fi - -# User specific environment and startup programs - -PATH=$PATH:$HOME/.local/bin:$HOME/bin - -export PATH diff --git a/bash/bashrc b/bash/bashrc deleted file mode 100644 index e939e42..0000000 --- a/bash/bashrc +++ /dev/null @@ -1,95 +0,0 @@ -# .bashrc - -# Source global definitions -if [ -f /etc/bashrc ]; then - . /etc/bashrc -fi - -# Uncomment the following line if you don't like systemctl's auto-paging feature: -# export SYSTEMD_PAGER= - -# User specific aliases and functions - -# Alias stuffs -alias grep='grep --color=auto' -alias fgrep='fgrep --color=auto' -alias egrep='egrep --color=auto' - -alias ls='ls --color=auto' -alias la='ls -a' -alias lsd='ls -lh' - -alias record-audio='ffmpeg -f pulse -i default' -alias python='python3' - - -# -# Define some colors first: Capitals denote bold -# -black='\e[0;30m' -BLACK='\e[1;30m' -dgray='\e[0;90m' -DGRAY='\e[1;90m' -red='\e[0;31m' -RED='\e[1;31m' -lred='\e[0;91m' -LRED='\e[0;91m' -green='\e[0;32m' -GREEN='\e[1;32m' -lgreen='\e[0;92m' -LGREEN='\e[1;92m' -yellow='\e[0;33m' -YELLOW='\e[1;33m' -lyellow='\e[0;93m' -LYELLOW='\e[1;93m' -blue='\e[0;34m' -BLUE='\e[1;34m' -lblue='\e[0;94m' -LBLUE='\e[1;94m' -magenta='\e[0;35m' -MAGENTA='\e[1;35m' -lmagenta='\e[0;95m' -LMAGENTA='\e[1;95m' -cyan='\e[0;36m' -CYAN='\e[1;36m' -lcyan='\e[0;96m' -LCYAN='\e[1;96m' -lgray='\e[0;37m' -LGRAY='\e[1;37m' -NC='\e[0m' # No Color - -# Taken from http://www.opinionatedprogrammer.com/2011/01/colorful-bash-prompt-reflecting-git-status/ -function _git_prompt() { - local git_status="`git status -unormal 2>&1`" - if ! [[ "$git_status" =~ Not\ a\ git\ repo ]]; then - if [[ "$git_status" =~ nothing\ to\ commit ]]; then - local ansi=$GREEN - elif [[ "$git_status" =~ nothing\ added\ to\ commit\ but\ untracked\ files\ present ]]; then - local ansi=$RED - else - local ansi=$YELLOW - fi - if [[ "$git_status" =~ On\ branch\ ([^[:space:]]+) ]]; then - branch=${BASH_REMATCH[1]} - #test "$branch" != master || branch=' ' - else - # Detached HEAD. (branch=HEAD is a faster alternative.) - branch="`git describe --all --contains --abbrev=4 HEAD 2> /dev/null || - echo local`" - fi - if ! [[ "$branch" =~ local ]]; then - echo -n '\['"$ansi"'\](in git branch '"$branch"') ' - fi - fi -} - -function report_status() { - RET_CODE=$? - if [[ $RET_CODE -ne 0 ]] ; then - echo -ne "[\[$RED\]$RET_CODE\[$NC\]]" - fi -} - -#export _PS1="\[$RED\]\u\[$NC\]@\[$YELLOW\]\h \[$yellow\]\w | \[$GREEN\]\V\s \[$BLUE\]\d \@ \[$NC\]" -export _PS1="\[$LCYAN\]\u \[$dgray\]at \[$GREEN\]\h \[$dgray\]in \[$NC\]\w " -export PROMPT_COMMAND='export PS1="${_status}${_PS1}$(_git_prompt)\[$NC\]\$ "' diff --git a/fonts/README.md b/fonts/README.md new file mode 100644 index 0000000..d58020a --- /dev/null +++ b/fonts/README.md @@ -0,0 +1 @@ +The fonts I use for `dwm` are [Roboto](https://fonts.google.com/specimen/Roboto) and [JetBrains Mono](https://fonts.google.com/specimen/JetBrains+Mono). diff --git a/vim/.vimrc b/vim/.vimrc deleted file mode 120000 index 2e5c7e5..0000000 --- a/vim/.vimrc +++ /dev/null @@ -1 +0,0 @@ -/home/bryson/.vimrc \ No newline at end of file diff --git a/vim/.vimrc b/vim/.vimrc new file mode 100644 index 0000000..3859b42 --- /dev/null +++ b/vim/.vimrc @@ -0,0 +1,58 @@ +set nocompatible +colorscheme sitruuna +set mouse=a +set tabstop=4 shiftwidth=4 expandtab +set linebreak +set ttymouse=sgr +set cursorline +set backspace=indent,eol,start +set laststatus=2 +set wildmenu +set scrolloff=5 + +" stolen from https://shapeshed.com/vim-statuslines/ +"function! GitBranch() +" return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") +" let g:gitparsedbranchname = strlen(l:string) > 0?'['.l:string.']':'' +"endfunction + +"function! StatuslineGit() +" let l:branchname = GitBranch() +" return strlen(l:branchname) > 0?' '.l:branchname.' ':'' +"endfunction + +"function! InsertStatuslineColor(mode) +" if a:mode == 'i' +" hi statusline guibg=Cyan ctermfg=6 guifg=Black ctermbg=0 +" elseif a:mode == 'r' +" hi statusline guibg=Purple ctermfg=5 guifg=Black ctermbg=0 +" else +" hi statusline guibg=DarkRed ctermfg=1 guifg=Black ctermbg=0 +" endif +"endfunction + +"au InsertEnter * call InsertStatuslineColor(v:insertmode) +"au InsertLeave * hi statusline guibg=DarkGrey ctermfg=8 guifg=White ctermbg=15 + +set statusline= +"set statusline+=%#PmenuSel# +"set statusline+=%{StatuslineGit()} +"set statusline+=%#LineNr# +set statusline+=\%F +set statusline+=\ %m +set statusline+=\ %r +set statusline+=%= +set statusline+=%#CursorColumn# +set statusline+=\ %L\ lines +set statusline+=\ %y +"set statusline+=\ +set statusline+=\ %{&fileencoding?&fileencoding:&encoding} +"set statusline+=" >" +set statusline+=\[%{&fileformat}\] +"set statusline+=" >" +set statusline+=\ %p%% +"set statusline+=" >" +set statusline+=\ %l:%c + + +hi StatusLine ctermbg=black diff --git a/x/.Xresources b/x/.Xresources index 4597ef7..9c5a55a 100644 --- a/x/.Xresources +++ b/x/.Xresources @@ -1,2 +1,2 @@ Xcursor.theme: capitaine-cursors-light -Xcursor.size: 55 +Xcursor.size: 55 diff --git a/x/.xinitrc b/x/.xinitrc index 81f583c..0ea051b 100644 --- a/x/.xinitrc +++ b/x/.xinitrc @@ -6,14 +6,26 @@ cd ~ & # set up monitors fixscreen & +# set default audio device to be dock audio jack +pacmd set-default-sink 1 + # add weather, date and time to xsetroot sh ~/bin/xsetloop-docked.sh & # set up wallpapers -wallpapers & +#wallpapers & + +# start notifications daemon +notification-daemon & # apply Xresources -xrdb -merge ~/.Xresources & +xrdb -merge ~/.Xresources + +# make cursor disappear after a couple of seconds +unclutter --idle 4 -root & + +# enable numlock +numlockx & # start dwm redshift -O3500; xset r rate 300 50; exec dwm diff --git a/x/.xinitrc-not-docked b/x/.xinitrc-not-docked index f7ad927..ca365f4 100644 --- a/x/.xinitrc-not-docked +++ b/x/.xinitrc-not-docked @@ -6,11 +6,20 @@ cd ~ # add network, battery, date and time to xsetroot sh ~/bin/xsetloop-not-docked.sh & +# set default audio device to be laptop speakers +pacmd set-default-sink 1 + # set up wallpaper -nitrogen --head=0 --set-zoom-fill ~/git/nordic-wallpapers/wallpapers/ign_unsplash7.png & +#nitrogen --head=0 --set-zoom-fill ~/Pictures/Wallpapers/'10-6-Server.jpg' & + +# start notifications daemon +notification-daemon & # apply Xresources xrdb -merge ~/.Xresources +# make cursor disappear after a couple of seconds +unclutter --idle 4 -root & + # start dwm redshift -O3500; xset r rate 300 50; exec dwm -- cgit v1.2.3