small fixes for laptop

This commit is contained in:
Amarpreet Minhas 2024-03-30 14:36:49 -04:00
parent 1e63101725
commit a22ede5b96
2 changed files with 16 additions and 8 deletions

View file

@ -1,14 +1,23 @@
#!/bin/bash #!/bin/bash
# add golang to path # add golang to PATH
export PATH=${PATH}:/usr/lib/go-1.22/bin/:${HOME}/go/bin
if [ -d "/usr/lib/go-1.22/bin/" ]; then
export PATH=${PATH}:/usr/lib/go-1.22/bin
fi
if [ -d "${HOME}/go/bin" ]; then
export PATH=${PATH}:${HOME}/go/bin
fi
# add uxn to path # add uxn to path
if [ -d "$HOME/code/git.sr.ht/rabbits/uxn/bin" ]; then
export PATH=${PATH}:${HOME}/code/git.sr.ht/rabbits/uxn/bin export PATH=${PATH}:${HOME}/code/git.sr.ht/rabbits/uxn/bin
fi
# set up moolticute ssh agent
if ! pgrep -u "$USER" mc-agent >/dev/null; then if ! pgrep -u "$USER" mc-agent >/dev/null; then
mc-agent >~/.mc-agent-env mc-agent >~/.mc-agent-env
fi fi
if pgrep -u "$USER" mc-agent &>/dev/null && grep -q 'SSH_AUTH_SOCK=' ~/.mc-agent-env; then if pgrep -u "$USER" mc-agent &>/dev/null && grep -q 'SSH_AUTH_SOCK=' ~/.mc-agent-env; then
# once mc-agent started successfully override gnome-keyring ssh component
eval "$(<~/.mc-agent-env)" eval "$(<~/.mc-agent-env)"
fi fi

View file

@ -6,20 +6,19 @@ if [ -n "$BASH_VERSION" ]; then
fi fi
fi fi
# set PATH so it includes user's private bin if it exists # set PATH so it includes user's private bin dirs if they exists
if [ -d "$HOME/bin" ]; then if [ -d "$HOME/bin" ]; then
PATH="$HOME/bin:$PATH" PATH="$HOME/bin:$PATH"
fi fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ]; then if [ -d "$HOME/.local/bin" ]; then
PATH="$HOME/.local/bin:$PATH" PATH="$HOME/.local/bin:$PATH"
fi fi
# set up wayland env vars
if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then if [ -z "${WAYLAND_DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
export MOZ_ENABLE_WAYLAND=1 export MOZ_ENABLE_WAYLAND=1
export MOZ_WEBRENDER=1 export MOZ_WEBRENDER=1
export XDG_SESSION_TYPE=wayland export XDG_SESSION_TYPE=wayland
XDG_CURRENT_DESKTOP=sway export XDG_CURRENT_DESKTOP=sway
exec sway exec sway
fi fi