diff --git a/docs/modules/Launcher.md b/docs/modules/Launcher.md
index 7f8e500f..14040d29 100644
--- a/docs/modules/Launcher.md
+++ b/docs/modules/Launcher.md
@@ -18,7 +18,7 @@ Optionally displays a launchable set of favourites.
| `show_names` | `boolean` | `false` | Whether to show app names on the button label. Names will still show on tooltips when set to false. |
| `show_icons` | `boolean` | `true` | Whether to show app icons on the button. |
| `icon_size` | `integer` | `32` | Size to render icon at (image icons only). |
-
+| `reversed` | `boolean` | `false` | Whether to reverse the order of favorites/items |
JSON
@@ -32,7 +32,8 @@ Optionally displays a launchable set of favourites.
"discord"
],
"show_names": false,
- "show_icons": true
+ "show_icons": true,
+ "reversed": false
}
]
}
@@ -51,6 +52,7 @@ type = "launcher"
favorites = ["firefox", "discord"]
show_names = false
show_icons = true
+reversed = false
```
@@ -66,6 +68,7 @@ start:
- discord
show_names: false
show_icons: true
+ reversed: false
```
@@ -81,7 +84,7 @@ start:
favorites = [ "firefox" "discord" ]
show_names = false
show_icons = true
-
+ reversed = false
}
]
}
diff --git a/src/modules/launcher/mod.rs b/src/modules/launcher/mod.rs
index 2d315575..03599b18 100644
--- a/src/modules/launcher/mod.rs
+++ b/src/modules/launcher/mod.rs
@@ -33,6 +33,9 @@ pub struct LauncherModule {
#[serde(default = "default_icon_size")]
icon_size: i32,
+ #[serde(default = "crate::config::default_false")]
+ reversed: bool,
+
#[serde(flatten)]
pub common: Option,
}
@@ -338,7 +341,12 @@ impl Module for LauncherModule {
&controller_tx,
);
- container.add(&button.button);
+ if self.reversed {
+ container.pack_end(&button.button, false, false, 0);
+ } else {
+ container.add(&button.button);
+ }
+
buttons.insert(item.app_id, button);
}
}