diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2021-10-18 23:09:28 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2021-10-18 23:09:28 -0500 |
commit | e7786d9b1904ecd2c9989c3f157df48016b0dd50 (patch) | |
tree | 6c05945a22b462556fc4f1612cee2fe778e544fe /launch | |
parent | 2cf3ea2f828f6da07adff92a7dc5bce6069620ab (diff) | |
download | scripts-e7786d9b1904ecd2c9989c3f157df48016b0dd50.tar.xz scripts-e7786d9b1904ecd2c9989c3f157df48016b0dd50.zip |
moved some things around
Diffstat (limited to 'launch')
l--------- | launch/chrome | 1 | ||||
-rwxr-xr-x | launch/emu | 51 | ||||
-rwxr-xr-x | launch/launch | 54 | ||||
-rwxr-xr-x | launch/tserv | 13 |
4 files changed, 119 insertions, 0 deletions
diff --git a/launch/chrome b/launch/chrome new file mode 120000 index 0000000..1fcdd6b --- /dev/null +++ b/launch/chrome @@ -0,0 +1 @@ +../../lib/ungoogled-chromium/chrome
\ No newline at end of file diff --git a/launch/emu b/launch/emu new file mode 100755 index 0000000..df24b10 --- /dev/null +++ b/launch/emu @@ -0,0 +1,51 @@ +#!/bin/sh + +# This only works for collections with a common extension. You can rename all your roms to use the same extension and (in any decent emulator at least) they should work regardless of the actual header type +gamedir=${XDG_DATA_HOME:-$HOME/.local/share}/games +dmenuprompt="dmenu -l 25" +resolution=`cat /sys/class/drm/*/modes | head -1` +case "$1" in + 2600) + dmenucolors="-nb #111 -nf #e4963c -sb #6c3b17 -sf #fff -nhb #121212 -nhf #fc5231 -shb #804f2d -shf #fc5231" + emulator="stella" + ext=bin + ;; + 3ds) + dmenucolors="-nb #111 -nf #888 -sb #999 -sf #F00 -nhb #111 -nhf #fff -shb #999" + emulator="citra" + ext=3ds + ;; + nes) + dmenucolors="-nb #6d6a6d -nf #fff -sb #dfdcdd -sf #c1121c -nhb #222 -nhf #dc444d -shb #a29fa3 -shf #dc444d" + emulator="fceux" + ext=nes + ;; + snes) + dmenucolors="-nb #b2b4b2 -nf #000 -sb #514689 -sf #fff -nhb #707372 -nhf #fff -shb #a7a4e0 -shf #000" + emulator="launch snes" + ext=sfc + ;; + n64) + dmenucolors="-nb #223 -nf #fff -sb #069330 -sf #fff -nhb #c20d02 -nhf #ffc001 -shb #011da9 -shf #ffc001" + emulator="mupen64plus --fullscreen --gfx mupen64plus-video-glide64mk2 --resolution $resolution" + ext=z64 + ;; + gcn) + dmenucolors="-nb #4d3b7c -nf #ddd -sb #000 -sf #fff -nhb #4d3b7c -nhf #eba982 -shb #000 -shf #eba982" + emulator="dolphin-emu -b" + ext=iso + ;; + nds) + dmenucolors="-nb #ccc -nf #000 -sb #52398d -sf #fff -nhb #888 -nhf #fff -shb #52398d" + emulator="desmume --3d-engine 2" + ext=nds + ;; + *) + console=`ls $gamedir | dmenu -l 25` && ($0 $console || emu) # Allows going back to select a different console + exit + ;; +esac + +gamedir="$gamedir/$1" && [ -e "$gamedir" ] \ + && selgame="`ls "$gamedir" | sed -n "s/\.$ext$//p" | $dmenuprompt $dmenucolors`.$ext" \ + && $emulator "$gamedir/$selgame" diff --git a/launch/launch b/launch/launch new file mode 100755 index 0000000..0e2745e --- /dev/null +++ b/launch/launch @@ -0,0 +1,54 @@ +#!/bin/sh +[ -n "$2" ] && args=`echo "$@" | cut -d' ' -f2-` + +launchother() { $@ || echo "Launch: $@: Does not exist or exited with an error"; } + +case "`hostname`" in + G3N2) + case "$1" in + brave) brave-bin $args & xdotool search --all --sync --class "brave-browser" set_window --class "Brave" --urgency 1 ;; + chromium|chrome) chromium-browser $args & xdotool search --all --sync --class "Chromium-browser-chromium" set_window --class "Chrome" --urgency 1 ;; + halt|off|poweroff|shutdown) doas poweroff ;; + sleep|suspend|zzz) doas s2ram ;; + reboot|res|restart) doas reboot ;; + snes|snes9x) snes9x -fullscreen -xvideo $args ;; + *) launchother $@ ;; + esac + ;; + voidx250) + case "$1" in + brave) brave-browser-stable $args & xdotool search --all --sync --class "brave-browser" set_window --class "Brave" --urgency 1 ;; + chromium|chrome) chrome $args & xdotool search --all --sync --class "Chromium-browser" set_window --class "Chrome" --urgency 1 ;; + halt|off|poweroff|shutdown) doas poweroff ;; + sleep|suspend|zzz) doas zzz ;; + reboot|res|restart) doas reboot ;; + snes|snes9x) snes9x-gtk $args ;; + *) launchother $@ ;; + esac + ;; + debx230) + case "$1" in + brave) brave-browser-stable $args & xdotool search --all --sync --class "brave-browser" set_window --class "Brave" --urgency 1 ;; + chromium|chrome) chromium $args & xdotool search --all --sync --class "Chromium" set_window --class "Chrome" --urgency 1 ;; + #halt|off|poweroff|shutdown) doas poweroff ;; + #sleep|suspend|zzz) doas zzz ;; + #reboot|res|restart) doas reboot ;; + #snes|snes9x) snes9x-gtk $args ;; + *) launchother $@ ;; + esac + ;; + openbsdx230) + case "$1" in + brave) + ;; + chromium|chrome) + ;; + halt|off|poweroff|shutdown) doas halt ;; + sleep|suspend|zzz) doas zzz ;; + reboot|res|restart) doas reboot ;; + snes|snes9x) snes9x-gtk $args ;; + *) launchother $@ ;; + esac + ;; + *) echo "Launch: The hostname \"`hostname`\" is not recognized. Please add an entry for it!" ;; +esac diff --git a/launch/tserv b/launch/tserv new file mode 100755 index 0000000..5e0d072 --- /dev/null +++ b/launch/tserv @@ -0,0 +1,13 @@ +#!/bin/sh +server=~/.local/share/Terraria/server/TerrariaServer.bin.x86_64 +#wldnum=1 + +$server +#$server << CMDS +#$wldnum +#16 +#7777 +#n +# +#say hello +#CMDS |