pub struct UiSettings {Show 15 fields
pub version: u64,
pub auto_start: AutoStart,
pub smooth_switch_desktops: bool,
pub request_admin_at_startup: bool,
pub stop_flashing_windows_after_applying_filter: bool,
pub tray_icon_type: TrayIconType,
pub quick_switch_menu: QuickSwitchMenu,
pub quick_switch_menu_shortcuts: Arc<BTreeMap<String, u32>>,
pub quick_switch_menu_shortcuts_only_in_root: bool,
pub quick_switch_hotkey: Arc<str>,
pub open_menu_at_mouse_pos_hotkey: Arc<str>,
pub left_click: TrayClickAction,
pub middle_click: TrayClickAction,
pub config_window: ConfigWindowInfo,
pub filters: Arc<[WindowFilter]>,
}
Fields§
§version: u64
§auto_start: AutoStart
Autostart this program when Windows is started.
smooth_switch_desktops: bool
If this is enabled then we will attempt to switch virtual desktops using animations. This is done by opening a transparent window on a different virtual desktop and then focusing on it.
request_admin_at_startup: bool
Elevated permission is useful to move windows owned by elevated programs. If this setting is enabled the program will ask for admin rights every time it is started, making it easy to always have them.
stop_flashing_windows_after_applying_filter: bool
Some windows might be trying to grab the user’s attention and will be flashing in the taskbar. These taskbar items will remain visible even if the window is moved to another virtual desktop. If this setting is enabled we will attempt to stop windows from flashing in the taskbar after moving them.
tray_icon_type: TrayIconType
The type of icon to show in the system tray.
Fancy context menu items that allows switching to a desktop by entering its one-based index via context menu keyboard shortcuts.
Extra context menu items that have custom access keys to allow fast
switching to specific desktops. Usually this is used if you have
more than 9 desktops because then pressing 1
could be interpreted
as the start of 10
and so it is useful to have another key that
brings you to the first desktop.
Determines if the extra shortcut menu items should be shown even in submenus of the quick switch menu. Usually it is enough to only have them in the top most “quick switch” context menu.
quick_switch_hotkey: Arc<str>
Global keyboard shortcut for opening the quick switch menu. Will be
parsed as a [global_hotkey::hotkey::HotKey
].
Global keyboard shortcut for opening the context menu at the mouse’s current position. Quite useful when the keyboard shortcut is used by a macro triggered by a mouse button.
left_click: TrayClickAction
§middle_click: TrayClickAction
Middle clicks are registered as left clicks for at least some versions of Windows 11.
config_window: ConfigWindowInfo
Info about last location of the configuration window.
filters: Arc<[WindowFilter]>
Filters/rules that specify which windows should be moved and to what virtual desktop.
Implementations§
Source§impl UiSettings
impl UiSettings
const CURRENT_VERSION: u64 = 2u64
Sourcefn migrate(&mut self)
fn migrate(&mut self)
Ensure settings are the newest version. Some work might have been done
previously by UiSettingsFallback::maybe_migrate
if initial parsing
failed.
Trait Implementations§
Source§impl Clone for UiSettings
impl Clone for UiSettings
Source§fn clone(&self) -> UiSettings
fn clone(&self) -> UiSettings
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for UiSettings
impl Debug for UiSettings
Source§impl Default for UiSettings
impl Default for UiSettings
Source§impl<'de> Deserialize<'de> for UiSettings
impl<'de> Deserialize<'de> for UiSettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<UiSettingsFallback> for UiSettings
impl From<UiSettingsFallback> for UiSettings
Source§fn from(value: UiSettingsFallback) -> Self
fn from(value: UiSettingsFallback) -> Self
Source§impl Ord for UiSettings
impl Ord for UiSettings
Source§fn cmp(&self, other: &UiSettings) -> Ordering
fn cmp(&self, other: &UiSettings) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for UiSettings
impl PartialEq for UiSettings
Source§impl PartialOrd for UiSettings
impl PartialOrd for UiSettings
Source§impl Serialize for UiSettings
impl Serialize for UiSettings
impl Eq for UiSettings
impl StructuralPartialEq for UiSettings
Auto Trait Implementations§
impl Freeze for UiSettings
impl RefUnwindSafe for UiSettings
impl Send for UiSettings
impl Sync for UiSettings
impl Unpin for UiSettings
impl UnwindSafe for UiSettings
Blanket Implementations§
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
Source§impl<T> DynWithDefault for T
impl<T> DynWithDefault for T
Source§fn with_default_mut(
&mut self,
f: &mut dyn FnMut(&mut dyn DynWithDefault, &mut (dyn Any + 'static)),
)
fn with_default_mut( &mut self, f: &mut dyn FnMut(&mut dyn DynWithDefault, &mut (dyn Any + 'static)), )
self
and the second argument
is the new temporary default value. The callback can then modify the
value as needed.Source§fn clear_and_inspect_old(
&mut self,
f: &mut dyn FnMut(&mut dyn DynWithDefault, &mut (dyn Any + 'static)),
)
fn clear_and_inspect_old( &mut self, f: &mut dyn FnMut(&mut dyn DynWithDefault, &mut (dyn Any + 'static)), )
self
to a new default value and inspect the previous value as the
second argument to the callback.fn clear(&mut self)
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.