diff options
Diffstat (limited to 'launch')
l--------- | launch/chrome | 1 | ||||
-rwxr-xr-x | launch/dmenu_runapp | 7 | ||||
-rwxr-xr-x | launch/emu | 5 | ||||
-rwxr-xr-x | launch/launch | 5 | ||||
-rwxr-xr-x | launch/tserv | 13 | ||||
-rwxr-xr-x | launch/virt | 30 |
6 files changed, 7 insertions, 54 deletions
diff --git a/launch/chrome b/launch/chrome deleted file mode 120000 index 1fcdd6b..0000000 --- a/launch/chrome +++ /dev/null @@ -1 +0,0 @@ -../../lib/ungoogled-chromium/chrome
\ No newline at end of file diff --git a/launch/dmenu_runapp b/launch/dmenu_runapp index 2de77f4..a2d8fb8 100755 --- a/launch/dmenu_runapp +++ b/launch/dmenu_runapp @@ -1,5 +1,4 @@ #!/bin/sh -apps=/usr/share/applications -name="$(grep -h -m1 '^Name=' $apps/* | cut -d'=' -f2- | sort | uniq | dmenu "$@")" -#$(grep '^Exec=[^%]*' -o -m1 $(grep -l -m1 "$name" $apps/*) | cut -d'=' -f2-) & -gtk-launch $(basename `grep -l -m1 "$name" $apps/*` .desktop) & +apps="$(echo $XDG_DATA_DIRS: | sed 's/:/\/applications\/*.desktop /g')" +name="$(grep -Rhm1 '^Name=' $apps 2>/dev/null | cut -d'=' -f2- | sort | uniq | dmenu "$@")" +[ -n "$name" ] && gtk-launch $(basename `grep -Rlm1 "^Name=$name" $apps 2>/dev/null`) & @@ -1,9 +1,8 @@ #!/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 } +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" @@ -41,7 +40,7 @@ case "$1" in ext=nds ;; *) - console=`ls $gamedir | dmenu -l 25` && ($0 $console || emu) # Allows going back to select a different console + console=`ls $gamedir | dmenu -l 25` && ($0 $console || $0) # Allows going back to select a different console exit ;; esac diff --git a/launch/launch b/launch/launch index cb06b1d..22a2bce 100755 --- a/launch/launch +++ b/launch/launch @@ -54,10 +54,10 @@ gencache() { if (cmd ~ hosts[host] && cmds[cmd] && cmds[cmd] != "-") { i = cmd sub(/.*:/, "", cmd) - print "\t"cmd") "cmds[i]" \"$@\" ;;" + print "\t"cmd") "cmds[i]" \"$@\" & ;;" } } - print "\t*) exit 1 ;;" + print "\t*) command -v \"$run\" >/dev/null && exec \"$run\" \"$@\" || echo \"\\`$run${@:+ $@}\\` Does not exist or exited with an error\" ;;" print "esac" } } @@ -90,5 +90,4 @@ case "$1" in esac # Run -#sh $cache "$@" || "$@" || echo "$(me): $@: Does not exist or exited with an error" & exec $cache "$@" diff --git a/launch/tserv b/launch/tserv deleted file mode 100755 index 5e0d072..0000000 --- a/launch/tserv +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -server=~/.local/share/Terraria/server/TerrariaServer.bin.x86_64 -#wldnum=1 - -$server -#$server << CMDS -#$wldnum -#16 -#7777 -#n -# -#say hello -#CMDS diff --git a/launch/virt b/launch/virt deleted file mode 100755 index 9706106..0000000 --- a/launch/virt +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh -virtdir=~/.local/share/virt - -halfram() { awk '/^MemTotal/ { printf "%dM\n", $2/2/1024 }' /proc/meminfo; } # Needs to be either in M or G according to man page -halfthreads() { echo $(( $(nproc) / 2 )); } -startvm() { - qemu-system-x86_64 \ - -enable-kvm \ - -cpu host \ - -m $(halfram) \ - -smp $(halfthreads) \ - -net nic \ - -display sdl,gl=on \ - -audiodev pa,id=pa1,server=/run/user/1000/pulse/native \ - -soundhw all \ - -boot menu=on \ - -drive file="$virtdir/$1.img" \ -; } - #-vga none \ - #-nographic \ - -vms="$(ls $virtdir)" - -[ -n "$1" ] && vm="$1" || vm=$(echo "$vms" | sed 's/\.img//' | dmenu -p "Choose Virtual Machine Image or Enter Name for New Virtual Machine") - -if echo "$vms" | grep "^$vm.img$" >/dev/null; then - startvm "$vm" -else - qemu-img create -f qcow2 "$virtdir/$vm.img" $(echo -n "4G\n8G\n16G\n32G" | dmenu -p "Choose Size of Virtual Machine \"$vm\"") -fi |