all: remove control center in its entirety
This commit is contained in:
parent
1dfd6169f8
commit
769d12a525
97 changed files with 59 additions and 10580 deletions
|
|
@ -91,7 +91,6 @@ pub enum SimpleCommand {
|
|||
ToggleSimpleImEnabled,
|
||||
ReloadSimpleIm,
|
||||
EnableUnicodeInput,
|
||||
OpenControlCenter,
|
||||
WarpMouseToFocus,
|
||||
}
|
||||
|
||||
|
|
@ -226,12 +225,6 @@ pub struct Theme {
|
|||
pub bar_separator_width: Option<i32>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct Egui {
|
||||
pub proportional_fonts: Option<Vec<String>>,
|
||||
pub monospace_fonts: Option<Vec<String>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Status {
|
||||
pub format: MessageFormat,
|
||||
|
|
@ -532,7 +525,6 @@ pub struct Config {
|
|||
pub log_level: Option<LogLevel>,
|
||||
pub clean_logs_older_than: Option<Duration>,
|
||||
pub theme: Theme,
|
||||
pub egui: Egui,
|
||||
pub gfx_api: Option<GfxApi>,
|
||||
pub direct_scanout_enabled: Option<bool>,
|
||||
pub drm_devices: Vec<ConfigDrmDevice>,
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ mod connector_match;
|
|||
mod content_type;
|
||||
mod drm_device;
|
||||
mod drm_device_match;
|
||||
mod egui;
|
||||
mod env;
|
||||
pub mod exec;
|
||||
mod fallback_output_mode;
|
||||
|
|
|
|||
|
|
@ -168,7 +168,6 @@ impl ActionParser<'_> {
|
|||
"toggle-simple-im-enabled" => ToggleSimpleImEnabled,
|
||||
"reload-simple-im" => ReloadSimpleIm,
|
||||
"enable-unicode-input" => EnableUnicodeInput,
|
||||
"open-control-center" => OpenControlCenter,
|
||||
"warp-mouse-to-focus" => WarpMouseToFocus,
|
||||
_ => {
|
||||
return Err(
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
use {
|
||||
crate::{
|
||||
config::{
|
||||
Action, Config, Egui, Libei, Theme, UiDrag,
|
||||
Action, Config, Libei, Theme, UiDrag,
|
||||
context::Context,
|
||||
extractor::{Extractor, ExtractorError, arr, bol, int, opt, recover, str, val},
|
||||
parser::{DataType, ParseResult, Parser, UnexpectedDataType},
|
||||
|
|
@ -14,7 +14,6 @@ use {
|
|||
connector::ConnectorsParser,
|
||||
drm_device::DrmDevicesParser,
|
||||
drm_device_match::DrmDeviceMatchParser,
|
||||
egui::EguiParser,
|
||||
env::EnvParser,
|
||||
fallback_output_mode::FallbackOutputModeParser,
|
||||
float::FloatParser,
|
||||
|
|
@ -152,7 +151,6 @@ impl Parser for ConfigParser<'_> {
|
|||
simple_im_val,
|
||||
show_titles,
|
||||
fallback_output_mode_val,
|
||||
egui_val,
|
||||
clean_logs_older_than_val,
|
||||
mouse_follows_focus,
|
||||
),
|
||||
|
|
@ -213,7 +211,6 @@ impl Parser for ConfigParser<'_> {
|
|||
opt(val("simple-im")),
|
||||
recover(opt(bol("show-titles"))),
|
||||
opt(val("fallback-output-mode")),
|
||||
opt(val("egui")),
|
||||
opt(val("clean-logs-older-than")),
|
||||
recover(opt(bol("unstable-mouse-follows-focus"))),
|
||||
),
|
||||
|
|
@ -332,15 +329,6 @@ impl Parser for ConfigParser<'_> {
|
|||
}
|
||||
}
|
||||
}
|
||||
let mut egui = Egui::default();
|
||||
if let Some(value) = egui_val {
|
||||
match value.parse(&mut EguiParser(self.0)) {
|
||||
Ok(v) => egui = v,
|
||||
Err(e) => {
|
||||
log::warn!("Could not parse the egui settings: {}", self.0.error(e));
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut gfx_api = None;
|
||||
if let Some(value) = gfx_api_val {
|
||||
match value.parse(&mut GfxApiParser) {
|
||||
|
|
@ -585,7 +573,6 @@ impl Parser for ConfigParser<'_> {
|
|||
log_level,
|
||||
clean_logs_older_than,
|
||||
theme,
|
||||
egui,
|
||||
gfx_api,
|
||||
drm_devices,
|
||||
direct_scanout_enabled: direct_scanout.despan(),
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
use {
|
||||
crate::{
|
||||
config::{
|
||||
Egui,
|
||||
context::Context,
|
||||
extractor::{Extractor, ExtractorError, arr, opt},
|
||||
parser::{DataType, ParseResult, Parser, UnexpectedDataType},
|
||||
},
|
||||
toml::{
|
||||
toml_span::{Span, Spanned},
|
||||
toml_value::Value,
|
||||
},
|
||||
},
|
||||
indexmap::IndexMap,
|
||||
thiserror::Error,
|
||||
};
|
||||
|
||||
pub struct EguiParser<'a>(pub &'a Context<'a>);
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum EguiParserError {
|
||||
#[error(transparent)]
|
||||
Expected(#[from] UnexpectedDataType),
|
||||
#[error(transparent)]
|
||||
Extractor(#[from] ExtractorError),
|
||||
}
|
||||
|
||||
impl Parser for EguiParser<'_> {
|
||||
type Value = Egui;
|
||||
type Error = EguiParserError;
|
||||
const EXPECTED: &'static [DataType] = &[DataType::Table];
|
||||
|
||||
fn parse_table(
|
||||
&mut self,
|
||||
span: Span,
|
||||
table: &IndexMap<Spanned<String>, Spanned<Value>>,
|
||||
) -> ParseResult<Self> {
|
||||
let mut ext = Extractor::new(self.0, span, table);
|
||||
let (proportional_fonts_arr, monospace_fonts_arr) =
|
||||
ext.extract((opt(arr("proportional-fonts")), opt(arr("monospace-fonts"))))?;
|
||||
let mut proportional_fonts = None;
|
||||
let mut monospace_fonts = None;
|
||||
for (out, f) in [
|
||||
(&mut proportional_fonts, proportional_fonts_arr),
|
||||
(&mut monospace_fonts, monospace_fonts_arr),
|
||||
] {
|
||||
if let Some(f) = f {
|
||||
let fonts = out.insert(vec![]);
|
||||
for f in f.value {
|
||||
let Value::String(s) = &f.value else {
|
||||
log::error!("Expected a string: {}", self.0.error3(f.span));
|
||||
continue;
|
||||
};
|
||||
fonts.push(s.clone());
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(Egui {
|
||||
proportional_fonts,
|
||||
monospace_fonts,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
@ -31,7 +31,6 @@ alt-m = "toggle-mono"
|
|||
alt-u = "toggle-fullscreen"
|
||||
|
||||
alt-f = "focus-parent"
|
||||
alt-c = "open-control-center"
|
||||
alt-shift-c = "close"
|
||||
alt-shift-f = "toggle-floating"
|
||||
Super_L = { type = "exec", exec = "alacritty" }
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ use {
|
|||
is_reload,
|
||||
keyboard::Keymap,
|
||||
logging::{clean_logs_older_than, set_log_level},
|
||||
on_devices_enumerated, on_idle, on_unload, open_control_center, quit, reload,
|
||||
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_middle_click_paste_enabled, set_show_bar, set_show_float_pin_icon, set_show_titles,
|
||||
|
|
@ -45,8 +45,8 @@ use {
|
|||
switch_to_vt,
|
||||
tasks::{self, JoinHandle},
|
||||
theme::{
|
||||
reset_colors, reset_font, reset_sizes, set_bar_font, set_bar_position,
|
||||
set_egui_monospace_fonts, set_egui_proportional_fonts, set_font, set_title_font,
|
||||
reset_colors, reset_font, reset_sizes, set_bar_font, set_bar_position, set_font,
|
||||
set_title_font,
|
||||
},
|
||||
toggle_float_above_fullscreen, toggle_show_bar, toggle_show_titles,
|
||||
video::{
|
||||
|
|
@ -250,7 +250,6 @@ impl Action {
|
|||
let persistent = state.persistent.clone();
|
||||
b.new(move || persistent.seat.enable_unicode_input())
|
||||
}
|
||||
SimpleCommand::OpenControlCenter => b.new(open_control_center),
|
||||
SimpleCommand::WarpMouseToFocus => {
|
||||
let persistent = state.persistent.clone();
|
||||
b.new(move || persistent.seat.warp_mouse_to_focus())
|
||||
|
|
@ -1662,12 +1661,6 @@ fn load_config(initial_load: bool, auto_reload: bool, persistent: &Rc<Persistent
|
|||
if let Some(v) = config.fallback_output_mode {
|
||||
persistent.seat.set_fallback_output_mode(v);
|
||||
}
|
||||
if let Some(f) = &config.egui.proportional_fonts {
|
||||
set_egui_proportional_fonts(f.iter().map(|s| &**s));
|
||||
}
|
||||
if let Some(f) = &config.egui.monospace_fonts {
|
||||
set_egui_monospace_fonts(f.iter().map(|s| &**s));
|
||||
}
|
||||
if let Some(mouse_follows_focus) = config.mouse_follows_focus {
|
||||
#[expect(deprecated)]
|
||||
persistent
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue