#!/bin/bash # Script to toggle caps:swapescape setting in Hyprland # Save this as ~/.config/hypr/scripts/toggle-caps-escape.sh # Check current state current_setting=$(hyprctl getoption input:kb_options | grep -o "caps:swapescape" || echo "") if [ -n "$current_setting" ]; then # Currently swapped, disable it hyprctl keyword input:kb_options "" notify-send "Keyboard Layout" "Caps Lock and Escape returned to normal" -i input-keyboard else # Not swapped, enable it hyprctl keyword input:kb_options "caps:swapescape" notify-send "Keyboard Layout" "Caps Lock and Escape swapped" -i input-keyboard fi