update rbw fuzzel script
This commit is contained in:
parent
86ea42c652
commit
1b70942d39
2 changed files with 28 additions and 0 deletions
|
@ -217,6 +217,12 @@ transfer()
|
|||
esac
|
||||
}
|
||||
|
||||
{{- if eq .chezmoi.hostname "sri-laptop-fedora" }}
|
||||
export RBW_PROFILE="arbeit"
|
||||
{{- else }}
|
||||
export RBW_PROFILE="privat"
|
||||
{{- end }}
|
||||
|
||||
export PNPM_HOME="$HOME/.local/share/pnpm"
|
||||
export PATH="$PATH:$HOME/bin:$HOME/.local/bin"
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
|
|
|
@ -1,5 +1,27 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Profile-Liste (einfach erweitern falls nötig)
|
||||
profiles=("arbeit" "privat")
|
||||
profile_input=$(printf "%s\n" "${profiles[@]}")
|
||||
|
||||
# Profil-Auswahl am Start
|
||||
select_profile() {
|
||||
local prompt="$1"
|
||||
local input="$2"
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
echo "$input" | choose -p "$prompt"
|
||||
else
|
||||
echo "$input" | fuzzel -d -p "$prompt"
|
||||
fi
|
||||
}
|
||||
|
||||
chosen_profile=$(select_profile "Welches rbw-Profil?" "$profile_input")
|
||||
if [[ -z "$chosen_profile" ]]; then
|
||||
echo "Kein Profil gewählt – abgebrochen."
|
||||
exit 1
|
||||
fi
|
||||
export RBW_PROFILE="$chosen_profile"
|
||||
|
||||
# Funktion zur Auswahl mit fuzzel oder choose
|
||||
select_item() {
|
||||
local prompt="$1"
|
||||
|
|
Loading…
Add table
Reference in a new issue