summaryrefslogtreecommitdiff
path: root/ar/.local/bin
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-06-30 11:37:41 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2026-06-30 11:37:41 +0900
commit4d7854d7cfab4b7ed881a0f53c1197fefd520ae0 (patch)
treef133e16f0ff22c7fb7991aa1799c8c139b568718 /ar/.local/bin
parentc6eec89323ea6e637b627ed7e65497d660dea9d1 (diff)
modified vim/init.vim, modified bin/opout, modified bin/sysact
Diffstat (limited to 'ar/.local/bin')
-rwxr-xr-xar/.local/bin/opout4
-rwxr-xr-xar/.local/bin/sysact12
2 files changed, 9 insertions, 7 deletions
diff --git a/ar/.local/bin/opout b/ar/.local/bin/opout
index 70bc2cb..1b84b19 100755
--- a/ar/.local/bin/opout
+++ b/ar/.local/bin/opout
@@ -9,7 +9,9 @@ basename="${1%.*}"
case "${*}" in
*.tex | *.sil | *.m[dse] | *.[rR]md | *.mom | *.[0-9])
target="$(getcomproot "$1" || echo "$1")"
- setsid -f xdg-open "${target%.*}".pdf >/dev/null 2>&1
+ target="${target##*/}"
+ target="$(find . -name "${target%.*}".pdf | head -n 1)"
+ setsid -f xdg-open "$target" >/dev/null 2>&1
;;
*.html) setsid -f "$BROWSER" "$basename".html >/dev/null 2>&1 ;;
*.sent) setsid -f sent "$1" >/dev/null 2>&1 ;;
diff --git a/ar/.local/bin/sysact b/ar/.local/bin/sysact
index c76fa0b..8e56979 100755
--- a/ar/.local/bin/sysact
+++ b/ar/.local/bin/sysact
@@ -8,13 +8,13 @@ case "$(readlink -f /sbin/init)" in
esac
lock() {
- mpc pause
- pauseallmpv
- wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
- kill -38 "$(pidof dwmblocks)"
+ was_muted="$(wpctl get-volume @DEFAULT_AUDIO_SINK@ | grep -o 'MUTED' && echo 1 || echo 0)"
+ mpc pause &
+ pauseallmpv &
+ wpctl set-mute @DEFAULT_AUDIO_SINK@ 1 &
slock
- wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
- kill -38 "$(pidof dwmblocks)"
+ [ "$was_muted" -eq 0 ] && wpctl set-mute @DEFAULT_AUDIO_SINK@ 0
+ pkill -RTMIN+4 "${STATUSBAR:-dwmblocks}"
}
wmpid() { # This function is needed if there are multiple instances of the window manager.