Skip to content

Commit

Permalink
Fully migrate to labwc, remove weston
Browse files Browse the repository at this point in the history
This patch fully migrates Ghaf to labwc, removing Weston compositor
support, improves usability and performance of the labwc environment.

Signed-off-by: Humaid Alqasimi <humaid.alqassimi@tii.ae>
  • Loading branch information
humaidq-tii committed May 7, 2024
1 parent d77f0a8 commit 402eda1
Show file tree
Hide file tree
Showing 40 changed files with 533 additions and 1,784 deletions.
Binary file removed assets/icons/png/app.png
Binary file not shown.
Binary file removed assets/icons/png/appflowy.png
Binary file not shown.
Binary file removed assets/icons/png/browser.png
Binary file not shown.
Binary file removed assets/icons/png/element.png
Binary file not shown.
Binary file removed assets/icons/png/pdf.png
Binary file not shown.
Binary file removed assets/icons/png/settings.png
Binary file not shown.
Binary file removed assets/icons/png/windows.png
Binary file not shown.
27 changes: 0 additions & 27 deletions assets/icons/svg/app.svg

This file was deleted.

29 changes: 0 additions & 29 deletions assets/icons/svg/appflowy.svg

This file was deleted.

11 changes: 0 additions & 11 deletions assets/icons/svg/browser.svg

This file was deleted.

27 changes: 0 additions & 27 deletions assets/icons/svg/pdf.svg

This file was deleted.

9 changes: 0 additions & 9 deletions assets/icons/svg/settings.svg

This file was deleted.

6 changes: 6 additions & 0 deletions assets/icons/svg/wifi.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 0 additions & 6 deletions assets/icons/svg/windows.svg

This file was deleted.

104 changes: 0 additions & 104 deletions lib/icons.nix

This file was deleted.

5 changes: 2 additions & 3 deletions modules/desktop/graphics/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
# SPDX-License-Identifier: Apache-2.0
{
imports = [
./weston.nix
./labwc.nix
./weston.ini.nix
./waybar.config.nix
./labwc.config.nix
./ironbar.config.nix
./demo-apps.nix
./fonts.nix
./window-manager.nix
Expand Down
34 changes: 14 additions & 20 deletions modules/desktop/graphics/demo-apps.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,9 @@
...
}: let
cfg = config.ghaf.graphics.demo-apps;
inherit (import ../../../lib/icons.nix {inherit pkgs lib;}) resizePNG;

/*
Scaled down firefox icon
*/
firefox-icon = resizePNG "firefox" "${pkgs.firefox}/share/icons/hicolor/128x128/apps/firefox.png" "24x24";

/*
Generate launchers to be used in weston.ini
Generate launchers to be used in the application drawer
Type: mkProgramOption :: string -> bool -> option
Expand All @@ -28,7 +22,7 @@
description = "Include package ${name} to menu and system environment";
};
in {
options.ghaf.graphics.demo-apps = with lib; {
options.ghaf.graphics.demo-apps = {
chromium = mkProgramOption "Chromium browser" false;
firefox = mkProgramOption "Firefox browser" config.ghaf.graphics.enableDemoApplications;
gala-app = mkProgramOption "Gala App" false;
Expand All @@ -40,34 +34,34 @@ in {
config = lib.mkIf config.ghaf.profiles.graphics.enable {
ghaf.graphics.launchers =
lib.optional cfg.chromium {
name = "chromium";
name = "Chromium";
path = "${pkgs.chromium}/bin/chromium --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.chromium}/share/icons/hicolor/24x24/apps/chromium.png";
icon = "${pkgs.icon-pack}/chromium.svg";
}
++ lib.optional cfg.firefox {
name = "firefox";
name = "Firefox";
path = "${pkgs.firefox}/bin/firefox";
icon = "${firefox-icon}";
icon = "${pkgs.icon-pack}/firefox.svg";
}
++ lib.optional cfg.element-desktop {
name = "element";
name = "Element";
path = "${pkgs.element-desktop}/bin/element-desktop --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.element-desktop}/share/icons/hicolor/24x24/apps/element.png";
icon = "${pkgs.icon-pack}/element-desktop.svg";
}
++ lib.optional cfg.gala-app {
name = "gala";
name = "GALA";
path = "${pkgs.gala-app}/bin/gala --enable-features=UseOzonePlatform --ozone-platform=wayland";
icon = "${pkgs.gala-app}/gala/resources/icon-24x24.png";
icon = "${pkgs.icon-pack}/distributor-logo-android.svg";
}
++ lib.optional cfg.zathura {
name = "zathura";
name = "PDF Viewer";
path = "${pkgs.zathura}/bin/zathura";
icon = "${pkgs.zathura}/share/icons/hicolor/32x32/apps/org.pwmt.zathura.png";
icon = "${pkgs.icon-pack}/document-viewer.svg";
}
++ lib.optional (cfg.appflowy && pkgs.stdenv.isx86_64) {
name = "appflowy";
name = "AppFlowy";
path = "${pkgs.appflowy}/bin/appflowy";
icon = ../../../assets/icons/svg/appflowy.svg;
icon = "${pkgs.appflowy}/opt/data/flutter_assets/assets/images/flowy_logo.svg";
};
environment.systemPackages =
lib.optional cfg.chromium pkgs.chromium
Expand Down
5 changes: 3 additions & 2 deletions modules/desktop/graphics/fonts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
config,
...
}: let
inherit (config.ghaf.graphics) weston labwc;
inherit (config.ghaf.graphics) labwc;
in {
config = lib.mkIf (weston.enable || labwc.enable) {
config = lib.mkIf labwc.enable {
fonts.enableDefaultPackages = true;
fonts.packages = with pkgs; [
inter
fira-code-nerdfont
Expand Down
Loading

0 comments on commit 402eda1

Please sign in to comment.