Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions Home/.config/mpv/mpv.conf
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ ytdl-raw-options=cookies-from-browser=firefox
ytdl-format=bestvideo[height<=?1080][fps<=?60][vcodec*=vp9|vcodec*=vp09|vcodec*=av01|vcodec*=avc1]+bestaudio/best

# --- Quality ---
# TODO: see which one is better
#scale=ewa_lanczossharp
#cscale=ewa_lanczossharp
scale=spline36
cscale=spline36
# Using ewa_lanczossharp for best quality (modern GPU recommended)
scale=ewa_lanczossharp
cscale=ewa_lanczossharp
dscale=mitchell
correct-downscaling=yes
linear-downscaling=yes
Expand Down
6 changes: 3 additions & 3 deletions Home/.local/bin/appImage_to_desktop.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
set -eo pipefail
set -euo pipefail

APPIMAGE_PATH="$1"
if [[ -z "$APPIMAGE_PATH" ]]; then
Expand All @@ -21,7 +21,7 @@ if [[ "$2" == "--remove" ]]; then
find "${ICON_FOLDER}" -maxdepth 1 -type f -name "$APP_NAME.*" -delete
echo "Removed"; exit 0
fi
pushd $TEMP_SQUASHFS_PATH
pushd "$TEMP_SQUASHFS_PATH"
"$APPIMAGE_FULLPATH" --appimage-extract > /dev/null
cd squashfs-root/
echo "Choose icon: "
Expand All @@ -47,5 +47,5 @@ Terminal=false
EOT

popd
rm -rf $TEMP_SQUASHFS_PATH
rm -rf "$TEMP_SQUASHFS_PATH"
echo "Created"
21 changes: 17 additions & 4 deletions Home/.local/bin/killwine.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#!/bin/sh
wineserver -k
kill -9 $(ps -ef | grep -E -i '(wine|processid|\.exe)' | awk '{print $2}')
killall -9 pressure-vessel-adverb
#!/usr/bin/env bash
set -euo pipefail

# Kill Wine processes safely
has() { command -v "$1" &>/dev/null; }

# Kill wine server
has wineserver && wineserver -k || true

# Kill wine-related processes
mapfile -t pids < <(ps -ef | grep -E -i '(wine|processid|\.exe)' | grep -v grep | awk '{print $2}')
if [[ ${#pids[@]} -gt 0 ]]; then
kill -9 "${pids[@]}" 2>/dev/null || true
fi
Comment on lines +11 to +14
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The logic for finding and killing processes can be significantly simplified and made more robust by using pkill. This single command can replace the mapfile, ps, grep, awk, if, and kill combination, making the script more readable and idiomatic. pkill with the -f flag will match against the full command line, and it's designed to avoid matching itself, making it safer than a ps | grep pipeline.

Suggested change
mapfile -t pids < <(ps -ef | grep -E -i '(wine|processid|\.exe)' | grep -v grep | awk '{print $2}')
if [[ ${#pids[@]} -gt 0 ]]; then
kill -9 "${pids[@]}" 2>/dev/null || true
fi
pkill -f -9 -i 'wine|processid|\.exe' 2>/dev/null || true


# Kill pressure vessel
pkill -9 pressure-vessel-adverb 2>/dev/null || true
3 changes: 2 additions & 1 deletion Home/.local/bin/proton-cachyos.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail

## configuration
# proton executable
Expand Down
Loading