config: allow disabling the primary selection
This commit is contained in:
parent
e70be28e22
commit
9c165ab56c
13 changed files with 63 additions and 2 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue