use new XDG profile

this might be subject to change, due to exessive problems still needing
fixes
This commit is contained in:
2025-06-05 00:23:24 +02:00
parent 5439d4650b
commit e87e65df4f
60 changed files with 63 additions and 16 deletions

View File

@@ -1,29 +0,0 @@
#!/bin/bash
BUILD_CONFIG=
# try to find a valid build config path
if [ -n "${1+x}" ] && [ -f "$1" ] && [[ "$(basename "$1")" == ".buildconfig" ]]; then BUILD_CONFIG="$1" # first check if a build config has been specified, and whether it's a valid path
elif [ -n "${1+x}" ]; then echo "E: the specified path '$1' is not a valid path!"; exit 1
elif [[ -f "$PWD/.buildconfig" ]]; then BUILD_CONFIG="$PWD/.buildconfig" # then check if there is a build config in the current working directory
elif [[ -f "$HOME/.buildconfig" ]]; then BUILD_CONFIG="$HOME/.buildconfig" # then check if there is a build config in the home directory
else $EDITOR .buildconfig
#else echo "E: could not find a .buildconfig file and none was specified!"; exit 1
fi
source "$BUILD_CONFIG"
[ -z "${cmd+x}" ] && { echo "E: cmd was not set! '$BUILD_CONFIG'"; exit 1; }
[ -z "${arg+x}" ] && { echo "E: arg was not set! '$BUILD_CONFIG'"; exit 1; }
# export the environment variables if they've been set
if [[ -n ${env+x} ]]; then
for var in "${!env[@]}"; do
export "$var=${env[$var]}"
done
fi
# execute the command with the arguments
# don't mind if the user made arguments separate out, that would likely be the user's intention
$cmd "$arg"
exit $?

Binary file not shown.

View File

@@ -1,2 +0,0 @@
#!/bin/sh
sudo "$HOME/.local/share/cpusetcores" "$@" -v

View File

@@ -1,2 +0,0 @@
#!/bin/bash
"$HOME/.local/share/emsdk/upstream/emscripten/emcc" "$@"

View File

@@ -1,2 +0,0 @@
#!/bin/bash
"$HOME/.local/share/emsdk/emsdk" "$@"

View File

@@ -1,17 +0,0 @@
#!/bin/bash
if [ -z ${1+x} ]; then
echo -e "\033[91mdidn't include a file exstension. (eg. \".cs\")"
exit -1
fi
# get all the files with the file extension
git ls-files | grep -E ".*\\$1" |
# run git blame on each file, which shows the commit for each line
xargs -n 1 git blame --line-porcelain |
# aquire the authors of this output and sort it
grep "^author " | sort |
# count all the unique authors and sort by number
uniq -c | sort -nr

View File

@@ -1,5 +0,0 @@
#!/bin/sh
export __NV_PRIME_RENDER_OFFLOAD=1
export __VK_LAYER_NV_optimus=NVIDIA_only
export __GLX_VENDOR_LIBRARY_NAME=nvidia
exec java "$@" --no-window

View File

@@ -1,2 +0,0 @@
#!/bin/bash
__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@"

View File

@@ -1,66 +0,0 @@
#!/bin/python
import os
from sys import stderr
def error(msg: str):
print(f"\033[91m{msg}\033[0m", file=stderr)
def validate_path(path: str, outdir: str, outpath: str) -> bool:
if (os.path.isdir(outdir) == False):
error(f"'{outdir}' does not exist! can't write .desktop file!")
return False
if (os.path.exists(outpath)):
error(f"'{outpath}' already exists!")
return False
if (os.path.isfile(path) == False):
error(f"file does not exist: '{path}'")
return False
return True
def create_desktop_file(path: str) -> int:
outdir = os.environ['HOME'] + "/.local/share/applications"
outpath = outdir + "/" + os.path.basename(path)
if (validate_path(path, outdir, outpath) == False):
return 1
f_in = open(path, "r")
f_out = open(outpath, "w")
while (True):
ln = f_in.readline();
if (len(ln) == 0):
break
if (ln.startswith("Exec=")):
lns = ln.split('=', 1)
ln = f"{lns[0]}=prime-run {lns[1]}"
f_out.write(ln)
f_in.close()
f_out.close()
return 0
def main(argc: int, argv: list[str]) -> int:
if (argc <= 1):
error("incorrect amount of arguments! expected: 'desktop file path'")
return 1
err = 0
i = 1
while (i < argc):
err |= create_desktop_file(argv[i])
i += 1
return err
if __name__ == "__main__":
import sys
exit(main(len(sys.argv), sys.argv));

View File

@@ -1,13 +0,0 @@
#/bin/bash
if [ -z ${var+2} ]; then
echo -e "\033[91mno parameters were given!\033[0m"
fi
for i in $2; do
readonly fname="$(basename $i .*)"
mkdir "$fname"
cd "$fname"
unzip "../$i"
cd -
done

View File

@@ -1,6 +0,0 @@
#!/bin/bash
while true; do
printf "owo "
sleep 0.25
done

View File

@@ -1,14 +0,0 @@
#!/bin/sh
WIN=$(xdotool getwindowfocus)
STATE=$(xprop -id "$WIN" _NET_WM_STATE)
# check if fullscreen is present in the state
if echo "$STATE" | grep -q '_NET_WM_STATE_FULLSCREEN'; then
wmctrl -ir "$WIN" -b remove,fullscreen
exit $?
else
# If not fullscreen, add it
wmctrl -ir "$WIN" -b add,fullscreen
exit $?
fi

Binary file not shown.