1 use serde::{Deserialize, Serialize}; 2 3 /* TODO this code is temporary. Due to the limitations of TOML we cannot serialize leftwm_core::Command 4 * easily. If we replace TOML by JSON/JSON5/YAML we will be able to remove this code and a 5 * bunch of validation in leftwm-check.rs. This requires to deprecate the TOML config file, 6 * thus making a breaking change. 7 * 8 * https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=59232ae3a6f902fc3a3a7a09d1d48c80 9 */ 10 11 // Because this is temporary, we will allow this clippy lint to be bypassed 12 #[allow(clippy::module_name_repetitions)] 13 #[derive(Debug, Serialize, Deserialize, Clone)] 14 pub enum BaseCommand { 15 Execute, 16 CloseWindow, 17 SwapTags, 18 SoftReload, 19 HardReload, 20 ToggleScratchPad, 21 ToggleFullScreen, 22 ToggleSticky, 23 GotoTag, 24 FloatingToTile, 25 TileToFloating, 26 ToggleFloating, 27 MoveWindowUp, 28 MoveWindowDown, 29 MoveWindowTop, 30 FocusNextTag, 31 FocusPreviousTag, 32 FocusWindowUp, 33 FocusWindowDown, 34 FocusWorkspaceNext, 35 FocusWorkspacePrevious, 36 MoveToTag, 37 MoveToLastWorkspace, 38 MoveWindowToNextWorkspace, 39 MoveWindowToPreviousWorkspace, 40 MouseMoveWindow, 41 NextLayout, 42 PreviousLayout, 43 SetLayout, 44 RotateTag, 45 IncreaseMainWidth, 46 DecreaseMainWidth, 47 SetMarginMultiplier, 48 // Custom commands 49 UnloadTheme, 50 LoadTheme, 51 } 52