alpha
Login
or
Join now
secluded.site
/
yadr
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Yet Another Dotfiles Repo
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
rpncalc: add wrapper
author
Amolith
date
3 weeks ago
(Jul 5, 2026, 12:20 PM -0600)
commit
54df209f
54df209f24963b042a5af72322b433f400c9cfc8
parent
526e84d6
526e84d6d1b2455fb0a6302b871faa0d4422cf65
+35
1 changed file
Expand all
Collapse all
Unified
Split
dot_local
bin
executable_rpncalc-qs
+35
dot_local/bin/executable_rpncalc-qs
View file
Reviewed
···
1
1
+
#!/bin/sh
2
2
+
set -eu
3
3
+
4
4
+
config_home=${XDG_CONFIG_HOME:-"$HOME/.config"}
5
5
+
config_path=$config_home/quickshell/rpncalc/shell.qml
6
6
+
title='RPN Calculator'
7
7
+
8
8
+
if command -v quickshell >/dev/null 2>&1; then
9
9
+
quickshell_bin=quickshell
10
10
+
elif [ -x /usr/bin/quickshell ]; then
11
11
+
quickshell_bin=/usr/bin/quickshell
12
12
+
elif command -v qs >/dev/null 2>&1; then
13
13
+
quickshell_bin=qs
14
14
+
else
15
15
+
message='quickshell is not installed; install the Arch package with: sudo pacman -S quickshell'
16
16
+
if command -v notify-send >/dev/null 2>&1; then
17
17
+
notify-send 'RPN calculator' "$message"
18
18
+
fi
19
19
+
printf '%s\n' "$message" >&2
20
20
+
exit 127
21
21
+
fi
22
22
+
23
23
+
if [ ! -f "$config_path" ]; then
24
24
+
printf 'Missing Quickshell config: %s\n' "$config_path" >&2
25
25
+
exit 1
26
26
+
fi
27
27
+
28
28
+
if command -v i3-msg >/dev/null 2>&1 && command -v jq >/dev/null 2>&1; then
29
29
+
if i3-msg -t get_tree | jq -e --arg title "$title" '.. | objects | select(.name? == $title)' >/dev/null; then
30
30
+
i3-msg '[title="^RPN Calculator$"] focus' >/dev/null
31
31
+
exit 0
32
32
+
fi
33
33
+
fi
34
34
+
35
35
+
exec "$quickshell_bin" --path "$config_path"