You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

17 lines
625 B

#!/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