diff --git a/.bash_profile b/.bash_profile new file mode 100644 index 0000000..ee6c79b --- /dev/null +++ b/.bash_profile @@ -0,0 +1,7 @@ +# +# ~/.bash_profile +# + +[[ -f ~/.config/shell/profile ]] && . ~/.config/shell/profile + +[[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/.config/bash/.bashrc b/.config/bash/.bashrc index 896f727..1eb5344 100644 --- a/.config/bash/.bashrc +++ b/.config/bash/.bashrc @@ -1,5 +1,10 @@ #!/bin/bash +case $- in + *i*) ;; #interactive + *) return ;; +esac + export GOPATH="$HOME/go" export PATH="$PATH:$HOME/.local/bin:$GOPATH/bin:$HOME/scripts" @@ -29,7 +34,7 @@ export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quo bind '"\C-o":"lfcd\n"' bind '"\C-t":"tms\n"' bind '"\C-n":"zk edit --interactive --sort modified-\n"' -bind '"\C-f":"$(dirname "$(fzf)")\n"' +bind '"\C-f":"cd $(dirname "$(fzf)")\n"' # use lf to switch directories and bind it to ctrl-o function lfcd() { diff --git a/.config/nvim/lua/lazyvim/plugins/lsp/init.lua b/.config/nvim/lua/lazyvim/plugins/lsp/init.lua index a3c96c1..845ccf2 100644 --- a/.config/nvim/lua/lazyvim/plugins/lsp/init.lua +++ b/.config/nvim/lua/lazyvim/plugins/lsp/init.lua @@ -33,6 +33,15 @@ return { }, }, }, + -- arduino_language_server = { + -- cmd = { + -- "arduino-language-server", + -- "-cli-config", + -- "/home/solomon/.arduino15/arduino-cli.yaml", + -- "-fqbn", + -- "arduino:avr:uno", + -- }, + -- }, }, setup = { -- additional setup can be added here. diff --git a/.config/shell/profile b/.config/shell/profile index 31e96af..6808510 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -61,9 +61,6 @@ export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm export ZK_NOTEBOOK_DIR="$HOME/notes/zk" -# I'm not using Luke's shortcuts so... -[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 & - # This is something luke smith has in his profile (which I have stolen, it's nice but # doesn't work very nicely with my login manager, lightdm, and I prefer to just run # startx myself if I'm not using a login manager anyway. diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index ac02a6f..8303069 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -2,15 +2,15 @@ export GOPATH="$HOME/go" export PATH=$PATH:$HOME/.local/bin:$GOPATH/bin:$HOME/scripts -source "$ZDOTDIR/themes/inkletblotsh.zsh" - # Enable colors and change prompt: autoload -U colors && colors # Load colors -# PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " setopt autocd # Automatically cd into typed directory. stty stop undef # Disable ctrl-s to freeze terminal. setopt interactive_comments +# My prompt +source "$ZDOTDIR/themes/inkletblotsh.zsh" + HIST_STAMPS="yyyy-mm-dd" HISTSIZE=1000000 SAVEHIST=1000000 @@ -18,7 +18,7 @@ SAVEHIST=1000000 # Load aliases and shortcuts if existent. [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc" [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" -# + # Basic auto/tab complete: autoload -U compinit zstyle ':completion:*' menu select diff --git a/.config/zsh/themes/inkletblotsh.zsh b/.config/zsh/themes/inkletblotsh.zsh index 7b4eb29..4967692 100644 --- a/.config/zsh/themes/inkletblotsh.zsh +++ b/.config/zsh/themes/inkletblotsh.zsh @@ -27,12 +27,20 @@ setopt prompt_subst local return_code="%(?..%F{red}%?↵%f)" local user_host="${PR_USER}%F{blue}@${PR_HOST}" - local current_dir="%F{cyan}%~%f" + + # local current_dir="" + # + # if [[ -n $(find . -user "$(id -u)" -print -prune -o -prune) ]]; then + current_dir="%F{cyan}%~%f" + # else + # current_dir="%F{red}%~%f" + # fi + local git_branch='$(bash-status-git)' local bat='$(bash-status-bat | sed "s/%/%%/")' PROMPT="${user_host} ${bat} ${current_dir} ${git_branch} - -$PR_PROMPT" +-$PR_PROMPT" RPROMPT="]${return_code} %*" # all git prompt overrides for easy modification diff --git a/.local/bin/checkup b/.local/bin/checkup new file mode 100755 index 0000000..5a453c1 --- /dev/null +++ b/.local/bin/checkup @@ -0,0 +1,3 @@ +#!/bin/bash + +$HOME/.local/bin/cron/checkup diff --git a/.local/bin/htitle b/.local/bin/htitle new file mode 100755 index 0000000..9189e34 --- /dev/null +++ b/.local/bin/htitle @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +# Produces a centered title in the middle of a horizontal rule of text. + +pre='//' + +_filter(){ + [[ -n "$1" ]] && return 1 + while IFS= read -ra args; do + "${FUNCNAME[1]}" "${args[@]}" + done +} + +htitle() { + _filter "$@" && return $? + local str="$1" char="${2:--}" + local -i len=${#str} + local -i side=$((((HRULEWIDTH / 2) - len / 2) - 3)) + local -i left=$side + local -i right=$side + (( len % 2 == 1 )) && ((right -= 1)) + echo "$pre $(echon "$char" "$left") "$str" $(echon "$char" "$right")" +} + +htitle "$@" diff --git a/.local/bin/status-packages b/.local/bin/status-packages new file mode 100755 index 0000000..e9eb284 --- /dev/null +++ b/.local/bin/status-packages @@ -0,0 +1,3 @@ +#!/bin/bash + +pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/ /;s/^ 0$//g"