Compare commits

..

11 Commits

3 changed files with 13 additions and 12 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.disabled

12
bashrc
View File

@ -1,3 +1,4 @@
#!/usr/bin/env bash
# ~/.bashrc
# byMasterKTO
@ -59,7 +60,7 @@ if [[ $system == "Linux" ]]; then
# Arch family: light blue
Arch | ManjaroLinux | Manjaro-ARM) COLOR=$C_BOLD$C_ARCH;;
# Debian family: orange
Debian | Ubuntu | Linuxmint | Neon | Raspbian) COLOR=$C_BOLD$C_DEB;;
Debian | Ubuntu | Linuxmint | Neon | Raspbian | PureOS) COLOR=$C_BOLD$C_DEB;;
# RedHat family: blue
Fedora) COLOR=$C_BOLD$C_RH;;
# SUSE family: green
@ -88,7 +89,7 @@ if [[ $system == "Linux" ]]; then
fi
fi
# hostname
# hostname TODO could we not get rid of hostname command (not always installed)?
# if hostname has 5 parts then host=.secondpart
if [[ $(hostname | grep -o "\." | wc -l) -eq 4 ]]; then
host='.'$(hostname | cut -f 2 -d '.')
@ -145,7 +146,7 @@ unset TMUX
alias touchpad='xinput set-prop 12 "Device Enabled" 1'
# Set VNC aliases
X_user=$(who | grep \(: | cut -d " " -f1)
X_user=$(who | grep -m1 \(: | cut -d " " -f1)
X_display=$(who | grep \(: | cut -d ":" -f2 | cut -b 1)
if id -u gdm > /dev/null 2>&1; then
X_gdm_id=$(id -u gdm)
@ -160,7 +161,6 @@ alias vnc-gdm="sudo x11vnc -auth /run/user/$X_gdm_id/gdm/Xauthority -localhost -
alias vnc-lightdm='sudo x11vnc -auth /var/run/lightdm/root/:0 -localhost -once -nopw -display :0'
# load any additional configuration
for f in ~/.bashrc-*; do
[ -e "$f" ] && . ~/.bashrc-*
break
for f in ~/.bashrc.d/bashrc-*; do
[ -e "$f" ] && source $f
done

12
install.sh Normal file → Executable file
View File

@ -1,11 +1,11 @@
#!/bin/bash
#!/usr/bin/env bash
run_directory=$(dirname "$0")
run_directory=$(dirname $(readlink -f "$0"))
user=$(whoami)
if [ -z "$1" ]; then
user=$(whoami)
else
user=$1
if [ -f $run_directory/.disabled ]; then
echo "Installation is disabled. Exiting..."
exit 0
fi
if [[ $user != 'root' ]]; then