hee hee hee har
This commit is contained in:
TheCrazyInsanity
2023-10-19 17:53:38 -04:00
committed by GitHub
parent 1719da7bc1
commit d955e22046
7 changed files with 69 additions and 0 deletions

23
PKGBUILD Normal file
View File

@@ -0,0 +1,23 @@
pkgname="xonlyutil"
pkgver="1.0.0"
pkgrel="1"
pkgdesc="A set of utility scripts to use Xorg without a window manager."
depends=("xorg-server" "xdotool")
arch=("x86_64" "arm")
source=("runxvtrun.sh" "xrun" "xsize" "xvtrun" "xvtrun.sh")
sha512sums=("SKIP" "SKIP" "SKIP" "SKIP" "SKIP")
package(){
sudo mkdir -p "${pkgdir}/usr/local/bin"
sudo mkdir -p "${pkgdir}/etc/profile.d"
sudo mkdir -p "&{pkgdir}/etc/sudoers.d"
sudo cp "${srcdir}/xsize" "${pkgdir}/usr/local/bin"
sudo cp "${srcdir}/xvtrun.sh" "${pkgdir}/usr/local/bin"
sudo cp "${srcdir}/xrun" "${pkgdir}/usr/local/bin"
sudo cp "${srcdir}/runxvtrun.sh" "${pkgdir}/etc/profile.d"
sudo cp "${srcdir}/xvtrun" "${pkdir}/etc/sudoers.d"
sudo chmod +x "${pkgdir}/usr/local/bin/xsize"
sudo chmod +x "${pkgdir}/usr/local/bin/xvtrun.sh"
sudo chmod +x "${pkgdir}/usr/local/bin/xrun"
sudo chmod +x "${pkgdir}/etc/profile.d/runxvtrun.sh"
}

18
readme.txt Normal file
View File

@@ -0,0 +1,18 @@
xsize goes in /usr/local/bin
runxvtrun.sh goes in /etc/profile.d
xvtrun goes in /etc/sudoers.d
xvtrun.sh goes in /usr/local/bin
xrun goes in /usr/local/bin
how it works:
it creates an xorg server running on a separate display on every vt 3 - 7, numbered 0 - 4
to switch between them simply use ctrl + alt + f3-7 as you would switch ttys
It also creates a command alias for reboot and shutdown that pkills all the xorg instances so it doesnt hang on shutdown
command docs:
xsize <display>: Fullscreens all apps in that display
xrun <command> <display>: exports display, runs a program, puts it's output in /dev/null, detaches it, switches your tty to the right tty for the display,
then fullscreens it
Please do not run this on real hardware, this is insecure, unstable, and buggy. This is a living shitpost made to prove someone wrong and for fun.
Good luck, have fun!

3
runxvtrun.sh Normal file
View File

@@ -0,0 +1,3 @@
alias shutdown="sudo pkill Xorg --signal kill && sudo shutdown"
alias reboot="sudo pkill Xorg --signal kill && sudo reboot"
sudo /usr/local/bin/xvtrun.sh &> /dev/null

6
xrun Normal file
View File

@@ -0,0 +1,6 @@
#! /bin/sh
export DISPLAY=:$2
$1 &> /dev/null &
chvt $(($2+3))
sleep 5
xsize $2

5
xsize Normal file
View File

@@ -0,0 +1,5 @@
#! /bin/sh
export DISPLAY=:$1
for nw in `xdotool search --screen :$1 ".*"`; do
echo "$nw" && xdotool windowsize "$nw" 1366 768 && xdotool windowmove "$nw" 0 0
done

1
xvtrun Normal file
View File

@@ -0,0 +1 @@
ALL ALL=(root) NOPASSWD: /usr/local/bin/xvtrun.sh

13
xvtrun.sh Normal file
View File

@@ -0,0 +1,13 @@
##This is horrible, I am bad at this. Too bad, this was a shitpost anyways.
this=`fgconsole`
X vt3 :0 &
sleep 0.1
X vt4 :1 &
sleep 0.1
X vt5 :2 &
sleep 0.1
X vt6 :3 &
sleep 0.1
X vt7 :4 &
sleep 0.5
chvt $this