1
0
Fork 0
forked from wry/wry

config: allow disabling the primary selection

This commit is contained in:
Julian Orth 2025-07-20 11:18:32 +02:00
parent e70be28e22
commit 9c165ab56c
13 changed files with 63 additions and 2 deletions

View file

@ -494,6 +494,7 @@ pub struct Config {
pub use_hardware_cursor: Option<bool>,
pub show_bar: Option<bool>,
pub focus_history: Option<FocusHistory>,
pub middle_click_paste: Option<bool>,
}
#[derive(Debug, Error)]

View file

@ -136,6 +136,7 @@ impl Parser for ConfigParser<'_> {
show_bar,
focus_history_val,
),
(middle_click_paste,),
) = ext.extract((
(
opt(val("keymap")),
@ -185,6 +186,7 @@ impl Parser for ConfigParser<'_> {
recover(opt(bol("show-bar"))),
opt(val("focus-history")),
),
(recover(opt(bol("middle-click-paste"))),),
))?;
let mut keymap = None;
if let Some(value) = keymap_val {
@ -513,6 +515,7 @@ impl Parser for ConfigParser<'_> {
use_hardware_cursor: use_hardware_cursor.despan(),
show_bar: show_bar.despan(),
focus_history,
middle_click_paste: middle_click_paste.despan(),
})
}
}

View file

@ -35,8 +35,8 @@ use {
logging::set_log_level,
on_devices_enumerated, on_idle, on_unload, quit, reload, set_color_management_enabled,
set_default_workspace_capture, set_explicit_sync_enabled, set_float_above_fullscreen,
set_idle, set_idle_grace_period, set_show_bar, set_show_float_pin_icon,
set_ui_drag_enabled, set_ui_drag_threshold,
set_idle, set_idle_grace_period, set_middle_click_paste_enabled, set_show_bar,
set_show_float_pin_icon, set_ui_drag_enabled, set_ui_drag_threshold,
status::{set_i3bar_separator, set_status, set_status_command, unset_status_command},
switch_to_vt,
theme::{reset_colors, reset_font, reset_sizes, set_font},
@ -1272,6 +1272,9 @@ fn load_config(initial_load: bool, persistent: &Rc<PersistentState>) {
persistent.seat.focus_history_set_same_workspace(v);
}
}
if let Some(v) = config.middle_click_paste {
set_middle_click_paste_enabled(v);
}
}
fn create_command(exec: &Exec) -> Command {