]> Freerunner's - dotfiles.git/commitdiff
scripts: tweak upgraayyedd und winecleaner main
authorAndre Ramnitz <andre.ramnitz@mail.de>
Fri, 25 Sep 2026 00:25:14 +0000 (02:25 +0200)
committerAndre Ramnitz <andre.ramnitz@mail.de>
Fri, 25 Sep 2026 00:25:14 +0000 (02:25 +0200)
dot-local/bin/steam-foot [new file with mode: 0755]
dot-local/bin/upgrayyedd
dot-local/bin/winecleaner

diff --git a/dot-local/bin/steam-foot b/dot-local/bin/steam-foot
new file mode 100755 (executable)
index 0000000..4520689
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+{
+    echo "WAYLAND_DISPLAY=$WAYLAND_DISPLAY"
+    echo "GAMESCOPE_WAYLAND_DISPLAY=$GAMESCOPE_WAYLAND_DISPLAY"
+    ls -l "$XDG_RUNTIME_DIR"/gamescope-*
+} > /tmp/steam-foot.log 2>&1
+
+export WAYLAND_DISPLAY="${GAMESCOPE_WAYLAND_DISPLAY}"
+
+exec /usr/bin/foot >>/tmp/steam-foot.log 2>&1
+
index da5100d52cea52f9af0c584d6585133de5581e78..25b1c943c3e1ca84bb1b4290305648cfd2166f49 100755 (executable)
@@ -99,6 +99,11 @@ case "$1" in
         run_in_portage_cgroup schedtool -D -e emerge -avuDNg @world "${@:2}"
         exit 0
         ;;
         run_in_portage_cgroup schedtool -D -e emerge -avuDNg @world "${@:2}"
         exit 0
         ;;
+    wbdeps|wbd)
+        root_check
+        run_in_portage_cgroup schedtool -D -e emerge -avuDNg --with-bdeps=y --binpkg-changed-deps=y @world "${@:2}"
+        exit 0
+        ;;
     daily|all)
         root_check
         emaint sync -A
     daily|all)
         root_check
         emaint sync -A
index 26f795ad9c9e6099f3515833b60a93ce0bf54177..a312496fa33482cfb0ff21f6c2a03910777bc91e 100755 (executable)
@@ -1,36 +1,75 @@
-#!/bin/bash
+#!/usr/bin/env bash
+
+yes_or_no() {
+    local answer
 
 
-function yes_or_no {
     while true; do
     while true; do
-        read -rp "$* [y/n]: " yn
-        case $yn in
-            [Yy]*) return 0  ;;
-            [Nn]*) echo "Aborted" ; return  1 ;;
+        read -r -p "$1 [y/n]: " answer
+
+        case "$answer" in
+            [Yy]*)
+                return 0
+                ;;
+            [Nn]*)
+                return 1
+                ;;
         esac
     done
 }
 
         esac
     done
 }
 
-PSOUTPUT="$(pgrep -l exe)"
-
-echo "Grepping ps for wine executables..."
-if [ -n "$PSOUTPUT" ]; then
-    echo "The following processes have been found:"
-    echo "$PSOUTPUT"
-    yes_or_no "Would you like to send sigTERM to all processes?" && pgrep exe | xargs kill
-    echo "Verifying that all processes have been cleaned..."
-    sleep 7
-    PSOUTPUT="$(pgrep -l exe)"
-    echo "After sending sigterm to every process, these ones still remain:"
-    echo "$PSOUTPUT"
-    yes_or_no "Would you like to send sigKILL to all processes?" && pgrep exe | xargs kill -9
-    echo "Verifying that all processes have been cleaned..."
-    if [ -n "$PSOUTPUT" ]; then
-        echo "Still some processes around. Please remove them manually..."
-        echo "$PSOUTPUT"
-    else
-        echo "All processes have been cleaned!"
-    fi
-else
-    echo "No wine executables found"
+get_wine_processes() {
+    pgrep -af '\.exe([[:space:]]|$)'
+}
+
+echo "Searching for Wine executables..."
+
+processes="$(get_wine_processes)"
+
+if [[ -z "$processes" ]]; then
+    echo "No Wine executables found."
+    exit 0
 fi
 
 fi
 
+echo "The following processes have been found:"
+printf '%s\n' "$processes"
+
+if ! yes_or_no "Would you like to send SIGTERM to all processes?"; then
+    echo "Aborted."
+    exit 0
+fi
+
+pkill -f '\.exe([[:space:]]|$)'
+
+echo "Waiting for processes to terminate..."
+sleep 7
+
+processes="$(get_wine_processes)"
+
+if [[ -z "$processes" ]]; then
+    echo "All processes have been cleaned!"
+    exit 0
+fi
+
+echo "The following processes are still running:"
+printf '%s\n' "$processes"
+
+if ! yes_or_no "Would you like to send SIGKILL to all remaining processes?"; then
+    echo "Some processes remain:"
+    printf '%s\n' "$processes"
+    exit 1
+fi
+
+pkill -9 -f '\.exe([[:space:]]|$)'
+
+sleep 1
+
+processes="$(get_wine_processes)"
+
+if [[ -n "$processes" ]]; then
+    echo "Some processes are still running. Please remove them manually:"
+    printf '%s\n' "$processes"
+    exit 1
+fi
+
+echo "All processes have been cleaned!"
+