Так что моя цель - просто связать alt + shift, чтобы запустить скрипт в xmonad. Мой ключ мода super (win) (mod4Mask). Как я могу это сделать? Вот как я пытаюсь сделать это сейчас:
Вот так сейчас выглядит мой xmonad.sh (просто изменился путь)
import XMonad
import XMonad.Config.Desktop
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.
import XMonad.Util.EZConfig
import System.IO
main = xmonad $ desktopConfig
{ terminal = "urxvt"
, modMask = mod4Mask
} `additionalKeys`
[ ((mod1Mask, shiftMask), spawn "/home/my-login/some-folder/my-script.sh"
]
И вот эта ошибка, которую я получаю: output
The important part of that error seems to be (with extra spaces for readability):
Expected type: KeySym
Actual type: KeyMask
In the expression: shiftMask
So, apparently you need to use a KeySym instead of a KeyMask for the second part of the key combo. That's likely because the "modifier keys" (Ctrl, Alt, Shift, Cmd/Win/Super) are "masks" (bitmasks) that change the internally-generated code when other keys are pressed, but they don't do so for each other.
If you are okay using 2 modifiers + 1 regular key for this effect you can "or" the modifiers together as per this answer and pick a KeySym that's not already mapped to that 3-key combo.
If losing/moving one of the modifier keys is okay the answer below that is from someone who uses xmodmap to remap the left Ctrl key to the left Super/Win key. So, you could remap a KeyMask to a KeySym if it would somehow be worth it.