Detect and use irc clients if available.

This commit is contained in:
Storm Dragon
2025-12-02 22:32:22 -05:00
parent f6f164d8bd
commit 00f3c93594
2 changed files with 23 additions and 0 deletions

1
I38.md
View File

@@ -62,6 +62,7 @@ Common Ratpoison mode commands:
|-----|--------|
| `c` | Launch a terminal |
| `e` | Open text editor (TEXTEDITOR) |
| `i` | Launch IRC client |
| `w` | Launch web browser (BROWSER) |
| `k` | Kill (close) the current window |
| `F1` | Show ratpoison mode keybindings |

22
i38.sh
View File

@@ -546,6 +546,23 @@ else
fileBrowser="${programList/#-/}"
fi
export fileBrowser="$(command -v $fileBrowser)"
# IRC client
unset programList
for i in albikirc Albikirc access-irc stormirc ; do
if command -v ${i/#-/} &> /dev/null ; then
if [ -n "$programList" ]; then
programList="$programList $i"
else
programList="$i"
fi
fi
done
if [ "$programList" != "${programList// /}" ]; then
ircClient="$(menulist "IRC client:" $programList)"
else
ircClient="${programList/#-/}"
fi
export ircClient="$(command -v $ircClient)"
# Auto mount removable media
udiskie=1
if command -v udiskie &> /dev/null ; then
@@ -845,6 +862,10 @@ $(if command -v pidgin &> /dev/null ; then
echo "# p bound to pidgin"
echo "bindsym p exec $(command -v pidgin), mode \"default\""
fi)
$(if [[ ${#ircClient} -gt 3 ]]; then
echo "# IRC client bound to i"
echo "bindsym i exec $ircClient, mode \"default\""
fi)
$(if command -v xrandr &> /dev/null ; then
echo "# alt+s bound to brightness control"
echo "bindsym \$mod+s exec --no-startup-id ${i3Path}/scripts/screen_controller.sh, mode \"default\""
@@ -1030,6 +1051,7 @@ webBrowser="${webBrowser##*/}"
screenReader="${screenReader##*/}"
textEditor="${textEditor##*/}"
fileBrowser="${fileBrowser##*/}"
ircClient="${ircClient##*/}"
# Extract and categorize top-level keybindings for documentation
# Generate HTML directly since we're inserting into an already-converted HTML file