Add a script for installing fish
profile settings
This commit is contained in:
parent
b81b034287
commit
49ab989d1e
5 changed files with 42 additions and 25 deletions
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
. "../bash/profile.sh";
|
||||
. "../fish/profile.sh";
|
||||
NEXTCLOUD_DIR="${NEXTCLOUD_DIR}";
|
||||
themeDir="/usr/local/share/oh-my-posh/themes";
|
||||
install -d644 "$themeDir";
|
||||
|
@ -12,10 +13,9 @@ cat ~/.mnt/$NEXTCLOUD_DIR/.omp/manuel.omp.json | sudo tee "$themeDir/manuel.omp.
|
|||
} | addBashProfile "oh-my-posh" "Oh My Posh!";
|
||||
|
||||
{
|
||||
echo "# Oh My Posh!";
|
||||
echo "oh-my-posh init fish | source";
|
||||
echo "oh-my-posh completion fish | source";
|
||||
} | sudo tee /etc/fish/conf.d/oh-my-posh.fish;
|
||||
} | addFishProfile "oh-my-posh" "Oh My Posh!";
|
||||
|
||||
pwsh ./install.ps1;
|
||||
|
||||
|
|
11
scripts/Common/Config/fish/profile.sh
Executable file
11
scripts/Common/Config/fish/profile.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
. "../../Scripts/profile-base.sh";
|
||||
|
||||
function addFishProfile() {
|
||||
name="$1";
|
||||
title="$2";
|
||||
addProfileStatement "$name" "$title" "/bin/fish" "/etc/fish/conf.d" "${@:3}";
|
||||
}
|
||||
|
||||
popd > /dev/null;
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/bash
|
||||
configFile="/etc/fish/conf.d/logo-ls.fish";
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
. "../bash/profile.sh";
|
||||
. "../fish/profile.sh";
|
||||
functionName="_PortValhalla_ls_";
|
||||
|
||||
function dump_header() {
|
||||
|
@ -25,22 +27,21 @@ function dump_aliases() {
|
|||
echo "end";
|
||||
echo "";
|
||||
dump_aliases;
|
||||
} | sudo tee "$configFile" > /dev/null;
|
||||
} | addFishProfile "logo-ls" "logo-ls";
|
||||
|
||||
if ! grep "\blogo-ls\b" ~/.bashrc > /dev/null
|
||||
then
|
||||
{
|
||||
echo "";
|
||||
dump_header;
|
||||
echo "function ${functionName}() {";
|
||||
echo " if [ -t 1 ]";
|
||||
echo " then";
|
||||
echo ' logo-ls -D "$@";';
|
||||
echo " else";
|
||||
echo ' ls --color=auto "$@";'
|
||||
echo " fi;"
|
||||
echo "}";
|
||||
echo "";
|
||||
dump_aliases;
|
||||
} | tee -a ~/.bashrc > /dev/null;
|
||||
fi;
|
||||
{
|
||||
echo "";
|
||||
dump_header;
|
||||
echo "function ${functionName}() {";
|
||||
echo " if [ -t 1 ]";
|
||||
echo " then";
|
||||
echo ' logo-ls -D "$@";';
|
||||
echo " else";
|
||||
echo ' ls --color=auto "$@";'
|
||||
echo " fi;"
|
||||
echo "}";
|
||||
echo "";
|
||||
dump_aliases;
|
||||
} | addBashProfile "logo-ls" "logo-ls";
|
||||
|
||||
popd > /dev/null;
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
#!/bin/bash
|
||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||
. "../fish/profile.sh";
|
||||
. "../bash/profile.sh";
|
||||
|
||||
{
|
||||
echo 'export PYENV_ROOT="$HOME/.pyenv"';
|
||||
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"';
|
||||
echo 'eval "$(pyenv init -)"';
|
||||
} | sudo tee /etc/profile.d/pyenv.sh > /dev/null;
|
||||
} | addBashProfile "pyenv" "pyenv";
|
||||
|
||||
echo "pyenv init - | source" | sudo tee /etc/fish/conf.d/pyenv.fish > /dev/null;
|
||||
addFishProfile "pyenv" "pyenv" "pyenv init - | source";
|
||||
popd > /dev/null;
|
||||
|
|
|
@ -3,6 +3,7 @@ pushd "${BASH_SOURCE%/*}" > /dev/null;
|
|||
configPath="/etc/aliae/aliae.yml";
|
||||
|
||||
. "../../../Common/Config/aliae/install.sh";
|
||||
. "../../../Common/Config/fish/profile.sh";
|
||||
sudo install -Dm644 "../../../Common/Config/aliae/aliae.yml" "$configPath";
|
||||
|
||||
function dump_header() {
|
||||
|
@ -20,9 +21,8 @@ function dump_bash() {
|
|||
} | sudo tee /etc/profile.d/aliae.sh > /dev/null;
|
||||
|
||||
{
|
||||
dump_header;
|
||||
echo "aliae init fish | source";
|
||||
echo "aliae completion fish | source";
|
||||
} | sudo tee /etc/fish/conf.d/aliae.fish > /dev/null;
|
||||
} | addFishProfile "aliae" "aliae";
|
||||
|
||||
popd > /dev/null;
|
||||
|
|
Loading…
Reference in a new issue