Attempt to improve support for Simple terminal on linux. #112
This commit is contained in:
parent
1f5cdc025d
commit
284482e2d5
|
@ -303,6 +303,10 @@ void trigger_shift_ins_paste() {
|
|||
xdo_send_keysequence_window(xdo_context, CURRENTWINDOW, "Shift+Insert", 8000);
|
||||
}
|
||||
|
||||
void trigger_alt_shift_ins_paste() {
|
||||
xdo_send_keysequence_window(xdo_context, CURRENTWINDOW, "Shift+Alt+Insert", 8000);
|
||||
}
|
||||
|
||||
// SYSTEM MODULE
|
||||
|
||||
// Function taken from the wmlib tool source code
|
||||
|
@ -465,8 +469,12 @@ int32_t is_current_window_terminal() {
|
|||
return 1;
|
||||
}else if (strstr(class_buffer, "Terminator") != NULL) { // Terminator
|
||||
return 1;
|
||||
}else if (strstr(class_buffer, "stterm") != NULL) { // Simple terminal 3
|
||||
return 2;
|
||||
}else if (strstr(class_buffer, "St") != NULL) { // Simple terminal
|
||||
return 1;
|
||||
}else if (strstr(class_buffer, "st") != NULL) { // Simple terminal 2
|
||||
return 1;
|
||||
}else if (strstr(class_buffer, "Alacritty") != NULL) { // Alacritty terminal
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -87,6 +87,11 @@ extern "C" void trigger_terminal_paste();
|
|||
*/
|
||||
extern "C" void trigger_shift_ins_paste();
|
||||
|
||||
/*
|
||||
* Trigger alt shift ins pasting( Pressing ALT+SHIFT+INS )
|
||||
*/
|
||||
extern "C" void trigger_alt_shift_ins_paste();
|
||||
|
||||
|
||||
// SYSTEM MODULE
|
||||
|
||||
|
|
|
@ -43,4 +43,5 @@ extern {
|
|||
pub fn trigger_paste();
|
||||
pub fn trigger_terminal_paste();
|
||||
pub fn trigger_shift_ins_paste();
|
||||
pub fn trigger_alt_shift_ins_paste();
|
||||
}
|
|
@ -48,6 +48,8 @@ impl super::KeyboardManager for LinuxKeyboardManager {
|
|||
// so we need to check the correct situation.
|
||||
if is_terminal == 0 {
|
||||
trigger_paste();
|
||||
}else if is_terminal == 2 { // Special case for stterm
|
||||
trigger_alt_shift_ins_paste();
|
||||
}else{
|
||||
trigger_terminal_paste();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user