Removed control as a top level keybinding option. Added user defined mod key to quit i3 keybinding so now control+mod+q instead of control+q.

This commit is contained in:
Storm Dragon
2025-11-30 21:55:01 -05:00
parent 0d818c3465
commit fa9a6f3c7d
3 changed files with 73 additions and 5 deletions

View File

@@ -46,6 +46,17 @@ scrot: For OCR
- xorg-setxkbmap: [optional] for multiple keyboard layouts
- yad: For screen reader accessible dialogs
### AI Assistant (Optional)
- python-requests: For Ollama integration
- claude: [optional] Claude Code CLI for Claude AI integration. Install from https://claude.ai/code
- ollama: [optional] Local AI models. Install from https://ollama.ai
### Voice Mode (Optional)
- python-speechrecognition: For voice input recognition
- python-pyaudio: For audio recording
- pocketsphinx: [optional] For offline speech recognition fallback
- flac: [optional] For better audio encoding in speech recognition
I38 will try to detect your browser, file manager, and text editor and present you with a list of options to bind to their launch keys. It will also create bindings for pidgin and mumble if they are installed. Additionally, you can now add custom applications with your own keybindings during the setup process. To use the bindings, press your ratpoison mode key which is set when you run the i38.sh script. Next, press the binding for the application you want; w for web browser, e for text editor, f for file manager, m for mumble, etc. To learn all the bindings, find and read the mode ratpoison section of ~/.config/i3/config or use the help binding key, alt or super depending on your settings with Shift+F1.
Ratpoison mode is now enabled by default for better accessibility and ease of use.
@@ -95,6 +106,61 @@ I38 is an adaptation of the old Strychnine project which was based on the Ratpoi
When creating I38, I really wanted to port that functionality over, because it is very powerful and allows for lots and lots of shortcuts while minimizing collisions between shortcuts. So, for example, if you have chosen brave as your web browser, and selected alt+escape as your ratpoison mode key, you can quickly launch brave by pressing alt+escape followed by the letter w.
## AI Assistant
I38 includes an integrated AI assistant accessible through ratpoison mode with the 'a' key. The AI assistant provides accessibility-focused AI interaction with support for multiple providers:
### Features
- **Multiple AI Providers**: Support for Claude Code and Ollama
- **Voice Input & Output**: Hands-free voice interaction with speech recognition and synthesis
- **Wake Word Detection**: Continuous listening mode with customizable wake phrases
- **Contextual Questions**: Ask questions about the currently focused window
- **File Analysis**: Share files with the AI for analysis
- **Image Description**: Take screenshots and get AI descriptions for accessibility
- **Selected Text Analysis**: Analyze selected text or screen content using OCR
- **Action Confirmation**: Optional confirmation dialogs for AI-suggested actions
- **Keyboard Shortcuts**: F4 for voice input, F5 for continuous listening toggle
- **Accessibility First**: Full screen reader compatibility with keyboard navigation
### Usage
1. Press your ratpoison mode key (e.g., Alt+Escape)
2. Press 'a' to launch the AI assistant
3. Use Tab to navigate between the Interaction and Settings tabs
4. In the Interaction tab:
- Enter your question in the text area
- Use "Ask AI Question" for general queries
- Use "Ask About Focused Window" to include window context
- Use "Request AI Action" for step-by-step instructions
- Use "Browse" to select files for analysis
- Use "Describe Screenshot" for visual content
- Use "Analyze Selected Text/Screen Content" to analyze selected text or perform OCR
5. Voice Mode (if enabled):
- Press F4 or click "🎤 Voice Question" to speak your question
- Toggle continuous listening with F5 or "👂 Continuous Listen"
- Say your wake phrase (default: "hey assistant") when continuous listening is active
- Responses are automatically spoken if voice output is enabled
### Configuration
The AI assistant stores its configuration in `~/.config/stormux/I38/ai.conf` using XDG directory standards. Settings include:
- AI provider selection (Claude Code or Ollama)
- Ollama model selection and host configuration
- Action confirmation preferences
- Voice input/output settings
- Wake word customization
- Voice recognition timeout settings
### Providers
**Claude Code**: Requires the Claude Code CLI to be installed and authenticated. Supports text, code, and image analysis.
**Ollama**: Requires Ollama service to be running locally. Automatically discovers available models and supports text analysis.
## Custom Applications in Ratpoison Mode
I38 now includes a powerful system for adding custom applications to ratpoison mode with user-defined keybindings. During the configuration process, after setting up window event sounds, you'll be prompted to add custom applications that will be accessible through ratpoison mode.

10
i38.sh
View File

@@ -285,7 +285,8 @@ populateUsedKeys() {
usedKeys["Control+semicolon"]=1
usedKeys["Control+Shift+semicolon"]=1
usedKeys["Shift+exclam"]=1
usedKeys["Control+q"]=1
usedKeys["\$mod+q"]=1
usedKeys["Control+\$mod+q"]=1
usedKeys["Escape"]=1
usedKeys["Control+g"]=1
}
@@ -440,7 +441,7 @@ while [[ "$escapeKey" == "$mod" ]]; do
escapeKey="$(menulist "Ratpoison mode key:" Control+t Control+z Control+Escape Alt+Escape Control+Space Super)"
escapeKey="${escapeKey//Alt/Mod1}"
escapeKey="${escapeKey//Super/Mod4}"
mod="$(menulist "I3 mod key, for top level bindings:" Alt Control Super)"
mod="$(menulist "I3 mod key, for top level bindings:" Alt Super)"
mod="${mod//Alt/Mod1}"
mod="${mod//Super/Mod4}"
if [ "$escapeKey" == "$mod" ]; then
@@ -828,6 +829,8 @@ bindsym Mod1+Shift+u exec --no-startup-id play -qV0 "| sox -np synth 0.03 sin 20
bindsym Mod1+b exec --no-startup-id ${i3Path}/scripts/battery_status.sh, mode "default"
#Check controller battery status
bindsym g exec ${i3Path}/scripts/game_controller.sh -s, mode "default"
# AI Assistant bound to a
bindsym a exec ${i3Path}/scripts/ai.py, mode "default"
# Get a list of windows in the current workspace
bindsym apostrophe exec --no-startup-id ${i3Path}/scripts/window_list.sh, mode "default"
# Restart Cthulhu
@@ -859,7 +862,8 @@ done)
# Run dialog with exclamation
bindsym Shift+exclam exec ${i3Path}/scripts/run_dialog.sh, mode "default"
# exit i3 (logs you out of your X session)
bindsym Control+q exec bash -c 'yad --image "dialog-question" --title "I38" --button=yes:0 --button=no:1 --text "You pressed the exit shortcut. Do you really want to exit i3? This will end your X session." && $i3msg -t run_command exit'
bindsym \$mod+q exec bash -c 'yad --image "dialog-question" --title "I38" --button=yes:0 --button=no:1 --text "You pressed the exit shortcut. Do you really want to exit i3? This will end your X session." && $i3msg -t run_command exit'
bindsym Control+\$mod+q exec bash -c 'yad --image "dialog-question" --title "I38" --button=yes:0 --button=no:1 --text "You pressed the exit shortcut. Do you really want to exit i3? This will end your X session." && $i3msg -t run_command exit'
# Exit ratpoison mode without any action escape or Control+g
bindsym Escape mode "default"
bindsym Control+g mode "default"

View File

@@ -1,2 +0,0 @@
assign [class="Solaar"] workspace number 11
assign [class="qjoypad"] workspace number 11