viy@lemmy.world to Pop!_OS (Linux)@lemmy.worldEnglish · 3 months agoany way to change keyboard layout with win+space or alt + shift in new cosmic DE?message-squaremessage-square3fedilinkarrow-up18arrow-down11
arrow-up17arrow-down1message-squareany way to change keyboard layout with win+space or alt + shift in new cosmic DE?viy@lemmy.world to Pop!_OS (Linux)@lemmy.worldEnglish · 3 months agomessage-square3fedilink
minus-squarev9CYKjLeia10dZpz88iU@programming.devlinkfedilinkEnglisharrow-up0·3 months agoAre you comfortable with code? I made a repository that tries to simplify it for temporary usage. I needed it for my own personal stuff. Defining the shortcuts looks like the following. let alt_shift_shortcut = CosmicKeyboardShortcut { modifiers: Modifiers::new().alt().shift(), keyboard_key: None, action: shortcuts::Action::Spawn("cosmic-term".into()), description: Some("Write a description".into()), }; println!( "{:?}", add_custom_cosmic_shortcut(alt_shift_shortcut, /* overwrite: */ true) ); let win_space_shortcut = CosmicKeyboardShortcut { modifiers: Modifiers::new().logo(), keyboard_key: Some(Keysym::from_char(' ')), action: shortcuts::Action::System(shortcuts::action::System::Launcher), description: Some("Write a description".into()), }; println!( "{:?}", add_custom_cosmic_shortcut(win_space_shortcut, /* overwrite: */ true) ); The code is available here
Are you comfortable with code? I made a repository that tries to simplify it for temporary usage. I needed it for my own personal stuff.
Defining the shortcuts looks like the following.
let alt_shift_shortcut = CosmicKeyboardShortcut { modifiers: Modifiers::new().alt().shift(), keyboard_key: None, action: shortcuts::Action::Spawn("cosmic-term".into()), description: Some("Write a description".into()), }; println!( "{:?}", add_custom_cosmic_shortcut(alt_shift_shortcut, /* overwrite: */ true) ); let win_space_shortcut = CosmicKeyboardShortcut { modifiers: Modifiers::new().logo(), keyboard_key: Some(Keysym::from_char(' ')), action: shortcuts::Action::System(shortcuts::action::System::Launcher), description: Some("Write a description".into()), }; println!( "{:?}", add_custom_cosmic_shortcut(win_space_shortcut, /* overwrite: */ true) );
The code is available here