Yet Another Dotfiles Repo
0

Configure Feed

Select the types of activity you want to include in your feed.

rpncalc: add wrapper

+35
+35
dot_local/bin/executable_rpncalc-qs
··· 1 + #!/bin/sh 2 + set -eu 3 + 4 + config_home=${XDG_CONFIG_HOME:-"$HOME/.config"} 5 + config_path=$config_home/quickshell/rpncalc/shell.qml 6 + title='RPN Calculator' 7 + 8 + if command -v quickshell >/dev/null 2>&1; then 9 + quickshell_bin=quickshell 10 + elif [ -x /usr/bin/quickshell ]; then 11 + quickshell_bin=/usr/bin/quickshell 12 + elif command -v qs >/dev/null 2>&1; then 13 + quickshell_bin=qs 14 + else 15 + message='quickshell is not installed; install the Arch package with: sudo pacman -S quickshell' 16 + if command -v notify-send >/dev/null 2>&1; then 17 + notify-send 'RPN calculator' "$message" 18 + fi 19 + printf '%s\n' "$message" >&2 20 + exit 127 21 + fi 22 + 23 + if [ ! -f "$config_path" ]; then 24 + printf 'Missing Quickshell config: %s\n' "$config_path" >&2 25 + exit 1 26 + fi 27 + 28 + if command -v i3-msg >/dev/null 2>&1 && command -v jq >/dev/null 2>&1; then 29 + if i3-msg -t get_tree | jq -e --arg title "$title" '.. | objects | select(.name? == $title)' >/dev/null; then 30 + i3-msg '[title="^RPN Calculator$"] focus' >/dev/null 31 + exit 0 32 + fi 33 + fi 34 + 35 + exec "$quickshell_bin" --path "$config_path"