summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
Diffstat (limited to 'ar')
-rw-r--r--ar/.config/vim/init.vim3
-rwxr-xr-xar/.local/bin/opout4
-rwxr-xr-xar/.local/bin/sysact12
3 files changed, 10 insertions, 9 deletions
diff --git a/ar/.config/vim/init.vim b/ar/.config/vim/init.vim
index 66507d5..b488260 100644
--- a/ar/.config/vim/init.vim
+++ b/ar/.config/vim/init.vim
@@ -243,8 +243,7 @@ if !exists('g:airline_symbols')
endif
let g:airline_symbols.colnr = ' C:'
let g:airline_symbols.linenr = ' L:'
-let g:airline_symbols.maxlinenr = ' '
-let g:airline#extensions#whitespace#symbol = '!'
+let g:airline_symbols.maxlinenr = '☰ '
" colorscheme
if isdirectory(expand("${XDG_CONFIG_HOME:-$HOME/.config}/vim/plugged/catppuccin"))
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.