diff --git a/.config/systemd/user/.gitignore b/.config/systemd/user/.gitignore new file mode 100644 index 0000000..e554195 --- /dev/null +++ b/.config/systemd/user/.gitignore @@ -0,0 +1,2 @@ +# ignore enabled systemd units, since these are often symlinks to the system and stuff +/basic.target.wants/ diff --git a/.config/user-dirs.dirs b/.config/user-dirs.dirs new file mode 100644 index 0000000..287d208 --- /dev/null +++ b/.config/user-dirs.dirs @@ -0,0 +1,16 @@ +# This file is written by xdg-user-dirs-update +# If you want to change or add directories, just edit the line you're +# interested in. All local changes will be retained on the next run. +# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped +# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an +# absolute path. No other format is supported. +# +XDG_DESKTOP_DIR="$HOME/desktop" +XDG_DOWNLOAD_DIR="$HOME/downloads" +XDG_TEMPLATES_DIR="$HOME/templates" +XDG_PUBLICSHARE_DIR="$HOME/public" +XDG_DOCUMENTS_DIR="$HOME/documents" +XDG_MUSIC_DIR="$HOME/music" +XDG_PICTURES_DIR="$HOME/photos" +XDG_VIDEOS_DIR="$HOME/videos" +XDG_PUBLIC_DIR="$HOME/public" diff --git a/.config/user-dirs.locale b/.config/user-dirs.locale new file mode 100644 index 0000000..4889c8e --- /dev/null +++ b/.config/user-dirs.locale @@ -0,0 +1 @@ +en_GB \ No newline at end of file diff --git a/.config/user-tmpfiles.d/localtmp.conf b/.config/user-tmpfiles.d/localtmp.conf new file mode 100644 index 0000000..bd6b40f --- /dev/null +++ b/.config/user-tmpfiles.d/localtmp.conf @@ -0,0 +1,2 @@ +D /home/furry/.local/tmp 0750 furry furry - + diff --git a/.gtkrc-2.0 b/.gtkrc-2.0 new file mode 100644 index 0000000..5178e83 --- /dev/null +++ b/.gtkrc-2.0 @@ -0,0 +1,19 @@ +# DO NOT EDIT! This file will be overwritten by LXAppearance. +# Any customization should be done in ~/.gtkrc-2.0.mine instead. + +include "/home/furry/.gtkrc-2.0.mine" +gtk-theme-name="Gruvbox-Dark" +gtk-icon-theme-name="Gruvbox-Plus-Dark" +gtk-font-name="NotoSans Nerd Font 11" +gtk-cursor-theme-name="Breeze" +gtk-cursor-theme-size=0 +gtk-toolbar-style=GTK_TOOLBAR_BOTH +gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR +gtk-button-images=1 +gtk-menu-images=1 +gtk-enable-event-sounds=1 +gtk-enable-input-feedback-sounds=1 +gtk-xft-antialias=1 +gtk-xft-hinting=1 +gtk-xft-hintstyle="hintfull" +gtk-xft-rgba="none" diff --git a/.inputrc b/.inputrc new file mode 100644 index 0000000..98b8760 --- /dev/null +++ b/.inputrc @@ -0,0 +1,3 @@ +"\e[A": history-search-backward +"\e[B": history-search-forward + diff --git a/.local/bin/buildconfig b/.local/bin/buildconfig new file mode 100755 index 0000000..7aa5f6e --- /dev/null +++ b/.local/bin/buildconfig @@ -0,0 +1,29 @@ +#!/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 $? diff --git a/.local/bin/coinflip b/.local/bin/coinflip new file mode 100755 index 0000000..685da7d Binary files /dev/null and b/.local/bin/coinflip differ diff --git a/.local/bin/cpusetcores b/.local/bin/cpusetcores new file mode 100755 index 0000000..37832d0 --- /dev/null +++ b/.local/bin/cpusetcores @@ -0,0 +1,2 @@ +#!/bin/sh +sudo "$HOME/.local/share/cpusetcores" "$@" -v diff --git a/.local/bin/emcc b/.local/bin/emcc new file mode 100755 index 0000000..3bdf25d --- /dev/null +++ b/.local/bin/emcc @@ -0,0 +1,2 @@ +#!/bin/bash +"$HOME/.local/share/emsdk/upstream/emscripten/emcc" "$@" diff --git a/.local/bin/emsdk b/.local/bin/emsdk new file mode 100755 index 0000000..007be76 --- /dev/null +++ b/.local/bin/emsdk @@ -0,0 +1,2 @@ +#!/bin/bash +"$HOME/.local/share/emsdk/emsdk" "$@" diff --git a/.local/bin/git-leaderboard b/.local/bin/git-leaderboard new file mode 100755 index 0000000..c5a468e --- /dev/null +++ b/.local/bin/git-leaderboard @@ -0,0 +1,17 @@ +#!/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 diff --git a/.local/bin/java-prime b/.local/bin/java-prime new file mode 100755 index 0000000..0d8f1be --- /dev/null +++ b/.local/bin/java-prime @@ -0,0 +1,5 @@ +#!/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 diff --git a/.local/bin/prime-run b/.local/bin/prime-run new file mode 100755 index 0000000..59d01de --- /dev/null +++ b/.local/bin/prime-run @@ -0,0 +1,2 @@ +#!/bin/bash +__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only __GLX_VENDOR_LIBRARY_NAME=nvidia "$@" diff --git a/.local/bin/prime-run-conf b/.local/bin/prime-run-conf new file mode 100755 index 0000000..a785efe --- /dev/null +++ b/.local/bin/prime-run-conf @@ -0,0 +1,66 @@ +#!/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)); diff --git a/.local/bin/unzip-all b/.local/bin/unzip-all new file mode 100755 index 0000000..2f4ffdd --- /dev/null +++ b/.local/bin/unzip-all @@ -0,0 +1,13 @@ +#/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 diff --git a/.local/bin/uwu b/.local/bin/uwu new file mode 100755 index 0000000..abc476f --- /dev/null +++ b/.local/bin/uwu @@ -0,0 +1,6 @@ +#!/bin/bash + +while true; do + printf "owo " + sleep 0.25 +done diff --git a/.local/bin/xfullscreen-toggle b/.local/bin/xfullscreen-toggle new file mode 100755 index 0000000..ba550fc --- /dev/null +++ b/.local/bin/xfullscreen-toggle @@ -0,0 +1,14 @@ +#!/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 diff --git a/.local/share/cpusetcores b/.local/share/cpusetcores new file mode 100755 index 0000000..9c717b8 Binary files /dev/null and b/.local/share/cpusetcores differ diff --git a/.stow-local-ignore b/.stow-local-ignore new file mode 100644 index 0000000..31e914a --- /dev/null +++ b/.stow-local-ignore @@ -0,0 +1,3 @@ +\.git +LICENSE +README\.md