diff options
Diffstat (limited to '.local/share/bin')
-rwxr-xr-x | .local/share/bin/patchmc | 17 | ||||
-rwxr-xr-x | .local/share/bin/setwacom | 2 | ||||
-rwxr-xr-x | .local/share/bin/ttv | 8 | ||||
-rwxr-xr-x | .local/share/bin/wacomshortcuts | 12 |
4 files changed, 39 insertions, 0 deletions
diff --git a/.local/share/bin/patchmc b/.local/share/bin/patchmc new file mode 100755 index 0000000..4b23cc9 --- /dev/null +++ b/.local/share/bin/patchmc @@ -0,0 +1,17 @@ +#!/bin/node + +var fs = require('fs'); +var path = require('path'); + +var profilesPath = path.join(process.env.HOME, '/.minecraft/launcher_profiles.json'); +var profiles = require(profilesPath); + +var def = "-Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M"; +var patch = " -Dorg.lwjgl.librarypath=\"/home/loek/.minecraft\"" + +for (var profile in profiles.profiles) { + var javaArgs = profiles.profiles[profile].javaArgs + profiles.profiles[profile].javaArgs = javaArgs ? (javaArgs.includes(patch) ? javaArgs : javaArgs + patch) : (def + patch); +} + +fs.writeFileSync(profilesPath, JSON.stringify(profiles, null, 4)) diff --git a/.local/share/bin/setwacom b/.local/share/bin/setwacom new file mode 100755 index 0000000..d7427a6 --- /dev/null +++ b/.local/share/bin/setwacom @@ -0,0 +1,2 @@ +#!/bin/sh +xsetwacom set "Wacom Intuos PT S 2 Pen stylus" $@ diff --git a/.local/share/bin/ttv b/.local/share/bin/ttv new file mode 100755 index 0000000..4db2cd5 --- /dev/null +++ b/.local/share/bin/ttv @@ -0,0 +1,8 @@ +#!/bin/sh +streamlink twitch.tv/$1 best -p "mpv --fs=no --geometry=75%" & disown +brave --user-data-dir=/tmp --app="https://twitch.tv/$1/chat?popout=" & disown + +sleep 5 +PPPID=$(awk '{print $4}' "/proc/$PPID/stat") +kill $PPPID + diff --git a/.local/share/bin/wacomshortcuts b/.local/share/bin/wacomshortcuts new file mode 100755 index 0000000..911e7ff --- /dev/null +++ b/.local/share/bin/wacomshortcuts @@ -0,0 +1,12 @@ +#!/bin/sh + +# tablet buttons +xsetwacom set "Wacom Intuos PT S 2 Pad pad" Button 3 "key +super +alt +ctrl 1 -super -alt -ctrl" +xsetwacom set "Wacom Intuos PT S 2 Pad pad" Button 1 "key +super +alt +ctrl 2 -super -alt -ctrl" +xsetwacom set "Wacom Intuos PT S 2 Pad pad" Button 9 "key +super +alt +ctrl 3 -super -alt -ctrl" +xsetwacom set "Wacom Intuos PT S 2 Pad pad" Button 8 "key +super +alt +ctrl 4 -super -alt -ctrl" + +# pen buttons +setwacom Button 2 pan +setwacom PanScrollThreshold 200 + |