I am new to Linux and start with the Mint. I use three keyboard layouts (Eng, Rus, Fr), but only two of them are of everyday use. In Windows, I was using the CapsLock to switch between the main two layouts (Eng and Rus), and Ctrl+Shift to rotate all three. Is it possible to implement the same in Cinnamon? I
As shown in the Image, you can create a custom Keyboard shortcut in the Keyboard settings. You give the Shortcut a name and point to the script you are gonna create. They you'll assign the Key Capslock to it.
for rotating betwen the two you can create a script like this:
#!/bin/sh # This shell script is PUBLIC DOMAIN. You may do whatever you want with it. TOGGLE=$HOME/.toggle if [ ! -e $TOGGLE ]; then touch $TOGGLE setxkbmap en rm $TOGGLE setxkbmap ru fi
(don't forget to
chmod +x the script to make it executable)
For rotating between three commands, someone at Stackoverflow answered that question.
Here's your bash script for switching between three or more languages:
# Script that rotates between English, Russian, French, and Finnish keyboards # Name of the state file state_file=$HOME/.keyboard_state # Ensure that the state file exists; initialize it with 0 if necessary. [ -f "$state_file" ] || printf '0\n' > "$state_file" # Read the next keyboard to use read state < "$state_file" # Set the keyboard using the current state case $state in 0) setxkbmap en ;; 1) setxkbmap ru ;; 2) setxkbmap fr ;; 3) setxkbmap fi ;; esac # Increment the current state. # Could also use state=$(( (state + 1) % 4 )) state=$((state + 1)) [ "$state" -eq 4 ] && state=0 # Update the state file for the next time the script runs. printf '%s\n' "$state" > "$state_file"