aboutsummaryrefslogtreecommitdiff
path: root/env/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'env/.local/bin')
-rwxr-xr-xenv/.local/bin/scripts/autoport_mc.sh13
-rwxr-xr-xenv/.local/bin/system/kaomoji-picker.sh19
-rwxr-xr-xenv/.local/bin/system/start-scripts/newsboat-fetch.sh2
3 files changed, 33 insertions, 1 deletions
diff --git a/env/.local/bin/scripts/autoport_mc.sh b/env/.local/bin/scripts/autoport_mc.sh
new file mode 100755
index 0000000..8ccf0b0
--- /dev/null
+++ b/env/.local/bin/scripts/autoport_mc.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# this finds the log file from a picked instance using rofi. then fords traffic thorugh 25565
+if [ -z "$LOG_FILE" ]; then
+ choice="$HOME/stuff/minecraft/polymc/instances/$(ls ~/stuff/minecraft/polymc/instances | rofi -dmenu -p "Instance")"
+ LOG_FILE="$(find "$choice" -mindepth 1 -maxdepth 1 -type d | grep "minecraft$")/logs/latest.log"
+fi
+
+setport="$(cat "$LOG_FILE" | grep "Started on" | sed 's/.*Started on //' | tail -n 1)"
+echo $setport
+if [ "$setport" ]; then
+ doas socat TCP6-LISTEN:25565,fork TCP4:127.0.0.1:$setport
+fi
diff --git a/env/.local/bin/system/kaomoji-picker.sh b/env/.local/bin/system/kaomoji-picker.sh
new file mode 100755
index 0000000..d1ac4fd
--- /dev/null
+++ b/env/.local/bin/system/kaomoji-picker.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+# set up to work with https://github.com/Aptivi-Analytics/KaomojiList.git
+
+KAO_FILE="$HOME/stuff/manual-programs/KaomojiList/kaomojis.json"
+
+choices=$(jq '.[]|.categories|.[]|.name' "$KAO_FILE" | sed 's/"//g')
+
+choice=$(echo "$choices" | sed /^$/d | rofi -dmenu "$prompt_message")
+
+emojlist=$(jq --arg sel "$choice" '..| select(.name==$sel)? | .emoticons | .[]' "$KAO_FILE")
+
+emoj=$(echo "$emojlist" | sed /^$/d | rofi -dmenu "$prompt_message")
+
+if [ "$WAYLAND_DISPLAY" ]; then
+ echo "$emoj" | wl-copy
+else
+ echo "$emoj" | xclip -sel clip
+fi
diff --git a/env/.local/bin/system/start-scripts/newsboat-fetch.sh b/env/.local/bin/system/start-scripts/newsboat-fetch.sh
index 5534489..0b95d5d 100755
--- a/env/.local/bin/system/start-scripts/newsboat-fetch.sh
+++ b/env/.local/bin/system/start-scripts/newsboat-fetch.sh
@@ -1,6 +1,6 @@
#!/bin/bash
newsboat_loop(){
- newsboat -x reload
+ NO_PROXY=\".com,.org,.xyz,.chat,.social,.net,.co\" newsboat -x reload
#newsboat -x print-unread | xargs -0 notify-send "newsboat feed"
unreads=$(newsboat -x print-unread)