Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Maxattax97/miscellaneous
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxattax97 committed Nov 11, 2024
2 parents fddf99f + 821cdfd commit 706e356
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 38 deletions.
13 changes: 13 additions & 0 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,11 @@ zshrc_source() {
if [ -s "$HOME/.luaver/luaver" ]; then
source "$HOME/.luaver/luaver"
fi

if [ -n "${PYENV_ROOT}" ]; then
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
}

zshrc_set_options() {
Expand Down Expand Up @@ -904,6 +909,10 @@ zshrc_set_path() {
zshrc_add_path "${KREW_ROOT:-$HOME/.krew}/bin" before
if [ -n "${PYENV_ROOT}" ]; then
zshrc_add_path "${PYENV_ROOT}/bin" before
fi
# Always wins, these are mine.
zshrc_add_path "${HOME}/bin" before
}
Expand Down Expand Up @@ -2014,6 +2023,10 @@ zshrc_set_environment_variables() {
# Python on macOS uses ~/Library/Python/X.Y/lib/python/site-packages
# ... this is madness, unify them.
export PYTHONUSERBASE="$HOME/.local"
if [ -d "${HOME}/.pyenv" ]; then
export PYENV_ROOT="${HOME}/.pyenv"
fi
}
zshrc_aura_shrc() {
Expand Down
79 changes: 41 additions & 38 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1011,18 +1011,19 @@ case "$response" in
xdg-settings set default-web-browser brave-browser.desktop
fi

# TODO: Install extensions
#[email protected]
#blur-my-shell@aunetx
#[email protected]
#[email protected]
#[email protected]
#[email protected]
#[email protected]
#[email protected]
#[email protected]
#[email protected]
#[email protected]
extensions=(
"[email protected]"
"blur-my-shell@aunetx"
"[email protected]"
"[email protected]"
"[email protected]"
)

for extension in "${extensions[@]}"; do
# TODO: Need to download the extensions first.
# gnome-extensions install "$extension"
gnome-extensions enable "$extension"
done

# Clear the bookmarks file
printf "" > "${HOME}/.config/gtk-3.0/bookmarks"
Expand Down Expand Up @@ -1424,36 +1425,38 @@ case "$response" in
;;
esac

read -r -p "Would you like to setup system permissions? [y/N] " response
case "$response" in
[yY][eE][sS] | [yY])
if [[ "$(uname)" != "Darwin" ]]; then
read -r -p "Would you like to setup system permissions? [y/N] " response
case "$response" in
[yY][eE][sS] | [yY])

if [[ -x "$(command -v pw)" ]]; then
sudo pw groupmod video -m "$USER"
sudo pw groupmod docker -m "$USER"
sudo pw groupmod wireshark -m "$USER"
sudo pw groupmod wheel -m "$USER"
sudo pw groupmod tty -m "$USER"
sudo pw groupmod nordvpn -m "$USER"
else
# TODO: Check that these are correct groupadd commands.
sudo groupadd -r docker
sudo usermod -a -G docker "$USER"
if [[ -x "$(command -v pw)" ]]; then
sudo pw groupmod video -m "$USER"
sudo pw groupmod docker -m "$USER"
sudo pw groupmod wireshark -m "$USER"
sudo pw groupmod wheel -m "$USER"
sudo pw groupmod tty -m "$USER"
sudo pw groupmod nordvpn -m "$USER"
else
# TODO: Check that these are correct groupadd commands.
sudo groupadd -r docker
sudo usermod -a -G docker "$USER"

sudo groupadd -r wireshark
sudo usermod -a -G wireshark "$USER"
sudo groupadd -r wireshark
sudo usermod -a -G wireshark "$USER"

sudo groupadd -r tty
sudo usermod -a -G tty "$USER"
sudo groupadd -r tty
sudo usermod -a -G tty "$USER"

sudo groupadd -r nordvpn
sudo usermod -a -G nordvpn "$USER"
fi
;;
*)
echo "Skipping permission setup"
;;
esac
sudo groupadd -r nordvpn
sudo usermod -a -G nordvpn "$USER"
fi
;;
*)
echo "Skipping permission setup"
;;
esac
fi

if [ -n "${AUTOMATED}" ]; then
response='n'
Expand Down

0 comments on commit 706e356

Please sign in to comment.