Change various things

This commit is contained in:
crater2150 2024-11-27 12:14:40 +01:00
parent 281ea9f354
commit 8a9503b95a
7 changed files with 21 additions and 8 deletions

View file

@ -1,3 +1,5 @@
if exists /usr/bin/node && exists github-copilot-cli; then
eval "$(github-copilot-cli alias -- "$0")"
elif exists gh && gh extension list | grep copilot -q; then
eval "$(gh copilot alias -- zsh)"
fi

View file

@ -384,3 +384,7 @@ alias Cgit="gh-copilot-cli git"
alias Cgh="gh-copilot-cli gh"
alias e="nvim -c 'lua require(\"telescope.builtin\").fd { cwd = require(\"findroot\")(require(\"telescope.utils\").buffer_dir()) } '"
if [[ -e ${XDG_CONFIG_HOME}/broot/launcher/bash/br ]]; then
source ${XDG_CONFIG_HOME}/broot/launcher/bash/br
fi

View file

@ -16,4 +16,3 @@ export TEXMFCONFIG=$XDG_CONFIG_HOME/texlive/texmf-config
export TEXMFHOME=$XDG_DATA_HOME/texmf
export TEXMFVAR=$XDG_CACHE_HOME/texlive/texmf-var
export XINITRC="$XDG_CONFIG_HOME"/X11/xinitrc
export _JAVA_OPTIONS="-Djava.util.prefs.userRoot=$XDG_CONFIG_HOME/java"

2
env/50_scala.zsh vendored
View file

@ -1 +1 @@
export SBT_OPTS="-XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=10G -Xmx10G"
export SBT_OPTS="-Xmx10G"

View file

@ -1,6 +1,7 @@
typeset -gA ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
ZSH_HIGHLIGHT_DIRS_BLACKLIST+=(/mnt/)
if [[ "`tput colors`" == "256" ]] || [[ "`tput colors`" == "88" ]] ; then

3
zshenv
View file

@ -1,3 +1,6 @@
if [ -z "$ZDOTDIR" ]; then
export ZDOTDIR=$HOME/.config/zsh
fi
exists() { command -v "$@" >/dev/null }
function(){
local i

8
zshrc
View file

@ -29,12 +29,15 @@ fpath=($ZDOTDIR/functions $fpath)
function exists { command -v "$@" >/dev/null }
# get a file from ZDOTDIR, return file in /etc/zsh if it does not exist
# get a file from ZDOTDIR, return file in /etc/zsh if it does not exist. If both
# don't exist, return the first of them.
zdotfile() {
if [[ -e $ZDOTDIR/$1 ]]; then
echo $ZDOTDIR/$1
else
elif [[ -e /etc/zsh/$1 ]]; then
echo /etc/zsh/$1
else
echo $ZDOTDIR/$1
fi
}
try-source() {
@ -109,6 +112,7 @@ if [[ -e $HOME/.calendars ]]; then
fi
if exists mail; then
MAILCHECK=0
_prompt_cron_mails() {
[[ ! -e $MAIL ]] && return
local newmails=$(mail -Hf $MAIL | grep -c '^.N')