summaryrefslogtreecommitdiff
path: root/ar/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'ar/.local/bin')
-rwxr-xr-xar/.local/bin/opout4
-rwxr-xr-xar/.local/bin/statusbar/sb-system5
-rwxr-xr-xar/.local/bin/sysact12
3 files changed, 11 insertions, 10 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/statusbar/sb-system b/ar/.local/bin/statusbar/sb-system
index 8f022d1..dcf1062 100755
--- a/ar/.local/bin/statusbar/sb-system
+++ b/ar/.local/bin/statusbar/sb-system
@@ -45,9 +45,8 @@ case $BLOCK_BUTTON in
[ "$SHOW_DISK" = 1 ] && notify-send "💽 Disk space" "$(df -h --output=target,used,size)"
;;
2) setsid -f "$TERMINAL" -e htop ;;
-3) notify-send "🖥 System module" "CPU temp, CPU bars, Memory, Disk usage
-Left click: show hogs & disk info
-Middle click: open htop" ;;
+3) notify-send "🖥 System module" "\- Left click: show hogs & disk info
+- Middle click: open htop" ;;
6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
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.