From 857c6ec62c2ffd416d0f451ef4a43e559b56e76b Mon Sep 17 00:00:00 2001 From: Solomon Laing Date: Thu, 16 Feb 2023 21:44:37 +1030 Subject: [PATCH] updated a bunch, removed omz. --- .config/bash/.bashrc | 6 - .config/lf/icons | 83 ++++++++ .config/shell/profile | 91 +-------- .config/x11/xinitrc | 1 - .config/zsh/.zshrc | 182 +++--------------- ...nkletblotsh.zsh-theme => inkletblotsh.zsh} | 0 6 files changed, 113 insertions(+), 250 deletions(-) create mode 100644 .config/lf/icons rename .config/zsh/themes/{inkletblotsh.zsh-theme => inkletblotsh.zsh} (100%) diff --git a/.config/bash/.bashrc b/.config/bash/.bashrc index dee6490..c9231e9 100644 --- a/.config/bash/.bashrc +++ b/.config/bash/.bashrc @@ -1,11 +1,5 @@ #!/bin/bash -# If not running interactively, don't do anything -case $- in - *i*) ;; - *) return ;; -esac - export GOPATH="$HOME/go" export PATH="$PATH:$HOME/.local/bin:$GOPATH/bin:$HOME/scripts" diff --git a/.config/lf/icons b/.config/lf/icons new file mode 100644 index 0000000..becef61 --- /dev/null +++ b/.config/lf/icons @@ -0,0 +1,83 @@ + +# This is the list for lf icons +di  +fi  +tw  +ow  +ln  +or  +ex  +*.txt  +*.mom  +*.me  +*.ms  +*.odt  +*.ods  +*.png  +*.webp  +*.ico  +*.jpg  +*.jpe  +*.jpeg  +*.gif  +*.svg  +*.tif  +*.tiff  +*.xcf  +*.html  +*.gpg  +*.css  +*.js  +*.ts  +*.cs  +*.sql  +*.db  +*.json  +*.py  +*.c  +*.orig  +*.rej  +*.h  +*.yml  +*.yaml  +*.mk  +*.cpp  +*.scss  +*.sass  +*.pdf  +*.epub  +*.csv  +*.xlsx  +*.tex  +*.md  +README  +LICENSE  +*.mp3  +*.opus  +*.ogg  +*.m4a  +*.flac  +*.wav  +*.mkv  +*.mp4  +*.webm  +*.mpeg  +*.avi  +*.mov  +*.mpg  +*.wmv  +*.m4b  +*.flv  +*.zip  +*.rar  +*.7z  +*.tar.gz  +*.1  +*.nfo  +*.info  +*.iso  +*.img  +*.torrent  +*.jar  +*.java  + diff --git a/.config/shell/profile b/.config/shell/profile index 88bcca3..31e96af 100644 --- a/.config/shell/profile +++ b/.config/shell/profile @@ -1,4 +1,4 @@ -#!/bin/zsh +#!/bin/bash # profile file. Runs on login. Environmental variables are set here. @@ -6,13 +6,11 @@ # to clean up. # Adds `~/.local/bin` to $PATH -export PATH="$PATH:${$(find ~/.local/bin -type d -printf %p:)%%:}" +export PATH="$PATH:$HOME/.local/bin/" # Userwide npm installations export npm_config_prefix="$HOME/.local" -unsetopt PROMPT_SP - # Default programs: export EDITOR="nvim" export TERMINAL="st" @@ -62,95 +60,14 @@ export AWT_TOOLKIT="MToolkit wmname LG3D" #May have to install wmname export _JAVA_AWT_WM_NONREPARENTING=1 # Fix for Java applications in dwm export ZK_NOTEBOOK_DIR="$HOME/notes/zk" -# This is the list for lf icons: -export LF_ICONS="di=:\ -fi=:\ -tw=:\ -ow=:\ -ln=:\ -or=:\ -ex=:\ -*.txt=:\ -*.mom=:\ -*.me=:\ -*.ms=:\ -*.odt=:\ -*.ods=:\ -*.png=:\ -*.webp=:\ -*.ico=:\ -*.jpg=:\ -*.jpe=:\ -*.jpeg=:\ -*.gif=:\ -*.svg=:\ -*.tif=:\ -*.tiff=:\ -*.xcf=:\ -*.html=:\ -*.gpg=:\ -*.css=:\ -*.js=:\ -*.ts=:\ -*.cs=:\ -*.sql=:\ -*.db=:\ -*.json=:\ -*.py=:\ -*.c=:\ -*.orig=:\ -*.rej=:\ -*.h=:\ -*.yml=:\ -*.yaml=:\ -*.mk=:\ -*.cpp=:\ -*.scss=:\ -*.sass=:\ -*.pdf=:\ -*.epub=:\ -*.csv=:\ -*.xlsx=:\ -*.tex=:\ -*.md=:\ -README=:\ -LICENSE=:\ -*.mp3=:\ -*.opus=:\ -*.ogg=:\ -*.m4a=:\ -*.flac=:\ -*.wav=:\ -*.mkv=:\ -*.mp4=:\ -*.webm=:\ -*.mpeg=:\ -*.avi=:\ -*.mov=:\ -*.mpg=:\ -*.wmv=:\ -*.m4b=:\ -*.flv=:\ -*.zip=:\ -*.rar=:\ -*.7z=:\ -*.tar.gz=:\ -*.1=:\ -*.nfo=:\ -*.info=:\ -*.iso=:\ -*.img=:\ -*.torrent=:\ -*.jar=:\ -*.java=:\ -" # I'm not using Luke's shortcuts so... -#[ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 & +[ ! -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. + # Start graphical server on user's current tty if not already running. #[ "$(tty)" = "/dev/tty1" ] && ! pidof -s Xorg >/dev/null 2>&1 && exec startx "$XINITRC" diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc index cf6af5e..24287f7 100755 --- a/.config/x11/xinitrc +++ b/.config/x11/xinitrc @@ -20,7 +20,6 @@ case $session in exec "$HOME/.dwm/start-dwm.sh" ;; xmonad) exec "$HOME/.xmonad/start-xmonad.sh" ;; - # No known session, try to run it as command *) exec twm ;; esac diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 7dd6618..23121b0 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -2,58 +2,39 @@ export GOPATH="$HOME/go" export PATH=$PATH:$HOME/.local/bin:$GOPATH/bin:$HOME/scripts -# Path to your oh-my-zsh installation. -export ZSH="/home/solomon/.oh-my-zsh" +source ./themes/inkletblotsh.zsh -ZSH_THEME="inkletblotsh" +# 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 -# Uncomment the following line if you want to change the command execution time -# stamp shown in the history command output. -# You can set one of the optional three formats: -# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" -# or set a custom format using the strftime function format specifications, -# see 'man strftime' for details. HIST_STAMPS="yyyy-mm-dd" - -# Would you like to use another custom folder than $ZSH/custom? -ZSH_CUSTOM=/home/solomon/.config/zsh - -# Which plugins would you like to load? -# Standard plugins can be found in $ZSH/plugins/ -# Custom plugins may be added to $ZSH_CUSTOM/plugins/ -# Example format: plugins=(rails git textmate ruby lighthouse) -# Add wisely, as too many plugins slow down shell startup. -plugins=(git - battery - git-flow -git-prompt vi-mode) - -source $ZSH/oh-my-zsh.sh - -# You may need to manually set your language environment -export LANG=en_US.UTF-8 - -# Preferred editor for local and remote sessions -if [[ -n $SSH_CONNECTION ]]; then - # Probably shoud be vim or vi or even nano but it's annoying me. - export EDITOR='nvim' -else - export EDITOR='nvim' -fi - HISTSIZE=1000000 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 +zmodload zsh/complist +compinit +_comp_options+=(globdots) # Include hidden files. # vi mode bindkey -v export KEYTIMEOUT=1 # use vim keys in tab complete menu: +bindkey -M menuselect 'h' vi-backward-char +bindkey -M menuselect 'k' vi-up-line-or-history +bindkey -M menuselect 'l' vi-forward-char +bindkey -M menuselect 'j' vi-down-line-or-history bindkey -v '^?' backward-delete-char # use lf to switch directories and bind it to ctrl-o @@ -76,126 +57,15 @@ bindkey -s '^t' '^utms\n' # zk related things bindkey -s '^n' '^uzk edit --interactive --sort modified-\n' -function pomo() { - arg1=$1 - shift - args="$*" - - min=${arg1:?Example: pomo 25 Take a break} - sec=$((min * 60)) - msg="${args:?Example: pomo 25 Take a break}" - - while true; do - date '+%H:%M' && sleep "${sec:?}" && notify-send -u critical -t 0 -a pomo "${msg:?}" - done -} - -# Dracula Theme (for zsh-syntax-highlighting) -# -# https://github.com/zenorocha/dracula-theme -# -# Copyright 2021, All rights reserved -# -# Code licensed under the MIT license -# http://zenorocha.mit-license.org -# -# @author George Pickering <@bigpick> -# @author Zeno Rocha -# Paste this files contents inside your ~/.zshrc before you activate zsh-syntax-highlighting -ZSH_HIGHLIGHT_HIGHLIGHTERS=(main cursor) -typeset -gA ZSH_HIGHLIGHT_STYLES -# Default groupings per, https://spec.draculatheme.com, try to logically separate -# possible ZSH_HIGHLIGHT_STYLES settings accordingly...? -# -# Italics not yet supported by zsh; potentially soon: -# https://github.com/zsh-users/zsh-syntax-highlighting/issues/432 -# https://www.zsh.org/mla/workers/2021/msg00678.html -# ... in hopes that they will, labelling accordingly with ,italic where appropriate -# -# Main highlighter styling: https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters/main.md -# -## General -### Diffs -### Markup -## Classes -## Comments -ZSH_HIGHLIGHT_STYLES[comment]='fg=#6272A4' -## Constants -## Entitites -## Functions/methods -ZSH_HIGHLIGHT_STYLES[alias]='fg=#50FA7B' -ZSH_HIGHLIGHT_STYLES[suffix-alias]='fg=#50FA7B' -ZSH_HIGHLIGHT_STYLES[global-alias]='fg=#50FA7B' -ZSH_HIGHLIGHT_STYLES[function]='fg=#50FA7B' -ZSH_HIGHLIGHT_STYLES[command]='fg=#50FA7B' -ZSH_HIGHLIGHT_STYLES[precommand]='fg=#50FA7B,italic' -ZSH_HIGHLIGHT_STYLES[autodirectory]='fg=#FFB86C,italic' -ZSH_HIGHLIGHT_STYLES[single-hyphen-option]='fg=#FFB86C' -ZSH_HIGHLIGHT_STYLES[double-hyphen-option]='fg=#FFB86C' -ZSH_HIGHLIGHT_STYLES[back-quoted-argument]='fg=#BD93F9' -## Keywords -## Built ins -ZSH_HIGHLIGHT_STYLES[builtin]='fg=#8BE9FD' -ZSH_HIGHLIGHT_STYLES[reserved-word]='fg=#8BE9FD' -ZSH_HIGHLIGHT_STYLES[hashed-command]='fg=#8BE9FD' -## Punctuation -ZSH_HIGHLIGHT_STYLES[commandseparator]='fg=#FF79C6' -ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-unquoted]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[process-substitution-delimiter]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[back-quoted-argument-delimiter]='fg=#FF79C6' -ZSH_HIGHLIGHT_STYLES[back-double-quoted-argument]='fg=#FF79C6' -ZSH_HIGHLIGHT_STYLES[back-dollar-quoted-argument]='fg=#FF79C6' -## Serializable / Configuration Languages -## Storage -## Strings -ZSH_HIGHLIGHT_STYLES[command-substitution-quoted]='fg=#F1FA8C' -ZSH_HIGHLIGHT_STYLES[command-substitution-delimiter-quoted]='fg=#F1FA8C' -ZSH_HIGHLIGHT_STYLES[single-quoted-argument]='fg=#F1FA8C' -ZSH_HIGHLIGHT_STYLES[single-quoted-argument-unclosed]='fg=#FF5555' -ZSH_HIGHLIGHT_STYLES[double-quoted-argument]='fg=#F1FA8C' -ZSH_HIGHLIGHT_STYLES[double-quoted-argument-unclosed]='fg=#FF5555' -ZSH_HIGHLIGHT_STYLES[rc-quote]='fg=#F1FA8C' -## Variables -ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[dollar-quoted-argument-unclosed]='fg=#FF5555' -ZSH_HIGHLIGHT_STYLES[dollar-double-quoted-argument]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[assign]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[named-fd]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[numeric-fd]='fg=#F8F8F2' -## No category relevant in spec -ZSH_HIGHLIGHT_STYLES[unknown-token]='fg=#FF5555' -ZSH_HIGHLIGHT_STYLES[path]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[path_pathseparator]='fg=#FF79C6' -ZSH_HIGHLIGHT_STYLES[path_prefix]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]='fg=#FF79C6' -ZSH_HIGHLIGHT_STYLES[globbing]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[history-expansion]='fg=#BD93F9' -#ZSH_HIGHLIGHT_STYLES[command-substitution]='fg=?' -#ZSH_HIGHLIGHT_STYLES[command-substitution-unquoted]='fg=?' -#ZSH_HIGHLIGHT_STYLES[process-substitution]='fg=?' -#ZSH_HIGHLIGHT_STYLES[arithmetic-expansion]='fg=?' -ZSH_HIGHLIGHT_STYLES[back-quoted-argument-unclosed]='fg=#FF5555' -ZSH_HIGHLIGHT_STYLES[redirection]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[arg0]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[default]='fg=#F8F8F2' -ZSH_HIGHLIGHT_STYLES[cursor]='standout' - - -if [ -f /etc/hostname ]; then - HOST=$(cat /etc/hostname) -else - HOST=$(hostname) -fi - -if [ "$HOST" = "holocene" ] ; then - source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh -elif [ "$HOST" = "boost" ] ; then - source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -else - source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -fi +# search +bindkey -s '^f' '^ucd "$(dirname "$(fzf)")"\n' +# holocene -> gentoo +source /usr/share/zsh/site-functions/zsh-syntax-highlighting.zsh 2>/dev/null +# boost -> ubuntu +source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null +# archt430 -> arch... duh +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh 2>/dev/null #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! export SDKMAN_DIR="$HOME/.sdkman" diff --git a/.config/zsh/themes/inkletblotsh.zsh-theme b/.config/zsh/themes/inkletblotsh.zsh similarity index 100% rename from .config/zsh/themes/inkletblotsh.zsh-theme rename to .config/zsh/themes/inkletblotsh.zsh