c44c742c64
- Install the themes - Allow to load themes from /usr/share/zellij/themes/ * Added zellij-fix-theme-dir.patch OBS-URL: https://build.opensuse.org/request/show/1071167 OBS-URL: https://build.opensuse.org/package/show/utilities/zellij?expand=0&rev=58
25 lines
860 B
Diff
25 lines
860 B
Diff
Index: zellij-0.35.1/zellij-utils/src/setup.rs
|
|
===================================================================
|
|
--- zellij-0.35.1.orig/zellij-utils/src/setup.rs 2023-03-13 07:49:12.945032655 +0100
|
|
+++ zellij-0.35.1/zellij-utils/src/setup.rs 2023-03-13 15:15:59.796892796 +0100
|
|
@@ -85,8 +85,18 @@ pub fn get_layout_dir(config_dir: Option
|
|
}
|
|
|
|
pub fn get_theme_dir(config_dir: Option<PathBuf>) -> Option<PathBuf> {
|
|
- config_dir.map(|dir| dir.join("themes"))
|
|
+ const THEME_DIR: &str = "themes";
|
|
+
|
|
+ [
|
|
+ config_dir,
|
|
+ Some(get_default_data_dir())
|
|
+ ]
|
|
+ .into_iter()
|
|
+ .filter(|p| p.is_some())
|
|
+ .find(|dir| dir.clone().unwrap().join(THEME_DIR).exists())
|
|
+ .map(|dir| dir.clone().unwrap().join(THEME_DIR))
|
|
}
|
|
+
|
|
pub fn dump_asset(asset: &[u8]) -> std::io::Result<()> {
|
|
std::io::stdout().write_all(asset)?;
|
|
Ok(())
|