This repository has been archived on 2022-02-20. You can view files and clone it, but cannot push or open issues/pull-requests.
8 changed files with
44 additions and
24 deletions
|
|
|
@ -10,13 +10,13 @@ use_pyenv() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# TODO make alias generating function for versions of python
|
|
|
|
|
alias python3x="sudo -H python3.8 -m"
|
|
|
|
|
alias spip="sudo -H python3.8 -m pip"
|
|
|
|
|
alias spipi="sudo -H python3.8 -m pip install"
|
|
|
|
|
alias spipiu="sudo -H python3.8 -m pip install -U"
|
|
|
|
|
alias spipl="sudo -H python3.8 -m pip list"
|
|
|
|
|
alias spiplo="sudo -H python3.8 -m pip list --outdated"
|
|
|
|
|
alias pip3="sudo -H python3.8 -m pip"
|
|
|
|
|
alias python3x="sudo -H python3 -m"
|
|
|
|
|
alias spip="sudo -H python3 -m pip"
|
|
|
|
|
alias spipi="sudo -H python3 -m pip install"
|
|
|
|
|
alias spipiu="sudo -H python3 -m pip install -U"
|
|
|
|
|
alias spipl="sudo -H python3 -m pip list"
|
|
|
|
|
alias spiplo="sudo -H python3 -m pip list --outdated"
|
|
|
|
|
alias pip3="sudo -H python3 -m pip"
|
|
|
|
|
alias pipu="pipx upgrade"
|
|
|
|
|
alias pipua="pipx upgrade-all"
|
|
|
|
|
alias pipupip="pipx upgrade pipx"
|
|
|
|
|
|
|
|
@ -8,7 +8,10 @@ chromium_() {
|
|
|
|
|
# local DEFAULT="$HOME/.local/share/chromium"
|
|
|
|
|
local exe="/usr/bin/chromium"
|
|
|
|
|
|
|
|
|
|
[[ $1 == "-version" ]] && $exe -version && return
|
|
|
|
|
if [[ $1 == "-version" ]]; then
|
|
|
|
|
$exe -version
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
[[ $1 == -g ]] && exe=$(command -v google-chrome) && shift
|
|
|
|
|
echo execuatble to be used: $exe
|
|
|
|
@ -16,7 +19,8 @@ chromium_() {
|
|
|
|
|
echo chromium/chrome not installed, checking for flatpak version
|
|
|
|
|
flatpak=$(flatpak info com.github.Eloston.UngoogledChromium | grep error:)
|
|
|
|
|
if [[ $flatpak ]]; then
|
|
|
|
|
echo no flatpak version either - exiting && return 1
|
|
|
|
|
echo no flatpak version either - exiting
|
|
|
|
|
return 1
|
|
|
|
|
else
|
|
|
|
|
flatpak=true
|
|
|
|
|
exe="/usr/bin/flatpak run --branch=stable --arch=x86_64 --filesystem=<dir> --command=/app/bin/chromium --file-forwarding com.github.Eloston.UngoogledChromium @@u"
|
|
|
|
|
|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
[Seat:*]
|
|
|
|
|
session-cleanup-script=/opt/scripts/lightdm-cleanup.sh
|
|
|
|
|
session-setup-script=/opt/scripts/lightdm-setup.sh
|
|
|
|
|
session-setup-script=/opt/session/lightdm-setup.sh
|
|
|
|
|
session-cleanup-script=/opt/session/lightdm-cleanup.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +0,0 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
echo "cleanup for ${USER}:${HOME} $(date)" >> /opt/scripts/lightdm.log
|
|
|
|
|
log=${HOME}/.session.log
|
|
|
|
|
if [[ -e $HOME/.session_logout ]]; then su -c "/bin/bash $HOME/.session_logout 1>>${log} 2>>${log} || true" $USER; fi
|
|
|
|
@ -1,4 +0,0 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
echo "setup for ${USER}:${HOME} $(date)" >> /opt/scripts/lightdm.log
|
|
|
|
|
log=${HOME}/.session.log
|
|
|
|
|
if [[ -e $HOME/.session_login ]]; then su -c "/bin/bash $HOME/.session_login 1>>${log} 2>>${log} || true" $USER; fi
|
|
|
|
@ -14,15 +14,20 @@ loginout_install() {
|
|
|
|
|
echo copying 50-setup-cleanup.conf to /etc/lightdm/lightdm.conf.d
|
|
|
|
|
sudo cp -f 50-setup-cleanup.conf /etc/lightdm/lightdm.conf.d
|
|
|
|
|
|
|
|
|
|
if [[ ! -d /opt/scripts ]]; then
|
|
|
|
|
if [[ ! $(mkdir -p /opt/scripts) ]]; then
|
|
|
|
|
if [[ ! -d /opt/session ]]; then
|
|
|
|
|
if [[ ! $(mkdir -p /opt/session) ]]; then
|
|
|
|
|
echo unable to make /opt/session with user $USER, elevating to sudo
|
|
|
|
|
_sudo="sudo"
|
|
|
|
|
[[ $($_sudo mkdir -p /opt/scripts) ]] && echo can not make /opt/scripts, aborting && return
|
|
|
|
|
[[ $($_sudo mkdir -p /opt/session) ]] && echo can not make /opt/session, aborting && return
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo copying lightdm-cleanup.sh and lightdm-setup.sh to /opt/scripts
|
|
|
|
|
$_sudo cp -f lightdm-*.sh /opt/scripts
|
|
|
|
|
|
|
|
|
|
echo copying lightdm-cleanup.sh and lightdm-setup.sh to /opt/session
|
|
|
|
|
$_sudo cp -f scripts/* /opt/session
|
|
|
|
|
echo setting execute permissions
|
|
|
|
|
$_sudo chmod -R +x /opt/session/*.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
popd >/dev/null
|
|
|
|
|
|
|
|
@ -0,0 +1,9 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
_udir=${HOME}/.session
|
|
|
|
|
_uscript=${_udir}/session_logout
|
|
|
|
|
_log=${_udir}/session.log
|
|
|
|
|
_sdir=$(dirname "${BASH_SOURCE[0]}")
|
|
|
|
|
echo "${UID:-$(id -u)}:$(whoami) is running CLEANUP script in $_sdir for ${USER} sourcing ${_uscript}::$(date)" >> ${_sdir}/lightdm.log
|
|
|
|
|
if [[ -e ${_uscript} ]]; then
|
|
|
|
|
/bin/bash ${_uscript} 1>>${_log} 2>>${_log} || true
|
|
|
|
|
fi
|
|
|
|
@ -0,0 +1,9 @@
|
|
|
|
|
#!/bin/bash
|
|
|
|
|
_udir=${HOME}/.session
|
|
|
|
|
_uscript=${_udir}/session_login
|
|
|
|
|
_log=${_udir}/session.log
|
|
|
|
|
_sdir=$(dirname "${BASH_SOURCE[0]}")
|
|
|
|
|
echo "${UID:-$(id -u)}:$(whoami) is running SETUP script in $_sdir for ${USER} sourcing ${_uscript}::$(date)" >> ${_sdir}/lightdm.log
|
|
|
|
|
if [[ -e ${_uscript} ]]; then
|
|
|
|
|
/bin/bash ${_uscript} 1>>${_log} 2>>${_log} || true
|
|
|
|
|
fi
|