updates and more <3
This commit is contained in:
parent
58a6c2c3b0
commit
0f976b5d74
7
.bash_profile
Normal file
7
.bash_profile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#
|
||||||
|
# ~/.bash_profile
|
||||||
|
#
|
||||||
|
|
||||||
|
[[ -f ~/.config/shell/profile ]] && . ~/.config/shell/profile
|
||||||
|
|
||||||
|
[[ -f ~/.bashrc ]] && . ~/.bashrc
|
||||||
@ -1,5 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
case $- in
|
||||||
|
*i*) ;; #interactive
|
||||||
|
*) return ;;
|
||||||
|
esac
|
||||||
|
|
||||||
export GOPATH="$HOME/go"
|
export GOPATH="$HOME/go"
|
||||||
export PATH="$PATH:$HOME/.local/bin:$GOPATH/bin:$HOME/scripts"
|
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-o":"lfcd\n"'
|
||||||
bind '"\C-t":"tms\n"'
|
bind '"\C-t":"tms\n"'
|
||||||
bind '"\C-n":"zk edit --interactive --sort modified-\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
|
# use lf to switch directories and bind it to ctrl-o
|
||||||
function lfcd() {
|
function lfcd() {
|
||||||
|
|||||||
@ -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 = {
|
setup = {
|
||||||
-- additional setup can be added here.
|
-- additional setup can be added here.
|
||||||
|
|||||||
@ -61,9 +61,6 @@ export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm
|
|||||||
export ZK_NOTEBOOK_DIR="$HOME/notes/zk"
|
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
|
# 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
|
# 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.
|
# startx myself if I'm not using a login manager anyway.
|
||||||
|
|||||||
@ -2,15 +2,15 @@
|
|||||||
export GOPATH="$HOME/go"
|
export GOPATH="$HOME/go"
|
||||||
export PATH=$PATH:$HOME/.local/bin:$GOPATH/bin:$HOME/scripts
|
export PATH=$PATH:$HOME/.local/bin:$GOPATH/bin:$HOME/scripts
|
||||||
|
|
||||||
source "$ZDOTDIR/themes/inkletblotsh.zsh"
|
|
||||||
|
|
||||||
# Enable colors and change prompt:
|
# Enable colors and change prompt:
|
||||||
autoload -U colors && colors # Load colors
|
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.
|
setopt autocd # Automatically cd into typed directory.
|
||||||
stty stop undef # Disable ctrl-s to freeze terminal.
|
stty stop undef # Disable ctrl-s to freeze terminal.
|
||||||
setopt interactive_comments
|
setopt interactive_comments
|
||||||
|
|
||||||
|
# My prompt
|
||||||
|
source "$ZDOTDIR/themes/inkletblotsh.zsh"
|
||||||
|
|
||||||
HIST_STAMPS="yyyy-mm-dd"
|
HIST_STAMPS="yyyy-mm-dd"
|
||||||
HISTSIZE=1000000
|
HISTSIZE=1000000
|
||||||
SAVEHIST=1000000
|
SAVEHIST=1000000
|
||||||
@ -18,7 +18,7 @@ SAVEHIST=1000000
|
|||||||
# Load aliases and shortcuts if existent.
|
# 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/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"
|
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/aliasrc"
|
||||||
#
|
|
||||||
# Basic auto/tab complete:
|
# Basic auto/tab complete:
|
||||||
autoload -U compinit
|
autoload -U compinit
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
|
|||||||
@ -27,12 +27,20 @@ setopt prompt_subst
|
|||||||
local return_code="%(?..%F{red}%?↵%f)"
|
local return_code="%(?..%F{red}%?↵%f)"
|
||||||
|
|
||||||
local user_host="${PR_USER}%F{blue}@${PR_HOST}"
|
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 git_branch='$(bash-status-git)'
|
||||||
local bat='$(bash-status-bat | sed "s/%/%%/")'
|
local bat='$(bash-status-bat | sed "s/%/%%/")'
|
||||||
|
|
||||||
PROMPT="${user_host} ${bat} ${current_dir} ${git_branch}
|
PROMPT="${user_host} ${bat} ${current_dir} ${git_branch}
|
||||||
-$PR_PROMPT"
|
-$PR_PROMPT"
|
||||||
RPROMPT="]${return_code} %*"
|
RPROMPT="]${return_code} %*"
|
||||||
|
|
||||||
# all git prompt overrides for easy modification
|
# all git prompt overrides for easy modification
|
||||||
|
|||||||
3
.local/bin/checkup
Executable file
3
.local/bin/checkup
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
$HOME/.local/bin/cron/checkup
|
||||||
25
.local/bin/htitle
Executable file
25
.local/bin/htitle
Executable file
@ -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 "$@"
|
||||||
3
.local/bin/status-packages
Executable file
3
.local/bin/status-packages
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/ /;s/^ 0$//g"
|
||||||
Loading…
Reference in New Issue
Block a user