- renamed to over-env
- removed garbage - added install.sh
This commit is contained in:
parent
6888571eea
commit
84f3734353
10 changed files with 15 additions and 91 deletions
|
@ -1,17 +0,0 @@
|
|||
#! /bin/zsh
|
||||
|
||||
SRCDIR="$1"
|
||||
DESTDIR="$2"
|
||||
|
||||
pushd "${SRCDIR}" > /dev/null
|
||||
find . -type d | while read P
|
||||
do
|
||||
mkdir -p "${DESTDIR}/${P[3,-1]}"
|
||||
done
|
||||
|
||||
find . -type f | while read P
|
||||
do
|
||||
P="${P[3,-1]}"
|
||||
cp -bv "${P}" "${DESTDIR}/${P}"
|
||||
done
|
||||
popd > /dev/null
|
|
@ -1,70 +0,0 @@
|
|||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit git-2
|
||||
|
||||
DESCRIPTION="A nonintrusive zsh prompt that provides useful data like pwd, git info and system stats to the user."
|
||||
|
||||
HOMEPAGE="https://git.covalent.cz/overwatch/over-prompt"
|
||||
SRC_URI=""
|
||||
EGIT_REPO_URI="https://git.covalent.cz/overwatch/over-prompt.git"
|
||||
|
||||
LICENSE="AOJSL"
|
||||
SLOT="0"
|
||||
KEYWORDS="x86 amd64"
|
||||
IUSE="+dotfiles +tools"
|
||||
|
||||
RDEPEND="
|
||||
tools? ( dev-python/psutil )"
|
||||
|
||||
src_compile() {
|
||||
ewarn "This is a prototype written in Python. Expect lower performance."
|
||||
#g++ -ansi -Wall -o data data.cpp
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use tools; then
|
||||
for b in bin/*
|
||||
do
|
||||
dobin "${b}"
|
||||
done
|
||||
|
||||
for sb in sbin/*
|
||||
do
|
||||
dosbin "${sb}"
|
||||
done
|
||||
fi
|
||||
|
||||
insopts -m755
|
||||
|
||||
insinto /usr/libexec/
|
||||
newins libexec/render.py ${PN}.py
|
||||
|
||||
insinto /usr/share/${PN}/
|
||||
doins share/zsh-init
|
||||
|
||||
if use dotfiles; then
|
||||
pushd dotfiles > /dev/null
|
||||
|
||||
einfo "Installing dotfiles."
|
||||
zsh deploy-dotfiles.zsh system "${D}"
|
||||
|
||||
popd > /dev/null
|
||||
fi
|
||||
|
||||
insopts -m644
|
||||
|
||||
insinto /etc/${PN}/
|
||||
doins cfg/main.cfg
|
||||
|
||||
insinto /usr/share/i18n/locales/
|
||||
doins locale/en_OV
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
einfo "Source /usr/share/${PN}/zsh-init to enable the prompt."
|
||||
einfo "The config file is in /etc/${PN}/."
|
||||
}
|
|
@ -182,8 +182,8 @@ autoload -U compinit
|
|||
compinit
|
||||
autoload colors zsh/terminfo
|
||||
|
||||
# app-shells/over-prompt
|
||||
source /usr/share/over-prompt/zsh-init
|
||||
# app-shells/over-env
|
||||
source /usr/lib/over/env/prompt-init
|
||||
|
||||
# keyboard stuff
|
||||
bindkey "\e[1~" beginning-of-line
|
11
install.sh
Executable file
11
install.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#! /bin/bash
|
||||
|
||||
ROOT="${1}"
|
||||
LIBDIR="${ROOT}/usr/lib/over/env"
|
||||
|
||||
mkdir -p "${LIBDIR}"
|
||||
cp lib/* "${LIBDIR}"
|
||||
mkdir -p "${ROOT}/etc"
|
||||
|
||||
# intentionally ignoring zsh stuff - install that manually if you want
|
||||
cp -r etc/over-env etc/screen* "${ROOT}/etc"
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/zsh
|
||||
|
||||
OVER_PROMPT_CFG="/etc/over-prompt/main.cfg"
|
||||
OVER_PROMPT_CFG="/etc/over-env/prompt.cfg"
|
||||
|
||||
if [[ -a "$OVER_PROMPT_CFG" ]]; then
|
||||
source "$OVER_PROMPT_CFG"
|
||||
|
@ -21,7 +21,7 @@ function preexec {
|
|||
|
||||
function precmd {
|
||||
set_title "${USER}: ${PWD}"
|
||||
python3 /usr/libexec/over-prompt.py "${COLUMNS}" "${PWD}" "${OVER_PROMPT_LAST_REFRESH}" "${OVER_PROMPT_SYSLOAD_WARN:=1.25}" "${OVER_PROMPT_SYSLOAD_YELL:=3.0}" "${OVER_PROMPT_FREESPACE_WARN:=0.15}" "${OVER_PROMPT_FREESPACE_YELL:=0.05}"
|
||||
python3 /usr/lib/over/env/prompt.py "${COLUMNS}" "${PWD}" "${OVER_PROMPT_LAST_REFRESH}" "${OVER_PROMPT_SYSLOAD_WARN:=1.25}" "${OVER_PROMPT_SYSLOAD_YELL:=3.0}" "${OVER_PROMPT_FREESPACE_WARN:=0.15}" "${OVER_PROMPT_FREESPACE_YELL:=0.05}"
|
||||
PS1="$(print "%(?.%{\e[1;36m%}.%{\e[1;31m%}%?%{\e[0m%}:%{\e[1;31m%})%(\!.#.$)%{\e[0m%} ")"
|
||||
OVER_PROMPT_LAST_REFRESH=$(date +%s)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue