|
LXQtExTiX User Scripting.
|
+++ initthis.cfg
#!/bin/sh
#========
# initthis.cfg for ExTiX 23.5 lxqt
# runs extix in frugal mode from live install media
# user invoked from /media/live partition mounted via pcmanfm-qt
# customises session from persistent user settings, repos, & scripted configs
# =================
# standard prologue
# =================
echo -en "\e]10;cyan\a\e]11;black\a" >/dev/pts/0
env printf "...\n"
env printf "initthis.cfg in progress\n"
# echo -e "\033[1;34m$(date +%G%b%d%a.%P%H:%M:%S)\033[0m"
env printf "\033[1;34m$(date +%G%b%d%a.%P%H:%M:%S)\033[0m\n"
env printf "\033[1;32m .SNOG is Not Overwhelmingly GNUlike. \033[0m\n"
env printf "\033[1;32m _______ _______ _______ _______ \033[0m\n"
env printf "\033[1;32m | __|| | || || __| \033[0m\n"
env printf "\033[1;32m |__ || || - || | | \033[0m\n"
env printf "\033[1;32m |_______||__|____||_______||_______| Linux \033[0m\n"
# =============================
# ${HOME} directory linkage &c.
# =============================
# snoginit
cd $(dirname $0) ; INI=/tmp/.X11-snog ; mkdir ${INI} ; ln -sfn ${PWD} ${INI}/init
# homedir
cp -fpr ${USER} /home
sudo ${HOME}/kpZone/kData/unx/sh/zkp ${USER}
# sysreq
sudo sysctl kernel.sysrq=1
# =========================
# boottime package installs
# =========================
# tarballs
cd ${INI}/init/repo_tgz && $(zkp)/sh/fdfctl tgz >/dev/null 2>&1
# packages
cd ${INI}/init/repo_deb
ls -ahlGL *.deb 2>/dev/null && $(zkp)/sh/fdfctl deb >/dev/null 2>&1 &
# symlinkable squashfs packages
cd ${INI}/init/repo_ssp && $(zkp)/sh/fdfctl act
# ============
# user configs
# ============
# systemwide
sudo $(zkp)/sh/rc_init
# ==============================
# give control to the ui session
# ==============================
# pause
grep -iq fdf.log /proc/cmdline && read aparm
# refresh
sudo pkill -x slim
sudo pkill -x lxqt-session
env printf "\033[1;34minitthis.cfg complete\033[0m\n"
exit 0
+++ rc_xorg
#!/bin/sh
#========
# rc_xorg for gnu/linux/x11
# invoked from ${HOME}/kinit
# ctm mouse
mouse_id=$(xinput list | grep "Mouse")
mouse_id=${mouse_id##*id=} ; mouse_id=${mouse_id%%[*}
[ -z $1 ] && xm=4 || xm=$1
xinput set-prop ${mouse_id} \
'Coordinate Transformation Matrix' \
${xm} 0 0 \
0 ${xm} 0 \
0 0 1
# bell mouse kbrepeat
xset -b m 3 0 r rate 300 65
# power / screensaver
xset s 0
xset s noblank
xset dpms 0 0 0
# keyboard exit
setxkbmap -option terminate:ctrl_alt_bksp
# xmodmap
xmodmap ${HOME}/.Xmodmap
# [ -x /usr/bin/urxvt ] && urxvt -ic -e xmodmap ${HOME}/.Xmodmap &
# xresources
[ -f ${HOME}/.Xresources ] && xrdb -remove && xrdb -merge ${HOME}/.Xresources
# icewm tint2
{ pkill -f tint2 ; tint2 & } >/dev/null 2>&1
exit 0
+++ runsudo
#!/bin/sh
#========
if [ -z $1 ]; then
echo ooo
echo runsudo: sudo wrapper for LXQtExTiX
date +%G%b%d%a.%P%H:%M:%S
uname -srm
sudo $(zkp)/sh/runsudo ${USER}
else
USR=/home/$1
ksym() {
SYML=/root/$1
rm -rf ${SYML}
ln -sfn ${USR}/$1 ${SYML}
return 0
}
mkdir -p /root/.config/xfce4
mkdir -p /root/.local/share/mc
ksym .vfu
ksym .lynx
ksym .beaver
ksym .config/mc
ksym .config/vifm
ksym .config/Mousepad
ksym .config/neofetch
ksym .local/share/mc/skins
ksym .config/xfce4/terminal
ln -sf ${USR}/.bashrc /root/.bashrc
ln -sf ${USR}/.mostrc /root/.mostrc
ln -sf ${USR}/.nanorc /root/.nanorc
ln -sf ${USR}/.emacsrc /root/.emacsrc
ln -sf ${USR}/.trcmshrc /root/.trcmshrc
exit 0
fi
ICO=preferences-plugin
if [ -x /usr/bin/urxvt ]; then
SUTERM=urxvt; OPT="-name superuser"
elif [ -x /usr/bin/xfce4-terminal ]; then
SUTERM=xfce4-terminal; OPT="-I ${ICO}"
elif [ -x /usr/bin/lxterminal ]; then
SUTERM=lxterminal
else
SUTERM=xterm
fi
EXE="sudo -i"
OPT=${OPT}" -T "$(uname -n):$(uname -o)
${EXE} ${SUTERM} ${OPT} &
exit 0
+++ shstat
#!/bin/sh
#========
TEXTOUT=/tmp/r_linux.txt
{
echo
echo ooo
echo System stats v2.01.006
date +%G%b%d%a.%P%H:%M:%S
uname -srm
} > ${TEXTOUT}
{
echo ; id
echo ; md5sum $0
echo ; cat /proc/cpuinfo
: echo ; lspci
echo ; lsusb
echo ; cat /proc/devices
echo ; cat /proc/partitions
# echo ; sudo /sbin/fdisk -l
echo ; lsblk -i -o name,label,fstype,size,mountpoint
echo ; df -h
echo ; mount | sort
echo ; cat /proc/meminfo
echo ; ulimit -a
echo ; vmstat
echo ; cat /proc/cmdline
echo ; xrandr
echo ; cat /proc/1/status
echo ; lsmod
echo ; ps -ef f
echo ; pstree -p
echo ; ls -al $(zkp) $(zkp)/sh
echo ; cat /etc/hosts
# echo ; netstat -an
# echo ; netstat -rn
echo ; cat /etc/resolv.conf
# echo ; cat /etc/sysconfig/netcard
# echo ; /sbin/ifconfig
echo ; ip a
echo ; nmcli dev show 2>&1 | sed 's_Error_Congratulations_g'
echo ; sudo dmesg
echo ; $(zkp)/sh/shvesa || cat ${HOME}/.local/share/xorg/Xorg.0.log
echo ; xset -q
echo ; /sbin/sysctl -a --pattern kernel 2>/dev/null
echo ; sudo cat /proc/slabinfo
echo ; /lib/x86_64-linux-gnu/libc.so.6
echo ; cat /etc/ld.so.conf
: echo ; /sbin/ldconfig -p
echo ; INI=/tmp/.X11-snog/init ; ls -alL --group-directories-first / ${INI}/repo_ssp
: echo ; fc-list | sort >/tmp/r_fc-list.txt
: echo ; dpkg -l >/tmp/r_packages.txt
: echo ; systemctl status -a >/tmp/r_systemd.txt
: echo ; journalctl -q --no-pager >/tmp/r_journal.txt
echo ; set
} | tr \<\> [] >> ${TEXTOUT}
case "$1" in
"--vi" ) exec vi ${TEXTOUT} ;;
"--ue" ) exec ue -v ${TEXTOUT} ;;
"--le" ) exec le -r ${TEXTOUT} ;;
"--less" ) exec most ${TEXTOUT} ;;
"--less" ) exec less -m~ ${TEXTOUT} ;;
"--nano" ) exec nano -ZDUckaxev ${TEXTOUT} ;;
"--lynx" ) exec $(zkp)/sh/runlynx ${TEXTOUT} ;;
* ) exec cat ${TEXTOUT} ;;
esac
exit 0
GPL
|
@ 2024 TRCM TranceRave Capital Management
|
part of the CircleOmega organisation
|
|